How can I choose data points continuously from Fig during clicking the mouse

조회 수: 1 (최근 30일)
I'm referring application [Image segmenter] to fabrication my own analysis program. In the Graph Cut function, the application can choose the data points of foreground and background continuously during clicking the mouse, but I could only find [ginput] function and [getpts] function, and both can only acquire 1 data by 1 click. Is any way to do the clicking as same as the application?

채택된 답변

Sammit Jain
Sammit Jain 2018년 6월 28일
편집: Sammit Jain 2018년 6월 28일
Hi, I think what you want to do can be achieved using the impixel function.
Once you have an image being displayed, just call the impixel function and you can continuously select points. Hit Enter once you're done and it gives an array of coordinates. It'll also return the RGB values for those pixels.
Hope this helps.
  댓글 수: 3
Walter Roberson
Walter Roberson 2018년 6월 29일
ginput() will accept a number as input, and will collect that many points before returning them all.
You should also consider the roi functions such as impoint() and imfreehand()
W Chen
W Chen 2018년 7월 1일
Thank you for the information.
I found that imfreehand() is appropriate for my objective.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Build Interactive Tools에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by