Shelf shopper view point

Goal: Find the point in the shelf where the shopper is looking at. Based on head pose angles (x,y,z) and left- and right eye (x,y) angles. (yaw,pitch,roll)


  • Shelf height 2m (x 1m width)

    Camera position = 1.5m inside the shelf (see picture)

    Camera Resolution = 320px * 180px

    Camera Focal length = 2.3mm

    Camera DPI = 360

    Assume Human Face height (real life) = 18cm

Head Rotation Angle (x,y,z) Eye Rotation (left,right eye) (x,y) relative to the Head Rotation Angle

We can always get the rectangle (face) inside a picture of a picture 320px * 180px (webcam).


1.) Calculate the distance first: I used the formula:

Distance (cam to face) =  Human Face height in real life m * camera focal length (mm) / human face height in picture (mm)


human face height in picture (mm) = 2.54  *  human face height in picture (px) / Camera DPI 

My Problem:

I don’t know if it possible to solve this by somehow calculating a persons height, through knowing the camera offset height. All angles are related to the camera position, but I want to calculate the point being focused on the shelf.

The image is just a 2D example. I believe I need some translation function, rotation (head), rotation (eye) matrix to solve this?

I don’t know what is the best approach. Thank you for help.enter image description here


Your Answer

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

Browse other questions tagged or ask your own question.