Extract point from a video

조회 수: 7 (최근 30일)
Boris Huljak
Boris Huljak 2017년 5월 1일
댓글: Imran 2020년 5월 16일
Hello. I would like to follow a point on a video by cliking on it, and getting the coordinate as an output (like getpts would do for a picture.) . Do you have any idea on how I can do that with a video, where each next click would send me to a different frame ? Thank you !

답변 (2개)

hmi amid
hmi amid 2017년 5월 1일
I think you should use ginput for this. Use imshow for each frame.
uiopen('video.mp4',1)
for frame=1:size(video,4)
imshow(video(:,:,:,frame))
drawnow
[x(frame),y(frame)]=ginput(1);
end
Amid.
  댓글 수: 2
Imran
Imran 2020년 5월 16일
In this case, Each frame appears for clicking but frame gets rectangular box once all frames end, that rectangular box appears on just last frame. Can i show all frames with rectangular box once area of box is clicked?
Imran
Imran 2020년 5월 16일
As i used 4 ginput(1) four 4 positions. Last frame is working well with showing rectangular box but not from start. Rectangular box appears just on last frame.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2017년 5월 1일
See my attached video tracking solution, where I track the tip of a green colored Sharpie marker.

카테고리

Help CenterFile Exchange에서 Display Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by