Plotting points on top of a video using impoint()
3 views (last 30 days)
Show older comments
Hi! How do I place points on top of an image, and keep the points there while changing the image underneath?
A longer description: I have a simple GUI containing a slider, axes, and an “Add Point” button. A video frame is displayed on the axes (using imshow()) and the slider is used to scroll through frames. At any frame the user can click “Add Point” and place a point (created with impoint()) on something of interest in the frame. The user can then click and drag the point somewhere else (a useful feature of impoint()).
This works except, when the user scrolls to a new frame all the points are deleted. I would like the points to remain in the axes, and also for the user to still be able to drag them. How do I do this? I am fairly new to Matlab, any answers or example code would help. Thanks!
0 Comments
Answers (1)
Walter Roberson
on 7 Jul 2012
Only imshow() the very first image. For all of the images after that, set() the CData property of the image handle to contain the new image data.
0 Comments
See Also
Categories
Find more on Display Image 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!