[英]Reconstructing a non-planar polygon in 3D given a 2d projection and known polygon dimensions
在您的問題中,您提到要僅使用對象的單個視圖來實現此目的。 在那種情況下,單應性或基本/基本矩陣將無濟於事,因為它們至少需要兩個場景視圖才有意義。 如果您對要重建的對象的形狀沒有任何先驗知識,那么您將缺少的關鍵信息是(相對)深度,在這種情況下,我認為這是兩種可能的解決方案:
利用學習算法。 關於深度網絡中6dof對象姿態估計的文獻很多,例如,請參見本文 。 如果使用深度,則不必直接處理深度,因為這些網絡是端到端地訓練以估計SO(3)
的姿勢。
添加更多的圖像,並使用一個密集的光度SLAM / SFM管道,如彈性融合 。 但是,在這種情況下,您將需要對結果模型進行細分,因為它們所產生的估計是針對整個環境的,這可能很難根據場景進行。
但是,正如您在評論中所提到的,如果您對模型的幾何先驗性很強,則可以按比例重建模型。 如果是平面物體(長方體只是該物體的擴展),則可以使用此簡單算法(即它們在此處執行的操作或多或少,還有其他方法,但是我發現它們有點混亂,方程式-明智的):
//let's note A,B,C,D the rectangle in 3d that we are after, such that
//AB is parellel with CD. Let's also note a,b,c,d their respective
//reprojections in the image, i.e. a=KA where K is the calibration matrix, and so on.
1) Compute the common vanishing point of AB and CD. This is just the intersection
of ab and cd in the image plane. Let's call it v_1.
2) Do the same for the two other edges, i.e bc and da. Let's call this
vanishing point v_2.
3) Now, you can compute the vanishing line, which will just be
crossproduct(v_1, v_2), i.e. the line going through both v_1 and v_2. This gives
you the orientation of your plane. Let's write its normal N.
5) All you need to find now is the boundaries of the rectangle. To do
that, just consider any plane with normal N that doesn't go through
the camera center. Now find the intersections of K^{-1}a, K^{-1}b,
K^{-1}c, K^{-1}d with that plane.
如果您需要對消失的點和線進行復習,建議您看一下Hartley-Zisserman的書的第213和216頁。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.