Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The implementation uses Lab color space rather than ℓαβ color space. #1

Open
TJCoding opened this issue Aug 2, 2020 · 0 comments

Comments

@TJCoding
Copy link

TJCoding commented Aug 2, 2020

Although the commentary here states that the processing implements a conversion of images from “RGB to ℓαβ color space”, this is not the case. The processing, as implemented, converts images from RGB to CIE Lab color space. (It uses the function cvtColor in association with COLOR_BGR2LAB.)

Here is an implementation in Matlab where the conversion is from RGB to ℓαβ color space.
https://github.com/hangong/reinhard_color_transfer
Here is an implementation in Python where the conversion is from RGB to CIE Lab color space.
https://github.com/pengbo-learn/python-color-transfer

It can be seen that the output image produced by the first processing method is different to that produced by the second.
The implementation presented in this repository is correct and perfectly valid, but it cannot be described as an implementation of the paper ‘Color Transfer between Images’ by Erik Reinhard, Michael Ashikhmin, Bruce Gooch and Peter Shirley. It is a variation of the method described in that paper.

Incidentally, I have implemented an enhanced CIE Lab version of color transfer here.
https://github.com/TJCoding/Enhanced-Image-Colour-Transfer

I have also attached here a file which implements in Python ‘Enhanced Image Color Transfer Processing’. It is a modification of the code that was posted here. https://github.com/jrosebr1/color_transfer
It is the only Python code I have ever written so it is not suitable for formal issue, but if anyone wishes to produce a formal version by refining the code then they are welcome to do so.

init.zip

A web app is now available here which permits a comparison of processing using the ℓαβ and the CIE Lab colour spaces.
https://www.dustfreesolutions.com/CT/CT.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant