Notices
Results 1 to 5 of 5

Thread: Distance of objects in photos

  1. #1 Distance of objects in photos 
    New Member
    Join Date
    Oct 2009
    Posts
    2
    Are there any known methods for calculating/estimating the distances of objects from the camera in photos?
    More specifically I'm looking for a method that estimates the distance from the camera to the object of every pixel in the image - creating a sort of height/distance map of the photo?
    I'm not looking for a perfect methodology; estimates will do.

    Thanks


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Professor marcusclayman's Avatar
    Join Date
    Mar 2009
    Posts
    1,702
    if you have something else in the photo that you know the size of, then you can triangulate distance

    it would help to draw a grid over some photos, if your using a computer, experiment by taking picutures of things you know the size of and distance in between. Then you can learn how to draw the grid to calculate size and distance based on relative size of things you know in the photo.

    For example if you want to know the distance between two trees. Grab a stick and lay it on the ground pointing from one tree to the other, take the picture of the trees and include the stick. Then bring the stick with you, measure it, and do some math. You should be able to get roughly close to the actuall distance between the trees.


    If you don't know the size of anything in the picture, you can only guess distance.


    Dick, be Frank.

    Ambiguity Kills.
    Reply With Quote  
     

  4. #3  
    New Member
    Join Date
    Oct 2009
    Posts
    2
    The problem with your suggestion is that it requires object recognition. I'm looking for an automatic process that creates a depth map of the whole photo rather than specific objects. So while I can myself distinguish that this object in my photo is a tree, my computer cannot without some very clever programming.
    Reply With Quote  
     

  5. #4  
    Forum Professor marcusclayman's Avatar
    Join Date
    Mar 2009
    Posts
    1,702
    I believe what you are trying to do is impossible. Maybe not though.

    As far as I know, you need a reference to measure the size of anything reliably. Without a reference you are guessing, because you don't know how far away the camera was and what type of lens was used(I'm sure there are other variables too)

    You might be able to figure out every angle, but this won't help you without at least one measurment of distance to work with.

    Anyway, you should post this in the mathematics forum.
    Dick, be Frank.

    Ambiguity Kills.
    Reply With Quote  
     

  6. #5  
    Forum Ph.D. Leszek Luchowski's Avatar
    Join Date
    Jun 2008
    Location
    Gliwice, Poland
    Posts
    807
    You are trying to reinvent computer stereo vision. And you have a very idealized view of what it can achieve.

    If you cannot use two photos (a stereo pair), or more, but are stuck with just one picture, you can still try "depth from focus", "shape from texture" and "shape from shading" (search the net for these terms) to get some information about the 3D structure of whatever you are looking at.

    Another option, if you have the money, is to use a 3D scanner.

    I don't think a computing technique will be developed, ever, that would allow the distance to be estimated at every pixel of a normal 2D digital photo. The information is simply not there. Unless, as has already been pointed out, you already know the exact shapes and sizes of the objects in your picture.

    Good luck anyway, and have fun,
    Leszek.
    Leszek. Pronounced [LEH-sheck]. The wondering Slav.
    History teaches us that we don't learn from history.
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •