- Notifications
You must be signed in to change notification settings - Fork11.7k
Addition of "estimateAffine2D" for finding transformation matrix in OpenCV version greater than 3.0#515
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
For OpenCV version greater than 3.0 assigned "estimateAffine2D" function for finding transformation matrix.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
| #Find transformation matrix | ||
| m=cv2.estimateRigidTransform(prev_pts,curr_pts,fullAffine=False)#will only work with OpenCV-3 or less | ||
| iffloat((cv2.__version__)[0:3])<=3.0: |
dustinfreemanJul 31, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Based on other usages in the repo, I less brittle version of this is:
if int((cv2.__version__).split('.')[0]) <= 3:
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.
@dustinfreeman what changes do you suggest here to merge this PR?
For OpenCV version greater than 3.0 assigned "estimateAffine2D" function for finding transformation matrix. Initially "estimateRigidTransform" was used which only works in OpenCV-3 or less.