-
Notifications
You must be signed in to change notification settings - Fork 31
Segmentation
In general, segmentation refers to the process of taking an image and labeling each pixel with an integer such that similar pixels have the same label. Segmentation algorithms can be divided into sub-categories in several ways.
- Binary Segmentation - pixels are assigned to one of two labels
- Multi-class Segmentation - pixels are assigned to one of many labels
- Discriminative Segmentation - requires some sort of model that is used to classify pixels
- Filtering Techniques
- Classification Techniques (i.e. Support Vector Machines)
- Generative Segmentation - generates a model while classifying pixels
- Clustering Techniques (i.e KMeans, MeanShift)
- Region Growing Techniques
- Split-Merge Techniques
- Graph Partitioning Techniques
The color filter class performs binary segmentation on a 3-channel image. It accepts a range for each channel (i.e. [35, 70]). The ranges are circular such that if the first value specified in the range is larger than the second value (i.e. [70, 35]), the range that passes the filter will be [70, 255] | [0, 35]. In order to pass the filter, a pixel must fall within all of the specified ranges.
- Pros
- Extremely fast to compute the filtered image
- Cons
- Suffers poor performance under varying lighting conditions
- Parameters must be hand-tuned for each environment
The standard ColorFilter is limited to filtering rectangular boxes in a 3 dimensional color space. The TableColorFilter is able to support a filter model that has an arbitrary shape in the 3 dimensional color space. Since it is not easy for a human to specify these arbitrary models, it is best learned from examples that are expected to pass the color filter.
The learning approach is based on Accurate Color Classification and Segmentation for Mobile Robots. This technique uses a clustering algorithm to find a representation of the distribution of color that exists in the example set. Each cluster is represented as a 3D primitive and the membership functions of the 3D primitives are combined in a way that generates a membership function for a smooth surface. The 3D lookup table can be constructed by evaluating this membership function at all color space locations. This process is done offline in order to create a model that can be efficiently evaluated.
- Pros
- Fast to compute the filtered image
- Cons
- Suffers poor performance if training data is not representative of actual data.