从视觉尺寸指定速度 [英] Specifiyng speed from visual size

查看:89
本文介绍了从视觉尺寸指定速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[问题]

问题1:如何根据对象的视觉大小从摄像机图像序列确定对象(平面)的速度

Q1: How to determine the speed of an object(plane) from sequence of camera images based on visual size of objects

  • 相机图像很少
  • 相机的高度和角度是已知的

[注释]

  • 这是对一个有趣但写得不好的问题(目前处于搁置状态)的重写,所以我可以回答.
  • 原始问题是此处
  • 还有许多其他方法,例如模糊分析等等...

推荐答案

这个问题非常广泛,因此我将只关注后面的数学/物理学

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

  1. 垂直于相机轴的速度

图像显示了对象视觉尺寸h与视距l的依赖关系.物体越远,其视觉尺寸越小.在两倍距离处只有一半大小,因此我们可以这样写:

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

现在我们知道图像不是在同一时间拍摄的,因此如果我们假设速度恒定(对于我们正在测量的时间),则图像0,1,2在时间t0,t1,t2拍摄,因此对于恒定速度我们知道:

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)

其中:

  • v是相机和物体之间的相对速度
  • t0,t1,t2是照片拍摄的时间
  • l0,l1,l2是在时间t0,t1,t2
  • 时相机和物体之间的距离
  • h0,h1,h2是对象在t0,t1,t2
  • 时的视觉尺寸
  • 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

为简单起见,我们可以以1秒的间隔拍摄照片,因此:

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

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

这简化了一些事情:

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

现在的问题是,我们不知道物体的距离.上面的方程式不会导致解决方案(至少我看不到任何解决方案)...对于此任务,我们必须在场景中找到一些已知的对象(etalone),并根据视觉距离h0和对象计算其实际距离z1已知尺寸h1.请注意,这些h0,h1不是上面的h0,h1 ...仅是针对此图片

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

这样我们可以及时找到物体的真实距离(l0,l1,l2)两个就足够了,速度就很简单

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)

这是垂直于相机轴的速度,因此,如果您想要某个方向的速度,则可以通过向量的标量乘法或通过sin

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. 巡航速度

更好的方法是沿地面"方向拍照,这消除了场景中已知物体的需求,但您必须将摄像机安装在特定方向上,而这并非总是可能的.飞机的pitchroll也会对此产生很大影响,因此需要进行纠正.

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.

这个想法很简单,即找到场景中的任何不同物体,并测量其随时间推移的视觉距离.应用相机透视图和已知的altitude,pitchroll将像素转换为地面单位[m].透视的方程式和属性与上一个项目符号相同

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

[注释]

对于相机,Zfar是无穷大,而Znear取决于相机的光学元件和芯片.您可以通过在已知距离拍摄已知物体的图像并根据其进行计算来对其进行校准. 当然,如果您没有固定焦点,那么您会遇到麻烦

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

这篇关于从视觉尺寸指定速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆