-
Notifications
You must be signed in to change notification settings - Fork 0
/
ManualTips.m
33 lines (24 loc) · 881 Bytes
/
ManualTips.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
clear all;
clear all;
imFolder = 'C:\Users\linder\Documents\Data\PanNeuronal Behav\20150611\Worm8\Raw Images';
images=dir([imFolder filesep '*.jpeg']);
numframes = length(images);
%load('C:\Users\linder\Documents\Data\PanNeuronal Behav\20150420\20150420_tips.mat');
% load('C:\Users\linder\Documents\Data\PanNeuronal Behav\20141212\PNworm3\20141212pn3tips.mat')
% % % %
% % % %
%startframe = length(tip2(:,2));
%startframe = length(tip2(:,1));
startframe = 1;
framesclicked = 1:5:numframes;
for iFrame = startframe:length(framesclicked)
I = im2double(imread(images(framesclicked(iFrame)).name));
% I = I-background;
figure(1); imshow(I)
title(['Frame', num2str(framesclicked(iFrame))]);
[y,x] = getpts;
close
tip1(iFrame,:) = [x(1) y(1)];
tip2(iFrame,:) = [x(2) y(2)];
save('20150420_tips.mat', 'tip1', 'tip2');
end