how to find the distance between two point in a video while playing video?

10 ビュー (過去 30 日間)
saba sabu
saba sabu 2017 年 1 月 30 日
回答済み: Takuji Fukumoto 2017 年 1 月 31 日
hi i have a video that there are two points in it that the distance between them changing in video. so i want to find the displacement of these two points while video is playing and their distances change.How can i do it? thank you for your help.

回答 (1 件)

Takuji Fukumoto
Takuji Fukumoto 2017 年 1 月 31 日
You can get each frame with the following code. And deal with it as an image.
vidobj = vision.VideoFileReader('filename')
viewer = vision.DeployableVideoPlayer;
for N = 1:numframe
I = step(vidobj);
% write image processing algorithm here
Iout = *******
step(viewer, Iout)
end
where, numframe is number of frame.
Computer Vision system toolbox is required.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by