Reading a video in MATLAB and plotting the trajectory of robot in each frame
5 次查看(过去 30 天)
显示 更早的评论
Hello all,
I am working on a path planning task where I am trying to plot the trajectory of a robot arm in the SimMechanics explorer, but unfortunately this feature is not yet available.
I am now trying to find an alternative to this where I have saved the video of the SimMechanics animation as a video and read that video in MATLAB.
Is it possible to draw the trajectory on each frame of that video?
Any other suggestions to trace the trajectory will also be valuable.
Thanks and Regards
0 个评论
回答(1 个)
Abhisek Pradhan
2019-8-9
A possible work around would be to get frames of the video using VideoReader Object and reading the Video.
v = VideoReader('filename');
while hasFrame(v)
video = readFrame(v);
end
whos video
Now from each frame, we can get the position of robot’s arm using Computer Vision Toolbox taking image of robot’s arms as reference image and plot the trajectory of robot in each frame.
The following link shows an example to find the position of an object from a reference object.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!