What Different Values Do To Images

https://behappy.me/generator

On the second week of our laboratory discussions, image enhancements were discussed. These kinds of image enhancements lets you generate a function according to your liking or according to what enhancements you want the given image to have and then applying that function to compute for the newly generated value for a certain color channel for every pixel in an image.

                                            bear.jpg
In an example of image enhancements, our laboratory professor provided us with an image of a bear named bear.jpg. Below, the following versions of bear.jpg is produced together with a graph of the given function in contrast to the function x = y.

bear_dark.jpg




bear_inverted.jpg






                                    bear_light.jpg

x is the input pixel of bear.jpg. bear_dark.jpg was produced when each pixel was manipulated using the function  

f(x) = 0.001*x^2-0.023x

On the other hand,  bear_inverted.jpg applied the function 

f(x) = 255-x 

and the bear_light.jpg used the function 

f(x) =0.47*x+120

Our exercise was to correct three given images into a "normalized" image. Through the examples given, the students are given an idea on how to think of a function that will make an image look "normal". The following are the results of the functions we tried to the given images together with its corresponding graph.

highcontrast.jpg
"normalized" image of highcontrast.jpg

To make highcontrast.jpg somewhat "normalized", my lab partner and I applied the third function from the examples which is a linear function. A few changes of constants and coefficients from the function made highcontrast.jpg "normalized". 👍😁

lowcontrast.jpg
"normalized" image of lowcontrast.jpg

This time, to make lowcontrast.jpg somewhat "normalized", my lab partner and I used the first function from the examples which is a quadratic function. We removed some terms and changed some coefficients and thus, the "normalized" version of the lowcontrast.jpg👍😁
                                     
underexposed .jpg

"normalized" image of underexposed.jpg
Lastly, to make underexposed.jpg somewhat "normalized", my lab partner and I made a square root function which we just derived from the quadratic function from the examples and divided it with a small value. Hence, the "normalized" version of the underexposed.jpg. 👍😁

After "normalizing" the given images, another task is to graph the function we created and compare it to the function x = y. The trouble with this is that were lines that goes over the bound and that made us revise our functions more than necessary. Also, for every function revision, we have to check if the image still looks "normalized". This part of the exercise is what took most of our time in the laboratory. 

graph of "normalized" highcontrast.jpg

graph of "normalized" lowcontrast.jpg

graph of "normalized" underexposed.jpg

All in all, the exercise was fun to do especially the part where we experiment on functions because I get to see the effects of a change in coefficient or the difference of a linear function and a quadratic function in terms of image enhancement.

Comments