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:

How will you measure length of a line drawn in this picture?

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.

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

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.

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.

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