Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Finding the real-world distance of object from pixel coordinates

I have a picture of a supermarket shelf, with its top-most and bottom most row detected (as blue lines).

I know the height (say 2.5 meters) of the shelf, and that it is a fixed value throughout the entire shelf (this also implies that the 2 blue lines are always parallel in the real world).

I have marked out a point (in green), with pixel coordinates only. This point will always be in between the top - bottom most rows.

image description

In this case, given the above information, is there a way to calculate the distance (in meters) of the green point (in the real environment) to the top-most shelf?

I am thinking of using information such as the vanishing point, but I can't figure out how to do that.

Finding the real-world distance of object from pixel coordinates

I have a picture of a supermarket shelf, with its top-most and bottom most row detected (as blue lines).

I know the height (say 2.5 meters) of the shelf, and that it is a fixed value throughout the entire shelf (this also implies that the 2 blue lines are always parallel in the real world).world). The pixel coordinates of the blue lines are known.

I have marked out a point (in green), with pixel coordinates only. This point will always be in between the top - bottom most rows.

image description

In this case, given the above information, is there a way to calculate the distance (in meters) of the green point (in the real environment) to the top-most shelf?

I am thinking of using information such as the vanishing point, but I can't figure out how to do that.