Estimating the Size of Objects in Images

Quite often, when you're trying to make something that you've seen in a movie or a photograph, you need to calculate the dimensions of that object. You can guess the dimensions, of course, but there's another relatively simple way to do it, too. First, try to get the highest resolution image of the subject that you can find. Second, make sure that the image contains an object of known size. Third, make sure that the subject has an orthographic projection; meaning, oriented toward or away from the camera, or at right angles to the camera.

Let's take the following image as an example. We want to know the size of the tombstone. Assume that Beetlejuice is approximately 6' tall (or 72")

Using an app such as Photoshop, we can edit the image, and determine that Beetlejuice is approximately 383 pixels high. We can also determine that the tombstone is 285 pixels high. Calculating the actual height of the tombstone is simply a ratio.

72 / 383 = n / 285, where n is the unknown height of the tombstone.

n = (72 * 285) / 383 = 53 inches

You will notice that this calculation only works when you are measuring vertical or horizontal pixels. But, let's say that you want to measure along a diagonal. You have to use the distance formula

d = sqrt((x2 - x1)^2 + (y2 - y1)^2)

where (x1, y1) is the coordinate of one pixel and (y1, y2) is the coordinate of the other.

So, in the example above, you would plug d into the equation...

n = (72 * d) / 383 As you can see from these calculations, you will get more accuracy with a higher resolution image.

29 views0 comments

Recent Posts

See All