Question regarding opticalFlowRAFT function
6 views (last 30 days)
Show older comments
I am trying to use the opticalFlowRAFT function which is newly added to the 2024b version of MATLAB. However, there is very limited information regarding this function on the website. Can someone help me understand the input and output arguments of this function?
Thank you
0 Comments
Answers (1)
Gayathri
on 1 Oct 2024
Edited: Gayathri
on 1 Oct 2024
I understand that you want to know more about the “opticalFlowRAFT” function. To start with, we will be creating a RAFT optical flow object using the below code.
flowModel = opticalFlowRAFT;
Then we use the “estimateFlow” function to estimate the optical flow. The input to this function would be the current frame along with the RAFT optical flow object “flowModel”.
flow = estimateFlow(flowModel,frame);
This object would most probably be storing the previous frame and the previous optical flow output to generate the optical flow of the current frame. Explicitly, we need to provide the “flowModel” object and current frame as input. But the function would be considering the previous frame and previous outputs for generating the output.
The output variable “flow” has four properties "velocity" in "x" and "y" direction, "orientation" (in radians) and "magnitude". The same is shown below for your reference.
For more information, about these outputs you can refer the following link.
For deeper understanding about “opticalFLOWRAFT” and “estimateFlow” functions please refer to the example mentioned in the following link.
Hope you find this information helpful.
See Also
Categories
Find more on Optics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!