how to detect and measure foot length and width in image ?

I have to detect the foot in image and have to measure the width an height of foot in image.

Currently I am using crop to measure length and width of foot image using rectangle. I want same rectangle should automatically set on foot image.

In above image circle is already now I how to draw a Rectangle over around the foot to measure length and width of foot.

edit retag close merge delete

1

some image samples would help I think

( 2016-02-22 07:15:17 -0500 )edit

also, due to pinhole model, from a single camera, you will only be able to get exact dimensions, if you either know the distance, or have some reference-scale object in your image

( 2016-02-22 08:26:31 -0500 )edit

@berak yes I am using coin as a reference scale object. But how I can detect and measure rectangle of specific foot.

( 2016-02-23 00:19:20 -0500 )edit

@theodore Image would be like put the foot on the surface with one coin(specificied) as a refence and Image of foot. Now I want opencv create a rectangle on foot and give me length and width. Though I'll soon update a Image here.

( 2016-02-23 00:22:25 -0500 )edit

( 2016-03-01 23:59:30 -0500 )edit

Plane are not parallel (foot and camera plane) so it would be difficult with only one coin. With two coin I think it's possible to estimate foot length

( 2016-03-02 02:50:27 -0500 )edit

@LBerger Lets Assume if foot and camera plane are parallel, then how we can measure height and width of foot.

( 2016-03-02 05:25:56 -0500 )edit

Of course you cannot find height and width. But your coin give you a length estimation small image region. You can say that 's this value is true everywhere (order 0). If you 've got focal length you can interpolate this value everywhere.

Agian this method is not calibrattion process but can give you some good estimation...

( 2016-03-02 07:57:30 -0500 )edit

Sort by ยป oldest newest most voted

I am assuming you mean length of rectangle when you say height.

I think the best way to detect foot is by edge detection. You should try some morphological operations and then you can use some edge detection techniques (canny, sobel operator, gradient etc). If all the images are gonna be like the one you posted then the strongest edge or the biggest component(if you apply some global thresholding) will be your leg. I think to remove some false positives you can do some texture analysis (texture of the foot and background are totally different), histogram analysis (to get the color difference) and generate a classifier. After your component has been classified you can get the rectangle surrounding the foot easily. Just find the min x, min y, max x, max y values. So your height will be (max y - min y) and width will be (max x - min x) or just use the inbuilt function of opencv.

If you want the actual height of the leg then you will have to c alculate the disparity and depth map of the image.

more