Android Question Measuring Person's height With Camera

walterf25

Expert
Licensed User
Longtime User
Hi, i just had an interesting talk with a business owner and one of the questions that were asked was, Is it possible to develop an App that can measure a person's height, I've seen many apps that can be used to measure length on a surface, and even width but have never seen an App that an accurately measure a person's height.

Wanted to get someone's input on this, what do you guys think, is this possible?

I've looked into AR, as google's AR has an example to measure length and width, but i was not able to accurately measure a person's height.

Would this be possible using any other method, OpenCV, Machine Learning etc.

Has anyone came across this very same question?

Let's hear it!

Walter
 

fredo

Well-Known Member
Licensed User
Longtime User
... measure a person's height

How about a first approach via the mathematical intercept theorem?



If you know the height of the camera lens "hp" and the distance "dpx" between lens and person
it should be possible to calculate the height of person "hx".

Of course it will not be very accurate, but maybe it will be enough for simple classifications.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User


On top of my mind:
  1. Give the person a known reference object to hold (the yellow/red thingie in the pic)
  2. Use magic (OpenCV etc) to determine highest and lowest point of person
  3. Use magic to determine length of reference object in pic, which gives a multiplication factor for the body
  4. Apply math
  5. ???
  6. Profit!

(Step 2 can be swapped with the phone user manually marking feet and head, obviously. And the magic in step 3 is simple, so that would probably not need OpenCV etc. So if it's acceptable with a manual step, that would be an easier route to go.)
 
Upvote 0

freedom2000

Well-Known Member
Licensed User
Longtime User

You could as well use this method combined with a picture of a door behind the guy. They all have pretty much the same height (2.05 m)...
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
I have an app on my phone called "Easy Measure". It is fairly accurate where one gives his or her height of vision to the app and the app mechanism can tell you how far an object (typically a wall) is from the user apparently using geometry to measure the angle of the phone in relation to the object that is being viewed (using the Pythagorean theorem I assume). The person viewing must be on a level surface in relation to the object which apparently would form an imaginary right angle at the base of the viewer's position. It seems to me that if the app can determine the distance from the user using the viewer's angle of vision (requiring that the surface is level), why couldn't it then use another viewer's angle from the top of an object (like a person) measured from the same distance. The calculating mechanism could then make a new base level line from the viewer's eye allowing a new right angle used in a new geometric formula and so on.
 
Last edited:
Upvote 0

freedom2000

Well-Known Member
Licensed User
Longtime User
You are right.
When I said "not accurate" I meant whithin a range of a few centimeters...
You have to know your eyes (camera focal point (not screen center !)) height, then keep the camera vertical, then apply maths... assume camera has no distortion, get the image, extract pixels numbers, convert them to cm etc !
 
Upvote 0

fredo

Well-Known Member
Licensed User
Longtime User
...apply maths...

Ok - second approach: "Sine theorem" or "Law of sines"
It is quite a while ago, but I think, if you have three values in a triangle (e.g. angle, angle, side length), then you can calculate the missing values.

Since you need the distance to the object for the following calculations, you can determine the value "dx" using Inclination Angle to the objects base and Height of the camera lens.

dx = sin(alpha) / ( sin(90° -alpha) ) * hp
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Second approach from me:

- Make an app with a single, big button on screen.
- Hold phone at height of person's head and let go.
- Phone app measures time between letting go of button and impact on floor.
-Apply math.

Should be fairly correct, at least for first measurement. ?
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Thanks everyone, I like @fredo and @Sandman approach, i actually saw an example using OpenCV, basically i would set an object of known size near the target and OpenCV does the rest, @fredo solution using the Intercept theorem seems very straight forward I will definitely give this some more thought, I like Google's AR approach, unfortunately is not very accurate.

Again, thanks everyone, it would be very interesting to come up with a solution to this.

Regards,
Walter
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
I would ask the person to wear a medallion with a small white paper with 2 parallel black lines that the distance between them is known. Measuring the distance of the two lines in pixels in the camera picture taken I would have a scale cm/pixel. Then all you have to do is measure the height of the person in pixels and you will get the height in cm.

Edit - on a second read (actually first) my solution is somewhat similar to @Sandman but I didn't delete my post anyway.
 
Upvote 0

TomKluz

Active Member
Licensed User
This is very interesting subject:
- how to determine surtain point on a picture (top of a head or bottom of a leg)
- how to measure distance between this two points
- eventually how to determine surtain shape (face or leg or entire body) from the picture.
Math is not a problem.
I would like to join to Walterf25 question and wait for idea at least.

Kind regards
TomKluz
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…