Image Segmentation
Segmentation is the separating of objects from the background. It divides images into regions.
Edges & Regions
Edge enhancement can divide images into regions:
- Each region is bounded by an edge.
A threshold can detect edges in an edge enhanced image.
Edge Linking
Due to noise, edges may be unclear:
- Edges may not be continuous.
- Regions may not be self-contained.
We use edge linking to solve these issues. To link up “loose ends” in an image we can use:
- Linking nearest neighbours.
- Linking all within a given distance.
- Probabilistic linking.
“Snakes”
Snakes is an advanced edge-linking or region extraction algorithm:
- Uses defined edges and a cost-minimisation technique to find regions.
- The cost function is minimised when the edges match the underlying features.
- The optimisation can be done using any standard algorithm.
Thresholding
Some objects are not large enough to generate detectable edges (such as a small house in an image of a large valley).
A simple method for segmentation is to use multiple thresholds:
- To select a certain band of grey levels.
- The pixels in a region will often have a similar intensity.
Variance Growth
A problem with thresholding is with variance in light within an image. An automated method to threshold an image is by using variance growth:
- Images often contain large regions with similar intensities.
- Objects of interest are typically have a different brightness to their background.
We want to choose a threshold on the flat part of the histogram.
Statistical Texture
We can use a kernel to define the neighbourhood of a pixel. These pixels are connected to the central pixel:
If you take the mean of the kernel:
- Pixels in the same region will tend towards the central pixel.
Watershed Algorithm
- Represent the image as a surface (with height defined by pixel intensity).
- Applying a thresholding “flood-fill”:
- Link connected pixels to form the background.
- Repeat this to form several regions as layers.
Colour Segmentation
We can start by representing the image in HSL:
- We can then threshold on the hue or saturation channels to find the object.
Motion Segmentation
We can separate moving objects from stationary backgrounds:
- Take the difference between the two images to clearly identify the object.
We can remove small camera motions and noise by using noise filtering on the output.
Region Labelling
After segmentation, region labelling is required. The result of image segmentation is a binary image with the foreground represented by ones.
Typically there will be a large number of foreground regions, this contains:
- Objects of Interest
- Background Regions
-
Localised Noise
This can be removed by using noise filtering.
To distinguish the regions we label connected foreground pixels. We use:
- Connected Component Labelling
- Extracting Connected Components
Noise in Segmentation
By knowing the type of noise (white, Gaussian, photon) we can use an appropriate model to remove it effectively.
Blur is also a form of noise. To deal with this we change change our blur model to account for blur caused by the sensor.