Ask Your Question

Revision history [back]

Hi der.freiburger!

Yes you can measure the approximate size of object in real world by using a reference graph. Provided that object is in constant distance from the camera.

here are the steps to measure the size of object:

  1. How will you measure length of a line drawn in this picture? image description

  2. You need a ruler as a reference. To make this ruler you have to know the real world ruler size which will be in pixels in our case.

  3. Now make an graph. I'm gonna take a unit line as a reference graph. I'm taking centimeter scale as reference. image description

  4. Place this graph in front of the camera & detect the Two red dots. Now calculate the number of pixels between this two points ref. Lets assume the distance is 1000 pixels. So 1 cm is taking 1000 pixels. So 1 pixel is equal to 0.1 cm & take this as a Reference_pixels_count.

  5. Now place an object & find corners.Now cycle through each corner & find the distance between each corner. Multiply this distance with the Reference_pixels_count to get the actual dimension of the object. image description

NOTE: This method can work only for object in a single Z-Plane(Depth).

Hi der.freiburger!

Yes you can measure the approximate size of object in real world by using a reference graph. Provided that object is in constant distance from the camera.

here are the steps to measure the size of object:

  1. How will you measure length of a line drawn in this picture? image description

  2. You need a ruler as a reference. To make this ruler you have to know the real world ruler size which will be in pixels in our case.

  3. Now make an graph. I'm gonna take a unit line as a reference graph. I'm taking centimeter scale as reference. reference.

image description

  1. Place this graph in front of the camera & detect the Two red dots. Now calculate the number of pixels between this two points ref. Lets assume the distance is 1000 pixels. So 1 cm is taking 1000 pixels. So 1 pixel is equal to 0.1 cm & take this as a Reference_pixels_count.

  2. Now place an object & find corners.Now cycle through each corner & find the distance between each corner. Multiply this distance with the Reference_pixels_count to get the actual dimension of the object. object.

image description

NOTE: This method can work only for object in a single Z-Plane(Depth).