我对OpenCV中的solvePnP函数的使用有些困惑。
我有相机内参矩阵,并在图像中识别了一些关键点,现在我正在尝试估计标定的外参参数。
solvePnP的文档如下:
cv2.solvePnP(objectPoints, imagePoints, cameraMatrix,
distCoeffs[, rvec[, tvec[, useExtrinsicGuess[, flags]]]]) → retval, rvec, tvec
我猜我的imagePoints
参数是我检测到的关键点,并且这些关键点以像素为单位指定,例如(x1, y1), (x2, y2), (x3, y3)
。
我对objectPoints
完全感到困惑。因此,文档中说:
objectPoints – Array of object points in the object coordinate space,
3xN/Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points.
vector<Point3f> can be also passed here.
我该如何从我的图像点生成这些物体点?当他们在这里说对象坐标空间时,这意味着什么?