Specifiyng speed from visual size

2019-03-05 09:53发布

问题:

[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 ...

回答1:

This question is very broad so I will focus on the math/physics behind only

  1. velocity perpendicular to camera axis

    image shows dependence of object visual size h vs view distance l. The more distant object is the less visual size it has. At double distance there is half size so we can write this:

    l0=(h1/h0)*l1
    l0=(h2/h0)*l2
    l1=(h0/h1)*l0
    l1=(h2/h1)*l2
    l2=(h0/h2)*l0
    l2=(h1/h2)*l1
    

    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 times t0,t1,t2 so for constant speed v we know that:

    v=(l1-l0)/(t1-t0)
    v=(l2-l1)/(t2-t1)
    v=(l2-l0)/(t2-t0)
    

where:

  • v is relative velocity between camera and object
  • t0,t1,t2 are times the photos are taken
  • l0,l1,l2 are distances between the camera and object at times t0,t1,t2
  • h0,h1,h2 are visual sizes of object at times t0,t1,t2

For simplicity we can take the photos in 1 sec intervals so:

    t1-t0=1
    t2-t1=1
    t2-t0=2

That simplifies things a bit:

    v=(l1-l0)
    v=(l2-l1)
    v=(l2-l0)/2

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 distance h0 and object known size h1. Beware that these h0,h1 are not the h0,h1 from above ... it is only respect to this picture

    z1 = (h1/h0)*z0

This way we can find the real distance of object in time (l0,l1,l2) two will suffice and speed is then simple

    v = (l1-l0)/(t1-t0)

This 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

  1. 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 and roll 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 and roll to convert pixels to ground units [m]. Equations and properties of perspective are the same as in previous bullet

    v = dpos/dtime
    

    You 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 and Znear 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



标签: math physics