Giter VIP home page Giter VIP logo

ciede2000's Introduction

CIE Delta E 2000 (CIEDE2000)

A C++ library containing a function to determine how similar two colors are. The code here is original, based on the psuedocode written in the paper The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations, by Gaurav Sharma, Wencheng Wu, and Edul N. Dalal. While this is written in C++ so that I could place it in a namespace, there's nothing C++-specific about the implementation, and so it would be trivial to convert to C if required. The conversion is left as an exercise to the reader.

To Build make

To Test make test && ./testCIEDE2000 (Expected output below.)

As I implemented the method from the paper, I commented the code to line up code fragements with lines from the paper for tracability. There are ways to speed up and optimize this algorithm, which have not been attempted.

A test program (testCIEDE2000) is built by default to run the tests perscribed by the algorithm authors. Tested on OS X 10.10.2, and Ubuntu 14.04 LTS. Should work on Cygwin/MINGW, though there will likely need to be edits to the Makefile.

NOTE The CIEDE2000 algorithm uses colors from the LAB colorspace, not RGB. In practice, I've used ImageMagick to convert color values for use with CIEDE2000, though that not may be entirely correct.

Expected Testing Output

$ ./testCIEDE2000 
1: 2.0425 vs 2.0425	PASS 
2: 2.8615 vs 2.8615	PASS 
3: 3.4412 vs 3.4412	PASS 
4: 1.0000 vs 1.0000	PASS 
5: 1.0000 vs 1.0000	PASS 
6: 1.0000 vs 1.0000	PASS 
7: 2.3669 vs 2.3669	PASS 
8: 2.3669 vs 2.3669	PASS 
9: 7.1792 vs 7.1792	PASS 
10: 7.1792 vs 7.1792	PASS 
11: 7.2195 vs 7.2195	PASS 
12: 7.2195 vs 7.2195	PASS 
13: 4.8045 vs 4.8045	PASS 
14: 4.8045 vs 4.8045	PASS 
15: 4.7461 vs 4.7461	PASS 
16: 4.3065 vs 4.3065	PASS 
17: 27.1492 vs 27.1492	PASS 
18: 22.8977 vs 22.8977	PASS 
19: 31.9030 vs 31.9030	PASS 
20: 19.4535 vs 19.4535	PASS 
21: 1.0000 vs 1.0000	PASS 
22: 1.0000 vs 1.0000	PASS 
23: 1.0000 vs 1.0000	PASS 
24: 1.0000 vs 1.0000	PASS 
25: 1.2644 vs 1.2644	PASS 
26: 1.2630 vs 1.2630	PASS 
27: 1.8731 vs 1.8731	PASS 
28: 1.8645 vs 1.8645	PASS 
29: 2.0373 vs 2.0373	PASS 
30: 1.4146 vs 1.4146	PASS 
31: 1.4441 vs 1.4441	PASS 
32: 1.5381 vs 1.5381	PASS 
33: 0.6377 vs 0.6377	PASS 
34: 0.9082 vs 0.9082	PASS

ciede2000's People

Contributors

gfiumara avatar lk64076007a avatar

Watchers

 avatar

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.