Questions tagged «pose-estimation»

2
从图像点计算x,y坐标(3D)
我有一项任务是在3D坐标系中定位对象。由于我必须获得几乎精确的X和Y坐标,因此我决定跟踪一个具有已知Z坐标的颜色标记,该颜色标记将放置在移动对象的顶部,如该图中的橙色球: 首先,我已经完成了相机校准以获取固有参数,然后使用cv :: solvePnP来获取旋转和平移矢量,如以下代码所示: std::vector<cv::Point2f> imagePoints; std::vector<cv::Point3f> objectPoints; //img points are green dots in the picture imagePoints.push_back(cv::Point2f(271.,109.)); imagePoints.push_back(cv::Point2f(65.,208.)); imagePoints.push_back(cv::Point2f(334.,459.)); imagePoints.push_back(cv::Point2f(600.,225.)); //object points are measured in millimeters because calibration is done in mm also objectPoints.push_back(cv::Point3f(0., 0., 0.)); objectPoints.push_back(cv::Point3f(-511.,2181.,0.)); objectPoints.push_back(cv::Point3f(-3574.,2354.,0.)); objectPoints.push_back(cv::Point3f(-3400.,0.,0.)); cv::Mat rvec(1,3,cv::DataType<double>::type); cv::Mat tvec(1,3,cv::DataType<double>::type); cv::Mat rotationMatrix(3,3,cv::DataType<double>::type); cv::solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, …

1
您可以将OpenCVsolvePNP与等角矩形图像一起使用吗?
是否可以将OpenCV的solvePNP与等矩形图像一起使用?我有一个等边的图像,并且在此图像中有四个点(红色点)及其像素坐标,然后我有四个对应的世界点,例如,[(0, 0, 0), (2, 0, 0), (2, 10, 0), (0, 10, 0)]如何估计相机的姿势? 我尝试使用OpenCV,solvePnp但由于它期望使用Brown相机模型,因此无法正常工作。球形摄像机可以做到吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.