How to Get Distance of Object from iPhone Camera Using Image Exif Meta Data

How to find out focal length of camera in ios and what is the sensor height?

The way to solve this issue.

First take one real world object and its measure i.e. height and width.(example of coke cane)
Now take a snap of the object that you want to measure.
For the iphone or ipad the focal length is fixed to 25mm.
Now frame the object that you want to measure on a snap and re-size the real world coke cane image according to the object you want to measure.

use the equation

object_distance = (focal * real_object_height)/object_height;

here, real_object_height = coke cane height;
and object_height = coke cane re-sized height

and accordingly measure the height of object using equation

height_of_frame = ((obj_distance) * measured_object_height_in_mm / 1000.0))/focal;

width_of_frame = ((obj_distance) * measured_object_width_in_mm / 1000.0))/focal;

this way you can find out the object distance and its measure.
but you need two static data i.e. focal length of camera which you are using and the one real world object measure to compare.

thanks,
bskania.

Measure Distance from iPhone Camera to an object using camera

Its very difficult! Iphone has many features, to implement this you either need a tracking beam or something like a laser. You can try using GPS and get the distance but focusing on a object definitely need some pre loaded data. I would suggest a method called "Parallax method", its difficult this method is used by astronomers to measure the distance between earth and stars. Its definitely possible but requires lot research and development, Iphone camera has limitation ,some R&D is required before u use parallax method because it requires camera to capture the photo at different angles. And lots of mathematical stuff (like trigonometry) definitely possible



Related Topics



Leave a reply



Submit