If I have two signals(image) $A$ and $B$, how to determine their displacement(shift) by using a specific window size and search length? Figure below show two signals(green and red) with the locally matched displacement(blue, in pixels) using window of size $18$ pixels and search length of $10$ pixels both ways.
How to perform this operation in MATLAB? Can the imabsdiff
function in MATLAB do this?
Partial code:
A=rand(1,300);
B=rand(1,300);
plot(A);
hold on;
plot(B);
plot(imabsdiff(A,B));
Portion of actual data:
A=[8867.57405148489 9402.91911342364 9260.13066495026 9345.56275526595 9066.54029280105 8894.01936371044 8412.68945486749 8919.64865493583 8727.95696825579 9074.89217283470 9608.00631088673 9705.23552482552 9925.36706001762 10527.5169206531 10771.2414339404 10191.8372768611 10521.7823136932 10582.8872241675 10343.1075045963 9769.05178493597];
B=[9158.03544409186 9429.74701058754 9528.06160406599 9236.34072710901 9183.22768932609 8956.44915466926 8429.70083898040 9144.08305356044 9093.35936685047 8833.96896404156 9507.13829962295 9773.79833257334 10153.9486443920 10251.5748622237 10352.4685365480 9949.82669971615 10202.3036826683 10557.1335972593 10497.4113150230 10159.5236764117];
Thanks in advance!
imabsdiff
function. $A$ and $B$ are actually the summation of intensity on x-axis. Which from there I wanted to find the displacement as shown in the blue line. Direct usage ofimabsdiff
will give me the difference in the intensity, obviously. But from there I can't figure it out how to find the displacement in pixel for every pixel. $\endgroup$