Changeset 619


Ignore:
Timestamp:
Apr 24, 2013, 7:35:43 PM (12 years ago)
Author:
sommeria
Message:

float_tracking added in series

Location:
trunk/src/series
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/particle_tracking.m

    r618 r619  
    7878    end
    7979    % parameters specific to the function 'particle_tracking'
    80     %Par.Nblock=25;%size of image subblocks for analysis
    81     Par.Nblock=[];%no subblock for background determination
    82     % Numexp=inputdlg('Entrer le numero','numexp',1);
    83     % numexp=str2num(Numexp{1})
    84     % Thresh=inputdlg('Entrer le seuil de luminosite (4000)','thresh',1);
    85     % thresh=str2num(Thresh{1});%threshold for detection of particle luminosity weight
    86     %filter particle detection
    87     Par.ThreshLum=-2000;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles
    88     ParamOut.ActionInput=Par;
     80%     Par.Nblock=[];%size of image subblocks for background determination, =[]: no sublock
     81%     Par.ThreshLum=-2000;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles
     82%   ParamOut.ActionInput=Par;
    8983    return
    9084end
     
    144138%%%%%%%%%%%%   SPECIFIC PART (to edit) %%%%%%%%%%%%
    145139%filter for particle center of mass(luminosity)
    146 Nblock=Param.ActionInput.Nblock;
    147 ThreshLum=Param.ActionInput.ThreshLum;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles
    148 
     140%Nblock=Param.ActionInput.Nblock;
     141%ThreshLum=Param.ActionInput.ThreshLum;% luminosity threshold for particle detection, < 0 for black particles, >0 for white particles
     142AbsThreshold=30; %threshold below which a pixel is considered belonging to a float
     143%
    149144hh=ones(5,5);
    150145hh(1,1)=0;
     
    163158hdY(5,1)=0;
    164159hdY(5,5)=0;
    165 %Parameters for image plotting
    166 pxcm=1;
    167 pycm=1;%scaling
    168 PlotParam.AutoScal=0;
    169 PlotParam.MaxA=700;
    170 PlotParam.MinA=0;
    171 PlotParam.BW=1;
    172 PlotParam.Contours=0;
    173 
    174 %%%%%%%%%%%%%%
    175 % sizfiles=size(num_j1)
    176 % nbfield=sizfiles(1); %number of images in a burst
    177 % %%%%%%%%%
    178 % hRUN=findobj(Series.hseries,'Tag','RUN');
    179 % hwaitbar=findobj(Series.hseries,'Tag','waitbar');%handles of the waitbar
    180 % waitbarpos(1)=Series.WaitbarPos(1);%x position of the waitbar
    181 % waitbarpos(3)=Series.WaitbarPos(3);% width of the waitbar
    182 % filebase=fullfile(Series.RootPath{1},Series.RootFile{1});
    183 % dir_images=Series.RootPath{1};
    184 % nom_type=Series.NomType{1};
    185 % [error,Heading,nom_type_read,ext_ima_read,tt,TimeUnit,mode,NbSlice,npx,npy,Calib]=read_imadoc([filebase '.xml']);
    186160
    187161%%  mask to reduce the  working area (optional)
     
    193167    CheckMask=1;
    194168end
    195 %
    196 % %create dir of the new images
    197 % [dir_images,namebase]=fileparts(filebase);
    198 % [path,subdir_ima]=fileparts(dir_images)
    199 % curdir=pwd;
    200 % cd(path);
    201 % mkdir([subdir_ima '_b']);
    202 % cd(curdir);
    203 % filebase_b=fullfile(path,[subdir_ima '_b'],namebase);
    204 
    205 %
    206 %
    207 % lengthtot=siz(1)*siz(2);
    208 % nbfield=floor(lengthtot/(nbfield2*nbslice_i));%total number of i indexes (adjusted to an integer number of slices)
    209 % nbfield_slice=nbfield*nbfield2;% number of fields per slice
    210 % % test_plot=isequal(answer{5},'Yes'); %=1 to display background images
    211 % if nbaver_ima > nbfield*nbfield2
    212 %     errordlg('number of images in a slice smaller than the proposed number of images for the sliding average')
    213 %     return
    214 
     169
     170%%%%%% MAIN LOOP ON FRAMES %%%%%%
    215171for ifile=1:nbfield
    216172    if checkrun
     
    225181    end
    226182    filename=fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,i1_series{1}(ifile),[],j1);
    227     A=read_image(filename,FileType,VideoObject,frame_index(ifile));
     183    A=read_image(filename,FileType,VideoObject,frame_index(ifile));% read the current frame
    228184    if ndims(A)==3;%color images
    229185        A=sum(double(A),3);% take the sum of color components
Note: See TracChangeset for help on using the changeset viewer.