![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1782090/image.png)
Question regarding opticalFlowRAFT function
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Gayathri
il 1 Ott 2024
Modificato: Gayathri
il 1 Ott 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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1782090/image.png)
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.
Vedere anche
Categorie
Scopri di più su Optics in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!