How to measure the height, width and distance of an object using the camera?

I have named many links, but nevertheless I cannot understand that I can start my development. I want to measure image height, width and distance using a camera. I found this application . I want to make this application not quite the same, but exactly the same, but for my requirement I want to measure the height, width and distance of an image using a camera.

Can someone give me / suggest me the right way or some example so that I can learn more about this requirement.

I tried this:

http://android-er.blogspot.in/2012/04/gets-distances-from-camera-to-focus.html

+42
android camera android-camera
Jan 02 2018-12-12T00:
source share
7 answers

I think I know what you are asking. Here is what you can do.

first get the height of the person, say h meters.

sample image

if you can calculate the height of the camera from the ground (using height if the person is i.e. h) and get the angles A and B using a gyroscope or something like android, then you can calculate the height of the object using the above formula.

Isn't that what you were looking for?

let me know if you need an explanation.

+27
Jan 28 '12 at 11:14
source share

To measure distances with a single camera, you need to know some numbers. To measure the height of something, say a chair, the only thing you have is the size of it in the camera (which is in pixels and can be converted to inches using the screen size), that's all. A chance to measure height and width using a link, say a person 6 feet tall, standing next to a chair.

Thus, you can work in reverse order, using, for example, an object measuring 10 feet, using its size as displayed in the camera, you can develop the size of things at the same distance, on a surface that is not flat, even that they are on the same distance is a problem.

Thus, using a camera and a camera is not possible. You need to know the distance somehow, or need a link.

If you use the application to measure the height of objects that you know, and then using GPS, you can find the distance, and the rest is mathematical.

I found some links using google, they can help.

They can help you find out what other information is needed, in addition to what the camera can provide, so you can think about your application, as well as what you can do and what are the limitations.

One way is to use multiple cameras that can be compensated for using multiple shots taken at a known distance. Thus, the application may ask the user to take several images, track the distance using GPS and, possibly, it can work.

See also these links:

+13
Jan 28 2018-12-12T00:
source share

If you know the viewing angle of the camera, you can use the height in pixels to determine the angle from the top to the bottom of the object. Then, using distance and arc tangent, calculate the height:

height = arctan(angle) * distance 

To find the viewing angle, point the camera at a known height and make it fill the screen exactly. For example, hover over a ruler and make it far enough so that you can barely see the ends of the ruler. Measure from your camera and then your overall viewing angle

 viewportAngle = tan(ruler_length / distance) 

Then suppose your camera has a height of 480 pixels (a cheap webcam) and the viewing angle is 20 °. If you have an object on the screen whose height is 240 pixels, then its angle is 10 °. If you knew this 2 feet apart, you would say 2 feet * arctan(10°) = ~4.1 inches high. (I think ... it's 2 in the morning, so that might be a little off)

+7
Jan 02 2018-12-12T00:
source share

If you think about it, then an XRay body examination (at the medical center) is also required to check the size of the tumor. So they put a 1 dollar coin on the body to make comparative measurements.

Even newspapers print with some marks on the corners.

You need a link to measure. Maybe you can get your person to wear a cap with a few bright green circles. Once you know the size of the circle, you can comparatively measure the remaining.

Or you can create a transparent 1-inch circle that overlays the face, move the camera to / away from the face, point your overlaid circle to this bright green circle on the cap. Then your photo will be on a scale.

+3
Jan 30 '12 at 9:02
source share

You cannot .. You would need to know:

  • How far is the object (you can find out your location from GPS .. but the location of the object?)
  • What is the focal length of the camera

Maybe it’s just possible if the object was optically marked, for example, with a QR code, and you have a card with a code name ...

+2
Jan 02 2018-12-12T00:
source share

If you have an Android smartphone, the Smart Measure app will measure the distance and height of the object:

image

+2
Jan 30 2018-12-12T00:
source share

First of all, I will say “Nice Thaught” to develop such an application.

Now I'm not sure about this, but if you can get the same opportunity to detect any object in the android camera, with which you can achieve this.

Well, I'm not sure about that, but still give some insight so you can understand it.

All the best.:))

+1
Jan 27 '12 at 12:19
source share



All Articles