MATLAB: In the code below can we make freehand drawing of the line instead of straight line

Image Processing Toolboximdistline

if true figure, imshow(I); h = imdistline(gca); api = iptgetapi(h); width = api.getDistance(); end

Best Answer

See my attached demos of imfreehand().
Related Question