How can i measure an object in a picture

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 Commenti

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?
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...

Accedi per commentare.

Risposte (1)

Image Analyst
Image Analyst il 11 Dic 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 Commenti

Thats the image. http://tinyurl.com/by5t4rg We want to know how long the foot is but we don´t know how to tell matlab where to start and where to end. We thought about using green markers to clarify the start and the end of the foot. But the problem is that we don´t know how to get the coordinates of the green points. Plus we don´t have the image processing toolbox.
I hope you understand the problem. Thanks in advance.
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.
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).

Accedi per commentare.

Richiesto:

il 11 Dic 2012

Community Treasure Hunt

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

Start Hunting!

Translated by