Calculating object size in a P4P still photo

Joined
Dec 20, 2017
Messages
41
Reaction score
5
Age
76
I am struggling with calculating the size of objects in my P4P still photos.

Assuming a stock P4P camera, I should be able to determine a scale factor (inches/pixel) based solely on altitude.

Then, I just go into the image, count the number of pixels, and do the arithmetic.

Does this make sense? Does anyone know of a scaling factor table?

TNX
 
I am struggling with calculating the size of objects in my P4P still photos.

Assuming a stock P4P camera, I should be able to determine a scale factor (inches/pixel) based solely on altitude.

Then, I just go into the image, count the number of pixels, and do the arithmetic.

Does this make sense? Does anyone know of a scaling factor table?

TNX

The easiest answer is to put a pad on the ground somewhere that has a known measurement and do the math from there.
 
I am struggling with calculating the size of objects in my P4P still photos.

Assuming a stock P4P camera, I should be able to determine a scale factor (inches/pixel) based solely on altitude.

Then, I just go into the image, count the number of pixels, and do the arithmetic.

Does this make sense? Does anyone know of a scaling factor table?

TNX

You don't need a table - simple arithmetic will do. The P4P has a diagonal FOV of 84°. Assuming that your photos are full-resolution 3000 x 4000 pixels, that makes a nice 3:4:5 triangle, and so the diagonal length is 5000 pixel widths.

The distance, d, on the ground covered by 84° at a height, h, is simply given by:

d = 2h.tan(84/2)​

and so the length on the ground per pixel, l, is given by:

l = 2h.tan(84/2)/5000 = 0.00036h

and the dimension, L, of an object that is imaged by p pixels is therefore:

L = 0.00036hp

Those length quantities are valid in any units provided that they are all the same, i.e. if h is in feet then L is also in feet.
 
You don't need a table - simple arithmetic will do. The P4P has a diagonal FOV of 84°. Assuming that your photos are full-resolution 3000 x 4000 pixels, that makes a nice 3:4:5 triangle, and so the diagonal length is 5000 pixel widths.

The distance, d, on the ground covered by 84° at a height, h, is simply given by:

d = 2h.tan(84/2)​

and so the length on the ground per pixel, l, is given by:

l = 2h.tan(84/2)/5000 = 0.00036h

and the dimension, L, of an object that is imaged by p pixels is therefore:

L = 0.00036hp

Those length quantities are valid in any units provided that they are all the same, i.e. if h is in feet then L is also in feet.
I’m guessing you had something to do with rockets?
 
Thank you very much. I need to generate some size estimates of archaeological features for a presentation on Saturday, and this is an immense relief.

If you are involved with SAR in Los Alamos, I used to hang around with Gary C. in Santa Fe, who was quite active in local incident management and more. Small world.

TNX again.

You don't need a table - simple arithmetic will do. The P4P has a diagonal FOV of 84°. Assuming that your photos are full-resolution 3000 x 4000 pixels, that makes a nice 3:4:5 triangle, and so the diagonal length is 5000 pixel widths.

The distance, d, on the ground covered by 84° at a height, h, is simply given by:

d = 2h.tan(84/2)​

and so the length on the ground per pixel, l, is given by:

l = 2h.tan(84/2)/5000 = 0.00036h

and the dimension, L, of an object that is imaged by p pixels is therefore:

L = 0.00036hp

Those length quantities are valid in any units provided that they are all the same, i.e. if h is in feet then L is also in feet.
 
Thank you very much. I need to generate some size estimates of archaeological features for a presentation on Saturday, and this is an immense relief.

If you are involved with SAR in Los Alamos, I used to hang around with Gary C. in Santa Fe, who was quite active in local incident management and more. Small world.

TNX again.

OK - that method should work fine. It applies to any angle of image as long as h is the distance of the object from the camera, which is the height if looking straight down.

Yes - I worked with Gary. I think he's still with Santa Fe SAR but no longer actively working SAR.
 
I cant get this to work. I laid out 10 foot chalk markers on a parking lot. Did a test flight above it. Then plugged the numbers for this image into the formula:

h=123 ft
p = 600 pixels
scale = .00036

L = 26.8 ft when it should be around 10 ft.

what am I doing wrong?
 

Attachments

  • DJI_0105-frag.jpg
    DJI_0105-frag.jpg
    1.2 MB · Views: 258
I cant get this to work. I laid out 10 foot chalk markers on a parking lot. Did a test flight above it. Then plugged the numbers for this image into the formula:

h=123 ft
p = 600 pixels
scale = .00036

L = 26.8 ft when it should be around 10 ft.

what am I doing wrong?

There's not enough information for me to answer that. The image that you posted is 2126 × 768 pixels. Is that a simple crop from a 4000 x 3000 pixel image? That does not seem correct since that would make the diagonal field of view only 83 ft. At 123 ft AGL with an 84° lens the diagonal FOV should be 221 ft.
 
I tried another image, at a different altitude, and got 16 ft instead of 10 ft. Looks like the problem might be accurate altitude data.
 
Yes - in that case the multiplication factor is 0.000297 rather than 0.00036.

To elaborate:

L = 2hp.tan(84/2)/√(4856² + 3640²) = 0.000297hp

That is giving me calculated lengths of 13 ft. for 10 foot intervals. There must be something else going on? Are we re-inventing the wheel ?
 
That is giving me calculated lengths of 13 ft. for 10 foot intervals. There must be something else going on? Are we re-inventing the wheel ?

It's really simple geometric optics, so assuming that you have your height (or distance) correct, that suggests that the quoted field of view of the lens is not 84°on the diagonal of 4:3 images. There was a thread some time back discussing that.

If you are confident of your calibration test then you could simply adjust the scaling factor using your result - i.e. use 0.000297 x 10/13, which would be 0.000228.

I guess I would do an accurate calibration with the aircraft on the ground and viewing an object, or markers on a wall, of known width at a precisely measured distance. I don't have a P4P to do that test with unfortunately, but if you post a calibration image I'd be happy to check the numbers.
 
Last edited:
Good grief fellas, do I have to show you how to do this? Here you go.

Bud
Screen Shot 2018-11-03 at 12.14.33 PM.jpg



It's really simple geometric optics, so assuming that you have your height (or distance) correct, that suggests that the quoted field of view of the lens is not 84°on the diagonal of 4:3 images. There was a thread some time back discussing that.

If you are confident of your calibration test then you could simply adjust the scaling factor using your result - i.e. use 0.000297 x 10/13, which would be 0.000228.

I guess I would do an accurate calibration with the aircraft on the ground an viewing an object, or markers on a wall, of known width at a precisely measured distance. I don't have a P4P to do that test with unfortunately, but if you post a calibration image I'd be happy to check the numbers.
 
I cant get this to work. I laid out 10 foot chalk markers on a parking lot. Did a test flight above it. Then plugged the numbers for this image into the formula:

h=123 ft
p = 600 pixels
scale = .00036

L = 26.8 ft when it should be around 10 ft.

what am I doing wrong?
I think the problem is that whatever you are measuring has to be at the extreme edges of your photograph for this to be right
 
It's really simple geometric optics, so assuming that you have your height (or distance) correct, that suggests that the quoted field of view of the lens is not 84°on the diagonal of 4:3 images. There was a thread some time back discussing that.

If you are confident of your calibration test then you could simply adjust the scaling factor using your result - i.e. use 0.000297 x 10/13, which would be 0.000228.

I guess I would do an accurate calibration with the aircraft on the ground and viewing an object, or markers on a wall, of known width at a precisely measured distance. I don't have a P4P to do that test with unfortunately, but if you post a calibration image I'd be happy to check the numbers.
Go to a high school football field and try your measurements - big enough to minimize small errors.

And remember two things:

This only works when you shoot straight down (or straight ahead for vertical measuements)

Remember that it is the DIAGONAL, not the horizontal (across the width).
 
Quite a useful thread. Thanks guys.
 

Recent Posts

Members online

Forum statistics

Threads
143,066
Messages
1,467,352
Members
104,933
Latest member
mactechnic