Abstract:
A pattern recognition apparatus and method, the apparatus comprising a correlation calculating circuit for calculating first correlations between each part of a image pattern data and a reference pattern data, the first correlation being expressed as R(X), where X is a variable factor representing a region storing the part of the image pattern data, and also comprising a second correlation calculating circuit for recognizing the position of a pattern most identical to the reference pattern by emphasizing the maximum value of the first correlations by converting each of the first correlations R(X) into a second correlation expressed as [R(X)-R(X-α)]-[R(X+α)-R(X)], where α is a predetermined value determined in accordance with the size of the reference pattern data.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a pattern recognition apparatus and a pattern recognition method, more particularly, to an apparatus and method for recognizing, with a high accuracy and a high speed, bonding lead patterns and bonding pad patterns (hereinafter referred to as lead patterns and pad patterns) of an integrated circuit (IC) or elements such as transistors, and diodes, formed on a hybrid IC substrate, so as to enable an efficient automatic wire bonding operation between the lead and the bonding pad. 
     2. Description of the Prior Art 
     One of the applications of an apparatus for detecting the position of patterns is in the field of automatic wire bonding for assembling a semiconductor IC or a semiconductor hybrid IC. 
     To accomplish successful automatic wire bonding in assembling a semiconductor hybrid IC (or semiconductor IC), it is desired that the position of each pad pattern of elements on the hybrid IC and the position of each lead pattern on the hybrid IC be detected both quickly and accurately. If the positions of the pad patterns and the lead patterns are not detected quickly and accurately, the assembly process will be delayed or the yield of products will be reduced. 
     Two methods are known for detecting lead patterns and pad patterns, i.e., a pattern matching method and a pattern feature extracting method (see, for example, Semiconductor International, February 1981, pp 53 to 70, &#34;Pattern Recognition on Bonders and Probers&#34;, and Japanese Unexamined Patent Publication (Kokai) No. 55-187258 and U.S. Pat. No. 4,450,579). Both these methods have advantages and disadvantages when applied to a pattern-position recognizing apparatus used for assembling hybrid IC&#39;s. Thus, neither method is totally satisfactory when used in an automatic wire bonding apparatus. 
     In both of these conventional methods, the surface of a hybrid IC is scanned by a TV camera or the like to obtain image signals of the lead patterns or part of an element pattern including pad patterns. The image signals obtained by the scanning are converted into binary-coded signals. 
     In the conventional pattern matching method, the binary-coded data representing the scanned lead pattern or the part of the element are compared with the image data of a reference pattern of a standard sample whose position is previously known, by means of one-dimensional or two-dimensional correspondence, to determine correlations therebetween. When a correlation between the scanned pattern and the reference pattern is the maximum among all of the correlations, the position of the scanned pattern is identified. 
     In this conventional pattern matching method, however, there are several disadvantages. First, in the case of thick-film hybrid IC&#39;s, the lead patterns are formed by means of printing. Because of the printing, the surface of each lead pattern is too rough to find the maximum correlation in pattern matching. Thus, it is difficult to accurately detect the position of each lead pattern. 
     Second, if the element to be recognized is mounted on a substrate with a small rotation angle with respect to the standard sample, the binary-coded data representing the scanned pattern will not completely coincide with the image data of the reference pattern. This noncoincidence also occurs because of a production-prober&#39;s scratch on each lead pattern, or on each pad pattern, the scratch being inevitably formed during electrical testing of the IC or the hybrid IC before the wire bonding process. The scanned pattern generally does not coincide exactly with the reference pattern due to other noise as well. Under these circumstances, it is difficult to identify the scanned pattern which coincides with the reference pattern. Thus, the position of the scanned pattern may often be erroneously determined. In other words, the accuracy of the position detection is poor. 
     In the conventional pattern-feature extracting method, a specific shape, size, or area of a pattern is detected by, for example, extracting a pattern width and a middle point of the pattern with the use of a view-window determining circuit. This second method also has several disadvantages. As in the case of the first conventional method, it is difficult to determine the specific shape, size, or area of the rough surface of a lead pattern formed by printing. Also, erroneous positions may be determined when noise is introduced into the binary-coded data obtained by scanning a pattern. Further, a hybrid IC mounts various patterns of elements, such as rectangular-shaped patterns or egg-shaped patterns of IC&#39;s, transistors, diodes, etc., making it difficult to extract a specific feature. For example, it is difficult to determine the middle point of an egg-shaped pattern. Therefore, the feature extracting method is not adequate for recognizing a pattern on a hybrid IC. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the present invention is to provide an apparatus and a method which can prevent erroneous detection of the position of a pattern laid on an object, by combining an improved pattern matching method and a feature extracting method. 
     Another object of the present invention is to provide an apparatus and method which can correctly detect the position of a lead pattern formed by printing. 
     Still another object of the present invention is to provide an apparatus and method which can correctly detect the position of a pattern even when the pattern is mounted with a small rotation angle with respect to a reference pattern or even when the pattern has scratches. 
     A still further object of the present invention is to provide an apparatus and method which can correctly identify a desired pattern from various patterns on an IC or hybrid IC. 
     A still further object of the present invention is to provide an apparatus and method effective for an automatic wire bonding operation in a semiconductor device. 
     To attain the above objects, there is provided a pattern recognition apparatus comprising an image pickup section for picking up an image of patterns; a pretreatment circuit for converting (quantizing) the outputs of the image pickup section into digitized image pattern data consisting of binary-coded signals; a pattern memory circuit having N×M addresses for storing N×M bits of the image pattern data, where M and N are integers; and a reference pattern memory circuit having at least n×m addresses for storing reference pattern data consisting of n×m bits of a reference pattern, where m and n are integers smaller than M and N respectively. 
     According to the invention, the apparatus further comprises a correlation calculating circuit for calculating first correlations between sub-images each consisting of n×m bits of the image pattern data and of the reference pattern data respectively, each of the first correlations being expressed as R(x), where X is a variable factor representing a memory region (e.g. address) storing one of the sub-images of the image pattern data in the pattern memory circuit; and a position recognizing means for recognizing the position of a pattern-most indentical to the reference pattern by emphasizing (e.g. enhancing) the maximum value of the first correlations by converting each of the first correlations R(x) into a second correlation expressed as [R(x)-R(x-α)]-[R(x+α)-R(x)], where α is a predetermined value determined in accordance with the size of the reference pattern data. 
     According to one aspect of the present invention, the pattern recognition apparatus further comprises a data compaction circuit inserted between the pretreatment circuit and the pattern memory circuit, for compacting a predetermined number of neighboring uncompacted bits of the binary-coded image signals into a single compact bit, the sign of the single compact bit being determined in accordance with the number of &#34;1&#34; or &#34;0&#34; signals in the neighboring uncompacted bits, so as to provide compacted image pattern data to the pattern memory circuit. 
     According to the present invention, there is further provided a pattern recognition method comprising the steps of picking up an image of patterns; converting the picked-up image into digitized image pattern data consisting of binary-coded signals; storing N×M bits of the image pattern data, where M and N are integers; storing reference pattern data consisting of at least n×m bits of a reference pattern, where m and n are integers smaller than M and N, respectively; calculating first correlations between sub-images each consisting of n×m bits of the image pattern data and of the reference pattern data, respectively each of the first correlations being expressed as R(x), where X is a variable factor representing a memory region storing one of the sub-images of the image pattern data; and recognizing the position of a pattern most identical to the reference pattern, by emphasizing the maximum value of the first correlations by converting each of the first correlations R(x) into a second correlation expressed as [R(x)-R(x-α)]-[R(x+α)-R(x)], where α is a predetermined value determined in accordance with the size of the reference pattern data. 
     The pattern recognition method according to the present invention may further comprise, after the step of converting the picked up image into digitized image pattern data consisting of binary-coded signals, the step of compacting a predetermined number of neighboring uncompacted bits of the binary-coded signals into a single compact bit, the sign of the single compact bit being determined in accordance with the number of &#34;1&#34; or &#34;0&#34; signals in the neighboring uncompacted bits, so as to provide compacted image pattern data. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The above objects, advantages, and other features of the present invention will be more apparent from the following description of the embodiments when read in conjunction with the attached drawings, wherein; 
     FIG. 1 is a plan view of a hybrid IC chip on which an embodiment of the present invention is applied; 
     FIG. 2 is comprised of FIGS. 2A, 2B, which when laid adjacent one another present a block circuit diagram of a pattern recognition apparatus according to an embodiment of the present invention; 
     FIG. 3 is a more detailed block circuit diagram of part of FIG. 2; 
     FIG. 4 is a schematic diagram of an image pattern data in one column and a reference pattern data for explaining the process of obtaining first correlations therebetween by the circuit of FIG. 2; 
     FIG. 5A is a graph of first correlations between one column of the image pattern data and one column of the reference pattern data shown in FIG. 4; 
     FIG. 5B is a graph of second correlations obtained from the first correlations of FIG. 5A, in which the maximum second correlation is emphasized over the first correlation by the circuit of FIG. 2; 
     FIG. 5C is an enlarged view of a part of the graph of FIG. 5A, for explaining the method of obtaining the second correlations; 
     FIG. 5D is a graph of third correlations obtained from the first correlations of FIG. 5A and the second correlations of FIG. 5B, in which the maximum third correlation is emphasized over the first or the second correlation; 
     FIGS. 6A, 7A, and 8A are schematic magnified plan views of elements on the hybrid IC of FIG. 1; 
     FIGS. 6B, 7B, and 8B are graphs of experimental values of first correlations and the second correlations of the respective elements of FIGS. 6A, 7A and 8A; 
     FIG. 9A shows a lead pattern image in which data is not compacted; 
     FIG. 9B is a graph of the first correlations of the lead pattern image of FIG. 9A; 
     FIG. 10A shows a lead pattern image as of FIG. 9A in which two neighboring bits are compacted to a single bit; 
     FIG. 10B is a graph of the first correlations of the lead pattern image of FIG. 10A; 
     FIG. 11A shows a lead pattern image as of FIG. 9A, but in which four neighboring bits are compacted to a single bit; 
     FIG. 11B is a graph of the first correlations of the lead pattern image as of FIG. 11A; 
     FIG. 12A shows a lead pattern image of FIG. 9A in which 16 neighboring bits are compacted to a single bit; and 
     FIG. 12B is a graph of the first correlations of the lead pattern image of FIG. 12A. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Embodiments of the present invention will now be described with reference to the drawings. 
     FIG. 1 is a plan view of a hybrid IC chip on which an embodiment of the present invention is applied. In FIG. 1, on a hybrid IC substrate 1, patterns of various elements, such as an IC pattern 1a, transistor patterns 1b, 1c, and 1d, and a diode pattern 1e, are mounted. The IC pattern 1a has on its outer sides a number of pad patterns lap. On the periphery of the IC pattern 1a, a number of lead patterns 1al corresponding to the pad patterns lap are arranged. Similarly, the transistor pattern 1b has two pad patterns 1bp. On the periphery of the transistor pattern 1b, two lead patterns 1bl corresponding to the pad patterns 1bp are arranged. The transistor patterns 1c and 1d also have pad patterns 1cp and 1dp and lead patterns 1cl and 1dl on their peripheries. The diode pattern 1e has a pad pattern 1ep and, on its periphery, a lead pattern 1el. 
     These pad patterns and the corresponding lead patterns should be connected by, for example, gold wires by means of an automatic wire bonder. To do this, it is necessary to detect the position of each pad pattern and each lead pattern. To detect the position of each pad pattern and each lead pattern, a part of the corresponding element pattern should first be identified. 
     There are, however, problems in the conventional pattern recognition methods, as mentioned before. Briefly, the problems are derived from the following: 
     (a) The surfaces of the lead patterns are too rough to be recognized by a TV camera in the conventional two methods when the lead patterns are formed by screen printing. 
     (b) The elements may be mounted on the substrate of the hybrid IC chip 1 with a small rotation angle during the manufacturing process. In such a case, it is difficult to recognize, in the conventional pattern matching method, the part of the element for identifying the desired pad pattern and the corresponding lead pattern. 
     (c) On each pad pattern and on each lead pattern, there is inevitably formed a production-prober&#39;s scratch, as denoted by a notation pp in FIG. 1. Other optical noise may also be formed on the patterns. These deteriorate the pattern recognition accuracy in the conventional methods. 
     (d) There are various shapes of element patterns on the hybrid IC substrate 1, as illustrated in FIG. 1. For the sake of simplicity, only five element patterns are illustrated in FIG. 1, however, in practice, there may be many more shapes of element patterns on the hybrid IC substrate 1. These various shapes are difficult to identify by the conventional feature extracting method. 
     FIG. 2 is a block circuit diagram of a pattern recognition apparatus according to an embodiment of the present invention. In FIG. 2, reference numeral 2 represents an image pickup section, for example, a TV camera, for picking up an image of the patterns on the hybrid IC substrate 1 or on a reference sample. The image picked up by the TV camera 2 is transferred through a TV camera driver 4 to an analog-digital (A/D) converter 5. The TV camera driver 4 is controlled by a clock generator 3. 
     The A/D converter 5 converts (i.e., quantizes) the picked-up image signals into digitized image pattern data consisting of binary-coded signals, i.e., digital signals. The digital signals produced by the A/D converter 5 are stored in a frame memory 6 which operates synchronously with the operation of the TV camera 2 to store the digital signals, maintaining the shape of the picked-up image of the pattern on the hybrid IC substrate 1. Since an image represented by the digital signals consists of A×B bits (A and B are integers), for example, 256 (X-axis)×256 (Y-axis) bits, the frame memory 6 has a memory capacity corresponding to one digitized image, i.e., A×B bits, for example 256×256 bits. 
     The digital signals stored in the frame memory 6 are supplied to a data compaction circuit 7. 
     The data compaction circuit 7 converts a predetermined number of neighboring bits of the digital signals taken out from the frame memory 6 into a single bit. This conversion is carried out in such a manner that each of a plurality of small sub-images each consisting of c×c bits (c is an integer smaller than N or M), for example, 4×4 bits, in the digital signals of the image consisting of A×B bits, for example, 256×256 bits, are converted into a single bit, and, the sign of the single bit is determined in accordance with the number of &#34;1&#34; or &#34;0&#34; signals in the each small sub-image consisting of c×c bits, for example, 4×4 bits. That is, in the above example when, for example, eight or more &#34;1&#34; signals are included in the small sub-image, the converted single bit is assigned &#34;1&#34;value, and when the number of &#34;1&#34; signals is less than eight, the converted single bit is assigned a binary value of &#34;0&#34;. Thus, the data compaction circuit 7 outputs the compacted digitized image pattern data consisting of N×M bits (N and M are integers smaller than A and B), for example, 64×64 bits. This data compaction shortens the time required for data processing. 
     The output of the data compaction circuit 7 is connected to a pattern memory circuit 9 having a memory capacity of N×M bits. The output of the pattern memory circuit 9 is connected to a first input of a pattern correlation calculating circuit 10 and to the input of a first reference pattern memory circuit 11. 
     Under the control of a control circuit (not shown), reference pattern data is stored in the first reference pattern memory circuit 11 before picking up the image of the patterns to be recognized. The reference pattern data stored in the first reference pattern memory 11 is obtained from compacted image pattern data of the patterns on the hybrid IC substrate 1 to be recognized. The reference pattern data corresponding to one reference pattern consists of n×m bits (n and m are integers smaller than N and M respectively), for example, 24×24 bits. 
     There are a plurality of reference patterns on the reference sample. Therefore, a plurality of reference pattern data should be stored. A plural reference pattern memory circuit 12 is therefore constructed so as to store the plurality of reference pattern data, each of which is supplied from the first reference pattern memory circuit 11. A reference pattern control circuit 13 controls the plural reference pattern memory circuit 12 to output therefrom each necessary reference pattern and to store it into a second reference pattern memory circuit 14 under the control of the reference pattern controller 13. The output of the second reference pattern memory circuit 14 is connected to a second input of the pattern correlation calculating circuit 10. 
     The pattern correlation calculating circuit 10 calculates first correlations between the compacted image pattern data and a sub-image consisting of n×m bits, for example, 24×24 bits of the reference pattern data, in accordance with clock signals supplied from the clock generator 3. The output of the pattern correlation calculating circuit 10 is connected to a first input of an adder 15 and to the input of a second correlation calculating circuit 16. The output of the second correlation calculating circuit 16 is connected to a second input of the adder 15. The pattern correlation calculating circuit 10 and the second correlation calculating circuit 16, which constitute a main body of the present invention, will be described later in detail with reference to FIG. 3. 
     The output of the adder 15 is connected to the input of a maximum value storing register 17 and to the input of a comparator 18. In the maximum value storing register 17, a preset data value is stored before picking up of the image of the patterns to be recognized. When the output value of the adder 15 is greater than the value stored in the maximum value storing register 17, the contents of the maximum-value storing register 17 are updated to equal the output value of the adder 15 by providing a trigger from the comparator 18 to the maximum value storing register 17, and, the address at that time is stored into an address register 19 by providing a trigger to the address register 19. 
     The output of the address register 19 is connected to a view-window determining circuit 20. The view-window determining circuit 20 calculates the addresses of a view window for taking out a small sub-image of the image pattern data from the frame memory 6, after all bits in the pattern memory circuit 9 have been processed by the pattern correlation calculating circuit 10 and by the second correlation calculating circuit 16. Thus, the small sub-image taken out from the frame memory 6 includes the data corresponding to that data which provides the maximum value stored in the maximum value storing register 17 after all bits in the pattern memory circuit 9 are processed. In other words, the small sub-image taken out from the frame memory 6 includes the image pattern data of a pattern to be recognized which matches with the reference pattern. 
     Since a pattern to be recognized for wire bonding has a size of for example 100 μm×100 μm, the view window is determined to have a size of 200 μm×200 μm, for example, which is greater than the pattern size. The X and Y axis resolution of the TV camera 1 is for example 5 μm/l bit. Therefore, the small sub-image taken out from the frame memory 6 has a size of 40×40 bits in this example. 
     The small sub-image of 40×40 bits is transferred through the view-window determining circuit 20 to a middle-point detecting circuit 21, in which the middle point of the pattern to be recognized is calculated. It should be noted that, since the data of the small sub-image taken out from the frame memory 6 are not compacted, the detected middle point has a high accuracy when compared with the address stored in the address register 19. 
     The output of the middle-point detecting circuit 21 is connected to a control circuit (not shown). By the output of the control circuit, a wire bonding operation is carried out on the determined middle point of the pattern. 
     FIG. 3 is a detailed block circuit diagram of the pattern correlation calculating circuit 10 and the second correlation calculating circuit 16. In FIG. 3, the pattern correlation calculating circuit 10 comprises a first n-bit or 24-bit shift register 22 connected to the pattern memory circuit 9, a second n-bit or 24-bit shift register 23 connected to the second reference pattern memory circuit 14, a plurality of ENOR (Exclusive NOR) gates 24 each having a first input connected to one of the n locations in the first n-bit shift register 22 and a second input connected to one of the n locations in the second n-bit shift register 23, a first adding circuit 25 having inputs connected to the outputs of the ENOR gates 24, a data register 26, a second adding circuit 27 having a first input connected to the output of the first adding circuit 25 and a second input connected to the output of the data register 26, the output of the second adding circuit 27 being connected to the input of the data register 26, a memory control circuit 28, and a line memory circuit 29 having a plurality of first-correlation storing regions 29-1, 29-2, ---29-(N-n). Each of the locations in the first n-bit shift register 22 corresponds to one of the locations in the second n-bit shift register 23. 
     The second correlation calculating circuit 16 comprises a predetermined number of registers R 0 , R 1 , --- R.sub.α, --- R 2 α in a register storing portion 30, a first subtracting circuit 31 for subtracting the contents in the register R 0  from the contents in the register R.sub.α, a second subtracting circuit 32 for subtracting the contents in the register R.sub.α from the contents in the register R 2 α, and a third subtracting circuit 33 for subtracting the output of the second subtracting circuit 32 from the output of the first subtracting circuit 31. 
     The number α is determined in accordance with the size of the pattern to be recognized. The lead pattern or the pad pattern to be recognized for wire bonding has a size of for example 100 μm×100 μm. One compacted bit, when 4×4 bits are compacted to one compact bit, represents a 20 μm×20 μm (5 μm×4×4 bits) area of the image. Therefore, a 100 μm×100 μm is expressed by 5 compacted bits. In this case, the predetermined number α is determined to be equal to 5. Generally, when the size of the pattern to be recognized is l μm×l μm and when c×c bits of the original uncompacted image pattern data are compacted to one compacted bit, the predetermined number α is determined to be equal to l/5c, where the equivalent resolution of the TV camera 1 in the x and y axes is 5 μm/bit. 
     The line memory circuit 29 has an input/output terminal connected to the first input of the adder 15. The output of the third substracting circuit 33 is connected to the second input of the adder 15. 
     The operation of the pattern correlation circuit 10 and the second correlation calculating circuit 16 shown in FIG. 3 will now be described with reference to FIGS. 4, 5A, 5B, 5C, and 5D. 
     After storing a compacted reference pattern data into the second reference pattern memory circuit 14, the hybrid IC substrate 1 is moved into the visual field of the TV camera 2 and after digitized and compacting the image pattern data consisting of N×M compacted bits, for example, 64×64 bits are stored in the pattern memory circuit 9, as described before. In FIG. 4, RD shows the compacted reference pattern data consisting of n×m bits, or for example 24×24 bits, stored in the second reference pattern memory circuit 14, and ID shows the compacted image pattern data consisting of N×M bits, for example, 64×64 bits, stored in the pattern memory circuit 9. The image pattern data ID is compared with the reference pattern data RD so as to detect the position of a sub-image of the image pattern data ID most identical to the reference pattern data RD. The image pattern data ID consists of (M-m) columns (i.e. matrices) each consisting of N×m bits. The process of comparing the image pattern data ID with the reference pattern data RD comprises (M-m) main steps. In each main step, one column is processed. Each column consists of m sub-columns (i.e., sub-matrices) each consisting of N×1 bits. Each main step comprises m steps. In each step, one sub-column consisting of N×1 bits is processed. 
     FIG. 4 illustrates the first main step for processing the first column of N×m bits. 
     The first step in the first main step is shown in the left portion of FIG. 4. During the first step, the first-column reference pattern data RD 1  are input into the second n-bit shift register 23 (FIG. 3). The first step comprises (N-n) sub-steps. 
     In the first sub-step of the first step a, first sub-image data ID 1 ,1 consisting of n bits in the first sub-column of the image pattern data ID, are input into the first n-bit shift register 22 (FIG. 3), by means of a view window in the pattern memory circuit 9. That is, the view window can provide n bits in one of the sub-columns. Each of the ENOR gates 24 outputs a &#34;1&#34; when the data stored in the corresponding locations of the first n-bit shift register 22 and the second n-bit shift register 23 coincide, that is, when &#34;1&#34; and &#34;1&#34; or &#34;0&#34; and &#34;0&#34; are input to the ENOR gate 24. The first adding circuit 25 calculates the number of &#34;1&#34;s output from the ENOR gates 24. The calculated number of &#34;1&#34;s is a first correlation between the first data sub-matrix ID 1 ,1 stored in the first n-bit shift register and the reference pattern data sub-matrix RD 1  stored in the second n-bit shift register. Before obtaining the first correlation, the contents of the second adding circuit 27, the data register 26, and the line memory circuit 29 are cleared to zero. Thus, the first correlation obtained at the output of the first adding circuit 25 is stored, under the control of the memory control circuit 28, into the first-correlation storing region 29-1, which is allocated for the first row consisting of n×M bits in the image pattern data ID. 
     In the second sub-step, a second data sub-matrix ID 1 ,2 consisting of n bits in the first sub-column and in the second row are stored in the first n-bit shift register 22. That is, the view window in the pattern memory circuit 9 is shifted by one bit in the first sub column to provide the second data sub-matrix ID 1 ,2 to the first n-bit shift register 22. The first adding circuit 25 calculates a first correlation between the second data sub-matrix ID 1 ,2 and the reference pattern data sub-matrix RD 1 . The calculated first correlation is stored in the first-correlation storing region 29-2, which is allocated for the second row consisting of n×M bits in the image pattern data ID. It will be seen from FIG. 4 that the second row is shifted from the first row by one bit in the column direction. 
     Similar operations as in the first and second sub-steps mentioned above are carried out in the remaining sub-steps. After the (N-n)th sub-step in the first step, first correlations between (N-n) rows in the first sub-column of the image pattern data ID and the first column of the reference pattern data are stored in the first-correlation storing regions 29-1, 29-2, --- 29 (N-n), respectively. 
     The second step in the first main step is shown in the middle portion of FIG. 4. During the second step, the second-column reference pattern data sub-matrix RD 2  are stored in the second n-bit shift register 23. The second step also comprises (N-n) sub-steps. 
     In the first sub-step of the second step, a first data sub-matrix ID 2 ,1 in the second sub-column and in the first row of the image pattern data ID and the second-column reference pattern data sub-matrix RD 2  are compared. The first correlation therebetween is calculated in the first adding circuit 25 in a similar way as in the first step. The second adding circuit 27 adds the previously obtained first correlation stored in the first-correlation storing region 29-1 to the first correlation obtained at the output of the first adding circuit 25 in this second sub-step. The added result is stored in the first-correlation storing region 29-1. 
     Similar operations as in the first sub-step of the second step are carried out in the remaining sub-steps. The added results are stored in the first-correlation storing regions 29-2, 29-3, --- 29-(N-n), respectively. 
     The third step and the following steps are similar to the above-mentioned second step. 
     It will be understood that, after the m-th step, that is, after the first main step, the first correlation between the n×m bits in the first column and in X-th row (where X=1, 2, --- or N-n) of the image pattern data ID, and the reference -pattern data RD, is stored in the first-correlation storing region 29-X. 
     FIG. 5A is a graph of correlations between one column of the image pattern data ID and the reference pattern data, obtained in the above-mentioned one main step. 
     After one main step, the first-correlations R(X), where X=1, 2, --- N-n, stored in the first-correlation storing regions 29-1, 29-2, --- 29-(N-n) of the line memory circuit 29 are sequentially read out and sequentially shifted and loaded into the registers R 0 , R 1 , --- R.sub.α, --- R 2 α in the register storing portion 30. In this loading operation, the registers R 0  through R 2 α act as a shift register. The registers R 0 , R.sub.α, and R 2 α store first correlations R(X-α), R(X), and R(X+α), respectively. The first subtracting circuit 31 calculates [R(X)-R(X-α)]. The second subtracting circuit 32 calculates [R(X+α)-R(X)]. The third subtracting circuit 33 calculates [R(X)-R(X-α)]-[R(X+α)-R(X)]. Thus, at the output of the third subtracting circuit 33, the second correlations expressed as T(X)=[R(X)-R(X-α)]-[R(X+α)-R(X)] are obtained sequentially in time. 
     The object of obtaining the second correlations T(X) is to emphasize the maximum value of the first correlations R(X). FIG. 5B is a graph of the second correlations T(X). As can be seen from FIG. 5B, the maximum value shown by an arrow is emphasized. 
     Since the predetermined number α is so determined as to be equal to l/5c as described before, and since l is the side length of a pattern to be recognized, the relations among the first correlations R(X), R(X-α), and R(X+α) have a character as illustrated in FIG. 5C. That is, when the first correlation R(X) is one of the peak values in the graph of FIG. 5A, the first correlations R(X-α) and R(X+α) are bottom values on both sides of the peak value. Therefore, the second correlation emphasizes the maximum first correlation. 
     Experiments show that a preferable result is obtained by adding the first correlation R(X) and the second correlation T(X). Therefore, in the adder 15, the first correlation R(X) and the second correlation T(X) obtained during each clock period are added. The output waveform of the adder 15 is shown in FIG. 5D. As can be seen from FIG. 5D, the maximum value of the second correlation T(X) is further emphasized. 
     The maximum value of the outputs from the adder 15 is stored in the maximum-value storing register 17, and the address at that time is stored in the address register 19, as described before. Thus, the first main step is completed. 
     The remaining main steps are then carried out in a similar way as in the first main step described above. After all of the (M-m) main steps are completed, all of the image pattern data ID are processed, and, in the maximum-value storing register 17 and in the address register 19, the final maximum value and the address at the time when the final maximum value is output are stored respectively. In other words, the address of the image pattern data most identical to the reference pattern data is stored in the address register 19. 
     The operations of the view-window determining circuit 20 and of the middle-point detecting circuit 21 have already been described briefly. These circuits themselves are known (see, for example, Japanese Unexamined Patent Publication (Kokai) No. 57-111781) and U.S. Pat. No. 4,450,579. Therefore, detailed descriptions of these circuit operations are omitted. It should be noted, however, that the deterioration of resolution due to data compaction by the data compaction circuit 20 is compensated by the middle-point detecting circuit 21. 
     The determined middle point of a image pattern data is a point of a pad pattern or of a lead pattern which is then subjected to wire bonding. 
     The advantages or effects of obtaining the second correlations T(X) will be more apparent in the following explanation made with reference to FIGS. 6A, 7A and 8A and FIGS. 6B, 7B and 8B. 
     FIGS. 6A, 7A and 8A are schematic plan views of the elements on the hybrid IC substrate of FIG. 1, in which patterns are shown by non-hatched regions. FIGS. 6B, 7B and 8B are graphs of experimental waveforms of the first correlations and the second correlations of respective elements in FIGS. 6A, 7A and 8A. 
     In FIG. 6A, patterns on an IC are arranged at a relatively close density. In FIG. 6B, waveforms of first correlations R(X) and second correlations T(X) obtained by processing the image pattern data of the patterns of FIG. 6A during six main steps MS 1  through MS 6  are illustrated. As can be seen from FIG. 6B, the maximum value of the first correlations and the maximum value of the second correlations are detected in the sixth main step MS 6 . Since the patterns in FIG. 6A are arranged in close density, the waveforms of the first correlations in the sixth main step are clearly distinguishable from the waveforms in the adjacent fifth main step. Therefore, in this case, the second correlations are not so advantageous. However, the maximum value of the first correlations R(X) is emphasized in the second correlation T(X). 
     FIG. 7A shows patterns on an other IC pattern. The patterns in FIG. 7A are arranged at a relatively low density. FIG. 7B shows waveforms of the first correlations R(X) and second correlations T(X) obtained by processing the image pattern data of the patterns of FIG. 7A during six main steps MS 1  through MS 6 . Since the patterns in FIG. 7A are arranged at a low density, the waveforms of the first correlations in one main step are very similar to the other first correlations waveforms in the other main steps. Therefore, it is difficult to detect the maximum value of the first correlations throughout all of the main steps. The maximum value of the first correlations R(X) indicated by an arrow in FIG. 7B is, however, emphasized in the second correlations T(X). 
     FIG. 8A shows a pattern of a diode. FIG. 8B shows waveforms of the first correlations R(X) and second correlations T(X) obtained by processing the image pattern data of the pattern of FIG. 8A during six main steps MS 1  through MS 6 . Since the pattern in FIG. 8A is very simple and arranged at a low density, the same advantage is obtained as in the case of FIG. 7A described above with reference to FIG. 7B. 
     The advantages or effects of the data compaction carried out by the data compaction circuit 7 will be more apparent from the following explanation made with reference to FIGS. 9A, 10A, 11A and 12A and FIGS. 9B, 10B, 11B and 12B. 
     FIGS. 9A, 10A, 11A and 12A illustrate image patterns of a lead pattern formed by printing. FIG. 9A illustrates an image pattern which is not compacted. Therefore, one picture element in FIG. 9A represented a pattern area of 5 μm×5 μm as an example. FIG. 9B illustrates a compacted image pattern of the lead pattern, in which 2×2 bits are compacted to a single bit. Therefore, one picture element in FIG. 9B represents a pattern area of 10 μm×10 μm as an example. FIG. 9C illustrates a further compacted image pattern in which 4×4 bits are compacted to a single bit. Therefore, one picture element in FIG. 9C represents a pattern area of 20 μm×20 μm as an example. FIG. 9D illustrates a still further compacted image pattern in which 6×6 bits are compacted to a single bit. Therefore, one picture element in FIG. 9D is 30 μm×30 μm as an example. Accordingly, the resolution of the image pattern is deteriorated along with the increase in the compaction degree. The deteriorated resolution, however, is compensated, as described before, by the middle-point detecting circuit 21. 
     On the other hand, the amount of the image pattern data of the lead pattern is reduced to 1/c 2 , for example, 1/4, 1/16, and 1/36, in accordance with the data compactions. This shortens the data processing time t for obtaining the first and the second correlations. This advantage will be seen from FIGS. 9B, 10B, 11B and 12B, which are graphs of the first correlations R(x) of the lead pattern images of FIGS. 9A, 10A, 11A and 12A, respectively. 
     Further, since the surface of the printed lead pattern is uneven, or is not as smooth as a pad pattern formed by metal evaporation, and since the unevenness is randomly formed, the maximum value of the first correlations for the lead pattern is emphasized when image pattern data are compacted, as can be seen from FIGS. 9B through 12B. 
     The present invention is not restricted to the above described embodiment. Various changes and modifications are possible without departing from the spirit of the present invention. For example, the data compaction process may be eliminated in the pattern recognition process. In this case, the reference pattern data are, of course, not compacted. 
     From the foregoing description, it will be apparent that, according to the present invention, by combining an improved pattern matching method and a feature extracting method, the possibility of an error in detection of the position of a pattern laid on an object is greatly reduced, even when the pattern is a lead pattern formed by printing, the pattern is mounted with a small rotation angle with respect to a reference pattern, the pattern has scratches or optical noise, or the pattern includes various shapes of patterns on an object, such as in a hybrid IC. 
     Further, the introduction of the data compaction process into the process recognition pattern greatly reduces the data processing time to 1/c 2 . 
     As a result, the pattern recognition apparatus and method are effective for an automatic wire bonding operation for a semiconductor device.