O'Reilly logo

Learning Image Processing with OpenCV by Gloria Bueno García, Oscar Deniz Suarez, José Luis Espinosa Aranda, Jesus Salido Tercero, Ismael Serrano Gracia, Noelia Vállez Enano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Color transfer

Another task commonly carried out in image processing is to modify the color of an image, specifically in cases where it is necessary to remove a dominant or undesirable color cast. One of these methods is called color transfer, which carries out a set of color corrections that borrow one source image's color characteristics, and transfer the appearance of the source image to the target image.

The example code

The following colorTransfer example shows you how to transfer the color from a source to target image. This method first converts the image color space to CIE L*a*b*. Next, it splits the channels for source and target images. After that, it fits the channel distribution from one image to another using the mean and the standard ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required