I have an image with the size of (m,n), how to find out that, what distance the objects are taken, the image is taken by ptz camera of the focal length of 4mm-25mm.

  • Can't answer. The distance can be anywhere from probably a bit more than twice the focal length (4–25mm) to infinity, depending on where you focused the lens to, which is what you're hoping to find. It's a tautology. – scottbb Oct 31 at 6:38
  • Thank you for replay sir, suppose if I am taking the surveillance camera genrated images i.e traffic videos, those objects has some distance from the camera, but practicle do't know the distance of those objects situated. Now i would like to figure out the object distance from the camera. – Madhu Oruganti Oct 31 at 6:59
  • I understand. But without more information, what you're trying to find out is not possible. Given other information, you can make educated guesses about subject distance. For instance, if you know the real-world size of your subject (say, the width or length of a car), and you know the exact focal length of the lens, and the size of the image sensor, then you can deduce the distance to the subject. See: How do I calculate the distance of an object in a photo? – scottbb Oct 31 at 7:03
  • 1
    You are describing the thin lens formula. This formula describes how a lens focuses an image onto an imaging plane (such as film or sensor). This is not what you need. Please see the link in my previous comment. – scottbb Oct 31 at 7:47
  • 1
    I'm sorry, but your broader question is out of the scope of this site. Our scope is regarding the art, science, and business of photography (as in, using cameras to capture images to be appreciated by humans). Machine vision is off-topic here. – scottbb Oct 31 at 8:20