Below is a diagram of the setup. Using a smartphone camera, placed on the floor, I'd like to know how to figure out person's height, Y.

Since I know how far off the floor the camera is and the angle the camera is at, I know i & j.

I can't figure out what trig I need to figure out the triangle that is either the distance from the camera to the person's feet or the triangle formed by the person on the camera sensor.

Without using any reference points in the image (e.g. credit card), is it possible to figure out the person's height?

enter image description here

  • $\begingroup$ Do you know the camera’s field of view, in degrees for instance? $\endgroup$ – Lubin Jan 9 '16 at 21:44
  • $\begingroup$ @Lubin Yes, it's a camera phone, so either through the spec sheet or just manually testing it. $\endgroup$ – Misha M Jan 10 '16 at 0:27
  • $\begingroup$ There are all sorts of photographico-mathematical objections to doing what you want, and I think your idea of using a comparison object would be much preferable. There’s the foreshortening of the body because the camera’s not looking at it straight-on; there’s the problem that the imaging of the camera will not be linear (objects at the edge of the field of view will be stretched), and probably more that I’m not thinking of right now. $\endgroup$ – Lubin Jan 10 '16 at 3:26
  • $\begingroup$ Going to use camera calibration from OpenCV to deal with the camera being at an angle. Not too worried about the edges of the image yet. At the moment, trying to figure out if this is possible without using a comparison object or not. $\endgroup$ – Misha M Jan 11 '16 at 23:21

It should be relatively clear that without any reference objects, it is not possible to determine how tall the person is or how far away from the camera he or she is standing [1]. However, we can find a relationship between those two values [2]. I hope the proof below will address both of these points.

[1] Imagine that besides the person, all other parts of the image you take are blurred - specifically, there are no reference objects which you know the height of. Say we have an image of a person who is actually $l$ cm tall, appears to be $h$ cm tall, and is standing a distance $d$ cm from the camera lens. Since we have no reference objects, we should get multiple values of $l$ and $d$ that make for a similar image height $h.$ As we increase both $l$ and $d,$ our person's image height $h$ can remain constant.

[2] Though we may not be able to find either $l$ or $d$ given $h$ and specifics on the camera position, there is obviously a relationship between the values. Denote the phone image height $m,$ and the phone's vertical view field angle $x$ (these should be specification constants you can find). Notice that when the phone is tilted up, this angle $x$ is sweeping a larger and larger view field. We can quantify this with the value of the phone tilt, which we call $y.$ We see that $y = \arctan(\frac{i}{j})$ by trigonometry.

Again using trigonometry, we find the vertical view field to have length $d(\tan(y + \frac{x}{2}) - \tan(y - \frac{x}{2})).$ Now using a basic proportion, we see that $\frac{h}{m} = \frac{l}{d(\tan(y + \frac{x}{2}) - \tan(y - \frac{x}{2}))}.$ Rearranging, we have that $\boxed{\frac{d}{l} = \frac{m}{h(\tan(y + \frac{x}{2}) - \tan(y - \frac{x}{2}))}}.$ Notice from earlier that $y = \arctan(\frac{i}{j}).$ All other values on the right side of the equation above can be found via tech specs or measurements. If you know either $l$ or $d,$ you can find the other value with the equation.

  • $\begingroup$ @k-jiang thank you for the response. The problem I'm having is how to solve the problem if you don't know l or d $\endgroup$ – Misha M Jan 19 '16 at 1:46
  • $\begingroup$ No problem. That's the thing. I think I described it in part [1] above, but consider this: a really small person up close to the camera would appear similar in size to a large person far away from the camera. You would need to know one in order to find the other - otherwise, you can't calculate either. $\endgroup$ – K. Jiang Jan 19 '16 at 2:04
  • $\begingroup$ Exactly, that's what I got hung up on. I'm trying to understand how MTailor app works, since they don't require you to have any reference object. I have a solution if you hold a reference object, but was wondering how to do it without one. Thank you $\endgroup$ – Misha M Jan 19 '16 at 7:26

Your question at first seems impossible to answer with the information given, but after a closer look, I suspect you have left a clue or two in your statement that allows your answer to be estimated to a reasonable degree. I will have to make an assumption or two to get that estimate, so here we go: 1. Let the angle between the wall and the camera be phi such that tan (phi) = i/j. That will also be the angle of the midpoint of the field of view of the camera relative to the floor, from basic trig. 2. Now I assume you want to photograph the whole person as centered in the photograph, producing equal borders above and below him/her, neglecting any edge effects caused by the camera not pointing horizontally. Thus we have the midpoint of the field of view pointing at the midpoint of the person. 3. Next you measure the floor distance from the persons feet to the camera edge on the floor, and call it G. The last 4 lines of your description of the problem suggests you are looking for a triangle, and once you have it, and it doesn't involve a comparison object, you are at liberty to measure G and complete your triangle.
4. With this approach, the answer to your question is:

Yes, you can determine the height of the person from the data given. The answer is:

Y  = 2(i+G)tan(phi)+ 2j  .


  • $\begingroup$ Also in retrospect, you can simplify the process of lining up the camera by taking your photo, then making a few measurements on the printout. I'll leave it to you to figure out what to do with those measurements, just in case this problem is related to a job application or a class assignment, which you should do mostly on your own. Assuming you are not asking this question to answer some assignment, I will give you my approach to the "taking a picture" methodology. It was fun doing this problem, so thanks for asking the question. $\endgroup$ – williamo Jan 17 '16 at 21:53
  • $\begingroup$ thanks for the reply. No, this is not for an assignment or an interview. I downloaded the MTailor app and saw that they are getting measurements without using a reference object, so wanted to figure out how they do it. The part that I'm struggling with is how to get G in your description. $\endgroup$ – Misha M Jan 19 '16 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.