Skip to main content
  1. Masters/

Object-Based Image Analysis: OBIA Classification

·726 words·4 mins·

This exercise employs a variety of Object-Based Image Analysis (OBIA) Methods to classify a generated scene (Figure 1). This includes the use of sample-based and knowledge-based (including hierarchical) approaches. All practical tasks in this exercise were conducted using eCognition 9.1.

obia scene
Figure 1: Scene to classify

The first task is to use a supervised, sample-based approach to classify objects belonging to the following classes:

  • Grassland
  • Cropland
  • Buildings
  • Bare Soil
  • Road
  • Deciduous Tree
  • Coniferous Tree
  • Water
  • Boat

However, before this classification can be conducted, the image needs to be segmented. The multi-resolution segmentation algorithm with appropriate scale, shape, and compactness parameters was executed at the pixel level. This successfully splits the image up into roughly equal-sized segments, with boundaries within and at the edges of the desired classes (Figure 2).

obia segmentation
Figure 2: Inital segmentation

Once these segments have been deemed appropriate, samples for the desired classes can be collected by selecting relevant samples. As classes in the image are highly homogenous, only a few samples need to be collected per class. The Support Vector Machine (SVM) classification algorithm was chosen to be trained on the samples and used to classify the segments.

obia sample based classification
Figure 3: Sample based classification examples

The resulting classification (Figure 3) is as desired. However, the image is still split into many relatively small segments. To summarize all connected segments of one class into a single segment, the merge region algorithm is run on each class.

Another approach to classifying an image is to conduct a knowledge-based classification. To showcase this approach, the existing classes are further subdivided to include the following classes:

  • Forested Grassland (grassland next to/with trees)
  • Bridge (road next to water)
  • River (water with a different shape than a lake)
  • Lake (water with a different shape than a river)
  • Urban Tree (trees close to a village, i.e., in close distance to more than one building)
  • Farmhouse (buildings directly connected to grassland or cropland)
  • Island (bare soil, trees and grassland, surrounded by water)
  • Freighter (the larger of the two ships)

The assign class and find enclosed by class algorithms with the specified conditions above were executed on the object level to apply rules to the pre-existing classes and assign objects to the new classes (see Figure 4). This rule-based approach represents a very transparent process of classification, as there is always a clear definition of the classification condition. However, many of the rules are specific to the current scene. If applied to a different scene, the classification most likely would not function properly.

obia rule-based classification
Figure 4: Rule based classification examples

Knowledge-based classification can be taken a step further by using hierarchical relationships to derive two additional classes; Coniferous Forest and Deciduous Forest. A Coniferous Forest is defined as a combination of single trees and the surrounding grassland area in which Coniferous Trees are dominating. In a Deciduous Forest, the Deciduous Trees are Dominating.

A multi-resolution segmentation of the scene is conducted, this time with a very high scale parameter. This successfully encompasses trees and surrounding grasslands in one segment. The forest type definitions are put into conditions, and the assign class algorithm is executed with these conditions and a filter only including Forested Grassland and both types of trees (see Figure 5).

Overall, knowledge-based classification can employ a high amount of spatial concepts (e.g., Rel. border to, Enclosed by, Number of sub objects), which would not be possible with sample-based classification. As these spatial concepts rely on object properties to function, a pixel-based approach also would not be possible.

obia hierarchical classification
Figure 5: Hierarchical classification

All analysis steps are ordered in a procedural manner to allow for simple, repeatable execution and make the individual steps comprehensive.

As a final task, a blueness index, which may provide a nonspatial, rule-based approach to classify water objects, is calculated.

$$ π΅πΏπ‘ˆπΈπ‘πΈπ‘†π‘† = \frac{(Mean Layer 3 - π‘€π‘’π‘Žπ‘› πΏπ‘Žπ‘¦π‘’π‘Ÿ 2)}{(π‘€π‘’π‘Žπ‘› πΏπ‘Žπ‘¦π‘’π‘Ÿ 3 + π‘€π‘’π‘Žπ‘› πΏπ‘Žπ‘¦π‘’π‘Ÿ 2)} $$

Where Mean Layer 3 and Mean Layer 2 represent the average values of the blue and green color channels, respectively. Inspecting the blueness values for each class led to the conclusion that a value greater than zero may be used to classify water objects in this example (see Figure 6). If an object contains no blue or green, the result is an an undefined blueness value (division by 0).

obia analysis tasks
Figure 6: Blueness values of selected objects

Resources Used:

Trimble (2018). eCognition Developer User Guide