在多視圖幾何中最接近另一個 3D 點的線上查找 3D 點? (To find 3D point on a line closest to another 3D point in Multi-view Geometry?)


問題描述

在多視圖幾何中最接近另一個 3D 點的線上查找 3D 點? (To find 3D point on a line closest to another 3D point in Multi‑view Geometry?)

我有兩個立體相機,我從左相機和右相機都捕獲了標記的圖像。

我有一個完美的校準

  1. 內在

    li>
  2. 失真校正
  3. 外部

現在來到標記,我在板上有一組標記,我估計了它的姿勢。此外,我根據三角 3D 點計算了每個標記的 3D 點

cv::triangulatePoints(Projection_Matrix_L[o], Projection_Matrix_R[o], pointsMat1, pointsMat2, pnts3D);

然後我知道相機中心(CL_O)

CL_O = ‑Rotation_matrix.inv * translation

主要是(0,0,0 )

對於其他相機視圖也類似。為簡單起見,我們只使用一個。

我假設下面的等式應該根據 lambda(λ) 計算直線中的點

line(λ) = CL_O + λ*t

CL_O, is a 3D point say (x0, y0, z0)
t, is a Vector (a, b, c)

使用正確的(λ)值,結果將是一個3D點,比如Q。但它仍然不靠近標記點P。所以我需要計算點P和Q之間的最小距離。

問題 ‑ 我應該如何確定每個 3D 標記點的 λ,以便它給我一個接近 P 且誤差最小的 3D 點 Q。不知道下面的公式是否正確?

f(λ) = abs(Point P ‑ line(λ))

如果您認為它是正確的,我需要示例代碼/偽代碼的幫助來實現它(最好是 C++ 或 python)。

雖然上面寫了,我還是覺得還是少了點什麼。請連接點並告訴我如何繼續。

參考解法

方法 1:

I had done a similar problem in java sometimes its algorithm can help you

Check out it at https://github.com/sreeragrnandan/JAVA‑ASSIGNMENT/blob/master/Mdis.java

(by JokerSREERAG R NANDAN)

參考文件

  1. To find 3D point on a line closest to another 3D point in Multi‑view Geometry? (CC BY‑SA 2.5/3.0/4.0)

#3d #Python #camera-calibration #geometry #OpenCV






相關問題

OpenGL ES 或 Direct3D 中的表面究竟是什麼? (What exactly is a surface in OpenGL ES or Direct3D?)

為什麼我們需要維護自己的矩陣來轉換遊戲對象? (Why we need to maintain our own matrices to transform Game objects?)

將兩個 4x4 矩陣連接在一起? (Concat two 4x4 matrices together?)

使用 matplotlib 保存散點圖動畫 (Saving scatterplot animations with matplotlib)

如何在 Matlab 中為這個 3D 繪圖設置動畫? (How to animate this 3D plot in Matlab?)

用java加載最簡單的靜態模型格式? (easiest static model format to load with java?)

在 GLSL 中混合多個紋理 (Blending multiple textures in GLSL)

在 3D 中可視化 10,000 個陰影框的最簡單方法 (Easiest way to visualize 10,000 shaded boxes in 3D)

如何圍繞其中心旋轉 3D 模型? (How to rotate a 3D model around its center?)

如何計算一個長方體與其相鄰長方體的接觸面積 (How to calculate area of contact of one rectangular cuboid to its adjacent cuboids)

在多視圖幾何中最接近另一個 3D 點的線上查找 3D 點? (To find 3D point on a line closest to another 3D point in Multi-view Geometry?)

GLUT 環面與相機相撞 (GLUT torus colliding with camera)







留言討論