Giter Site home page Giter Site logo

rigid transformation about pycpd HOT 10 CLOSED

siavashk avatar siavashk commented on May 19, 2024
rigid transformation

from pycpd.

Comments (10)

siavashk avatar siavashk commented on May 19, 2024

What do you mean by "the effect was not ideal"?

from pycpd.

siavashk avatar siavashk commented on May 19, 2024

Closed due to inactivity.

from pycpd.

KingDeng005 avatar KingDeng005 commented on May 19, 2024

Hi siavashk, for the regid transformation, why scaling was computed? For my case, I computed rigid transform for two point clouds in 2D, and s_reg returns a non 1 value. It then made it non-rigid am I missing something?

from pycpd.

ckolluru avatar ckolluru commented on May 19, 2024

Hi, thanks for your work. Is there a way to get a rigid transformation result without any scaling?

There is no scaling effect between the two point clouds in my application. Thanks.

from pycpd.

gattia avatar gattia commented on May 19, 2024

Hey, @ckolluru I've reopened this issue because you & @KingDeng005 make good point - we should have the option to do rigid registration without scaling.

I don't have the time to do this right now, but that should be easy to do and is described in the original paper (quote at the end). Essentially, I think you just need to add an option for the rigid registration method that is a boolean of whether or not scaling should be optimized here. I'd call it scale since that isn't used yet (I don't think?) - we use s in the code base, and set the default to be True. You'll need to make the class inherit scale (self.scale) roughly here. Then, later in the update transform step here add something like:

if self.scale is True:
    self.s = np.trace(np.dot(np.transpose(self.A),
                                 np.transpose(self.R))) / self.YPY
else:
    pass                 

As is, this should also allow the user to pre-specify a non-unitary scaling, which would be useful.

Thanks for the interest! Let me know if you have any additional thoughts.

https://arxiv.org/pdf/0905.2635.pdf :

The most challenging here is that we biased the outliers to the different sides of fish point sets. We were able to register such point sets only by fixing the scaling to be constant (estimating rotation and translation only). CPD demonstrates accurate and robust registration performance

from pycpd.

gattia avatar gattia commented on May 19, 2024

@ckolluru did this help your usecase?

from pycpd.

ckolluru avatar ckolluru commented on May 19, 2024

I think this works.

Just one more question - with scaling disabled, is it reasonable to expect that the diagonal elements in the final transformation be very close to 1? 0.99 or higher?

from pycpd.

gattia avatar gattia commented on May 19, 2024

did you try this? If so, please feel free to make the changes on a development branch of your own fork of the repository and contribute back - others would really benefit from the addition.

That's a great question, not necessarily. They will only be close to 1.0 if the registration didn't rotate the object very much. This describes how a 3D rotation matrix should look.... you can see that all of the diagonal elements are describes as cos(theta)... therefore, if theta (the change in angle) is close to zero, then the element will be close to one. If you make the angle bigger, these elements will change accordingly.

Also.. pycpd does the scaling separate from the rotation matrix: here, so this shouldn't affect the rotation matrix at all.

from pycpd.

ckolluru avatar ckolluru commented on May 19, 2024

Submitted a PR, please take a look when you can and let me know if I can do anything else.

from pycpd.

gattia avatar gattia commented on May 19, 2024

Ability to select whether scaling is included in rigid registration has been added & merged to dev: #67

from pycpd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.