A Fuzzy Algorithm for Pixel Classification based on the Discrepancy ...

8 downloads 294639 Views 141KB Size Report
Edge area: pixels within or close to visually significant edges; ... 42HI4 57698A@¥6S HR425§6V8A@76S HT4 57698A@S@i hq p$rs6¤ tu t¤ t¥ 67 vQwQwAx y.
A Fuzzy Algorithm for Pixel Classification based on the Discrepancy Norm Peter Bauer, Ulrich Bodenhofer, Erich Peter Klement Fuzzy Logic Laboratorium Linz-Hagenberg Department of Mathematics Johannes Kepler Universität, A-4040 Linz, Austria [email protected]

Abstract In this paper a fuzzy method for a particular kind of pixel classification is proposed. It is one of the most important results of the development of an inspection system for a silkscreen printing process. The classification algorithm is applied to a reference image in the initial step of the printing process in order to obtain regions which are to be checked by applying different criteria. Tight limitations in terms of computation speed have necessitated very specific, efficient methods which operate locally. These methods are motivated and discussed in detail in the following.

Homogeneous

Edge

Halftone

Picture

1. Introduction The main goal of this project was to design an automatic inspection system which does not sort out every print with defects, but only those which have visible defects such that they are really unacceptable for the consumer. It is clear that the visibility of a defect depends on the structure of the print in the neighborhood. While little spots can hardly be recognized in very chaotic areas, they are disturbing in rather homogeneous areas. So, the first step towards a sensitive inspection is to extract areas from the print which should be treated differently. The following four types were specified by experts of our partner company. For certain reasons, which can be explained with the special principles of the silk-screen printing process, it is sufficient to consider only these types: Homogeneous area: uniformly colored area; Edge area: pixels within or close to visually significant edges; 

URL:

  

     

Figure 1. Magnifications of typical representatives of the four types

Halftone: area which looks rather homogeneous from a certain distance, but which is actually obtained by printing small raster dots of two or more colors; Picture: rastered area with high chaotic deviations, in particular small high-contrasted details. The magnifications in Figure 1 show how these areas typically look like. Of course, transitions between two or more of these areas are possible, hence a fuzzy model is recommendable. First of all, we should define precisely what an image is:

!2

!3

!4

!1

" #%$'&)( !

!5

S

S

T !8

!7

0

!6

S

T

8 Homogeneous

0

8 Raster

S

Figure 2. Enumeration of the neighborhood of a pixel

Definition 1 An *,+.-

T

matrix of the form

/ " 0213" #%$'&)(%$ 0 4" #%$'&)($5076" #%$8&( (9: ;=@?@?@?@> A B ;=@?@?@? > C

0

8

T

0

Edge

8 Aquarelle

(1)

with three-dimensional entries (additive RGB model)

Figure value curves of the form /VUEW=XZYX []3.\K\ Typical 9P^`_ aPbPceddedfgray cfgPh

" 0 1 " #%$'&)($50 4 " #$8&)(%$50 6 " #%$'&)(5(EDGFHI$JKJJ$%L3M3M)NPO

is called a 24 bit color image of size *Q+R- . A " #%$'&)( coordinate pair is called a pixel; the values " 0 1 " #%$'&)($50 4 " #$8&)%( $50 6 " #%$'&)(5( are called the gray values of " #$8&)( . pixel

mapping i with the following table: j k L

It is near at hand to use something like the variance or an other measure for deviations to distinguish between areas which show only low deviations, such as homogeneous areas and halftone areas, and areas with high deviations, such as edges or pictures. On the contrary, it is intuitively clear that such a measure can never be used to separate edge areas from picture areas, because any geometrical information is neglected. Experiments have shown that well-known standard edge detectors, such as the Laplacian or the Mexican Hat but also many other locally operating filter masks (see e.g. [7]), cannot distinguish sufficiently if deviations are chaotic or anisotropic. Another possibility we also took into consideration was to use wavelet transforms (see [5] or [8]) or sophisticated image segmentation methods (see for instance [7] or [3]). Since we have to cope with serious restrictions in terms of computation speed, such highly advanced methods would require too much time. Finally, we found a fairly good alternative which is based on the discrepancy norm. This approach uses only, as ordinary filter masks also do, the closest neighborhood of a pixel. Figure 2 shows how the neighbors are enumerated for our algorithm. For an ar" #%$8&( bitrary but fixed pixel we can define the enumeration

q s M v w x

"j ( i "l#m$V&on "#pn k $V&on "#pn k $r& "#pn k $V&ut "l#m$V&ut "#2t k $V&ut "#2t k $r& "#2t k $V&on

k ( k ( (

k (

(2)

k ( k ( (

k (

If we plot /one color extraction with respect to this enu02y" " j ( (9PzP{| D€FK‚$5ƒ„$%…PN i  meration, i.e , where , we @?@?@?@> }~ typically get curves like those ones shown in Figure 3. From these sketches it can be seen easily that a measure for the deviations can be used to distinguish between homogeneous areas, rasters, and the other two types. On the other hand, the most eyecatching difference between the curves around pixels in pictures and edge areas is that, in the case of an edge pixel, the peaks appear to be more connected while they are mainly chaotic and narrow for a pixel in a picture area. So, a method which judges the shape of the peaks should be used in order to separate edge areas from pictures. A simple but effective method for this purpose is the so-called discrepancy norm.

H Proof: If we assign to „Á and  3  < we can conclude

2. The Discrepancy Norm

† ‘ †ˆ 

Definition 2 The mapping †‚J‡†KˆŠ‰Œ‹Ž

n 

‹Ž

‘

n 

“ ”—– •