Вы находитесь на странице: 1из 3

Command: ./test a 255 255 255 < globe.ppm > output.

ppm
Output PPM file

Command: ./test a -255 -255 -255 < globe.ppm > output.ppm


Output PPM file

Besides checking black and white color, I also created three sets of image as below.
Add: -255 0 0
Original value
Add: 255 0 0

Above images with a mean filter that has value of 11

Figure 1: Image comparison


The center image is an unedited file and can be used to compare with. As we know, the
white color has RGB of 255 255 255. Because the globe image contains some white
background color, we can subtract 255 from the Red layer. The first image in Figure 1
will change white color to cyan, which has RGB of 0 255 255.
For the second test, I applied the same method by changing a particular color. The globe
image is mostly made up from green and blue, which has RGB of 0 255 0 and 0 0 255,
respectively. Again, if we add 255 to the Red layer, the results would be 255 255 0 and
255 0 255. The third image showed that Green became Yellow and Blue became Pink.
This is correct because the new RGBs are corresponding to Yellow and Pink.
In the last three images, I applied the same color set along with a mean filter of 11. The
new images are blurring. This showed that the program apply meanf() correctly as well
as be able to perform multiple operation.
Ve stedu obrazu je nesesthan soubor a mohou bt pouity pro porovnn s. Jak vme,
bl barva m RGB 255 255 255. Vzhledem k tomu, zemkoule obraz obsahuje njak
blou barvu pozad, meme odest 255 od Rudho vrstvy.Prvn obrzek na obrzku 1 se
zmn na blou barvu azurov, kter m RGB z 0 255 255.
Pi druhm testu, pouije mi stejn metody zmnou urit barvy. Obraz koule je vtinou
tvoen ze zelen a modr, kter m RGB 0 255 0 0 0 a 255, resp. Opt plat, e pokud
pidme 255 do ervenho vrstv, vsledky by byly 255 255 0 255 0 a 255. Tet snmek
ukzal, e Green se stala lut a modr stal se Pink. To je sprvn, protoe nov RGBS
jsou odpovdajc lut a rov.

V poslednch t snmk, kter jsem tak stejnou barvu sadu spolu s prmrnm filtrem
11. Nov snmky se straj. To ukzalo, e program se pouije meanf () sprvn a tak aby
byl schopen provst vce operaci.

Вам также может понравиться