MATLAB: How to hide the label on imdistline

Image Processing Toolboximdistline

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;

Best Answer

You can use imline() instead. See attached demo.
Related Question