Notes to myself #81
Shrediquette
started this conversation in
Ideas
Replies: 1 comment
-
Ask Matlab answers if there is a way to speed up cross corr when only a row of 32 px has changed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe a measure for PIV uncertainty?
When interrogation area is shifted minimally (1px) 9 times in all directions... After crosscorr: Calculate stdev of displacement magnitude. When the int area is "suitable" for capturing the displacements, then such a small shift shouldn't change the result, and stdev should be low. But if stdev is high, then the result is not reliable and dominated by low s2n...
Problem: takes 9 times longer to calculate...
in fftmulti:
miniy=miniy+shiftybiftyy;
minix=minix+shiftybiftyx;
maxix=maxix+shiftybiftyx;
maxiy=maxiy+shiftybiftyy;
clear all
clc
close all
%mask=1-uint16(imread('C:\Users\thiel\Desktop\PIV_discussion\mask.tif'))/255;
image1=imread('C:\Users\thiel\Documents\MATLAB\PIVlab-main\Examples\PIVlab_Karman_01.bmp');%.*mask;
image2=imread('C:\Users\thiel\Documents\MATLAB\PIVlab-main\Examples\PIVlab_Karman_02.bmp');%.*mask;
%image2=imread('C:\Users\thiel\Desktop\PIV_discussion\1B.tif');%.*mask;
interrogationarea=64;
step=32;
subpixfinder=1;
mask_inpt=[];
roi_inpt=[];
passes=2;
int2=64;
int3=0;
int4=0;
imdeform='*spline';
repeat=0;
mask_auto=0;
do_pad=1;
do_correlation_matrices=0;
repeat_last_pass=0;
delta_diff_min=0;
shiftybiftyx=0;
shiftybiftyy=0;
utable=[];
vtable=[];
cntr=0;
for shiftybiftyx=-1:1
for shiftybiftyy=-1:1
cntr=cntr+1
[xtable, ytable, utable(:,:,cntr), vtable(:,:,cntr), typevector, correlation_map,correlation_matrices] = piv_FFTmulti (image1,image2,interrogationarea, step, subpixfinder, mask_inpt, roi_inpt,passes,int2,int3,int4,imdeform,repeat,mask_auto,do_pad,do_correlation_matrices,repeat_last_pass,delta_diff_min,shiftybiftyx,shiftybiftyy);
end
magn=(utable.^2+vtable.^2).^0.5;
stdevi=std(magn,0,3,'omitnan');
figure;imagesc(stdevi);axis image
Beta Was this translation helpful? Give feedback.
All reactions