CS 445 Project 2 - Image Processing

Kim Dylla (InvaderKim@virginia.edu)



For this project, I had to implement many filters which altered images component-wise to produce
 a final product of a brighter, blurrier, edgier, etc, image. This process was done mainly through the use of either
interpolation or matrices. I stored the matrices for the most part in a one-dimensional vector, being that it was
easy to manipulate, and then used a series of 4 nested for loops in my convolve function to easily traverse through
all of the elements in the filter matrix.  Rotate required the use of some trigonometry.  The 'fun' filter
I chose to implement I have dubbed "Kim's Amazing Silkscreen Filter".
It takes any image and makes it look like an old-school punk t-shirt.


For this project, I modified mainly the image.cpp file, but made minor changes to image.h as well.
The links to these two files are here:


image.cpp
image.h


This is the original picture I started with (me with dreads and vinyl :) )
orig


Here are some results I got from the different filters I created, and the command prompt lines that I used.

bright
contrast
saturate
BRIGHTEN (increased)
image -brighten 1.5 <in.bmp> out.bmp
CONTRAST (decreased)
image -contrast 0.5 <in.bmp> out.bmp
SATURATION (decreased)
image -saturation 0.5 <in.bmp> out.bmp
extract



crop
quantize
EXTRACT CHANNEL (red, 1)
image -extractChannel 1 <in.bmp> out.bmp
CROP (at point 20,30 to w and h 75,100)
image -crop 20 30 75 150 <in.bmp> out.bmp
QUANTIZE (max quantization)
image -quantize 1 <in.bmp> out.bmp
noise
randdither    
order
ADD RANDOM NOISE
image -noise 0.5 <in.bmp> out.bmp
RANDOM DITHER
image -randomDither 2  <in.bmp> out.bmp
ORDERED DITHER
image -orderedDither 2  <in.bmp> out.bmp
floydsteinbergdither
blur
sharp
FLOYD-STEINBERG DITHER
image -FloydSteinbergDither 2  <in.bmp> out.bmp
BLUR
image -blur 10 <in.bmp> out.bmp
SHARPEN
image -sharpen 7  <in.bmp> out.bmp
edge
silkkim
EDGE DETECT
image -edgedetect <in.bmp> out.bmp
FUN (SILKSCREEN)
image -fun <in.bmp> out.bmp



scale
rotate
SCALE (decreased)
image -scale 0.5 0.5 <in.bmp> out.bmp
ROTATE (angle of 5 degrees)
image -rotate 5 <in.bmp> out.bmp

I implemented three different sampling methods, point sampling, bilinear sampling, and gaussian sampling.
Starting with such a low resolution image, there is only a slight difference between the three.
point
bilinear
gaussian
POINT SAMPLING
image -sampling 0 <in.bmp> out.bmp
BILINEAR SAMPLING
image -sampling 1 <in.bmp> out.bmp
GAUSSIAN SAMPLING
image -sampling 2 <in.bmp> out.bmp





FOR ART CONTEST IMAGES (study of Ben Miller) CLICK HERE


All Images Copyright Kim Dylla 2003