Measuring maximum height of an object
2 views (last 30 days)
Show older comments
Hello!
I am new to the Matlab, especially to a Image Processing Toolbox, so I was wandering maybe somebody could give a hand on one question. I am assigned for the project to calculate the shoe size from a given picture, so far I have written the code to threshold the picture and find boundaries. The part where I am stuck is to calculate the maximum height and width of the feet, as long as the problem remains because there are two objects on the photo - the feet itself and a white square to compare true size. There is the part of the code that I have:
I = imread('feet.jpg');
fn = imnoise (I, 'gaussian', 0, 0.05);
%imshow (fn);
%figure, imhist(fn);
Tn = graythresh (fn);
gn = im2bw(fn, Tn);
%figure, imshow(gn);
%Smooth the image and repeat
w = fspecial ('average', 5);
fa = imfilter (fn, w, 'replicate');
%figure, imshow(fa);
%figure, imhist(fa);
Ta = graythresh (fa);
ga = im2bw(fa, Ta);
%figure, imshow(ga);
[L, num] = bwlabel (ga, 4);
g = bwperim(ga, 4);
figure, imshow(g)
Could anyone help out with the methods to use furthermore?
Thanks in advance,
Jekaterina
1 Comment
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!