天天看點

IPM簡介

1.IPM包含3個函數。

image2ground:将圖像中的像素點(u, v)對應到地平面上(Z=1)IPM的像素點(x, y);

ground2image:将IPM中的像素點(x, y)基于IPM的最大範圍轉換為xygrid,進而轉化為uvgrid;

src2ipm:基于uvgrid插值得到IPM中像素點(x, y)的的灰階值并顯示,同時轉換得到IPM中每個像素點的實際距離coord;

2.如何求解原圖像中像素點的實際距離;

image2ground:uvp ——> xyp;

xyp2ipmp:xyp ——> ipmp;

xmin + x.ipmp * stepcol = x.xyp;

ymax - y.ipmp * steprow = y.xyp;

進而推導出,

x.ipmp = ( x.xyp - xmin ) / stepcol;

y.ipmp = ( ymax - y.xyp ) / steprow;

3.注意:

3.1.檢視x.ipmp和y.ipm的結果是否越界,需要添加越界判斷;

3.2.編碼的時候需要非常注意各個參數的資料類型及格式是否比對或者一緻;

4. 單應矩陣

5. IPM的原理

參考

1.​​matlab了解IPM​​;

2.​​opencv函數​​;