필터 지우기
필터 지우기

Getting mouse points with App Designer

조회 수: 2 (최근 30일)
qiana curcuru
qiana curcuru 2018년 2월 22일
편집: Reza Mohammadi 2019년 1월 6일
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;

답변 (1개)

Reza Mohammadi
Reza Mohammadi 2019년 1월 6일
편집: Reza Mohammadi 2019년 1월 6일
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.

카테고리

Help CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by