Sunteți pe pagina 1din 5

Using blur to remove noise from images

Averaging / Mean filter


Convolution.
Guassian blur instead of normal convolution.
Its more controlled, edge preserving!
Standard eviatie == de gemiddelde afstand tot de het gemiddelde.
Standard eviatie bepaald hoe wijd de curve is.
The edges are more preservered, we are giving more weight to the numbers close
to us.
Image filter -> processes -> output -> new image
Kernel convolution: edge detection
Sharp change in intensity: large value -> steep change
Small value: shallow change
SOBEL OPERATOR
How big is the edge at this location?
atan(GradientValueY/GradientValueX)
->Gives the orientiation of the edges. (value in radiance or degrees)
Its unusual for a sobel to be run on colour. Its a grey scale operator. We need to
transform our image from colour into grayscale first so that we can check only the
change in intensity.
Sobel is very noisy! We see edges that are not actually edges.
GAUSSIAN BLUR FIRST to get rid of the high frequency stuff and keep the low
frequency stuff.
Color to grey -> Gaussian (to blur it) -> Sobel edge.
To blur it, get rid of high frequencies and keep the low frequencies.
PT1 JPEG
We dont see color as well as we do grayscale.
We dont see high frequency changes very good.
We can blur out the high changing in frequency components.
YCbCr: seperate the intensity from each pixel from the actual color

After converting to Ycbcr, downsample (chrome subsampling), reduce the amount of


color in the image.
DCT
Quantize
Encode
Y: brightness, grayscale component
Cb,Cr: blueness, redness
0-255 in JFIFF standard
We dont see chrominance very well.
We can get rid of a lot of chrominance
Our eye only see the greyscale and a little bit of colour.

DCT
We take some data, image data, we try to represent is as the SUM of lots of these
waves.
Cosine waves can have higher/lower frequencies (based on w)
We weight two different waves at two different frequencies together and this results
in a more complex shaped wave. We are weighting an average.

Increasing the number of cosines, we can increase the number of possible shapes of
waves.
We could change the weighting procedure. We can have different shaped waves.
The higher the frequency of the wave, the higher frequencies were dealing with.
We can get rid of the higher frequency signals, and the general gest of the image
will still be there.
The maths works like this: if we have a signal thats 8 long, we can represent this
with 8 cosine waves of different frequencies.
For an image we do the same, we split each image in 8x8 pixel groups. Each of
those groups is separately encoded with its own DCT. Each of these groups can be
replicated by (64) 8x8 cosine waves.
DCT calculates the coefficients for these waves.
Calculate the contribution of the cosine waves to the image.
Which bits of cosine waves do we need to add together to get the image?
Center all of the values around zero. We take away 128 of every intensity of the
pixel to get [-128,128] instead of [0,255]
Now we can use this in the DCT to calculate the coefficients.
The low frequency DCT will have a much bigger effect than the high frequency data.
AND we see them better. Thats how we compress JPEG.
The coefficients that we calculate are an indication of the weight of every cosine
wave.
We have DC (Dirrect current) coefficient, AC coefficients.
Has the highest coefficient.
In practice, DC coefficients are stored seperately.
The high freq cosine waves dont really contribute to the image.
So what we see is that the high freq components have a lower coefficient, they have
a really low impact on the eventual image.
Thats what we do in JPEG. We take away the high frequency components.
Removing this is done through quantization.
We have a standard JPEG quantization table that we use.
This represents a quality of 50%.
We divide everyone of the coefficients by the corresponding quantization values and
round it to the nearest integer.

Almost all of over frequency coefficients are now set to zero, except the lower
frequency ones on the top left.

We then use HUFFMAN ENCODING to further compress the data.


In a zig-zag way.

S-ar putea să vă placă și