Calculating object size in a P4P still photo

Joined
Dec 20, 2017
Messages
41
Likes
5
Age
71
#1
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
 
Joined
Mar 9, 2018
Messages
234
Likes
95
Location
FL
#2
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.
 
Joined
Mar 22, 2014
Messages
4,308
Likes
1,967
Location
Los Alamos, NM.
#3
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.
 
Joined
Dec 25, 2016
Messages
277
Likes
71
Location
Tucson, Arizona
#4
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?
 
Joined
Dec 20, 2017
Messages
41
Likes
5
Age
71
#5
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.
 
Joined
Mar 22, 2014
Messages
4,308
Likes
1,967
Location
Los Alamos, NM.
#6
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.
 
Joined
Dec 20, 2017
Messages
41
Likes
5
Age
71
#7
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

Joined
Mar 22, 2014
Messages
4,308
Likes
1,967
Location
Los Alamos, NM.
#8
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.
 
Joined
Dec 20, 2017
Messages
41
Likes
5
Age
71
#9
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.
 
Joined
Dec 20, 2017
Messages
41
Likes
5
Age
71
#12
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 ?
 
Joined
Mar 22, 2014
Messages
4,308
Likes
1,967
Location
Los Alamos, NM.
#13
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:
Joined
Jun 8, 2016
Messages
595
Likes
148
#14
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.
 
Joined
Jan 24, 2016
Messages
113
Likes
42
Age
62
#15
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
 
Joined
Jan 24, 2016
Messages
113
Likes
42
Age
62
#16
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).
 

New Threads

Forum statistics

Threads
130,274
Messages
1,352,016
Members
94,956
Latest member
Creei03