Skip to content
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

Implement full affine transform #364

Open
opatiny opened this issue Jun 21, 2023 · 3 comments
Open

Implement full affine transform #364

opatiny opened this issue Jun 21, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@opatiny
Copy link
Contributor

opatiny commented Jun 21, 2023

We want a function that takes in two sets of N points and returns the best 2x3 transformation matrix between them.
image
image
https://nghiaho.com/?p=2208

We need a minimum of 3 points to get the affine transform. The best affine transform can then be found using RANSAC.

@opatiny opatiny self-assigned this Jun 21, 2023
@opatiny opatiny added the enhancement New feature or request label Jun 21, 2023
@targos
Copy link
Member

targos commented Jun 21, 2023

Shouldn't this issue be in https://github.com/mljs/affine-transform ?

@opatiny
Copy link
Contributor Author

opatiny commented Jun 21, 2023

Oh no.... I got confused again...

Actually they are 2 different things I think:

  1. the function that takes only 3 points and returns the matrix -> this should indeed go to affine-transform
  2. the function that takes more than 3 points and that returns the best fitting transform (using ransac) -> put that in image-js-ts?

Currently for the partial affine transform, point 2 is made in image-js-ts, but I feel that it would be nearly more intuitive to have the function fitting N points in affine-transform as well. Indeed this function is completely unrelated to images.

This would imply migrating some of the code from image-js-ts to ml-affine-transform, which would then have ml-ransac as a dependency.

Wdyt @targos ?

@targos
Copy link
Member

targos commented Jun 21, 2023

I'd be fine migrating code from image-js to ml-affine-transform, especially since the existing getAffineTransform function over there already takes many points (not just 3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants