ciede2000 | CIEDE2000 color difference algorithm

 by   francescoracciatti Python Version: Current License: MIT

kandi X-RAY | ciede2000 Summary

kandi X-RAY | ciede2000 Summary

ciede2000 is a Python library. ciede2000 has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However ciede2000 build file is not available. You can download it from GitLab, GitHub.

Python implementation of CIEDE2000 color difference algorithm, to calculate the distance between two colors. The implementation and the tests are based on the paper The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations , by G. Sharma, W. Wu, E. N. Dalal.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ciede2000 has a low active ecosystem.
              It has 0 star(s) with 0 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              ciede2000 has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of ciede2000 is current.

            kandi-Quality Quality

              ciede2000 has 0 bugs and 0 code smells.

            kandi-Security Security

              ciede2000 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ciede2000 code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ciede2000 is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              ciede2000 releases are not available. You will need to build from source code and install.
              ciede2000 has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ciede2000 and discovered the below as its top functions. This is intended to give you an instant insight into ciede2000 implemented functionality, and help decide if they suit your requirements.
            • Distance between two colors .
            • Convert from RGB to Labels
            Get all kandi verified functions for this library.

            ciede2000 Key Features

            No Key Features are available at this moment for ciede2000.

            ciede2000 Examples and Code Snippets

            No Code Snippets are available at this moment for ciede2000.

            Community Discussions

            QUESTION

            Implementing Floyd-Steinberg Dithering in C# with specific Palette
            Asked 2021-Sep-19 at 07:47

            I am making a program where I want to take an image and reduce its color palette to a preset palette of 60 colors, and then add a dithering effect. This seems to involve two things:

            • A color distance algorithm that goes through each pixel, gets its color, and then changes it to the color closest to it in the palette so that that image doesn't have colors that are not contained in the palette.
            • A dithering algorithm that goes through the color of each pixel and diffuses the difference between the original color and the new palette color chosen across the surrounding pixels.

            After reading about color difference, I figured I would use either the CIE94 or CIEDE2000 algorithm for finding the closest color from my list. I also decided to use the fairly common Floyd–Steinberg dithering algorithm for the dithering effect.

            Over the past 2 days I have written my own versions of these algorithms, pulled other versions of them from examples on the internet, tried them both first in Java and now C#, and pretty much every single time the output image has the same issue. Some parts of it look perfectly fine, have the correct colors, and are dithered properly, but then other parts (and sometimes the entire image) end up way too bright, are completely white, or all blur together. Usually darker images or darker parts of images turn out fine, but any part that is bright or has lighter colors at all gets turned up way brighter. Here is an example of an input and output image with these issues:

            Input:

            ]3

            Output:

            I do have one idea for what may be causing this. When a pixel is sent through the "nearest color" function, I have it output its RGB values and it seems like some of them have their R value (and potentially other values??) pushed way higher than they should be, and even sometimes over 255 as shown in the screenshot. This does NOT happen for the earliest pixels in the image, only for ones that are multiple pixels in already and are already somewhat bright. This leads me to believe it is the dithering/error algorithm doing this, and not the color conversion or color difference algorithms. If that is the issue, then how would I go about fixing that?

            Here's the relevant code and functions I'm using. At this point it's a mix of stuff I wrote and stuff I've found in libraries or other StackOverflow posts. I believe the main dithering algorithm and C3 class are copied basically directly from this Github page (and changed to work with C#, obviously)

            ...

            ANSWER

            Answered 2021-Sep-19 at 07:08

            It appears that when you shift the error to the neighbors in floydSteinbergDithering() the r,g,b values never get clamped until you cast them back to Color.

            Since you're using int and not byte there is no prevention of overflows to negative or large values greater than 255 for r, g, and b.

            You should consider implementing r,g, and b as properties that clamp to 0-255 when they're set.

            This will ensure their values will never be outside your expected range (0 - 255).

            Source https://stackoverflow.com/questions/69239826

            QUESTION

            Better algorithm with CIEDE2000 to find true opposite colors
            Asked 2020-Jul-18 at 22:52

            Using Python 3.7 and the colormath module, I had some fun trying to find the complete opposite of one color (ex. The opposite color of black [0, 0, 0] is yellow [255, 255, 0] with a DE of 101.20397657762743) or trying to find the two colors with the most color difference (i.e. "Navy" [0, 0, 110] and "Chartreuse" [143, 255, 0] with a DE of 119.4740815993416, from my potentially inaccurate testing).

            Unfortunately, the only way I have found to find the opposite of a given color is just to bruteforce with a little bit of optimization by comparing the given color with (almost) every single sRGB color combo (or, [0, 0, 0] to [255, 255, 255]).

            Python 3.7 code:

            ...

            ANSWER

            Answered 2020-Jul-18 at 22:52

            CIE DeltaE 2000 is not appropriate for large colour differences so large differences in the range [10, 20]+ simply cannot be evaluated with this quasi-metric and you should probably look at something else such as HyAB colour difference metric: https://onlinelibrary.wiley.com/doi/abs/10.1002/col.22451 or alike.

            Source https://stackoverflow.com/questions/62964839

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ciede2000

            You can download it from GitLab, GitHub.
            You can use ciede2000 like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/francescoracciatti/ciede2000.git

          • CLI

            gh repo clone francescoracciatti/ciede2000

          • sshUrl

            git@github.com:francescoracciatti/ciede2000.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Python Libraries

            public-apis

            by public-apis

            system-design-primer

            by donnemartin

            Python

            by TheAlgorithms

            Python-100-Days

            by jackfrued

            youtube-dl

            by ytdl-org

            Try Top Libraries by francescoracciatti

            asl

            by francescoracciattiPython

            ivy

            by francescoracciattiC++

            castalia

            by francescoracciattiC++

            picman

            by francescoracciattiPython

            mechanoid

            by francescoracciattiPython