필터 지우기
필터 지우기

Get pixel location in UIAxes within app designer

조회 수: 2 (최근 30일)
Kyle
Kyle 2020년 12월 11일
In my app designer, I have a UIAxes to display an image. I also have an On/Off switch by the image. When the switch is On, I could click a pixel in the image to return the pixel coodinates in the codes for further calcualtion. When the switch is Off, click on the image won't return anything.
I'm stuck at connecting the swtich and coodinate picker. I also don't have a reliable solution to return pixel coodinates. Currently I'm following the example here,
roiPOC = drawpoint(app.UIAxes); %Use Mouse To Select a point ROI
PosPOC=round(get(roiPOC,'Position')); %Extract Coordinates of the point ROI
delete(roiPOC); %Delete the point ROI Marker
drawnow; % Force figure update
but above codes are not stable, sometimes the point won't be deleted. Any thoughts please? I'm using Matlab 2020b.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by