How do these codes work?
- cv::Point3f pt{1};
- cv::Point3f pt{3};
- cv::Point3f pt{1, 2, 3};
- std::vector<cv::Point3f> pts{1};
- std::vector<cv::Point3f> pts{3};
- std::vector<std::vector<cv::Point3f>> object_points{0};
- std::vector<std::vector<cv::Point3f>> object_points{1};
These questions arise from my implementation of camera calibration. The camera calibration requires us to create the 2D image_points and the 3D object_points to be used in cv::calibrateCamera() for computing the reprojection error.
Hence, I create the object_points
like this:
std::vector<std::vector<cv::Point3f>> object_points{1};
... // Fill in the object_points container with the "actual" corners in the chessboard.
object_points.resize(image_points.size(), object_points[0]); // Copy the entries in object_points[0]` to fill in the outer container of `object_points
Aucun commentaire:
Enregistrer un commentaire