enter image description here

I'm writing image processing software and my goal here is to take an image of a projectile moving away from the camera and determine the launch angle. What I already know is:

  • The actual size of the object
  • The distance from the camera to point a
  • The distance from point a to point b
  • The speed of the projectile
  • The elapsed time between points
  • The height from the camera to the ground
  • All technical specs of the camera

Is it possible to calculate this angle? I realize that if point a to point b is the hypotenuse then I could make the calculation if I had either the opposite or the adjacent but I'm struggling to find those measurements.

I'm not trying to model the flight path here. I need to determine the angle the object left the ground very soon (milliseconds) after launch. This angle will then feed into my flight model.

  • $\begingroup$ Related: physics.stackexchange.com/q/438647/2451 $\endgroup$ – Qmechanic Nov 7 '18 at 16:27
  • $\begingroup$ Do you not need to model the camera too? Do you have timestamps in the images? Do you know the gravitational field? Is it obstacle free? Does the ball have rockets or is it magnetic or neither? Is it fired in a fluid, gas or vacuum? $\endgroup$ – Emil Nov 7 '18 at 16:38

The vertical speed at the instance of launch can be calculated by measuring how high the object reaches, that's simply:

height = v^2 sin^2(theta) / 2g

Where v is the initial velocity theta is the angle you're looking for. g is a constant. So that leaves you with three unknowns, and you're going to have to supply two.

You can measure the maximum height through the camera, but the angle of view means that it changes with distance from the camera. Think about a camera aimed at the horizon - if you stand in front of it you take up "this" much of the screen, but as you move away the angle gets less and less.

So to measure the height, you'll need to know the distance of the object into the screen. You might be able to do that if you know the original size of the object.

The horizontal component could be measured using the same size/distance relationship and comparing across several frames. For small trajectories, like a ball across the room, this will be linear enough for reasonable estimates, but it will not work for anything where drag is a real concern.

So if the ball is a known size, take many images of it at difference distances to calibrate your images. Then fire it and find the point where it reaches the maximum altitude. Use that time and the measured distance to calculate the horizontal velocity, the formula above for the vertical, and solve for theta.

| cite | improve this answer | |
  • $\begingroup$ I've updated the question for further clarity. I know the original size of the object and the distance to the camera. That is how I calculated the distance between the two objects. I'm not concerned about drag as I would measure before it has any significant effect. I'm not understanding how I would get the objects height without knowing the angle first? $\endgroup$ – user1194439 Nov 7 '18 at 21:55
  • $\begingroup$ Calibrate the camera with a yardstick (orYou simply watch the object through its trajectory and pick out the moment when it reaches it's maximum point. The only problem is that it approaches this point asymptotically, so picking out the actual maximum is difficult. Instead, look for symmetry in the vertical movement and average that to find the maximum. I am assuming the camera is looking horizontally, that is how I understand your diagram. $\endgroup$ – Maury Markowitz Nov 8 '18 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.