Giter Site home page Giter Site logo

Comments (6)

theogf avatar theogf commented on September 17, 2024 1

Oh I would definitely not consider that a bug 😁 that makes total sense to return NaN here. I just wanted to explain where it came from!

from imagecontrastadjustment.jl.

zygmuntszpak avatar zygmuntszpak commented on September 17, 2024

Thanks for raising the issue. Just to clarify, when you say that color images are badly treated, do you mean that you apply adjust_histogram to a color image and for some images it fails because in the process some NaN values are created? Or do you mean, that the colour images has some NaN values to start with?

Would you be able to share an example problematic color image?

from imagecontrastadjustment.jl.

theogf avatar theogf commented on September 17, 2024

I mean that I apply all kinds of filters. The problem is that my process is completely random but I will try to go through the seeds and find one reproducible example.

Sorry that my problem is too vague 😅

from imagecontrastadjustment.jl.

zygmuntszpak avatar zygmuntszpak commented on September 17, 2024

For coloured images, the input is converted to YIQ type and the Y channel is equalised. This is the combined with the I and Q channels and the resulting image converted to the same type as the input

I suspect something is going wrong with conversion to the YIQ space. You could try this out on the results of your filters and see.

What is the final type of the image that you pass in? RGB Float64? Are all the channels in the unit interval?

from imagecontrastadjustment.jl.

theogf avatar theogf commented on September 17, 2024

Hi @zygmuntszpak,
Sorry for the delayed answer. I checked again, and using ImageTransformations.jl warp function, I indeed sometimes got some NaN values in my image!
I am working indeed in RGB{Float64}

from imagecontrastadjustment.jl.

johnnychen94 avatar johnnychen94 commented on September 17, 2024

The NaN returned from warp is an deliberate behavior -- it is used to indicate missing regions.

I'm using the phone so can't easily check out the documentation. If my memory serves well, there is a 'fillvalue' or 'fill' keyword for ImageTransformations operation, for which you can pass a, e.g., zero(RGB) or oneunit(RGB)

from imagecontrastadjustment.jl.

Related Issues (11)

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.