Assume that, I have taken a picture of a catenoid structure with some radius of curvature and now I would like to find the distance between two rings or some random points on the image using edge detection. There is an error when both the image processd length and actual experimental are compared. Any fuctions which can help to find out the distace between some random points on the image.
a = imread('image.jpg');a = im2bw(a);%subplot(221);
imshow(a);% measuring
h = imdistline(gca);api = iptgetapi(h);%
pause();%dist = api.getDistance();u=menu('Choose Measuring unit','Pixels','Centimeters','Meters');if (u==1) fprintf('The distance is : %0.2f Pixels\n',dist)elseif(u==2) dist_cm=dist*0.02645; fprintf('The distance is : %0.2f Cms\n',dist_cm)else dist_m=dist*0.02645/100; fprintf('The distance is : %0.2f m\n',dist_m)end
Best Answer