# How to calculate the real size of an object from image

• B
• DetectiveT
In summary: From a video, you'd need to determine the object's position and size relative to the frame, and use that to project its size onto the image.

#### DetectiveT

Hello everyone, I have been doing researches on this, but those topics I found are a bit different from what I am doing,

I am trying to determine the actual size of an object in image/video (CCTV video tracks), my thinking is, if this object is moving, the size appears on the screen changes, and depending on the position of this object (its distance from the camera), the size changing rate should be different, vice versa, if the object image size changing rate is known, it should be possible to deduce its actual position and actual size? If this is not right, "put a reference object in the scene" method is also acceptable.

However, the current problem is, I do not really understand the 3D real world projecting to 2D image geometrical math, perhaps with a reference object, some mapping equation f(x,y)→g(x_real, y_real, z_real) can be found? Or with the changing rate way, f(dr/dt, x, y)→g(x_real, y_real, z_real) is possible?

Please, any fundamental ideas, corrections or suggestions will be appreciated, thanks!

If you have two view points then you can determine the distance between the view point and the object, such as in stereo vision.

https://en.wikipedia.org/wiki/Triangulation

You require however two view points and a known distance between them. For example our eyes are two view points with a distance of 2 inches in between them. From there you can determine the other lengths of the triangle and size of the object.

DetectiveT said:
I am trying to determine the actual size of an object in image/video (CCTV video tracks)

For clarification, is the lens a fixed focal length or is it a zoom?

DetectiveT said:
my thinking is, if this object is moving, the size appears on the screen changes, and depending on the position of this object (its distance from the camera), the size changing rate should be different, vice versa, if the object image size changing rate is known, it should be possible to deduce its actual position and actual size

That sounds like it might only work if the velocity of the object is constant. If it's close by and moving slowly, it's image size will change slowly, similar to it being far away and moving quickly.

From a still image, you convert perspective projection to orthographic projection, and you'd also need at least one object in the image of known length.

## 1. How do I measure the real size of an object from an image?

To calculate the real size of an object from an image, you will need to know the scale or dimensions of the image and have a reference point or known size of an object in the image. You can then use a simple ratio or proportion to determine the real size of the object.

## 2. What is the scale of an image and how do I find it?

The scale of an image refers to the relationship between the size of the object in the image and its actual size. To find the scale, you can use a ruler or measuring tool to measure the dimensions of the image and divide it by the actual dimensions of the object. This will give you a ratio that can be used to calculate the real size of the object in the image.

## 3. Can I use any reference object to calculate the real size of an object in an image?

No, it is important to use a reference object that is known to have a specific size. This could be a ruler, coin, or any other object with a clearly defined size. Using a reference object with an unknown or variable size will result in an inaccurate calculation of the real size of the object in the image.

## 4. Is it possible to calculate the real size of an object if I only have a 2D image?

Yes, it is still possible to calculate the real size of an object from a 2D image. You will need to know the dimensions or scale of the image and have a reference point with a known size. However, keep in mind that the calculated size will only be accurate in the dimensions represented in the image and may not reflect the true shape of the object if it is 3D.

## 5. Are there any tools or software that can help me calculate the real size of an object from an image?

Yes, there are various tools and software available that can assist in calculating the real size of an object from an image. These include image analysis software, smartphone apps, and online calculators. However, it is important to verify the accuracy of the results and use multiple methods for a more precise measurement.