Page 52 - Classification Parameter Estimation & State Estimation An Engg Approach Using MATLAB
P. 52
DETECTION: THE TWO-CLASS CASE 41
r ¼ roc(z*w); % Compute the ROC curve
plotr(r); % Plot it
The merit of a ROC curve is that it specifies the intrinsic ability of the
detector to discriminate between the two classes. In other words,
the ROC curve of a detector depends neither on the cost function of
the application nor on the prior probabilities.
Since a false alarm and a missed event are mutually exclusive, the error
rate of the classification is the sum of both probabilities:
!
!
E ¼ Pð^ ! 2 ;! 1 Þþ Pð^ ! 1 ;! 2 Þ
!
!
¼ Pð^ ! 2 j! 1 ÞPð! 1 Þþ Pð^ ! 1 j! 2 ÞPð! 2 Þ ð2:48Þ
¼ P fa Pð! 1 Þþ P miss Pð! 2 Þ
p ffiffiffi
In the example of Figure 2.13, the discriminability d equals 8. If this
indicator becomes larger, P miss and P fa become smaller. Hence, the error
rate E is a monotonically decreasing function of d.
Example 2.7 Quality inspection of empty bottles
In the bottling industry, the detection of defects of bottles (to be
recycled) is relevant in order to assure the quality of the product. A
variety of flaws can occur: cracks, dirty bottoms, fragments of glass,
labels, etc. In this example, the problem of detecting defects of the
mouth of an empty bottle is addressed. This is important, especially in
the case of bottles with crown caps. Small damages of the mouth may
cause a non-airtight enclosure of the product which subsequently
causes an untimely decay.
The detection of defects at the mouth is a difficult task. Some
irregularities at the mouth seem to be perturbing, but in fact are
harmless. Other irregularities (e.g. small intrusions at the surface of
the mouth) are quite harmful. The inspection system (Figure 2.14)
that performs the task consists of a stroboscopic, specular ‘light field’
illuminator, a digital camera, a detector, an actuator and a sorting
mechanism. The illumination is such that in the absence of irregular-
ities at the mouth, the bottle is seen as a bright ring (with fixed size
and position) on a dark background. Irregularities at the mouth give
rise to disturbances of the ring. See Figure 2.15.
The decision of the inspection system is based on a measurement
vector that is extracted from the acquired image. For this purpose the
area of the ring is divided into 256 equally sized sectors. Within each