Giter Site home page Giter Site logo

Array dtype conversion about imreg_dft HOT 2 CLOSED

matejak avatar matejak commented on July 30, 2024
Array dtype conversion

from imreg_dft.

Comments (2)

matejak avatar matejak commented on July 30, 2024 1

Hello, the similarity function performs translation, rotation and scaling of the template image. Those operations generally require interpolation, so it makes perfect sense that the result is an array of floating point numbers. Imagine the simplest operation s.a. shifting 0.5 pixels in one direction --- the shifting algorithm has to guess what values correspond to the location where two pixels meet. If the algorithm is allowed to perform e.g. cubic interpolation, the guessed value is likely to be a non-integer, although all pixel values are integers.
This approach gives you freedom on how to deal with interpolation --- you may keep the float numbers, or you can cast them back to integers.
Anyway, the code you are interested in is the transform_img function.

from imreg_dft.

tvanderweide avatar tvanderweide commented on July 30, 2024

I should have realized the interpolation from the zoom function as converting to floats. Thank you!

from imreg_dft.

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.