Ignore:
Timestamp:
Jun 15, 2015, 10:45:43 PM (9 years ago)
Author:
sommeria
Message:

bug repaired in civ_series (mask problem) and clarification of output for OAR in series

File:
1 edited

Legend:

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

    r910 r911  
    10931093                        xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2)
    10941094                        ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge)
    1095                         iref=round(xtable(ivec));% nearest image index for the middle of the vector
    1096                         jref=round(ytable(ivec));
     1095                        iref=round(xtable(ivec)+0.5);% nearest image index for the middle of the vector
     1096                        jref=round(ytable(ivec)+0.5);
    10971097                        % eliminate vectors located in the mask
    1098                         if checkmask && par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100
     1098                        if  checkmask && (iref<1 || jref<1 ||iref>npx_ima || jref>npy_ima ||( par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100))
    10991099                            utable(ivec)=0;
    11001100                            vtable(ivec)=0;
     
    11291129F=0;
    11301130[npy,npx]=size(result_conv);
    1131 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log)
     1131result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1  (=0 by discretisation, to avoid divergence in the log)
    11321132%the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ᅵ Israel Institute of Technology
    11331133%http://urapiv.wordpress.com
    11341134peaky = y;
    1135 if y <= npy-1 && y > 1
     1135if y < npy && y > 1
    11361136    f0 = log(result_conv(y,x));
    11371137    f1 = log(result_conv(y-1,x));
     
    11421142end
    11431143peakx=x;
    1144 if x <= npx-1 && x > 1
     1144if x < npx-1 && x > 1
    11451145    f0 = log(result_conv(y,x));
    11461146    f1 = log(result_conv(y,x-1));
     
    11621162result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log)
    11631163[npy,npx]=size(result_conv);
    1164 if (x <= npx-1) && (y <= npy-1) && (x >= 1) && (y >= 1)
     1164if (x < npx) && (y < npy) && (x > 1) && (y > 1)
    11651165    F=0;
    11661166    for i=-1:1
Note: See TracChangeset for help on using the changeset viewer.