contrast
Simple illumination correction in images OpenCV C++
Convert the RGB image to Lab color-space (e.g., any color-space with a luminance channel will work fine), then apply adaptive histogram equalization to the L channel. Finally convert the resulting Lab back to RGB. What you want is OpenCV’s CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm. However, as far as I know it is not … Read more
How to decide font color in white or black depending on background color?
Building on my answer to a similar question. You need to break the hex code into 3 pieces to get the individual red, green, and blue intensities. Each 2 digits of the code represent a value in hexadecimal (base-16) notation. I won’t get into the details of the conversion here, they’re easy to look up. … Read more