[Problem]
Q1: How to determine the speed of an object(plane) from sequence of camera images based on visual size of objects
- there are few camera images
- height and angle of the camera is known
[Notes]
- This is rewrite of an interesting but badly written question (Currently on Hold) so I can answer it.
- original question is here
- there are many other approaches like blur analysis and so on ...
This question is very broad so I will focus on the math/physics behind only
velocity perpendicular to camera axis
image shows dependence of object visual size
h
vs view distancel
. The more distant object is the less visual size it has. At double distance there is half size so we can write this:Now we know that the images are not taken in the same time so if we assume that speed is constant (for the time we are measuring) then images
0,1,2
are taken at timest0,t1,t2
so for constant speedv
we know that:where:
v
is relative velocity between camera and objectt0,t1,t2
are times the photos are takenl0,l1,l2
are distances between the camera and object at timest0,t1,t2
h0,h1,h2
are visual sizes of object at timest0,t1,t2
For simplicity we can take the photos in 1 sec intervals so:
That simplifies things a bit:
Now the problem is that we do not know the distance of object. Equations above do not lead to solution (at least I do not see any)... For this task we must find some known object (etalone) on the scene and compute its real distance
z1
from visual distanceh0
and object known sizeh1
. Beware that theseh0,h1
are not theh0,h1
from above ... it is only respect to this pictureThis way we can find the real distance of object in time
(l0,l1,l2)
two will suffice and speed is then simpleThis is velocity perpendicular to camera axis so if you want velocity in some direction then just project it onto it by scalar multiply of vectors or by
sin
cruise velocity
Better approach is by taking photos in the 'ground' direction this eliminates the need of known object on the scene but you have to mount camera in specific direction which is not always possible. Also
pitch
androll
of the plane greatly affects this and need to be corrected.The idea is simple find any distinct object on the scene and measure the visual distance it travel with time. Apply camera perspective and known
altitude,pitch
androll
to convert pixels to ground units [m]. Equations and properties of perspective are the same as in previous bulletYou should check more objects at once and eliminate all those that move in different direction/speed as the majority to avoid measuring speed relative to some moving object like car ...
[Notes]
For camera the
Zfar
is infinity andZnear
depend on the camera optics and chip. You can calibrate it by taking image of known object at known distance and compute from it all you need. Of course if you have not fixed focus then you are in trouble