Monday, August 29, 2016

Exercise 3: Image Filtering

Original Image



Mean Filtering

Kernel 1:
1  1  1
1  1  1
1  1  1


Kernel 2:
-1  -1  -1
-1   8  -1
-1  -1  -1


Kernel 3:
1  2  1
2  4  2
1  2  1


Kernel 4:
1  0  0
0  1  0
0  0  1


Kernel 5:
0  -1   0
-1   5  -1
0  -1   0



Comparison:
  • Out of all kernels, kernel 1 produced the smoothest and clearest image. It's color is also closest to the original image.
  • Kernel 2 produced the image with most noise. Also it's color changed the most as compared to the other kernels. 
  • Kernel 3 produced a somewhat smooth image but the color of the original image changed.
  • 4th and 5th kernel resulted in smooth but very dark images. Kernel 5 gave the darkest image out of all.

Median Filtering

Kernel 1:
1  1  1
1  1  1
1  1  1


Kernel 2:
-1  -1  -1
-1   8  -1
-1  -1  -1


Kernel 3:
1  2  1
2  4  2
1  2  1


Kernel 4:
1  0  0
0  1  0
0  0  1


Kernel 5:
0  -1   0
-1   5  -1
0  -1   0


Comparison:
  • All images, except kernel 4 and 5, gave good results which is a smooth image.
  • Kernel 1 is the most similar to the original image.
  • Kernel 2's colors are the most different as compared to the other kernels (image negative)
  • Kernel 1 and 2 gave the smoothest results.
  • There are still a few grains and noise in kernel 3.
  • The original image is no longer visible in kernel 4 and 5. It only resulted in a black image.








Saturday, August 27, 2016

Exer2: Histogram

Daytime Image Histogram:


Colors of the daytime image are deviated more to the 0 values since there are plenty of dark colors in the image. The contrast is pretty good since there peaks in the histogram.

Nighttime Image Histogram:


Peak of the histograms is almost all (if not) near the 0 value. Image is mostly composed of dark colors.
Low Contrast Image Histogram:

Colors are not very evenly distributed since there are almost no colors near the 0 value. Colors focus more on the 255 values since the image is light to begin with. Contrast is low because peaks in the image are not high.

High Contrast Image Histogram:


Peak is the highest here as compared the other images. Colors are "kind of" evenly distributed.


  • Colors are mostly evenly distributed in the daytime image as compared to the other images.
  • Peaks are lowest in the low contrast image. Because of the image's low contrast. Highest in the high contrast image.









Monday, August 22, 2016

Exercise 2: Image Transformation Compare and Contrast

  • Daytime Image
    • The original image has good contrast and lightning.
    • After using the first function the colors of the image were inverted. The used to be white parts of the original image are converted to darker colors and are now easier to identify. Using the first function may be useful to highlight the lighter (or white) details of the original image.
    • Using the second function made the original image darker. Details of the image are now harder to observe and identify. I honestly don't see the point of this function.
    • The third function made the original image lighter and the contrast of the image is now lower. It now has a "foggier" feel to it.
 

  • Nighttime Image
    • The original image is a bit grainy and well, dark. Details of the image are hard to identify. Street lights/lamps are the most obvious parts of the image.
    • Since the first function converts the original image to its image negative, the new image now is almost all "white" or light colors since the original image was dark to begin with. Only street lights are identifiable in the new image.
    • Using second function made the image almost entirely black. Only the lights are seen in the image (and even these are dim).
    • The third function made the image a bit lighter. Still, details of the image are not seen because even if the image is lighter the contrast is very low. Using this function kind of blurred the image.

      

  • High Contrast Image
    • The original image has high contrast thus the small details of the image are easily identifiable.
    • Even after using the first function and the image is converted to its negative, details are still highly emphasized since the contrast of the original image is high.
    •  Although the second function made the image darker, the new image is a bit lighter as compared to the outputs from the daytime image and the nighttime image. This maybe the result of having high contrast.
    • The third function made the image brighter and it lowered the original image's contrast.


  • Low Contrast Image
    • The original image has low contrast. Details from afar are not as easily identifiable as compared to the high contrast image.
    • The first function actually helps in highlighting details from afar. After being converted to its image negative, small details can now be easily observed.
    • Again, the second image only makes the image darker. Details are harder to observe in this image.
    •  The third function lowers the contrast even more. This blurs the overall already blurry image.





Final Thoughts?
  • After using the first function, there's is obviously a notable change since the images are converted to their negatives. Most notable change is on the nighttime image since the entire image is dark thus the image negative resulted into a mostly white image.
  • The second function only darkens the images. Again, the nighttime image was the most notable since the entire image turned almost all black after applying the function. I still don't know why we use this function.
  • Applying the third function lowers the contrast of the images. This may be good to use for images with contrasts that are too high. For example, after applying this function on the high contrast image the resulting image is now a bit easier on the eyes.

Sunday, August 21, 2016

From Teacher A to Teacher B

I am going to be completely honest in this blog entry. I have to admit that my partner and I were completely in the dark during the entire exercise (or even when the lesson started).

We both were confused when people started asking questions. I started to think that I might have missed a lesson or something. It only turns out that I was not listening properly. It was an error on my part to no consult when I was having difficulties.

Anyway, luckily enough Sir Lei gave us a hint for the formula and we technically sort of patterned our work on some of the given examples which made things a whole lot easier for me and Erika. At first we were getting weird results and the outputs were either extremely "trippy" (like a psychedelic trip fest) or something straight from a horror film.

Eventually, with a little bit of trial and error we were able to get the output that we wanted! Hopefully we'll do better on the next exercise.