Wafer OCR (Optical Character Recognition) method and device based on template matching
By using the template matching method in wafer OCR recognition, OCR character outline templates and target area outline templates are created, and the wafer image is scaled and rotated, the problem of large wafer deflection angle and low character enlargement or reduction is solved, and high accuracy and wide-applicable recognition effects are achieved.
Patent Information
- Application Number
- CN202311412530.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2043-10-27
AI Technical Summary
In the prior art, in the case of large wafer deflection angle and enlargement or reduction of characters, the wafer OCR recognition accuracy is low and unstable.
Using a template matching method, by creating an OCR character outline template and a target area outline template in a preset coordinate system, obtaining wafer images and scaling and rotating processing, matching the character templates to extract the OCR character area.
It improves the recognition accuracy and scope of application of wafer OCR, ensuring that high recognition accuracy is maintained while the deflection angle is large and characters are enlarged or reduced.
Smart Images

Figure CN119904873A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wafer OCR recognition, and in particular relates to a wafer OCR recognition method and a recognition device based on template matching. Background Art
[0002] Wafer processing is a very important part of the chip production process. Each wafer has a unique number (Wafer ID), which is the wafer's OCR (Chinese name is identification code). Through this OCR, the production information of the wafer can be found. In the front-end process, the wafer's OCR is usually on the back of the wafer; in the back-end packaging and testing stage, after the wafer is tested by needle, the corresponding Map information will be written into the wafer's OCR. Through the wafer OCR, we can know which DIEs in the wafer are qualified, providing information assistance for subsequent packaging and testing.
[0003] Commonly used methods for reading wafer OCR include manual recording and traditional camera recognition. Manual recognition has a high accuracy rate, but it takes a long time, and workers are prone to making mistakes when working for a long time. Camera recognition has a high degree of automation and a fast recognition time, but it has high requirements for wafer characters, lighting conditions, and camera field of view. When the wafer deflection angle is large or the wafer characters become larger or smaller, the recognition accuracy is low and unstable. Summary of the invention
[0004] Therefore, the present invention provides a wafer OCR recognition method and recognition device based on template matching, which can solve the technical problem in the prior art that the OCR recognition accuracy is low when the wafer deflection angle is large and the wafer characters become larger or smaller.
[0005] In order to solve the above problems, the present invention provides a wafer OCR recognition method based on template matching, which comprises the following steps:
[0006] Creating an OCR character outline template and a target area outline template corresponding to the OCR character outline template in a preset coordinate system; wherein the OCR character outline is located within the target area outline;
[0007] Acquire a wafer image, and place the wafer image in the preset coordinate system;
[0008] According to the created OCR character outline template, the OCR character outline on the wafer image in the preset coordinate system is searched by template matching to obtain a rough OCR character outline, and a scaling ratio and a rotation angle between the rough OCR character outline and the OCR character outline template are determined, and the center of the rough OCR character outline is determined;
[0009] Translating the wafer image in the preset coordinate system so that the center of the rough OCR character outline is consistent with the center of the OCR character outline template;
[0010] Scaling and rotating the target area contour template according to the scaling ratio and rotation angle to obtain an actual target area contour;
[0011] Extract the image within the actual target area contour in the wafer image to obtain the wafer OCR character area image;
[0012] Extract each character in the wafer OCR character area;
[0013] Recognize each character in turn.
[0014] In some implementations, extracting each character in the wafer OCR character area specifically includes:
[0015] Threshold segmentation is performed on the wafer OCR character area to obtain different connected domains;
[0016] Structural screening is performed on each of the connected domains to screen out character connected domains in the connected domains to obtain each character.
[0017] In some embodiments, the structural screening comprises: area comparison and / or length comparison and / or width comparison.
[0018] In some implementations, recognizing each character in turn specifically includes:
[0019] Perform recognition training on each character of wafer OCR respectively to obtain a recognition model for each character;
[0020] Each character is recognized in turn according to the recognition model.
[0021] The present invention also provides a wafer OCR recognition device based on template matching, which includes a template creation module, a wafer image acquisition module, a template matching module, a position compensation module, a zooming and rotating module, a wafer OCR extraction module, a character extraction module and a recognition module;
[0022] The template creation module is used to create an OCR character outline template and a target area outline template corresponding to the OCR character outline template in a preset coordinate system; wherein the OCR character outline is located within the target area outline; the wafer image acquisition module is used to acquire a wafer image and place the wafer image in the preset coordinate system; the template matching module is used to search for the OCR character outline on the wafer image in the preset coordinate system by template matching according to the created OCR character outline template, obtain a rough OCR character outline, determine the scaling ratio and rotation angle between the rough OCR character outline and the OCR character outline template, and determine The center of the rough OCR character outline; the position compensation module is used to translate the wafer image within the preset coordinate system so that the center of the rough OCR character outline is consistent with the center of the OCR character outline template; the scaling and rotation module is used to scale and rotate the target area outline template according to the scaling ratio and rotation angle to obtain the actual target area outline; the wafer OCR extraction module is used to extract the image within the actual target area outline in the wafer image to obtain the wafer OCR character area image; the character extraction module is used to extract each character in the wafer OCR character area; the recognition module is used to recognize each character in turn.
[0023] The wafer OCR recognition method and recognition device based on template matching provided by the present invention have the following beneficial effects:
[0024] 1. The technical solution of the present invention sets a character template image corresponding to the wafer, and scales and / or rotates the acquired wafer image through the character template image, so that the wafer can be matched with the character template image when the deflection angle is large and the characters are enlarged or reduced, so as to facilitate subsequent recognition, thereby greatly improving the recognition accuracy and application scope of the wafer OCR, and still maintaining a high recognition accuracy when the wafer deflection angle is large and the characters are enlarged or reduced.
[0025] 2. By setting a target area contour template corresponding to the character contour template, scaling and rotating the target area contour template according to the determined scaling ratio and rotation angle, the actual target area contour can be obtained, so that the OCR character area in the wafer image can be accurately extracted to avoid incomplete extraction of the OCR character area. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. The drawings described below are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0027] Figure 1 It is a flow chart of a wafer OCR recognition method based on template matching of the present invention;
[0028] Figure 2 It is a schematic diagram for creating character templates;
[0029] Figure 3 It is a schematic diagram of template matching and positioning;
[0030] Figure 4 It is a schematic diagram of extracting character areas;
[0031] Figure 5 It is a schematic diagram of segmenting characters;
[0032] Figure 6 This is a schematic diagram of wafer OCR recognition;
[0033] Figure 7 A relationship diagram between a rough OCR character outline and an OCR character outline template in a preset coordinate system is shown. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0036] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0037] Unless otherwise specified, the relative arrangement of the components and steps described in these embodiments, the numerical expressions and numerical values do not limit the scope of the present invention. At the same time, it should be understood that for ease of description, the structures, proportions, sizes, etc. shown in the drawings are only used to match the contents disclosed in the specification, so that people familiar with this technology can understand and read, and are not used to limit the limiting conditions that can be implemented in the present invention. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the efficacy and purpose that can be achieved by the present invention. The techniques, methods and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the techniques, methods and equipment should be regarded as part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as merely exemplary, not as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further discussed in subsequent figures.
[0038] In the description of the present invention, it is necessary to understand that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "lateral, vertical, perpendicular, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the devices or elements referred to must have a specific direction or be constructed and operated in a specific direction. Therefore, they cannot be understood as limiting the scope of protection of the present invention. The directional words "inside and outside" refer to the inside and outside relative to the contours of each component itself.
[0039] For ease of description, spatially relative terms such as "above", "above", "on the upper surface of", "above", etc. may be used here to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" can include both "above" and "below". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatially relative descriptions used here are interpreted accordingly.
[0040] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. If not otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of the present invention.
[0041] See also Figure 1-6 As shown, according to an embodiment of the present invention, a wafer OCR recognition method based on template matching is provided, which includes the following steps:
[0042] Step S1: creating an OCR character outline template and a target area outline template corresponding to the OCR character outline template in a preset coordinate system, wherein the OCR character outline is located within the target area outline.
[0043] Among them, Figure 2 As shown, in order to ensure the recognition accuracy of subsequent wafer OCR, it is necessary to create a qualified character template image to ensure that subsequent wafer OCR can match. Specifically, the character template image should be clear and the character template frame should be as small as possible to reduce interference with character extraction.
[0044] In addition, the target area outline module can be a rectangular outline. In the preset coordinate system, the center coordinates of the OCR character outline template are (x0, y0).
[0045] Step S2: Acquire a wafer image, and place the wafer image in the preset coordinate system.
[0046] Among them, an industrial camera, a zoom lens and a strip light can be used to form an acquisition module to acquire wafer images. The quality of the acquired image can be guaranteed by using an industrial camera, a zoom lens and a strip light to form an acquisition module. Secondly, by adjusting the brightness of the light source, it can be applied to most wafer image acquisition scenarios.
[0047] It should be noted here that the wafer images collected by camera photography need to be preprocessed to enhance image features and reduce noise.
[0048] Step S3: Figure 3 As shown, according to the created OCR character contour template, the template matching method is used to find the OCR character contour on the wafer image in the preset coordinate system to obtain a rough OCR character contour, and the scaling ratio and rotation angle between the rough OCR character contour and the OCR character contour template are determined, and the center of the rough OCR character contour is determined.
[0049] Among them, the specific method of template matching is an existing technology, and the OCR character contour on the wafer image can be found by using the template matching method. Due to the low accuracy of template matching, the OCR character contour found at this time may have the phenomenon of missing or incomplete characters. It is necessary to further accurately search the OCR character contour.
[0050] In step S3, the center of the rough OCR character outline is (x1, y1), the scaling ratio between the rough OCR character outline and the OCR character outline template is (Sx, Sy), and the rotation angle is θ. The two-dimensional transformation matrix Vector_2D of the rough OCR character outline is:
[0051]
[0052] Step S4: translating the wafer image within the preset coordinate system so that the center of the rough OCR character outline is consistent with the center of the OCR character outline template.
[0053] It should be noted that: the translation distance on the X-axis in the preset coordinate system is ΔX, and the translation distance on the Y-axis is ΔY.
[0054]
[0055]
[0056] Step S5: scaling and rotating the target area contour template according to the scaling ratio and rotation angle to obtain an actual target area contour.
[0057] Among them, the actual target area contour transformation matrix Vector_2D' is:
[0058]
[0059] Step S6: Figure 4As shown, the image within the actual target area contour in the wafer image is extracted to obtain the wafer OCR character area image.
[0060] Step S7: extracting each character in the wafer OCR character area.
[0061] Specifically, if Figure 5 As shown, the extraction of each character in the wafer OCR character area can be achieved by the following method: threshold segmenting the wafer OCR character area to obtain different connected domains, and structurally screening each of the connected domains to screen out the character connected domains in the connected domain to obtain each character.
[0062] Among them, some of the connected domains are character connected domains, and some are non-character connected domains. The character connected domains in each connected domain can be screened out by structural screening to obtain each character.
[0063] In a specific application example, the above-mentioned structural screening may include: area comparison and / or length comparison and / or width comparison. Specifically, by comparing the area of each connected domain with a preset area range value, and / or comparing the length of each connected domain with a preset length range value, and / or comparing the width of each connected domain with a preset width range value, if the area of the connected domain is within the preset area range value, and / or the length of the connected domain is within the preset length range value, and / or the width of the connected domain is within the preset width range value, then the connected domain is the desired character connected domain, that is, the connected domain is screened out.
[0064] Step S8: Recognize each character in turn.
[0065] Among them, Figure 6 As shown, the recognition of each character in turn can be carried out in the following manner: each character of the wafer OCR is trained for recognition respectively to obtain a recognition model of each character. Each character is recognized in turn according to the recognition model.
[0066] It should be noted that: each character can be trained by character set, and the specific recognition training method is prior art and will not be described here. If an unfamiliar character is to be recognized, the character can be added to the character set for training and the recognition model can be updated.
[0067] For ease of understanding, Figure 7 A relationship diagram between a rough OCR character outline and an OCR character outline template in a preset coordinate system is shown. In this example, the OCR character is AB, Figure 7 The upper left side is the OCR character outline template, the center point of the OCR character outline template is O1, and the coordinates of the center point O1 are (x0, y0). Figure 7The lower right side is a rough OCR character outline, the center point of the rough OCR character outline is O2, and the coordinates of the center point O2 are (x1, y1). The distance between the center points O2 and O1 in the X-axis direction is ΔX, and the distance between the center points O2 and O1 in the Y-axis direction is ΔY. Figure 7 The rectangular box outside the OCR character AB in the upper left middle part is the target area contour template.
[0068] pass Figure 7 It can be seen that the wafer image in the preset coordinate system is first moved to make the center points O2 and O1 coincide with each other, and then the target area contour template is scaled and rotated according to the determined scaling ratio and rotation angle to obtain the actual target area contour.
[0069] In the above example, the wafer OCR recognition method of the present invention sets a character outline template corresponding to the wafer, and scales and / or rotates the acquired wafer image through the character outline template, so that the wafer can be matched with the character template image when the deflection angle is large and the characters are enlarged or reduced, so as to facilitate subsequent recognition, thereby greatly improving the recognition accuracy and application scope of the wafer OCR, and still maintaining a high recognition accuracy when the wafer deflection angle is large and the characters are enlarged or reduced.
[0070] In addition, by setting a target area contour template corresponding to the character contour template, scaling and rotating the target area contour template according to the determined scaling ratio and rotation angle, the actual target area contour can be obtained, so that the OCR character area in the wafer image can be accurately extracted, avoiding incomplete extraction of the OCR character area.
[0071] The present invention also provides a wafer OCR recognition device based on template matching, which includes a template creation module, a wafer image acquisition module, a template matching module, a position compensation module, a scaling and rotation module, a wafer OCR extraction module, a character extraction module and a recognition module. The template creation module is used to create an OCR character outline template and a target area outline template corresponding to the OCR character outline template in a preset coordinate system; wherein the OCR character outline is located in the target area outline. The wafer image acquisition module is used to acquire a wafer image and place the wafer image in the preset coordinate system. The template matching module is used to search for the OCR character outline on the wafer image in the preset coordinate system by template matching according to the created OCR character outline template, obtain a rough OCR character outline, determine the scaling ratio and rotation angle between the rough OCR character outline and the OCR character outline template, and determine the center of the rough OCR character outline. The position compensation module is used to translate the wafer image in the preset coordinate system so that the center of the rough OCR character outline is consistent with the center of the OCR character outline template. The scaling and rotation module is used to scale and rotate the target area contour template according to the scaling ratio and rotation angle to obtain the actual target area contour. The wafer OCR extraction module is used to extract the image within the actual target area contour in the wafer image to obtain the wafer OCR character area image. The character extraction module is used to extract each character in the wafer OCR character area. The recognition module is used to recognize each character in turn.
[0072] In the above example, the wafer OCR recognition device sets a character template image corresponding to the wafer, and scales and / or rotates the acquired wafer image through the character template image, so that the wafer can be matched with the character template image when the deflection angle is large and the characters are enlarged or reduced, so as to facilitate subsequent recognition, thereby greatly improving the recognition accuracy and application scope of the wafer OCR, and still maintaining a high recognition accuracy when the wafer deflection angle is large and the characters are enlarged or reduced.
[0073] It is easy for those skilled in the art to understand that, without conflict, the advantageous technical features of the above-mentioned methods can be freely combined and superimposed.
[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention. The above description is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and variations can be made without departing from the technical principles of the present invention. These improvements and variations should also be regarded as the protection scope of the present invention.
Claims
1. A wafer OCR recognition method based on template matching, characterized in that: The following steps are involved: Creating an OCR character outline template and a target area outline template corresponding to the OCR character outline template in a preset coordinate system; wherein the OCR character outline is located within the target area outline; Acquire a wafer image, and place the wafer image in the preset coordinate system; According to the created OCR character outline template, the OCR character outline on the wafer image in the preset coordinate system is searched by template matching to obtain a rough OCR character outline, and a scaling ratio and a rotation angle between the rough OCR character outline and the OCR character outline template are determined, and the center of the rough OCR character outline is determined; Translating the wafer image in the preset coordinate system so that the center of the rough OCR character outline is consistent with the center of the OCR character outline template; Scaling and rotating the target area contour template according to the scaling ratio and rotation angle to obtain an actual target area contour; Extract the image within the actual target area contour in the wafer image to obtain the wafer OCR character area image; Extract each character in the wafer OCR character area; Recognize each character in turn.
2. The wafer OCR recognition method based on template matching according to claim 1, characterized in that: The extracting of each character in the wafer OCR character area specifically includes: Threshold segmentation is performed on the wafer OCR character area to obtain different connected domains; Structural screening is performed on each of the connected domains to screen out character connected domains in the connected domains to obtain each character.
3. The wafer OCR recognition method based on template matching according to claim 2, characterized in that: The structural screening includes: area comparison and / or length comparison and / or width comparison.
4. The wafer OCR recognition method based on template matching according to claim 1, characterized in that: Each character is recognized in turn, including: Perform recognition training on each character of wafer OCR respectively to obtain a recognition model for each character; Each character is recognized in turn according to the recognition model.
5. A wafer OCR recognition device based on template matching, characterized in that: It includes template creation module, wafer image acquisition module, template matching module, position compensation module, zooming and rotation module, wafer OCR extraction module, character extraction module and recognition module; The template creation module is used to create an OCR character outline template and a target area outline template corresponding to the OCR character outline template in a preset coordinate system; wherein the OCR character outline is located within the target area outline; The wafer image acquisition module is used to acquire a wafer image and place the wafer image in the preset coordinate system; The template matching module is used to search the OCR character contour on the wafer image in the preset coordinate system by template matching according to the created OCR character contour template, obtain a rough OCR character contour, determine the scaling ratio and rotation angle between the rough OCR character contour and the OCR character contour template, and determine the center of the rough OCR character contour; The position compensation module is used to translate the wafer image in the preset coordinate system so that the center of the rough OCR character outline is consistent with the center of the OCR character outline template; The scaling and rotation module is used to scale and rotate the target area contour template according to the scaling ratio and the rotation angle to obtain the actual target area contour; The wafer OCR extraction module is used to extract the image within the actual target area contour in the wafer image to obtain the wafer OCR character area image; The character extraction module is used to extract each character in the wafer OCR character area; The recognition module is used to recognize each character in turn.
Citation Information
Patent Citations
Keyboard key character detection method
CN114299496A
Seal image generation method and seal identification method
CN116311273A
Positioning templates in optical character recognition systems
EP0834826B1
System and method for optical character recognition
IN201941028617A