Fix the incorrect method of setting the distortion model flag#78
Open
demul wants to merge 5 commits into
Open
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>
Owner
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.