How to use estimateFlow between two images that are not video frames
Mostra commenti meno recenti
I am interested in computing optical flow between images that are not part of a video sequence using the built-in MATLAB function estimateFlow. That is, I would like to compute optical flow between two images in my workspace, Img1 and Img2. How can I do this?
Currently, I am combining the images into an array and running a for loop to obtain the optical flow:
ImgStack(:,:,1) = Img1; % combine the images to a sequence
ImgStack(:,:,2) = Img2;
reset(opticFlow); % clear previous optical flow
opticFlow = opticalFlowLKDoG; % At this point, I don't realy care what method is used
for t = 1:2
flow = estimateFlow(opticFlow,ImgStack(:,:,t));
end
This procedure is inelegant and quite cumbersome. I am doing this on a large number of images and I would like a more efficient way to do this. It would be nice if I could just do something like flow = estimateFlow(opticFlow,[Img1,Img2]).
Dose anyone know how to do this?
2 Commenti
Image Analyst
il 7 Ago 2020
What do you have to start with? A bunch of arrays called Img1, Img2, Img3, etc.? Or one array ImgStack?
chris crowley
il 8 Ago 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Track Objects and Estimate Motion in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!