Calculating heights from parallax effect

  • Thread starter Thread starter RetroQu
  • Start date Start date
  • Tags Tags
    Parallax
AI Thread Summary
The discussion revolves around calculating the heights of birds from a plane using the parallax effect, with a specific focus on the accuracy of the height equation being utilized. The user is experiencing consistently inflated height estimates of 200-250m, while they expect heights to be between 0-50m. They suspect that the original height equation used in a program may be incorrect, leading to systematic errors in calculations. The conversation also touches on the complexities of accounting for bird speed and motion, particularly the impact of translational components on height estimates. Ultimately, the user is seeking insights to resolve discrepancies in their height calculations and to determine whether the issue lies with the equation or other factors affecting data accuracy.
RetroQu
Messages
6
Reaction score
0
I'm trying to calculate the heights of birds from a plane flying at a known altitude above them using the parallax effect. They're being recorded from the plane and the head and tail end coordinates marked on each frame they appear. The equation I'm using is from here:
http://www.geog.ucsb.edu/~jeff/115a/lectures/stereoscopy_and_height_measurement.html
specifically this part:
http://www.geog.ucsb.edu/~jeff/115a/lectures/stereoscopy_and_height/displacement.jpg
h = H*(dP/(P+dP))
Which I think holds up if the object you're measuring is horizontal as well as vertical, it just produces two triangles to compare (in the case of birds at the head and the tail) instead of one. Am I right about that?

The problem is the heights I'm calculating are a about 200m above what I'd expect. The speed of the birds is also a factor but I have a way to attempt to compensate for it. That's what I'll be looking into next if this height equation isn't correct in this case.

Any insight would be welcome.
 
Physics news on Phys.org
RetroQu said:
about 200m above what I'd expect
Which is what? Helps us help if we've got an order of magnitude for effects we're speculating on for you.
 
Sorry, I'm getting heights largely between about 200-250m, but I'd expect them to be between about 0-50m, so it seems like something is just systematically shifting heights up.

I'm try to fix a flaw in a program someone else made, and I think they got the height equation wrong. They used the equation h = H*(1 - (P/dP)) which I think they arrived at mixing up the heights in the initial geometry, and thinking that H / (H - h) = dP / P. The only problem is when I try to fix it I get results with birds flying over 200m up, rather than just more negative heights than I'd like which was the initial problem. I'm trying to figure out if they were wrong twice (with that equation and something else I need fix now) or I'm wrong about my equation.
 
RetroQu said:
200-250m,
RetroQu said:
expect them to be between about 0-50m
Okay, that's a problem.
RetroQu said:
I think they got the height equation wrong.
RetroQu said:
They used the equation h = H*(1 - (P/dP))
"h" = bird height, and "H" = plane height? "dP" = how much longer bird image is than length at "H?" "P" = length of bird image at "H?" Then you want "dP/P," to give you distance from plane, using the original equation, or just dP/P to get height.
 
"h" is the bird height, "H" is the plane height, "P" is the absolute parallax, the translation of a point on the ground between two frames, and "dP" is the bird parallax, how much the bird appears to move between frames (or specifically, the average translation of its head and tail).

Of course, the birds are also moving, but the program tries to compensate for that. Their direction (based on the head and tail having been marked) is turned into a unit vector, and their motion perpendicular to the plane (basically x part of the translation) to the airplane is multiplied by dir(y)/dir(x). The result should be approximately the forward motion of the bird without the parallax effect, so this is subtracted from the forward bird translation.
 
So you get dP for head and a second dP for tail. "P" takes care of aircraft speed. What's bird speed?
 
The exact equations used for bird speed are:
Code:
av_dir = av_dir/sqrt(sum(av_dir.^2));
P = Gr_int(2);
bird_side = bird_int(1) - Gr_int(1);
bird_forward = bird_side*av_dir(2)/av_dir(1);
bird_parallax = bird_int(2) - bird_forward;
height = plane_height*(bird_parallax/(P + bird_parallax));
Where Gr_int and bird_int are their translations summed over a few frames, and (1) and (2) are x and y components respectively.
 
How are you distinguishing bird speed from altitude?
 
I'm not sure what you mean. The images are taken from above, with the y-axis being in the airplane's line of flight. The bird movement perpendicular to the plane is assumed to be parallax free. Is that a bad assumption, could it be causing the problem?
 
  • #10
I'm not seeing how one can spot the difference between a slow bird at high altitude and a fast bird at low altitude ---- ah, now I am, as long as there's pure x-translation of the bird. Adding a translational y-component I think adds a degree of freedom that might be screwing things up. Don't wager large sums of money on that assessment. Pure x-translation should be golden. Pure y-translation is going to be indeterminate between high and slow or low and fast.
 
  • #11
That's a shame, I'd hoped the way speed was compensated for could have been the source of the problem. Every calculation I check seems to be ok, but in practice the numbers just aren't adding up as they should. I've been working on this for weeks and can't seem to isolate any problem besides the height equation, which just causes a bigger problem when it's corrected. Either my geometry is wrong and the original height equation is correct, in which case the problems with accuracy are due to data, or mine is correct and there's a second problem inflating heights to about 4 times the size. These images are being taken over the sea which can naturally cause problems with the ground translation, and wind speed can mess with bird directions that are used to calculate their speed, but I wouldn't expect such a tight and uniform result from that as calculating everything about 200m too high.
 
Back
Top