Detect defects in a microelectronic circuit.
The input image is a gray-scale image of a microelectronic circuit. The relevant objects in this image are vertical metal stripes. These stripes have some irregularities that should be detected. Our procedure takes the residues of a gray-scale closing and filter (by size) the threshold of the residues.
The input image is read. The image is also displayed as a surface model.
1. from ia870 import iagsurf 2. 3. a = mmreadgray('r4x2_256.tif') 4. adshow(a) 5. adshow( iagsurf(a))
Closing of the image by a vertical line of length 25 pixels. Then subtract it from the original. The sequence closing-subtraction is called closing top-hat. (This could be executed in a single command: c=iacloseth(a,iaseline(25,90));).
1. from ia870 import iaclose 2. from ia870 import iaseline 3. from ia870 import iagsurf 4. 5. b = iaclose(a,iaseline(25,90)) 6. adshow(b) 7. adshow( iagsurf(b))
Subtraction of the closing from the original is called closing top-hat. It shows the discrepancies of the image where the structuring element cannot fit the surface. In this case, it highlights vertical depression with length longer than 25 pixels.
1. from ia870 import iasubm 2. from ia870 import iagsurf 3. 4. c = iasubm(b,a) 5. adshow(c) 6. adshow( iagsurf(c))
Thresholding and Area Open
Threshold on the residues image. Elimination of the small objects by area open.
1. from ia870 import iacmp 2. from ia870 import iaareaopen 3. 4. 5. d = (c >= 50) 6. e = iaareaopen(d,5) 7. adshow(d) 8. adshow(e)
Overlay the detected defects over the original image, and over the surface display.
1. from ia870 import iagsurf 2. from ia870 import iagshow 3. 4. adshow(iagshow(a,e)) 5. adshow(iagshow(iagsurf(a),e))