1 | initial version |
The quickest estimate (of a persons height) would be to find the pixel size of the object held by the person and calculate the scale factor sf=real object size/object size in pixels. Since the known object is practically at the same distance as a human, you can just multiply the height of the person in pixels by the factor and there you go. If you need it to be automatic, you need an easily distinguishable object (black square/circle on a white background?) and a human detector. There are many of them (hog detectors, Haar classifiers, deep networks) and you need to see which one is the most precise in estimating the human silhouette. I believe Haar detector is the easiest in implementation. Just replace the face cascade with fullbody cascade.