Calculating heights from parallax effect

  • Thread starter RetroQu
  • Start date
  • Tags
In summary: I need to fix something else.In summary, the problem is that the height equation is wrong but something else is compensating for the speed which is then causing the heights to be higher than they should be.
  • #1
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:
specifically this part:
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
  • #2
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.
  • #3
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.
  • #4
RetroQu said:
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.
  • #5
"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.
  • #6
So you get dP for head and a second dP for tail. "P" takes care of aircraft speed. What's bird speed?
  • #7
The exact equations used for bird speed are:
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.
  • #8
How are you distinguishing bird speed from altitude?
  • #9
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.

1. What is the parallax effect?

The parallax effect is an optical phenomenon that occurs when an object appears to shift its position relative to its background as the viewer's perspective changes.

2. How can the parallax effect be used to calculate heights?

By measuring the angle of the parallax effect and knowing the distance between the observer and the object, trigonometric calculations can be used to determine the height of the object.

3. What tools are needed to measure the parallax effect?

To measure the parallax effect, you will need a baseline distance, such as the distance between your eyes, and a measuring device, such as a ruler or protractor, to determine the angle of the parallax.

4. Are there any limitations to using the parallax effect to calculate heights?

Yes, the parallax effect can only be used for objects that are relatively close to the observer. For objects that are very far away, the parallax angle becomes too small to accurately measure.

5. How accurate is the parallax method for calculating heights?

The accuracy of the parallax method depends on the precision of the measurements taken and the distance to the object. With careful measurements and relatively close objects, the parallax method can provide a fairly accurate estimation of height.

Suggested for: Calculating heights from parallax effect