given two different images, how can I compute and plot the vector field of the displacement between these two images?
I know matlab has a tool called opticalflow that allows me to do something similary of what i'm asking but it looks like it doesnt work for me.
Is there anything that could help me besides the opticalflow?
Perhaps i'm doing something wrong so i'm gonna post an example of what I'm doing:
fixed = rgb2gray(imread('Fixed_2.jpg'));
moving = rgb2gray(imread('Moved_2.jpg'));
fixed= fixed(:, 100:400);
moving= moving(:, 100:400);
[optimizer, metric] = imregconfig('monomodal');
movingRegistered = imregister(moving, fixed, 'rigid', optimizer, metric);
figure
imshow(movingRegistered);
opticFlow = opticalFlowHS;
flow = estimateFlow(opticFlow,fixed);
flow = estimateFlow(opticFlow,movingRegistered);
hold on
plot(flow,'DecimationFactor',[5 5],'ScaleFactor',25)
hold off
Many thanks in advance.