How can I choose data points continuously from Fig during clicking the mouse
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
W Chen
am 28 Jun. 2018
Kommentiert: W Chen
am 1 Jul. 2018
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?
0 Kommentare
Akzeptierte Antwort
Sammit Jain
am 28 Jun. 2018
Bearbeitet: Sammit Jain
am 28 Jun. 2018
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 Kommentare
Walter Roberson
am 29 Jun. 2018
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()
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!