Overhaul elliptical distortion correction#2787
Merged
Conversation
to accurately reflect the fact that this class calculates maps for any linear transform represented by matrix M, not just an ellipse.
linear scale factors for the lengths of ellipse axes
of undistorting an elliptical pattern with a 5% scale factor along one axis. Errors < 0.5 pixels for that test.
graeme-winter
pushed a commit
that referenced
this pull request
Nov 19, 2024
* Add ellipse_to_circle_transform and circle_to_ellipse_transform * Rename CreateEllipticalDistortionMaps --> PlaneLinearTransformationMaps to accurately reflect the fact that this class calculates maps for any linear transform represented by matrix M, not just an ellipse. * Remove no-longer-needed ellipse_matrix_form function * Correct the definition of the distortion matrices when l1, l2 are linear scale factors for the lengths of ellipse axes * Add tests for the circle<-->ellipse tranform functions and a full test of undistorting an elliptical pattern with a 5% scale factor along one axis. Errors < 0.5 pixels for that test. * Improve docstrings * Resolve an old TODO in test_translate
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.
Following #2745 some bugs were found with the generation of elliptical distortion correction maps. This PR replaces the$2 \times 2$ matrices to transform points from an ellipse to a circle and vice versa. Better tests are added, which check the operation of these functions, as well as a "real case" test of correction of an elliptical distortion.
ellipse_matrix_formfunction with a pair of functionsellipse_to_circle_transformandcircle_to_ellipse_transform, which produce the correctIn the course of this, the class$2 \times 2$ matrix, not just elliptical distortion.
CreateEllipticalDistortionMapswas renamedPlaneLinearTransformationMaps, reflecting the fact that it can be used to produce correction maps for any distortion represented by a