I referred lot many links but still I am not able to get any point from that I can start my development. I want to measure my image height, width and distance using camera. I found this app . I want to make this type of application not exactly same but quite same but for my requirement I want to measure my image height, width and distance using camera.
Can anyone give me/suggest me the right way or any example so that I can get more idea about this requirement.
I tried this :
http://android-er.blogspot.in/2012/04/gets-distances-from-camera-to-focus.html
Simply launch Measure, point the phone's camera to an object, then pick two points to measure the distance in between. The virtual tape measure can measure either height or length.
To work out the size of the object on the sensor, work out it's height in pixels, divide by the image height in pixels and multiply by the physical height of the sensor.
The formula: distance = size_obj * focal_length / size_obj_on_sensor. The whole method depends on figuring out the size of the object as it appears on the sensor given the focal length and the measured object size. Otherwise you have two unknowns.
Select the units of measurement required. Input the height (approximate) of the camera from the base of the target object. Click the 'Adjust Height' button. Point the marker at the base of the object, then select 'Get Distance' This will result in calculating the approximate distance of the object from the user.
I think I know what you are asking for. Here is what you can do.
first get the height of the person say h meters.
if you can calculate the height of the camera from ground (using height if the person i.e. h) and get angles A and B using gyroscope or something from android then you can calculate the height of the object using the above formula.
Isn't this what you were looking for???
let me know if you need any explanation.
For measuring distances with a single camera, you need to know some numbers. To measure height of something, say a chair, the only thing you have is the the size of it in the camera (which is in pixels, and can be converted to inches using screen size), that is all. The chance of measuring the height and width is using a reference, say a 6 foot tall person standing next to the chair.
This way you can work out in reverse using say a 10 foot tall object, using its size as appearing in the camera, you can work out the size of things at the same distance, on a surface that is not flat, even ensuring that they are at the same distance is a challenge.
So using the camera and just the camera, it is not possible. You need to know distance somehow, or need a reference.
If you are using the application to measure height of items you know the location of, then using GPS, you can find distance, and rest is math.
I have found some links using Google, they may help.
They may help you to find out what other information is needed other than what the camera can provide, so that you can think about your application as well regarding what can be done and what are the limitations.
One way is using multiple cameras, and that can be compensated using multiple pictures taken a known distance away. So the application can ask the user to take multiple images, track the distance using GPS, and probably it can work.
See these links as well:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With