How can i measure an object in a picture

2 views (last 30 days)
Camilla
Camilla on 11 Dec 2012
Hi everyone,
we are writing a programm which is able to measure your foot size. Therefore we take a picture with a camera and want to measure the size with Matlab. We thought about using a grey filter to make the picture black and white so the complete foot is white and the background black. Or we wanted to use green or blue markers to show Matlab where the foot begins and where it ends. Our problem is that we don´t know how to tell Matlab where those points are.
Thanks in advance.
  2 Comments
Walter Roberson
Walter Roberson on 11 Dec 2012
Will the picture be taken from a constant distance and constant angle? Or will there be something of known size in the image, such as a ruler?
Camilla
Camilla on 11 Dec 2012
the camera won´t move but we don´t know how to fix the foot that it doesn´t change the value from picture to picture.
sorryn for the bad english, I´m not a native speaker...

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 11 Dec 2012
Please post an image. I do pretty much the same thing in my image segmentation tutorial BlobsDemo except for coins instead of feet. Feel free to modify it.
  3 Comments
Walter Roberson
Walter Roberson on 12 Dec 2012
You have a camera taking a picture of a piece of glass that is a fixed distance away? Is the camera set for automatically determining the f-stop or is the focus and aperture fixed (possibly allowing the exposure time to vary) ?
If the distance and focus and aperture are fixed, then you could calibrate the system once by putting a ruler on it and taking measurements with that. After you had done that, if you had the image processing toolbox it would be a relatively simple mater of thresholding (to select the dark area), then using regionprops() to determine the major and minor axes lengths, followed by converting the pixel distance you obtained by the scaling factor you had calcualted from the ruler.
Image Analyst
Image Analyst on 12 Dec 2012
The dark sock blends in with the subject's pants. Why not just get a better picture to start with? Why not use a scanner, or a pressure sensor? If this is not a real project where you're allowed to spend time and money on it, but just some class assignment, then just specify that the user wears white socks and throws a black sheet over them (to block out lamps in the ceiling).

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!