Borrar filtros
Borrar filtros

Getting mouse points with App Designer

2 visualizaciones (últimos 30 días)
qiana curcuru
qiana curcuru el 22 de Feb. de 2018
Editada: Reza Mohammadi el 6 de En. de 2019
I realize that App designer does not support interactive figure manipulation, but I am wondering if I can find a workaround by opening a separate figure window (not a UI window) with my graphic displayed on it so that I can still get the location of my mouse clicks. Currently the code below displays the figure on my GUI, and then opens another blank figure that records my mouse clicks. This is fine, but I need to also display the figure in the new window as well, and am having trouble doing so.
first frame = vid(:,:,:,1);
imshow(firstframe,'Parent',app.UIAxes);
[centers_X centers_Y]=getpts;

Respuestas (1)

Reza Mohammadi
Reza Mohammadi el 6 de En. de 2019
Editada: Reza Mohammadi el 6 de En. de 2019
Hello
You can edit your code as follow:
myImage = imread('your image');
fig = figure
imshow(myImage)
[x y] = getpts(fig)
This code work in app designer without the using uifigure.

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by