All right, now that we added some missing bricks, like Y’CbCr to RGB , we can finish our contrast enhancement started in the post Contrast enhancement – part 1/2. The goal is to tweak poor contrast images, like this one: And to make these pictures automatically and reasonably contrasted: So let’s summarize, the idea is […]
Archive | Image Processing
Embedding a Processing.js sketch in a WordPress page
Image ProcessingProcessing.js is very handy, and it is very cool to run your sketches in your browser. I was looking around for one easy way to embed a sketch into a WordPress page or post, and found a good option. I used the Processing JS plugin, written by Keyvan Minoukadeh. You can get it from this […]
Color saturation enhancement and Y’CbCr to RGB conversion
Image ProcessingBefore 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, […]
Contrast enhancement – part 1/2
Image ProcessingIn the previous image processing posts, we built a luma histogram from a RGB picture. In the next posts, we will work on contrast enhancement. We will use the luma channel, and define 2 luma stretch points, one on the dark side, one on the bright side. So all the pixels having a luma value […]
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 […]
First image processing try with Processing.js
Image ProcessingProcessing is a famous language for Digital Artists and Makers. It is based on Java, but now Javascript is also supported by the regular Processing IDE. It is using the canvas element from HTML5, and most of the Java code was ported to run in Javascript only. I tried a quick example. In this example […]