Image processing apparatus and method for inspecting defects of enclosures of semiconductor devices

Abstract: The present invention provides an image processing apparatus for inspecting defects of enclosure of semi­ conductor devices, comprising first histogram memory means (60R) for storing a relative density degree of a first image signal or a reference signal, second histogram memory means (60P) for storing a relative density degree of a second image signal of an object to be inspected, third histogram memory means (70R) for storing an accumulated value of the relative degree supplied from the first histogram memory (60R), fourth histogram memory means (70P) for storing an accumulated value of the relative degree supplied from the second histogram memory (60P), and coincidence degree detection means (80) for detecting the coincidence degree between data from the third histogram memory means (70R) and the fourth histogram memory means (70P).

Description: Image processing apparatus and method for inspecting defects of enclosures of semiconductor devices The present invention relates to an image processing apparatus and method, in particular, for inspecting defects such as pinholes or breakage in an enclosure of a semiconductor device, by using density images of the enclosure. The enclosure is, for example, resin mold. "Systems and Computers in Japan", vol. 17, No. 5, May 1986, pages 54-63, Y.Shima et al discloses an image processing apparatus for inspecting defects of enclosure of semiconductor devices, comprising photoelectric conversion means for producing a first image signal of the semiconductor device, A/D conversion means for converting the image signal from the photoelectric conversion means to a digital image signal, and first histogram memory means for storing a relative density degree of said image signal of the semiconductor device. EP-A-142990 relates to comparing respective images of an article before and after some operation, e.g. drilling, has been performed on it. The comparison involves forming histograms of the grey levels in the images. Conventionally, a defect inspection of resin mold products of semiconductor devices has been performed by the naked eye, with respect to all products or products selected at random. However, the precision of the inspection by the naked eye varies from person to person, and is not reliable. Further, the size of semiconductor devices has been decreased year by year, and the inspection has been conducted with use of a microscope, resulting in fatigue of the eye. Under the circumstance, the precision of the inspection by the eye is low. On the other hand, in a well-known inspection method, image data of the surface of a resin mold is converted to an electric signal through a photoelectric converter, and two-value image data items are produced by providing a given threshold value. However, in the two-value processing, the amount of obtained image data is small and the determination of the threshold value is very difficult. A method of an inspection using density images of an object is disclosed in "HITACHI Hyoron, vol. 67, No. 9, 1985, Small-Sized Image Processing Apparatus for Electronic Part Inspection , SBIP (pp. 71-74)". This document teaches a technique of inspection using light-emission patterns of light-emitting diodes. In this technique, a light emission pattern of a light-emitting diode, consisting of a light-emission area 101 and a background area 102, is obtained by a TV camera (see Fig. 9A). Form this light emission pattern, a graph showing a distribution of degrees of density as shown in Fig. 9B is prepared. If the brightness (or density) of light emission pattern is too higher or too lower than a reference value, a difference R between the density of the light emission area 103 and the background area 104 varies. Namely, the brightness can be detected by checking whether or not the difference R falls within the scope of the reference value. A divergent value of an emission light pattern density distribution is obtained, as shown in Fig. 9C, and compared with a reference divergent value, thus detecting light emission blurring. As stated above, various drawbacks reside in the method of inspecting defects in the resin mold of a resin-sealed type semiconductor apparatus, which is performed by the eye. Under the circumstance, it is desired to develop a system for automating the process of the inspection thereby to manufacture reliable semiconductor devices at a high productivity. In this system, when a malfunction occurs in a step of the process, the process routine is immediately returned to the previous step. In most of currently developed automated image processing systems for defect inspection using two-value data, it is very difficult to determine the threshold value when a contrast between a defect and the background is small, as in the case of a resin mold. Thus, suitable two-value data images cannot be obtained. Even with the aforementioned density image processing system, correct detection of defects on a resin surface is difficult, since a drift is caused in the density due to a temperature rise in an ITV camera, a 'tradermark or the like is printed on the surface of an object or a resin mold. Further, for automation of defect inspection, a pre-process of detecting the position of the object is necessary. However, a contrast between the resin mold and the background is low, and the distinction therebetween is difficult. Thus, it is difficult to precisely detect the position of the resin mold. The object of the present invention is to provide an image processing apparatus and method, in particular, for inspecting defects such as pinholes or break-age in an enclosure of a semiconductor device. This invention can eliminate drawbacks residing in the conventional defect inspection process by the eye and the image processing process using two-value data. Also, the apparatus and method of the present invention can correctly detect the position of the enclosure semiconductor device. Furthermore, the apparatus and method of the invention are free from the temperature drift due to the ITV camera, and are suitable for automated processing. According to the invention from one aspect there is provided image processing apparatus for inspecting defects of enclosure of semiconductor devices, comprising: photoelectric conversion means for producing a first image signal of the semiconductor device; A/D conversion means for converting the image signal from the photoelectric conversion means to a digital image signal; and first histogram memory means for storing a relative density degree of said image signal of the semiconductor device; characterized by further comprising: first semiconductor device image memory means for storing the digital image signal supplied from the A/D converter means; position detection means, receiving the image signal from the first image memory means, for detecting the position of the semiconductor device; reference image memory means for supplying to the position detection means a reference image signal for the position detection; a second histogram memory means for storing a relative density degree of said reference image signal; position correcting means, receiving signals from the first semiconductor device image memory means and the position detection means, for correcting the position of the semiconductor device stored in the first image memory means; second semiconductor image memory means for storing a Position-corrected image signal from the position correcting means and supplying the stored signal to the first histogram memory means; third histogram means for storing an accumulated value of the relative degree supplied from said first histogram memory; fourth histogram means for storing an accumulated value of the relative degree supplied from said second histogram memory; and coincidence degree detection means for detecting the coincidence degree between data from said third histogram memory means and said fourth histogram memory means. In the apparatus with the above structure, the reference image density accumulated histogram is compared with the object image density accumulated histogram. This apparatus can overcome conventional drawbacks such as judgment error in visual inspection or low reliability of inspection in small-sized products. Also, the problems due to insufficient data items and difficulty in deciding threshold values in the two-value processing can be solved. According to the invention from another aspect there is provided an image processing method for inspecting defects of enclosure of semiconductor devices, comprising: a 1st step (ST1) for forming an image of a semiconductor device; an input processing 2nd step (ST2) for processing said image of the semiconductor device; a 3rd step (ST3) for judging whether or not a reference image has been recorded; a 4th step (ST4) for recording an image signal of the reference image in a memory, when a result in the 3rd step (ST3) is NO; a 5th step (ST5) for forming a reference image density histogram from said image signal; a 6th step (ST6) for forming a reference image density accumulated histogram from said reference image density histogram, a routine of control being returned to the input processing 2nd step (ST2) after the 6th step (ST6); a 7th step (ST7) for detecting the position of the object, the 7th step (ST7) being performed when a result in the 3rd step (ST3) is yes; an 8th step (ST8) for forming an object image density relative histogram from a result of detecting of the 7th step; a 9th step (ST9) for forming an object image density accumulated relative histogram from said object image density relative histogram; a 10th step (ST10) for detecting a maximum coincidence position between said reference image density accumulated histogram and said object image density accumulated relative histogram; an 11th step (ST11) for judging a coincidence degree at the maximum coincidence position in said histograms; a defect inspecting 12th step (ST12) for inspecting defects in the object, based on the accumulated histograms, the 12th step (ST12) being performed when the result in the 11th step (ST11) is OK; a 13th step (ST13) for judging whether or not the object is good, based on the result in the defect inspecting 12th step (ST12); a 14th step (ST14) for subjecting a good object to a predetermined processing, when the result in the 13th step is OK; and a 15th step (ST15) for subjecting a bad object to a predetermined processing, when the result in the 13th step (ST13) is NO. With the above method, the inspection of defects of enclosures of semiconductor devices, which is free from problems of visual inspection and two-value processing, can be realized, as in the case of the image processing apparatus of the present invention for inspecting defects of enclosures of semiconductor devices. This invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: Fig. 1 is a block diagram showing an example of a structure of an image processing apparatus for inspecting defects in resin molds, according to the present invention; Fig. 2 shows an example of a structure of photoelectric conversion means; Fig. 3 shows a relationship between a monitor screen and a memory image Po; Fig. 4A shows a structure of a window; Fig. 4B illustrates a method of calculating a correlation coefficient, using window processing; Fig. 4C illustrates a method of detecting a position, using window processing; Fig. 4D illustrates a process of producing an image, using affine transformation; Figs. 5A, 5B, 5C and 5D include views showing a one-dimensional histogram memory, a stored relative degree, and an accumulated relative degree; Fig. 6 shows a drift characteristic of image density; Figs. 7A, 7B and 7C include views showing an embodiment of histogram coincidence degree detection means according to the present invention; Fig. 8 shows an embodiment of enclosure defect inspecting means according to the present invention; Figs. 9A, 9B and 9C include views showing prior art; and Fig. 10 is a software flowchart in the case where the present invention is worked with use of a microcomputer. An embodiment of the image processing apparatus and method for inspecting defects in enclosure of semiconductor devices, according to the present invention, will now be described with reference to the accompanying drawings. Fig. 2 schematically shows conversion means 10 for converting an image of object 11 to an analog electric signal, A/D converter 20, and first inspected object image memory 21. The object or resin-sealed semiconductor device 11 is amounted on table 12. Ring-shaped illumination device 13 (e.g., MORITEX MHF-50L) uniformly illuminates the resin face of object 11. An upper face image of object 11 is picked up by ITV cameral 14 (CS3310(TELi)), and is converted to an analog image electric signal. The electric signal is converted to a digital image signal by A/D converter 20 and is stored in image density memory 21. Fig. 3 shows the relationship between a screen of a monitor (not shown in Fig. 2) attached to ITV camera 14 and the image stored in memory 21. The outline of the screen of the monitor is defined by solid line 22, and the outline of the image stored in memory 21 is defined by solid line 23. In Fig. 3, symbols M and N represent the number of horizontal pixels and vertical pixels, respectively, which are variably set by the sampling frequency of A/D converter 20. In this embodiment, M = 256, and N = 240. Numeral 24 indicates the density image Po of object 11. Memory 21 has 8 bits for each pixel, and can represent the density of image Po in 256 levels at maximum. In this embodiment, the ranges of <0 (black) to 255 (while)> to <0 (black) to 64 (white)> are used. Also, in this embodiment, the pixel arrangement of each of reference image density memory 31R and second inspected object image density memory 31P (see Fig. 1) is identical to that of first inspected object image density memory 21. Object 11 is mounted on a predetermined location of table 12 for the image pick-up operation. Since the inspection of the object is performed at real time, fine positioning is not carried out. Thus, it is necessary to adjust the position of image Po based on reference image R. For this purpose, as shown in Fig. 1, reference image memory 31R for storing the reference density of image R of the resin mold and second inspected object image density memory 31P for storing position-inverted image density P are provided. In Fig. 1, reference numeral 32R indicates the position of reference image R stored in memory 31, numeral 23 indicates the position of source object image Po stored in first inspected object image memory means 21, and numeral 32P denotes the position of position-converted object image P stored in memory 31P. Position detecting means for judging the pixel position of image Po stored in memory 21 , which corresponds to the pixel position of image R stored in memory 31R, is constituted by using a pattern detecting device disclosed in Japanese Patent Disclosure (Kokai) No. 57-137978. Fig. 4(a) shows a structure of a window, with which a process of cutting out pixels of an image memory can be performed. Window W R indicates a predetermined rectangular region in the image memory. For convenience's sake, the pixel position (x R , y R ) of the upper left corner of the rectangular image determines the position of the window. The size of the window is determined by the number m of horizontal pixels and the number n of vertical pixels. Eight bits are assigned to one pixel. Characters R and P accompanied with characters x, y and w indicate the pixel coordinates of the reference image memory or the first object image memory, or the used window. The expression "R (x R , y R )" or "P (x p , y p )" indicates the pixel density data at the coordinate (x R , y R ) or (x p , y p ). As shown in Fig. 4(B), a window W R is placed on the pixel at the coordinate (x R , y R ) of reference image memory 31R. A window W P is placed on the pixel at the coordinate (x p , y p ) of first inspected object image memory 21. The structure of each of windows W R and W P is identical to that shown in Fig. 4A. The correlation coefficient H between the group of m × n pixels cut out by windows W R and W P is given by the following formula: H = A - 1 m×n B · C D - 1 m×n B² · E - 1 m×n C² In formula (1), the value A is obtained from a summing circuit for summing the reference pixels and corresponding object pixels cut out by windows W R and W P . The values B and C are obtained by a summing circuit for summing pixel data items in windows W R and W P . The values D and E are obtained by a square adding circuit for pixel data items in windows W R and W P . The value (m × n) represents the total number of pixels in the windows. These circuit elements constitute a two-dimensional data correlation coefficient calculation circuit. This circuit is described in detail in Japanese Patent Disclosure (Kokai) No. 57-137978. With reference to Fig. 4(C), a description is given of the case where the pixel position of source image Po in first object image memory 21 is determined in relation to the corresponding pixel position of reference image R in reference image memory 31R. Window W R is arranged at the pixel position (X R1 , Y R1 ) including an upper left area of reference image R, and window W P is arranged at the pixel position (1, 1) in an upper left area of first object image memory 21. The correlation coefficient H (1, 1) between pixel groups cut out by windows W R and W P is obtained by formula (1), that is, the two-dimensional data correlation coefficient calculating circuit. Then, the position of window W R is fixed, and the position of window W P is shifted to the pixel position (2, 1). Thus, the correlation coefficient H (2, 1) is obtained, in like manner described above. Further, while the position of window W R2 is fixed, data items of correlation coefficients H (x p , y p ), the number of which corresponds to (M - m + 1) × (N - n + 1), are similarly obtained with respect to pixels in a matrix defined by the horizontal position (M - m + 1) and the vertical position (N - 1 + 1) in first object image memory 21. These data items are fed to a position judging circuit, and a correlation coefficient H max (Xp1, Yp1) indicative of a maximum value is selected. The pixel position of first object image memory 21, which corresponds to the pixel position (X R1 , Y R1 ) of reference image memory 31R, is (Xp1, Yp1). The position of window W R of the reference image memory is sequentially shifted to all pixels in a region including reference image R, and the pixel position (Xp, Yp) of the first object image memory corresponding to each pixel is repeatedly obtained by the above method. Position correcting means 50 for transferring image data of image Po to second object image memory 31P comprises, for example, a memory address controller (MAC). When pixel addresses (x R , y R ) and (Xp, Yp) corresponding to the MAC are input, the contents Po (Xp, Yp) of the pixel (Xp, Yp) of first object image memory 21 are fed through a data bus to the pixel position (x p , y p ) of second object image memory corresponding to the pixel (x R , y R ). In the embodiment of position detection means 40, window W R was fixed at the pixel position (x R , y R ) of reference image R, window W P was shifted to all area of first object image memory 21, and the correlation coefficients were repeatedly obtained to find the corresponding pixel position (X P , Y P ). However, the number of calculating operations can be reduced if a plurality of adjacent pixels are gathered as one pixel having an average image density, and the correlation coefficient calculation start position is obtained from a resultant reduced image, as disclosed in Japanese Patent Disclosure (Kokai) No. 57-137978. In other embodiments of position detecting means 40 and position correcting means 50, affine transformation can be utilized. In Fig. 4D, the pixel matrix of reference image memory 31R is overlapped with the pixel matrix of first object image memory 21. In this figure, points T1 (x PT1 , y PT1 ) and T2 (x PT2 , y PT2 ) of image Po in first object image memory 21, which correspond to the upper left corner point S1 (x RS1 , y RS1 ) and the lower right corner point S2 (x RS2 , y RS2 ) of reference image R, are obtained by the position detecting means. Then, image Po is moved in parallel so that point T1 coincides with point S1, and the pixel matrix of image R is superposed on the pixel matrix of image Po by rotation over an angle about point S1. A pixel coordinate conversion formula for this technique is obtained (see "Electronics Parts Technical Report - 27, 1984, pp. 10-11). If this coordinate conversion formula is applied to an IRS (image resampling sequencer, Nikkei Electronics , 1987, 9/7, (No. 429), pp. 75-76), the pixel data of the position of image Po in first object image memory 21, which was converted according to the conversion formula is output to the data bus and supplied to the pixel position of second object image memory 31P which is equivalent to reference image memory 31R. Thus, an image P of a pattern position equivalent to that of reference image R can be obtained. Fig. 5A shows a one-dimensional reference relative degree histogram memory and an accumulated relative degree histogram, and a one-dimensional object relative degree histogram memory and an accumulated relative degree histogram memory. Each memory has addresses corresponding to the image density levels. In this embodiment, the memory has a one-dimensionally arranged relative addresses 0 (black) to 255 (white), and each address comprises 16 bits. Fig. 5B shows a reference upper face image of an object or a semiconductor device. This image includes background image 61, resin mold image 62, and a mark image. The density of image pixels in a region 63 defined by a dot-and-dash line is inspected. A relative degree obtained by dividing all pixels of region 63 by pixels having the density level is stored in addresses of reference relative degree histogram memory 60R and object relative degree histogram memory 60P. Then, the values of relative degrees stored in address 0 to address 255 are sequentially added, and accumulated relative degrees corresponding to the addresses of reference histogram memory 70R and object histogram memory 70P. As a result, an equivalent relative degree histogram and an accumulated relative degree histogram are prepared, as shown in Figs. 5C and 5D. In general, a density histogram drifts with the lapse of time. Fig. 6 shows drift characteristics of the accumulated degree histogram in the system including the ITV camera, illumination device and image processing means. The abscissa indicates the image density of the resin mold surface in 6-bit or 64 levels (0(black) to 63(white)), and the ordinate denotes the accumulated degree. The number of pixels in the density inspection region on the resin surface is 64 × 64 = 4096. Fig. 6 shows the case where a super-mini transistor (container TO-236) having a resin mold upper face size of (2.9 mm × 1.5 mm) is used as an object. In the figure, curve a indicates an accumulated degree histogram just after the turning-on, curve b indicates the histogram after 5 minutes, curve c indicates the histogram after 10 minutes, curve d indicates the histogram after 20 minutes, and curve e indicates the histogram after one hour. When 256 density levels are provided, a drift of about density level 10 is observed. Thus, in inspecting defects, the drift characteristics cannot be ignored. Fig. 7A is illustrative of a case where a coincident portion between the reference accumulated relative degree histogram and the object accumulated relative degree histogram is detected by using a correlation coefficient, whereby defects in the resin mold can be inspected. The abscissa of Fig. 7A indicates the density levels of addresses (0 (black) to 255 (white)) of the reference one-dimensional accumulated relative degree histogram and the object one-dimensional accumulated relative degree histogram. The ordinate of Fig. 7A shows the accumulated relative degree (maximum value: 1). Curves a0 and b0 indicate reference and object accumulated relative degree histograms y = F(x) and y = E(x), respectively. Histograms are actually expressed by bent lines. In Fig. 7A, x and y have discrete values which are approximately expressed by curves. For example, the accumulated relative degree stored at density address x of the reference accumulated relative degree histogram is represented by F(x) or y. Fig. 7B shows a structure of reference/object one-dimensional component accumulated relative degree memories 71R and 71P. The memories 71R and 71P have functions similar to the function of the window used for two-dimensional image processing. Each memory has continuous relative addresses 0 to (I-1), and one address consists of 16 bits. The value I is in the range of 1 ≦ I ≦ 256. Thus, a desired portion of the one-dimensional histogram can be cut out by the memory 71R or 71P. In Fig. 7A, data items in the density range of x1 to x1 + I-1 are cut out by two memories 71R and 71P. The correlation coefficient G1(0) between cut-out curve portions of the reference histogram a0 and object histogram b0 is obtained by the following formula: Then, the correlation coefficient between the cut-out portion of the curve a0 and a portion cut out in a range of x1 to x1 + I-1 of the curve b1 or y = E(x-1) which is obtained by shifting the curve b0 to the right by one degree is obtained by formula (2), and the obtained correlation coefficient is supposed to be G1 (-1). When the value G1 (-1) is obtained, only E(x1 + i) is changed to E(x1 - 1 + i) in formula (2). The same arithmetic operation is repeated with respect to the curve b2 which is obtained by shifting the curve b1 to the right by one degree, thereby to obtain the value G1 (-2). Similarly, values G1 (-3), G1 (-4)...G1 (-n) are obtained. A maximum value among G1 (0) to G1 (-n) is obtained. In the present embodiment, it is supposed that the maximum value G1 (-3) is obtained by setting I = 24 and n = 10. That is, a curve obtained by correcting the drift in the object histogram b0 is b3 or y = E(x-3). When the density level of the reference curve a0 is lower than the lower limit value z1, the accumulated relative degree is y = E (x1 - 3), and the pixel area in this case is obtained by the formula, E (x1 - 3) × (all area of object inspection). As shown in Fig. 7(C), when the object accumulated relative degree histogram b0 is located on the right side of the reference accumulated relative degree histogram a0, the curve b1 located on the right side of histogram a0 by one degree is expressed by y = E (x + 1). By changing E (x1 +i) to E (x1 + 1 + i) in formula (2), the correlation coefficient G1 (1) is calculated. Similarly, the values G1 (2), G1 (3)...G1 (n) are obtained, and a maximum value among them is obtained. If it is not detected in advance whether the curve b0 is located on the left side or right side of the curve a0, the values G1 (-n)...G1 (-2), G1 (-1), G1 (0), G1 (1), G1 (2)...G1 (n) are calculated, and a maximum value among them is obtained. In order to obtain more exact partial coincidence degree between the reference accumulated histogram and the object accumulated histogram, the position of the accumulated relative degree memories 71R and 71P is shifted to the right by one degree, and the values of G2 (0), G2 (-1), G2 (-2)...G2 (-n) are obtained in like manner described above. This operation is repeated until the contrast range of the histogram curve a0 (the range between the lower limit density x1 at which the accumulated relative degree is 0 and the upper limit density at which the accumulated relative degree is 1) is covered. A maximum value among G1, G2...Gk is obtained, and the histograms are overlapped at the maximum value. Thus, the pixel area which does not fall within the reference image contrast range between the upper and lower limits. In general, in the object accumulated relative degree histogram or object relative degree histogram, defects such as pinholes on the resin surface exist in a low density (dark) portion, and breakages in the resin mold exist in a high density (light) portion. In Fig. 8, a curve 72R (solid line) and a curve 72P (broken line) indicates a reference accumulated relative degree histogram and an object accumulated relative degree histogram. The histogram 72P shows the case where the resin mold surface of the object has pinholes and breakages. It is possible to compare the dark portion 73 (e.g., density levels of 0 to 20) and the light portion 74 (e.g., density levels of 200 to 255) with the reference histogram pattern, thus detecting defects in the resin surface. In order to eliminate the influence due to a drift by which the histograms may be displaced to the right or left, it is possible to perform total positioning of the histograms by pattern matching. When the maximum value of the correlation coefficient obtained in this case is 0.7 or less, it is judged that the histogram is largely displaced. When the value of the correlation coefficient is higher than 0.7, the partial coincidence degree of the histograms is obtained by the above manner, and the correlation coefficient is compared to the reference value which was obtained in advance. Thus, the quality of the mold can be judged. When a contrast level between the resin mold and the background is high, the distinction therebetween is easy. For example, the upper and lower limit values of the accumulated relative degrees are set to constants, and the quality of the mold can be judged based on the pixel area which is out of the range between the upper and lower limits. Furthermore, the present invention can be worked by using software loaded in a microcomputer. Fig. 10 shows a flowchart of the software. In the flowchart, steps ST2 to ST5 relate to the reference image, steps ST6 to ST9 relate to the processing of image data of an inspected object, and steps ST10 to ST14 relate to the processing of comparison results. In ST1, an image of an object is stored in a memory. In ST2, it is detected whether or not a reference image is recorded. In ST3, an image signal of the reference image is recorded in the memory. The routine goes to ST3 when the result in ST2 is NO. In ST4, a reference image density histogram is prepared. In ST5, a reference image density accumulated histogram is prepared. After ST5, the routine returns to ST1. On the other hand, the routine goes to ST6 when the result in ST2 is YES. In ST6, the position of the inspected object is detected. In ST7, an object image relative density histogram is prepared in comparison with the reference image density. In ST8, an object image density accumulated histogram is prepared. In ST9, a maximum coincidence value between the reference accumulated histogram prepared in ST5 and the object accumulated histogram prepared in ST8. In ST10, the degree of coincidence is judged based on the result of ST9. The routine goes to ST11, when the result in ST10 is OK. In ST11, defects of the object are inspected based on the accumulated histograms. In ST12, it is judged whether the quality of the object is good or bad, based on the result in ST11. When the result in ST12 is OK, the processing for a good object is performed in ST13. For example, a signal indicating that the object is good is output from the device. On the other hand, when the result in ST10 is NG (no good) or the result in ST12 is NO, the routine goes to ST14 in which the processing for a defective object is performed. For example, a signal indicating that the object is bad is output from the device. According to the image processing apparatus and method of the present invention for inspecting defects of enclosure of semiconductor devices, an object density image relative degree histogram pattern and an object density image accumulated relative degree histogram pattern are compared with a reference pattern, thereby to inspect defects in resin molds. This invention can overcome drawbacks in a conventional visual inspection method or in a two-value image processing method. The influence due to a density drift in an ITV camera or the like can be eliminated. In addition, in the present invention, the detection of the position of the object and the coordinate conversion of the image can be performed by a computer in a pre-processing step. Thus, the real-time inspection of defects in the resin mold can be realized. Also, the method and apparatus of the invention is suitable for automated inspection.

Claims: An image processing apparatus for inspecting defects of enclosure of semiconductor devices, comprising: photoelectric conversion means (10) for producing a first image signal of the semiconductor device; A/D conversion means (20) for converting the image signal from the photoelectric conversion means (10) to a digital image signal; and first histogram memory means (60P) for storing a relative density degree of said image signal of the semiconductor device; characterized by further comprising: first semiconductor device image memory means (21) for storing the digital image signal supplied from the A/D converter means (20); position detection means (40), receiving the image signal from the first image memory means (21), for detecting the position of the semiconductor device; reference image memory means (31R) for supplying to the position detection means (40) a reference image signal for the position detection; second histogram memory means (60R) for storing a relative density degree of said reference image signal; position correcting means (50), receiving signals from the first semiconductor device image memory means (21) and the position detection means (40), for correcting the position of the semiconductor device stored in the first image memory means (21); second semiconductor image memory means (31P) for storing a position-corrected image signal from the position correcting means (50) and supplying the stored signal to the first histogram memory means (60P); third histogram means (70R) for storing an accumulated value of the relative degree supplied from said second histogram memory (60R); fourth histogram means (70P) for storing an accumulated value of the relative degree supplied from said first histogram memory (60P); and coincidence degree detection means (80) for detecting the coincidence degree between data from said third histogram memory means (70R) and said fourth histogram memory means (70P). The apparatus according to claim 1, characterized by further comprising: defect inspections means (90) for receiving an output signal from said coincidence degree detection means (80) for detecting defects of enclosure of said semiconductor device based on the coincidence degree between data from said third and fourth histogram memory means (70R,70P). The apparatus according to claim 1 or 2, characterized by further comprising a single microcomputer having a program loaded thereon for operating said first image memory means (21), said reference image memory means (31R), said position detecting means (40), said second image memory means (31P), and said first, second, third and fourth histogram memory means (60P, 60R, 70R, 70P). The apparatus according to claim 1, 2 or 3, characterized in that said position detecting means (40) comprises a rectangular window for specifying the number and location of pixels in horizontal and vertical directions, for cutting out pixels from the two images represented by said stored digital and reference image signals, two-dimensional data correlation coefficient calculation means for calculating a correlation coefficient H between the group of pixels cut out from the two images represented by said digital and reference image signals, and position judging means for correlating windows covering a given area of the image represented by said stored digital image signal with the windows covering a corresponding area of the image represented by said stored reference image signal, based on maximum values of said correlation coefficient for different pairs of pixel groups. The apparatus according to claim 4, characterized in that said first histogram memory means (60P), second histogram memory means (60R), third histogram memory means (70R), and fourth histogram memory means (70P) have addresses corresponding to density levels of the image signal. An image processing method for inspecting defects of enclosure of semiconductor devices, comprising: a 1st step (ST1) for forming an image of a semiconductor device,; an input processing 2nd step (ST2) for processing said image of the semiconductor device; a 3rd step (ST3) for judging whether or not a reference image has been recorded; a 4th step (ST4) for recording an image signal of the reference image in a memory, when a result in the 3rd step (ST3) is NO; a 5th step (ST5) for forming a reference image density histogram from said image signal; a 6th step (ST6) for forming a reference image density accumulated histogram from said reference image density histogram, a routine of control being returned to the input processing 2nd step (ST2) after the 6th step (ST6); a 7th step (ST7) for detecting the position of the object, the 7th step (ST7) being performed when a result in the 3rd step (ST3) is yes; an 8th step (ST8) for forming an object image density relative histogram from a result of detecting of the 7th step; a 9th step (ST9) for forming an object image density accumulated relative histogram from said object image density relative histogram; a 10th step (ST10) for detecting a maximum coincidence position between said reference image density accumulated histogram and said object image density accumulated relative histogram; an 11th step (ST11) for judging a coincidence degree at the maximum coincidence position in said histograms; a defect inspecting 12th step (ST12) for inspecting defects in the object, based on the accumulated histograms, the 12th step (ST12) being performed when the result in the 11th step (ST11) is OK; a 13th step (ST13) for judging whether or not the object is good, based on the result in the defect inspecting 12th step (ST12); a 14th step (ST14) for subjecting a good object to a predetermined processing, when the result in the 13th step is OK; and a 15th step (ST15) for subjecting a bad object to a predetermined processing, when the result in the 13th step (ST13) is NO.

Inventors: OZAKI TAKAYUKI C O INTELLECTUA, OZAKI, TAKAYUKI C/O INTELLECTUAL PROPERTY DIVISION
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1989
Main classification: G06T7
IPC codes: G01R31, H01L21, G01N21