Getting mouse points with App Designer
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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;
0 comentarios
Respuestas (1)
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.
0 comentarios
Ver también
Categorías
Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!