Giter Club home page Giter Club logo

Comments (3)

johnnychen94 avatar johnnychen94 commented on August 19, 2024

The expectation that "imrotate(img, pi/2) should have the same size as img" can be somehow illusive due to the numerical error. A trick we use in this package is to discretization on ratio so that we consistently have imrotate(img, theta) == imrotate(img, theta+2pi) but that doesn't handle special pi/2, pi and 3pi/2 case.

θ = floor(mod(θ,2pi)*typemax(Int16))/typemax(Int16) # periodic discretezation

To get the same size you can use imrorate(img, π/2, axes(img)).


Would it make sense to just define a new imrotate specifically for these factors of pi/2?

Yes it totally makes sense, I did some experiment a long time ago in #79 but there are performance concerns.

from imagetransformations.jl.

johnnychen94 avatar johnnychen94 commented on August 19, 2024

Would it make sense to just define a new imrotate specifically for these factors of pi/2?

There're Base functions rotl90, rotr90 and rot180 for this very purpose. In the meantime, I still think #79 is needed.

I believe that we also need more documentation on this behavior because other image processing frameworks don't have this axes stuff.

from imagetransformations.jl.

timholy avatar timholy commented on August 19, 2024

This is also fixed by #148

from imagetransformations.jl.

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.