TJCoding / Enhanced-Image-Colour-Transfer

An Enhanced Implementation of the Colour Transfer Method Proposed by E Reinhard et al.
GNU Lesser General Public License v3.0
53 stars 2 forks source link

CIELab or L-alpha-beta? #1

Closed TJCoding closed 4 years ago

TJCoding commented 4 years ago

Although the basic principle here is sound, it is less clear whether processing should be performed in the CIELab colour space or the L-alpha-beta colour space.

I made the choice to program the ‘Enhanced Reinhard method’ using the CIELab colour space rather than the L-alpha-beta colour space for convenience (the former is in the OpenCV library).

The implementation of the Reinhard Method by ‘ZZPot’ uses L-alpha-beta colour space; (https://github.com/ZZPot/Color-transfer). The code also includes the capability (with a quick modification) to utilise the CIELab colour space instead. For CIELab processing, ZZPot’s implementation give outcomes that closely resemble those achieved by this implementation (for the case of one iteration, no cross correlation processing and source-image-derived shading).

The issue here is ZZPot achieves better images under L-alpha-beta than under CIELab. However, things aren’t so clear cut because the images that ZZPot has chosen are legacy images with less than optimum quality ‘https://github.com/ZZPot/Color-transfer/issues/5’. This matter deserves further investigation.

It should be noted that Reinhard and Pouli find that CIELab performs better than L-alpha-beta for colour transfer.

https://link.springer.com/content/pdf/10.1007%2F978-3-642-20404-3_1.pdf

However, the performance comparison is for the case where channels are processed independently which is not the case here.

TJCoding commented 4 years ago

An implementation has now been provided for processing in the L-alpha-beta colour space in addition to the original implementation utilising the CIELab colour space. Commentary has been added to cover the matters raised in this issue.