Computer Vision Techniques Flashcards
(67 cards)
Median Background Subtraction
Temporal Averaging: simple average across frames
Spatiotemporal: Weighted average across frames using kernel
Temporal Median: Median across frames using convolution
These give us the background of an image which can be subtracted from each frame
Mixture Of Gaussians Background Subtraction
Image is modelled as histogram.
The histogram can be represented as a mixture of gaussians.
Each gaussian has a weight, depending on its amplitude.
Calculate probability of pixel colour, low p is considered foreground.
Background Subtraction Methods
Median
Mixture of Gaussians
Kernel Approach
Image Convolution
Applies template across image, calculated weighted sum.
Convolution flips kernel horizontally and vertically, cross correlation does not.
Convolution Vs Fourier
Convolution time complexity:
O(N^2 x M^2)
Fourier:
O(log(N))
Statistical Filters
Mean (Direct Average/Boxcar filter):
- Smooths and blurs image
Median (Sort):
- Makes edges clearer
- Medical Use
Wavelets
Allow for scale-space analysis and simultaneous decimation in space and frequency.
Gabor Wavelets
Complex function enveloped by a gaussian function.
Has a real and imaginary part, giving space and freq information simultaneously.
Better than Fourier but computationally expensive.
Gabor Wavelet Applications
Texture Modelling and analysis:
- Iris texture measurements
- Face Feature Extraction for automatic face recognition system
Image Coding
Image Restoration
Intensity and Spatial Processing
A histogram shows the number of pixels for colour/greyscale in an image.
Can normalise the histogram to follow a probability distribution.
Can normalise the x axis to range from zero and unity.
Histogram Stretching
Sometimes the image is too narrow leading to poor visibility.
Simply stretch the domain of the histogram linearly.
What is an Edge?
An edge is a sharp change in intensity.
Can have:
- ramp edges: /. Gradual sloping edge
- step edges: _|^. Sudden change in colour.
- roof edges: ^. Usually lines.
Edge Detection
The best way to find an edge is to take the derivative.
Two Approaches:
- take the local maxima of the first derivative
- take the zero crossing of the second derivative
However, derivates are sensitive to noise and will not work well for noisy edges.
Edge Detection: Image Gradient
The First Derivative on an image (Image gradient) can be approximated as two partial derivates for x and y.
These can be approximated by convolving with these masks:
X: [ -1 1]
Y: [-1
1 ]
Edge Detection Kernels
Simple Partial Derivatives will not capture diagonal or oriented edges, leading to Roberts 2x2 masks.
2x2 masks have no symmetry, this may shift detected edges. This lead to Prewitt 3x3 masks (Row of -1, 0, 1)
To smooth image before edge detection, Sobel masks include the centre 2 for smoothing.
Sum of all mask coefficients is always 0. Partial derivatives = 0? Do not change the image?
Feature Extraction
Evidence Gathering, Active Contours, Statistical Shapes, Skeletonization, etc.
Can be done through matching low level features (Template matching, Hough)
Can be done through evolution (snakes)
Template Matching
Correlation and Convolution using template kernel. Result maximum highlights feature location.
Can implement with Fourier.
Convolution vs Correlation with Fourier
Convolution:
- F(f*g) = F(f) * f(g)
Correlation:
- F(f x g) = F(f) * [F(g)]*
- = complex conjugate
The conjugate is simply where you flip the sign of the imaginary part.
Hough Transform
Achieves equivalent performance to template matching but is faster.
Defines accumulator space mc based on equation of a line.
If points are on the same line in the image space, these lines will intersect in the accumulator space, giving mc for the line in the image.
Can form accumulator map with max values corresponding to the most prominent lines.
Active Contours
For unknown arbitrary shapes - extract by evolution.
Alternative segmentation method to thresholding.
Start with a contour (set of points), forces applied to contour from image and contour itself.
Contour will move towards object, segmenting it.
Active Contour ‘Basics’
Aiming to evolve to minimum energy solution.
Energy Functional: Total energy integrates the sum of Internal and Image energy as well as the external constraints.
Internal and Image Energy
Internal Energy: controls the shape of the snake, penalises stretching (alpha) and bending (beta)
Image Energy: Pulls the snake towards useful parts in the image. Sums line, edge and term energy.
Line - attracts snake to bright/dark regions.
Edge - attracts snake to edges.
Term - attracts snake to endpoints, corners or curves.
Geometric Active Contours
Imperfect Algorithm which can result in mistakes. Are not knowledge based like alternatives.
Segmentation vs Object Detection
Image Segmentation attempts to extract exact object boundaries.
Object Detection overlays bounding boxes around objects.