- Timestamp:
- Jul 30, 2014, 8:38:17 PM (10 years ago)
- Location:
- trunk/src/series
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/float_tracking.m
r784 r804 78 78 end 79 79 % parameters specific to the function 'particle_tracking' 80 % Par.Nblock=[];%size of image subblocks for background determination, =[]: no sublock81 % Par.ThreshLum=-2000;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles82 %ParamOut.ActionInput=Par;80 Par.Nblock=10;%size of image subblocks for background determination, =[]: no sublock 81 Par.ThreshLum=210;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles 82 ParamOut.ActionInput=Par; 83 83 return 84 84 end … … 92 92 checkrun=0; 93 93 end 94 hseries=findobj(allchild(0),'Tag','series'); 95 RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series 96 WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series 94 97 95 98 %% define the directory for result file … … 138 141 %filter for particle center of mass(luminosity) 139 142 %Nblock=Param.ActionInput.Nblock; 140 %ThreshLum=Param.ActionInput.ThreshLum;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles141 AbsThreshold=30; %threshold below which a pixel is considered belonging to a float143 ThreshLum=Param.ActionInput.ThreshLum;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles 144 %AbsThreshold=30; %threshold below which a pixel is considered belonging to a float 142 145 SizePart=4; 143 146 % … … 164 167 for ifile=1:nbfield 165 168 if checkrun 166 if strcmp(get(Param.RUNHandle,'BusyAction'),'queue')167 update_waitbar(Param.WaitbarHandle,ifile/nbfield)168 else169 break% leave the loop if the STOP button is activated on the GUI series169 update_waitbar(WaitbarHandle,ifile/nbfield) 170 if ~isempty(RUNHandle) &&ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 171 disp('program stopped by user') 172 return 170 173 end 171 174 end … … 186 189 Mask(:,end-SizePart:end)=0; 187 190 if ifile ==1 188 [Js,Is]=find(A<AbsThreshold & Mask==1);%indices (I,J) of dark pixels 191 if ThreshLum>0 %brigth particles 192 [Js,Is]=find(A>ThreshLum & Mask==1);%indices (I,J) of dark pixels 193 else %black particle 194 [Js,Is]=find(A<ThreshLum & Mask==1);%indices (I,J) of dark pixels 195 end 189 196 else 190 197 Is=round(Xtime(ifile-1,:)); -
trunk/src/series/particle_tracking.m
r784 r804 78 78 end 79 79 % parameters specific to the function 'particle_tracking' 80 % Par.Nblock=[];%size of image subblocks for background determination, =[]: no sublock81 % Par.ThreshLum=-2000;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles82 %ParamOut.ActionInput=Par;80 Par.Nblock=10;%size of image subblocks for background determination, =[]: no sublock 81 Par.ThreshLum=70;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles 82 ParamOut.ActionInput=Par; 83 83 return 84 84 end … … 92 92 checkrun=0; 93 93 end 94 hseries=findobj(allchild(0),'Tag','series'); 95 RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series 96 WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series 94 97 95 98 %% define the directory for result file … … 137 140 %%%%%%%%%%%% SPECIFIC PART (to edit) %%%%%%%%%%%% 138 141 %filter for particle center of mass(luminosity) 139 %Nblock=Param.ActionInput.Nblock;140 %ThreshLum=Param.ActionInput.ThreshLum;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles141 AbsThreshold=30; %threshold below which a pixel is considered belonging to a float142 Nblock=Param.ActionInput.Nblock; 143 ThreshLum=Param.ActionInput.ThreshLum;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles 144 %AbsThreshold=30; %threshold below which a pixel is considered belonging to a float 142 145 % 143 146 hh=ones(5,5); … … 170 173 for ifile=1:nbfield 171 174 if checkrun 172 if strcmp(get(Param.RUNHandle,'BusyAction'),'queue')173 update_waitbar(Param.WaitbarHandle,ifile/nbfield)174 else175 break% leave the loop if the STOP button is activated on the GUI series175 update_waitbar(WaitbarHandle,ifile/nbfield) 176 if ~isempty(RUNHandle) &&ishandle(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 177 disp('program stopped by user') 178 return 176 179 end 177 180 end 181 j1=1; 178 182 if ~isempty(j1_series)&&~isequal(j1_series,{[]}) 179 183 j1=j1_series{1}(ifile);
Note: See TracChangeset
for help on using the changeset viewer.