Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As first step, you need to detect the paper, suppose the background is uniform, in that case simple threshold might work.

Now you got the object detected, next calculate the distance by referring the following,

  • Check out this link might be helpful if you know the focal length and sensor height of the camera.

  • For far distance object you can use the equation by THE RULE OF 57

    Distance of object= (Size of object * 360)/(2 * 3.14 * Angular size in degree)

For more information refer this link.

  • Or simply do the modeling, like calculate size of the object(in pixel) with certain interval of known distance, and while testing, the object(here paper) size comes in that range you can say on what distance the object is.

As first step, you need to detect the paper, suppose the background is uniform, in that case simple threshold might work.

Now you got the object detected, next calculate the distance by referring the following,

  • Check out this link might be helpful if you know the focal length and sensor height of the camera.

  • For far distance object you can use the equation by THE RULE OF 57

    Distance of object= (Size of object * 360)/(2 * 3.14 * Angular size in degree)

For more information refer this link.

  • Or simply do the modeling, like calculate size of the object(in pixel) with certain interval of known distance, and while testing, the object(here paper) size comes in that range you can say on what distance the object is.

Use imwrite to save the image to hard-disk.