Before finishing the contrast enhancement started in previous post, we need to add a Y’CbCr to RGB function. It will allow us to close the loop : RGB=>Y’CbCr=>contrast enhancement on Y’=>RGB. One easy modification we can do while in Y’CbCr domain is modifying color saturation by multiplying Cb and Cr by a common gain. Finally, […]
Tag Archives: YCbCr
Luma histogram
Image ProcessingIn the previous post we created 3 channels from the RGB original picture : Y’, Cb, and Cr. We will now look that the luma histogram, so using the Y’ channel computed in previous post. What is an histogram ? It is a graphical representation of the pixel value distribution in a picture. It could […]
Y’CbCr (“YUV”) conversion – part 2
Image ProcessingNow the fun part : the implementation using Processing.js We will load the original picture as in the previous example: img = loadImage(“Yosemite.jpg”); Then we will go through all the pixels by 2 loops: for (int y = 0; y < img.height; y++) { //we loop through every line for (int x = 0; x […]
Y’CbCr (“YUV”) conversion – part 1
Image ProcessingOk this week let’s try something a little bit more useful than random manipulation of one picture. Starting from the same beautiful Yosemite picture, we will convert it from RGB color space to Y’CbCr color space. Many websites can help you to get more background on Y’CbCr color spaces, and commonly called “YUV”. I am […]