Fix the incorrect method of setting the distortion model flag - #78
Conversation
merge from original branch
Update from oliver-batchelor's master
* Fix deprecated numpy int * Update setup.py * Update setup.py * Non-overlapping functionality with some other adjustments (oliver-batchelor#67) * iterative_intrinsic_calibration To begin, we selected all available images and performed an initial estimation of camera parameters. However, some images might contain significant errors. Then, we identify and remove these problematic images, focusing on a subset of more reliable images. Using this refined dataset, we recalculated camera parameters iteratively until we reached a satisfactory level of accuracy. * pose_estimation_algorithm_changed cv2.solvePnPGeneric proves to be more robust. Additionally, the per-view error provided by this function is valuable for identifying and filtering out outlier poses. * cached_detection When using the same dataset, this algorithm checks the last 3 folders and files in the path to determine if it is similar to the currently loaded dataset. For example, if the dataset path is '/home/.../icosahedron/cam1/p1.png', the algorithm will only evaluate the portion '/icosahedron/cam1/p1.png' for comparison. * extra_info_in_pose_table In pose_table, per view re-projection error and view_angle infos are added. Poses with error higher than "pose_error_limit" are excluded from further calculation. * Non_overlapping_funtionality Hand-eye calibration functionality added. * final_adjustments iterative intrinsic calibration, outlier pose rejection, non-overlapping (hand-eye calibration) * Mention non overlapping use case * Mention non-overlapping case * Bump version * Don't undistort twice in estimate_pose_points * charuco detections are discarded if too few (oliver-batchelor#75) * Bump version, restrict opencv --------- Co-authored-by: Oleksandr Slovak <slovak194@gmail.com> Co-authored-by: Oliver Batchelor <saulzar@gmail.com> Co-authored-by: TabassumNova <77242943+TabassumNova@users.noreply.github.com> Co-authored-by: Elia Pontiggia <59708804+pontig@users.noreply.github.com>
There was a problem hiding this comment.
- False is an odd expression
I presume this would suffice?
rational=cv2.CALIB_RATIONAL_MODEL ,
tilted=cv2.CALIB_RATIONAL_MODEL | cv2.CALIB_TILTED_MODEL,
thin_prism=cv2.CALIB_RATIONAL_MODEL | cv2.CALIB_TILTED_MODEL | cv2.CALIB_THIN_PRISM_MODEL,
I have never used rational models myself.
There was a problem hiding this comment.
Right, Your way is better for masking bits.
|
I commit to satisfy your change request, And there was a mistake! In, OpenCV, The tilted model(14 coefficients) is considered as exetended version of thin_prism model(12 coefficients). is right code. |
The previous way of setting distortion model is wrong.
For example, if you want to use thin-prism model, but you only set cv2.CALIB_THIN_PRISM_MODEL as True, not cv2.CALIB_RATIONAL_MODEL and cv2.CALIB_TILTED_MODEL, the calibration result sucks.
Thin-prism model must have other polynomial coefficients which is enabled by setting cv2.CALIB_RATIONAL_MODEL and cv2.CALIB_TILTED_MODEL as True.
I fixed above problem.