Changeset 1201 for trunk/src/civ.m


Ignore:
Timestamp:
Mar 23, 2026, 4:49:29 PM (3 hours ago)
Author:
sommeria
Message:

various improvements...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r1199 r1201  
    129129SearchRange_2=par_civ.SearchRange(2);
    130130if par_civ.CorrSmooth~=0 % par_civ.CorrSmooth=0 implies no civ computation (just input image and grid points given)
    131     parfor ivec=1:nbvec
    132 %         iref=round(par_civ.Grid(ivec,1));% xindex on the image A for the middle of the correlation box
    133 %         jref=round(npy_ima-par_civ.Grid(ivec,2));%  j index  for the middle of the correlation box in the image A
     131    for ivec=1:nbvec
    134132         iref=xtable(ivec);% xindex on the image A for the middle of the correlation box
    135133         jref=ytable(ivec);%  j index  for the middle of the correlation box in the image A
     
    230228                        utable(ivec)=vector(1)*mesh+shiftx(ivec);
    231229                        vtable(ivec)=-vector(2)*mesh+shifty(ivec);% vtable and shifty in image coordinates (opposite to pixel shift)
    232                       %  xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2)
    233                        % ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge)
    234 %                         iref=round(xtable(ivec)+0.5);% nearest image index for the middle of the vector
    235 %                         jref=round(ytable(ivec)+0.5);
    236                         % eliminate vectors located in the mask
    237 %                         if  checkmask && (iref<1 || jref<1 ||iref>npx_ima || jref>npy_ima ||( par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100))
    238 %                             utable(ivec)=0;
    239 %                             vtable(ivec)=0;
    240 %                             FF(ivec)=1;
    241 %                         end
    242230                        ctable(ivec)=corrmax/sum_square;% correlation value
    243231                    catch ME
     
    354342    [X,Y]=meshgrid(x_vec,y_vec);
    355343    coord=[reshape(X,[],1) reshape(Y,[],1)];
    356     result_conv=reshape(result_conv(y_ind,x_ind),[],1);
    357    
    358    
     344    result_conv=reshape(result_conv(y_ind,x_ind),[],1);       
    359345    % n=numel(X);
    360346    % x=[X Y];
Note: See TracChangeset for help on using the changeset viewer.