views:

129

answers:

4

Heyguys.. This isn't exactly a programming question exactly. I just want to know what your approach would be to a common problem in Digital image processing.

Lets say you have an image of a a few trees in say jpg format. How would you go about finding the heights of each of these trees. The photo is the only input you have.

I want to know the approaches you have not code. So it doesnt matter if your answers are vague, or non DIP-ish.

Small correction : The height need not be the actual height of the tree. The height can be taken to any scale. But should be consistant to all objects in the pic.

A: 

Assuming they're all the same distance away, all to scale, you'd want to find a single unit of measurement you can guarantee. For example, if there's a person in the photo, again, same scale, and you know they're exactly 6 feet tall, you use that as your measure. You then take that, and count how many stacked make the tree. For example, if you need 3.5 of this person, then:

3.5 * 6 = 21

gives you a 21 foot tall tree.

Without a single point of reference for everything, or if they're all on different scales, you would need a lot more information than you could easily get without having been there.

Slokun
A: 

I would rely on an object of known dimensions to be present in the picture. For instance, a man.

Or perhaps, we could use the EXIF data to reverse engineer the size of the object based on the camera's sensor dimensions, the lens and the focal length used. This again depends on the angle. We should be getting most accurate results when the camera has been held perpendicular to the subject.

Adarsh R
A man is not of known dimensions. Unless you know he's standing and his standing height.
mmr
sounds good. But how would you isolate each object? the object from the background etc.
Ram Bhat
+1  A: 

Yes it is possible. What you are describing has an entire industry around it, called Photogrammetry

Neil N
interesting. thanks for that!
Ram Bhat
A: 

There is a fair amount of computer vision research in this area. Assuming you don't know the camera constraints, you'll have to make assumptions about the scene and camera to determine the heights up to a scale factor. Note that without camera constraints or a reference height in the image it is impossible to tell the difference between a tall tree photographed from a distance or a short tree photographed up close. A great start is the Single View Metrology work by Criminisi.

jeff7
thanks for that. But see i'm not looking for exact height or anything. I just want relative heights of objects. Taken relative to anything0you wish. How do i measure it in a pic?
Ram Bhat
Did you look at the document I referenced? It has that exact application.
jeff7