How to use ButtonDownFcn in timer

1 次查看(过去 30 天)
Jeremy Grata
Jeremy Grata 2016-8-2
If an axis is used in a GUI for the display of an image (which becomes a child of the axis) and the buttondownfcn for the image (the child) is set to a function within the GUI, AND the image is updated rapidly using a timer function inside the GUI, how can the buttondownfcn be called without pausing the timer?
In the attached example, the push button starts or pauses the update of the image. The image is displayed on two different axes, one of which has additional features plotted on top of the image. Clicking the axis containing the image with the addition features displays the x and y positions of the mouse during the button click. However, the buttondownfcn does not register unless the updating is paused.
The goal is to have a GUI with an image displayed (ideally from a camera and not just a random number image) that can be clicked, and have additional processing occur based on the pixel location of a button click on the image. An additional goal is to have the same processing occur simply by mousing over a region of the image (ie, execute processing based on the pixel location of a mouse pointer located over an image without clicking the mouse button)

回答(0 个)

类别

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