필터 지우기
필터 지우기

Show image with dialog box for user input

조회 수: 13 (최근 30일)
Abhilash Sukumari
Abhilash Sukumari 2021년 10월 19일
댓글: Walter Roberson 2021년 10월 28일
I would like to show an image and user to use datatips and export the datatips and then run the subsequent code based on the exported datatips.
How to control the user input during this step and then proceed. Right now, I have a dialog box "Select two datatips" and imshow() but the code proceeds to run immediately after the imshow() command.

답변 (1개)

Srijith Kasaragod
Srijith Kasaragod 2021년 10월 28일
Hi Abhilash,
Once you display the image to user, you can use 'datacursormode' function to create a data cursor manager object for the current figure. Calling 'getCursorInfo' on this object returns a structure with one of the fields as the position of the selected datatip point on the image.
Refer this question and answers. It might help you in implementing the required code.
Regards.

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by