This chapter has introduced the usual methods of segmentation, but there are many more! No method is the best because the result depends, among other things, on the image itself. Consequently, it is interesting to have an objective evaluation of the segmentation quality. To do that, different criteria can be used, defined below. In addition to the image to be segmented, we also need the expected result, which we call “ground truth” (French: vérité terrain).
Imagine that the ground truth and the segmentation are the images in Figure 1, in the case of a binary segmentation.

Figure 1:Ground truth (left) and segmentation (right).
Each image has two areas: the segmented object (shown in white) and the background (in black). So, we can define four types of zones (cf. Figure 2):
the true positives (TP) represent the pixels considered as being in the object and being really in the object,
conversely, the true negatives (TN) are the pixels outside the object both in the segmentation and the ground truth,
the false positive (FP) are the pixels considered by the segmentation in the object, but which in reality are not part of it,
finally, the false negative (FN) are the pixels of the object that the segmentation has classified outside.

Figure 2:Definition of true positive (TP), false positive (FP), true negative (VN) and false negative (FN).
From these four quantities, several criteria can be defined, below are the most usual ones. The variables and are the ground truth and the segmentation and are considered as sets from which one can compute their cardinality (denoted ).