Changeset 273 for trunk/src/pivlab.m
- Timestamp:
- Nov 17, 2011, 7:01:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/pivlab.m
r248 r273 62 62 end 63 63 64 %% calculate correlations: MAINLOOP 64 %% calculate correlations: MAINLOOP on velocity vectors 65 65 corrmax=0; 66 66 sum_square=1;% default 67 for ivec=1:nbvec 67 for ivec=1:nbvec 68 68 iref=GridIndices(ivec,1); 69 69 jref=GridIndices(ivec,2); … … 82 82 end 83 83 end 84 if ~test0 85 image1_crop=image1(jref-iby2:jref+iby2,iref-ibx2:iref+ibx2); 86 image2_crop=image2(jref+shifty-isy2:jref+shifty+isy2,iref+shiftx-isx2:iref+shiftx+isx2); 87 image1_crop=image1_crop-mean(mean(image1_crop)); 84 if ~test0 85 image1_crop=image1(jref-iby2:jref+iby2,iref-ibx2:iref+ibx2);%extract a subimage (correlation box) from images 1 86 image2_crop=image2(jref+shifty-isy2:jref+shifty+isy2,iref+shiftx-isx2:iref+shiftx+isx2);%extract a larger subimage (search box) from image 2 87 image1_crop=image1_crop-mean(mean(image1_crop));%substract the mean 88 88 image2_crop=image2_crop-mean(mean(image2_crop)); 89 89 %reference: Oliver Pust, PIV: Direct Cross-Correlation
Note: See TracChangeset
for help on using the changeset viewer.