How to use ButtonDownFcn in timer
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!