Week 1 - Image Processing Flashcards
What are the four ways we can represent an image
Image Function
Landscape
Array of pixels
Image histogram
What is a grayscale image function
I : R^2 - > R
(x,y) -> I(x,y)
Gives the Intensity at position I(x,y)
A digital image is a discrete (sampled) version of this function
What is an image landscape
Imagine throwing a piece of cloth over a scene
creates a smooth and continuous landscape
What is an image histogram
Count the amount of pixels at each grey level
What is Spatial Resolution
The number of pixels that determines the resolution
(want more detail -> need more pixels)
eg Pixels per inch
-Allows for smaller scale structured images (to be seen in detail)
-constantly increases in digital cameras
What is grey level resolution
Number of different shades of grey that can be represented in an image
Higher resolution - > captures fine changes in brightness
What is important about having an array of pixels representation
We get the spatial relationship
What is Image arithmetic
Considering images as functions
g(x,y) = f(x,y) + 20
brightens by 20
g(x,y) = f(-x,y)
image is inverted along the y axis
What is image addition and what does it do visually
Takes the average over images in a sequence
(adding the two corresponding pixels)
Reduces noise
What is image subtraction and what does it do visually
Takes the difference of two images
Can capture a movement between two static background (the leftover is the moving object in the image)
Captures, shadows, reflections
What is Noise
A stochastic (random) process
All images contain noise
Do identical images have the same noise
No
How do we model noise
As small fluctuations
Noise is normally distributed
Some small fluctuations may actually be small changes in an image and not noise
What is the signal-to-noise ratio
SNR = max signal / σ
σ has subscript noise
Larger σ creates a smaller ratio and a more noisy image
How do we reduce noise by temporal averaging
We can average noise over N images
σ(subscript N) = σ / √N
Take N consecutive samples of the same image
the noise reduces
How do we reduce noise by spatial averaging
(When we do not have the choice of sampling an image n times)
Pass a 3x3 mask over an image, replacing the central pixel with the average of neighbours
“local averaging”
What is the issue with reducing noise by spatial averaging
Lose resolution - like blurring 5x5
particularly along edges
What is sub-sampling
Throw away every other row and columns in the image to create a 1/2 size image
Creates a very scruffy output
How can we improve sub-sampling
Local average first (which removes small scale detail and noise) then subsample
Means we are not keeping noise
What are the 3 ways we can define noise using its neighbours
Noisy dark areas
-just a messy area of dark pixels
Just noise
-white pixels with one dark pixels (one noise pixel)
Vertical edge
-noise is aligned vertically
What is neighbourhood processing and the 2 main methods
Modifying the pixel values of an image based on the values of neighboring pixels in a window
1) Rank filtering
2) Convolution
What is Rank filtering
Takes values in the filter window and orders them darkest to lightest
There are different ways to rank: minimum (erosion), maximum (dilation), median filtering
Replace the middle pixel with whichever chosen method (minimum/median/maximum)
Move to the next window and repeat
What is the effect of median filtering
Removes both dark and light noise spots
It is not the same as taking the mean
Mean -> creates shades of grey
Median - > produces only either white or black, keeps sharp edges
Works very well for salt and pepper noise
What is Convolution
Very often used in pre-processing
Want to maintain the spatial patterns
Uses a weighted filter window
Eg 1 2 1
applied to input image: 0.5 1 1
only changing the middle value to the average of all
The middle value = 0.9
NOTE divide by 4 (total of filter weight) not by pixel number