New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing minus in SimilarityTransform
docstring
#6840
Conversation
added a missing minus in the homogeneous transformation matrix
@@ -1293,7 +1293,7 @@ class SimilarityTransform(EuclideanTransform): | |||
|
|||
where ``s`` is a scale factor and the homogeneous transformation matrix is:: | |||
|
|||
[[a0 b0 a1] | |||
[[a0 -b0 a1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my understanding, the equations are correct and the matrix is not.
the homogenous matrix should be:
[[s*cos_theta, -s*sin_theta, t_x],
[s*sin_theta, s*cos_theta, t_y],
[0,0,1]]
here:
a0 = s*cos_theta
b0 = s*sin_theta
a1 = t_x
b1 = t_y
in the correction you proposed there is a contradiction, as b0=s*sin_theta=-s*sin_theta
Nice catch @akonsk ! |
hi @akonsk , are you an Outreachy applicant? |
@@ -1293,7 +1293,7 @@ class SimilarityTransform(EuclideanTransform): | |||
|
|||
where ``s`` is a scale factor and the homogeneous transformation matrix is:: | |||
|
|||
[[a0 b0 a1] | |||
[[a0 -b0 a1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the edit, @akonsk! All good now, I recognize the notation found, for example, at: https://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations
@akonsk would you mind including the same docstring fix for class |
[b0 a0 b1] | ||
[0 0 1]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[b0 a0 b1] | |
[0 0 1]] | |
[b0 a0 b1] | |
[0 0 1]] |
(to preserve alignment)
SimilarityTransform
docstring
Thanks @akonsk! |
added a missing minus in the homogeneous transformation matrix
Description
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.example, to backport to v0.19.x after merging, add the following in a PR
comment:
@meeseeksdev backport to v0.19.x
run-benchmark
label. To rerun, the labelcan be removed and then added again. The benchmark output can be checked in
the "Actions" tab.