How do I hide the label on imdistline?

1 Ansicht (letzte 30 Tage)
Andrew Vallejos
Andrew Vallejos am 14 Nov. 2017
Beantwortet: Image Analyst am 15 Nov. 2017
I am trying to hide the pixel lable on the imdistline tool. Below is my code. Thanks!
distLineHandle = imdistline(handles.imageAxes);
api = iptgetapi(distLineHandle);
api.setLabelVisible(false);
pause();
d = api.getDistance;
  1 Kommentar
Rik
Rik am 15 Nov. 2017
If I run this code, it hides the label for me on R2017a and R2012a. So I don't know what your issue is, but it is not reproducible for me on Windows.
figure(1),clf(1)
load penny
imshow(P,[])
handles.imageAxes=gca;
distLineHandle = imdistline(handles.imageAxes);
api = iptgetapi(distLineHandle);
api.setLabelVisible(false);
pause();
d = api.getDistance;

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 15 Nov. 2017
You can use imline() instead. See attached demo.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by