Measuring maximum height of an object
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
agung pratama
on 22 Jul 2020
I have same problem like this and still can't neasure the height
Answers (0)
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!