Channel mixing – seeing in Technicolor
Channel mixing is a simple technique for remapping colors. The color at a destination pixel is a function of the color at the corresponding source pixel (only). More specifically, each channel's value at the destination pixel is a function of any or all channels' values at the source pixel. In pseudocode, for a BGR image:
dst.b = funcB(src.b, src.g, src.r) dst.g = funcG(src.b, src.g, src.r) dst.r = funcR(src.b, src.g, src.r)
We may define these functions however we please. Potentially, we can map a scene's colors much differently than a camera normally does or our eyes normally do.
One use of channel mixing is to simulate some other, smaller color space inside RGB or BGR. By assigning equal values to any two ...
Get OpenCV: Computer Vision Projects with Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.