Method for determining application layer of workpiece
Through template matching, the inclination angle of the target feature of the workpiece surface and the measurement layer is adjusted, which solves the problem that optical measurement instruments find it difficult to place the angle uniformly when processing multiple samples, and achieves high-precision target feature recognition and measurement, improving measurement efficiency.
Patent Information
- Application Number
- CN202510151888.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-06-03
AI Technical Summary
When optical measuring instruments process multiple samples, it is difficult to align the positioning angle of the sample, resulting in unclear target features in the measurement layer and difficult to identify and measure.
Obtain the inclination angle of the target feature on the workpiece surface through template matching, adjust the measurement layer that recognizes and measures the target feature, ensure that the target feature creates shadows in the measurement layer, improves contrast, and automatically selects the most suitable measurement layer for identification and measurement of the target feature.
The operation steps of the measurement process are simplified, the recognition accuracy and measurement accuracy of target features are improved, the placement angles of multiple samples are unified, the number of target layers is reduced, and the measurement efficiency is improved.
Smart Images

Figure CN120088625A_ABST
Abstract
Description
[0001] This application is a divisional application of the patent application with the application date of October 8, 2024, the application number of 2024113955372, and the invention title of "Method for Obtaining Angle According to Template Matching to Adjust Workpiece Application Layer". Technical Field
[0002] This disclosure generally relates to the intelligent manufacturing equipment industry, and specifically relates to a method for determining a workpiece application layer. Background Art
[0003] Optical measuring instruments (such as dimensional screening instruments, image measuring instruments, etc.) are instruments that use light source illumination to measure parameters such as the size, shape, and position of samples. Optical measuring instruments can measure samples batch by batch and precisely. Compared with manual measurement, optical measuring instruments have very significant advantages in terms of measurement efficiency and measurement accuracy.
[0004] Taking a dimensional screening instrument as an example, a dimensional screening instrument usually includes a loading guiding vision system and a dimensional inspection vision system. The loading guiding vision system usually uses a large-field-of-view lens to capture an image of the sample at the loading station. However, since the tiny features of the sample in the image obtained by the large-field-of-view lens are not clear, the loading guiding vision system mainly uses the relatively clear outer contour of the sample in the image for template matching to confirm the placement angle of the sample at the loading station. After the robotic arm picks up the sample at the loading station, the sample is rotated to a suitable tilt angle based on the placement angle of the sample and then placed on the stage, so that the placement angles of the samples on the stage are unified. When the number of samples on the stage reaches a certain amount, the stage can carry the samples and transfer the samples to the dimensional inspection vision system. The dimensional inspection vision system illuminates the samples at a suitable angle and captures an image (i.e., a layer) containing multiple samples. Among them, the features to be measured (i.e., target features) on the surface of each sample are clear pattern details in the layer. The processing software identifies and / or measures the target features of each sample in the layer to obtain measurement results.
[0005] However, after placing some types of samples (such as samples with a centrosymmetric shape such as a circle, rectangle, or polygon for the outer contour) on the stage by the above method, the placement angles of multiple samples may still have deviations (for example, from the perspective of the outer contour of the sample, the placement angles of each sample may seem to be unified, but some samples are actually deflected by 90 degrees, 180 degrees, or 270 degrees). In addition, the robotic arm may also cause deviations in the placement angles of multiple samples on the stage due to unexpected collisions or malfunctions. Therefore, it is often difficult to unify the placement angles of the samples on the stage. In this case, in the layer obtained by the dimensional inspection vision system, the target features of some samples are not clear pattern details in the layer, resulting in difficulty in identifying the target features. Summary of the Invention
[0006] The present disclosure is proposed in view of the above situation, and aims to provide a method for obtaining an angle through template matching to adjust the application layer of a workpiece. This method can adjust the measurement layer for identifying and / or measuring a target feature based on the inclination angle of the target feature. By automatically selecting the most suitable measurement layer for identifying the target feature, it can not only simplify the operation steps of the measurement process, but also improve the identification accuracy and measurement accuracy of the target feature.
[0007] To this end, the present disclosure provides a method for obtaining an angle through template matching to adjust the application layer of a workpiece, which is a method for an optical measuring instrument to determine a target layer from multiple measurement layers for identifying target features on multiple workpiece surfaces, including: respectively photographing multiple workpieces under multiple unidirectional illuminations and obtaining multiple measurement layers corresponding to the unidirectional illuminations, wherein the multiple unidirectional illuminations are realized by multiple light sources arranged in a surrounding manner above the multiple workpieces; photographing multiple workpieces under uniform illumination and obtaining an initial layer; using the initial layer for template matching to obtain the inclination angles of each feature on multiple workpiece surfaces, wherein the range of the inclination angles is divided into multiple intervals corresponding to the multiple unidirectional illuminations, and a one-to-one correspondence relationship is established between the multiple intervals and the multiple measurement layers based on the multiple unidirectional illuminations and the multiple measurement layers; and determining the interval where the inclination angle of the target feature is located based on the inclination angle of the target feature to obtain the measurement layer corresponding to the inclination angle of the target feature as the target layer, wherein a shadow of the target feature is generated in the target layer.
[0008] In the present disclosure, the multiple unidirectional illuminations are realized by multiple light sources arranged in a surrounding manner above the workpiece, which can make the multiple unidirectional illuminations surround the workpiece. When photographing the workpiece under multiple unidirectional illuminations respectively, no matter what the posture of the workpiece is in the photographing field of view, at least one unidirectional illumination makes a shadow of the target feature of the workpiece, that is, at least one measurement layer in the multiple measurement layers makes the contrast of the target feature of the workpiece meet the preset requirements. In this case, since the shadow generated by the target feature in each measurement layer is related to the posture of the target feature in the photographing field of view, by dividing the range of the inclination angle of the target feature into multiple intervals and establishing a corresponding association between the multiple intervals and the multiple measurement layers, it is convenient to accurately match the corresponding measurement layer as the target layer according to the interval where the inclination angle of the target feature is located, that is, automatically select the most suitable measurement layer for identifying the target feature according to the inclination angle of the target feature, which can not only simplify the operation steps of the measurement process, but also improve the identification accuracy and / or measurement accuracy of the target feature.
[0009] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, it further includes: identifying the target feature in the target layer and displaying the identified target feature; and measuring the target feature in the target layer. In this case, identifying the target feature in the target layer can improve the identification accuracy of the target feature; in addition, by displaying the identified target feature in the target layer, it is convenient for the user to intuitively judge whether the identified target feature meets the measurement requirements; in addition, measuring the target feature in the target layer can improve the measurement accuracy of the target feature.
[0010] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, after obtaining the inclination angles of the respective features on the surfaces of multiple workpieces, a target area for identifying the target feature is determined. In this case, determining the target area can facilitate the identification of the target feature within the target area, thereby improving the identification efficiency of the target feature.
[0011] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, template matching is performed using the initial layer to obtain the positions and placement angles of multiple workpieces, and determining the target area includes: determining the type of the target feature; automatically calculating the position of the target feature based on the design drawing of the workpiece, the positions and placement angles of multiple workpieces; and obtaining the target area containing the target feature in the initial layer based on the position of the target feature. In this case, obtaining the target area in an automatic manner can improve the efficiency and accuracy of obtaining the target area, and when identifying the target feature within the target area, it can improve the efficiency and accuracy of identifying the target feature.
[0012] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, determining the target area includes: manually selecting the type of the target feature; and manually selecting the area containing the target feature in the initial layer to obtain the target area. In this case, obtaining the target area in a manual manner can flexibly and conveniently determine the target area, thereby improving the flexibility and convenience of identifying the target feature, and further improving the flexibility and convenience of measuring the target feature.
[0013] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, the target area is identified in the target layer to obtain the target feature. In this case, since the target area is first determined and the target area is the area where the target feature is located, by identifying the target area in the target layer, the efficiency and accuracy of identifying the target feature can be improved.
[0014] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, the middle direction between two adjacent unidirectional polishing directions is used as the demarcation line for dividing the plurality of intervals. Thereby, the convenience and accuracy of dividing the plurality of intervals can be improved.
[0015] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, in response to the inclination angle of the target feature being at the demarcation line, the contrast of the target feature in two measurement layers corresponding to two adjacent intervals is compared, and the measurement layer with a higher contrast of the target feature is used as the target layer. In this case, by using the measurement layer with a higher contrast of the target feature as the target layer, the clarity of the target feature in the measurement layer can be improved, thereby improving the recognition accuracy and measurement accuracy of the target feature.
[0016] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, it further includes the placement process of moving the workpiece from the loading station to the stage of the optical measuring instrument, and the placement process includes: photographing the workpiece located at the loading station to obtain the original layer; performing template matching based on the contour of the workpiece in the original layer to obtain the original placement angle of the workpiece; obtaining the target angle for rotating the workpiece based on the original placement angle and the preset placement angle of the workpiece on the stage; and placing the workpiece on the stage after rotating the target angle. In this case, the workpiece can be placed on the stage at the preset placement angle, so that the placement angles (i.e., postures) of multiple workpieces on the stage are as unified as possible, and further, the inclination angles of the target features on the surfaces of multiple workpieces are also as much as possible in the same interval, and the number of target layers used can be reduced when identifying and / or measuring the target features, thereby improving the measurement efficiency.
[0017] In addition, in the method for adjusting the application layer of a workpiece involved in the present disclosure, optionally, in response to a chamfer being formed near the target feature, the heights of the plurality of light sources are adjusted to cause the target feature to generate a shadow in the unidirectional polishing and the side of the target feature close to the unidirectional polishing is illuminated. In this case, for the case where a chamfer is formed near the target feature, by changing the height of the light source until the contrast of the target feature meets the preset requirements, the position of the target feature can be clearly reflected in the measurement layer, thereby facilitating the accurate identification of the target feature and reducing the interference of the chamfer on the identification of the target feature.
[0018] According to the present disclosure, a method for obtaining an angle according to template matching to adjust a workpiece application layer can be provided. This method can adjust a measurement layer for identifying and / or measuring a target feature based on the inclination angle of the target feature. By automatically selecting the most suitable measurement layer for identifying the target feature, not only can the operation steps of the measurement process be simplified, but also the identification accuracy and measurement accuracy of the target feature can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present disclosure will now be further explained in detail only by way of examples with reference to the accompanying drawings.
[0020] Figure 1 FIG. is a schematic structural diagram of an optical measuring instrument involved in an example of the present disclosure.
[0021] Figure 2 FIG. is a schematic side view of a partial area of a workpiece and a target feature involved in an example of the present disclosure.
[0022] Figure 3 FIG. is a flowchart of a method for adjusting a workpiece application layer involved in an example of the present disclosure.
[0023] Figure 4A FIG. is a schematic top view of a workpiece under single-directional lighting involved in an example of the present disclosure.
[0024] Figure 4B FIG. is a schematic side view of a partial area of a workpiece under single-directional lighting involved in an example of the present disclosure.
[0025] Figure 5 FIG. is a schematic diagram showing a plurality of light sources arranged in a surrounding manner above a workpiece involved in an example of the present disclosure.
[0026] Figure 6 FIG. is a schematic top view of a workpiece under uniform lighting involved in an example of the present disclosure.
[0027] Figure 7 FIG. is a schematic diagram showing a plurality of workpieces presenting different placement angles in a shooting field of view involved in an example of the present disclosure.
[0028] Figure 8 FIG. is a schematic diagram showing that the range of the inclination angle of a target feature involved in an example of the present disclosure is divided into 4 intervals.
[0029] Figure 9 FIG. is a schematic diagram showing that the range of the inclination angle of a target feature involved in an example of the present disclosure is divided into 6 intervals.
[0030] Figure 10 FIG. is a flowchart of the first embodiment for determining a target area involved in an example of the present disclosure.
[0031] Figure 11 It is a flowchart showing a second embodiment of determining a target area related to the examples of the present disclosure.
[0032] Figure 12 It is a flowchart showing another embodiment of a method for adjusting a workpiece application layer related to the examples of the present disclosure.
[0033] Figure 13 It is a flowchart showing a placement process related to the examples of the present disclosure. Detailed implementation manners
[0034] Next, the technical solutions in the embodiments of the present disclosure will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present disclosure.
[0035] It should be noted that the terms "first", "second", "third", and "fourth", etc. in the specification and claims of the present disclosure and the above accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices. In the following description, the same reference numerals are assigned to the same components, and repeated descriptions are omitted. Additionally, the drawings are only schematic diagrams, and the proportional sizes between components or the shapes of components, etc. may be different from the actual ones.
[0036] The method for obtaining an angle according to template matching to adjust a workpiece application layer related to the present disclosure obtains the inclination angle of a target feature on the surface of a workpiece through template matching, and adjusts the measurement layer used to identify and / or measure the target feature based on the inclination angle of the target feature, and determines the measurement layer used to identify and / or measure the target feature for the purpose of improving the contrast of the target feature in the measurement layer. By automatically selecting the most suitable measurement layer to identify the target feature, it can not only simplify the operation steps of the measurement process, but also improve the recognition accuracy and measurement accuracy of the target feature.
[0037] In some examples, the application layer may refer to a measurement layer used to identify and / or measure a target feature on the surface of a workpiece. Additionally, adjusting the workpiece application layer may refer to determining the measurement layer used to identify and / or measure a target feature on the surface of a workpiece from multiple measurement layers.
[0038] In some examples, the method of obtaining an angle according to template matching to adjust the workpiece application layer can be abbreviated as the method of adjusting the workpiece application layer, and sometimes it can also be called the method of determining the workpiece application layer, or the method of determining a target layer to measure the workpiece, etc.
[0039] Hereinafter, the method of adjusting the workpiece application layer involved in the present disclosure will be described with reference to the accompanying drawings.
[0040] Figure 1 FIG. is a schematic structural diagram of an optical measurement instrument 1 involved in an example of the present disclosure. Figure 2 FIG. is a schematic side view of a partial area of a workpiece 2 and a target feature A involved in an example of the present disclosure.
[0041] In some examples, the method of adjusting the workpiece application layer can be applied to an optical measurement instrument 1 as shown in Figure 1 In some examples, the optical measurement instrument 1 can execute the method of adjusting the workpiece application layer to identify and / or measure the target feature A on the surface of the workpiece 2.
[0042] In some examples, the method of adjusting the workpiece application layer can be a method for the optical measurement instrument 1 to determine a target layer from multiple measurement layers, where the optical measurement instrument 1 can use the target layer to identify and / or measure the target feature A on the surface of the workpiece 2.
[0043] In some examples, the optical measurement instrument 1 can refer to an instrument that illuminates the workpiece 2 with a light source 12 (described later), captures an image of the workpiece 2, and measures the workpiece 2 based on the captured image. In some examples, the optical measurement instrument 1 can be a dimensional screening instrument, a flash measurement instrument, or an image measuring instrument, etc.
[0044] In some examples, the workpiece 2 can refer to an object to be measured. Additionally, the workpiece 2 can also be referred to as a sample or a test object, etc. In some examples, referring to Figure 2 , the workpiece 2 can include the target feature A. In some examples, the target feature A can refer to a feature to be measured on the surface of the workpiece 2. In some examples, the feature to be measured can be a feature characterizing the undulation of the surface of the workpiece 2 (such as a feature characterizing a step). Figure 2 Schematically shows that the target feature A can include a first step A11 and a second step A12.
[0045] In some examples, if there is a step on the surface of the workpiece 2, a contour will be formed at the step, and the contour can be a feature such as a straight line, an arc, or a circle. In some examples, the target feature A can refer to a contour feature such as a straight line, an arc, or a circle formed at the step on the surface of the workpiece 2.
[0046] Hereinafter, taking the feature characterizing the surface undulation of the workpiece 2 as an example of the feature to be measured, the method for adjusting the application layer of the workpiece involved in the present disclosure will be described.
[0047] In some examples, the measurement layer may refer to an image including the workpiece 2. In some examples, the measurement layer may refer to an image including the workpiece 2 captured by the vision system of the optical measurement instrument 1 (such as Figure 1 the imaging lens 14 shown). Additionally, in some examples, the target layer may refer to an image used for identifying and / or measuring the target feature A.
[0048] Figure 3 FIG. is a flowchart showing the method for adjusting the application layer of the workpiece involved in the examples of the present disclosure. Figure 4A FIG. is a schematic top view of the workpiece 2 under unidirectional lighting involved in the examples of the present disclosure. Figure 4B FIG. is a schematic side view of a partial area of the workpiece 2 under unidirectional lighting involved in the examples of the present disclosure. Figure 5 FIG. is a schematic diagram showing a plurality of light sources 12 arranged above the workpiece 2 in a surrounding manner involved in the examples of the present disclosure.
[0049] It should be noted that Figure 4B most of the structure of the workpiece 2 is omitted for the convenience of showing the influence of unidirectional lighting on the contrast of the target feature A, which should not be construed as a limitation to the present disclosure.
[0050] In some examples, referring to Figure 3 , the method for adjusting the application layer of the workpiece may include: photographing a plurality of workpieces 2 under different lighting directions to obtain a plurality of measurement layers and photographing a plurality of workpieces 2 under uniform lighting to obtain an initial layer (step S110); performing template matching using the initial layer to obtain the inclination angles of the respective features on the surfaces of the plurality of workpieces 2 (step S120); and determining the interval C in which the inclination angle α of the target feature A is located based on the inclination angle α of the target feature A to obtain the measurement layer corresponding to the inclination angle α of the target feature A as the target layer (step S130).
[0051] In some examples, in step S110, a plurality of workpieces 2 may be respectively photographed under a plurality of unidirectional lightings and a plurality of measurement layers corresponding to the unidirectional lightings may be obtained. Among them, one unidirectional lighting may indicate lighting in one direction. In some examples, unidirectional lighting may mean that the light beam received by the workpiece 2 has a directionality and the direction of the light beam is at least not the vertical direction.
[0052] In some examples, the measurement layer can correspond to the direction of the illumination. In some examples, the number of measurement layers can be the same as the number of illumination directions. In other words, multiple measurement layers can correspond to multiple unidirectional illuminations. For example, in a top-down view, four unidirectional illuminations can be provided around the workpiece 2 in the up, down, left, and right directions, and four corresponding measurement layers can be obtained by photographing the workpiece 2 under the four unidirectional illuminations respectively.
[0053] In some examples, referring to Figure 4A , the unidirectional illumination can form a shadow S on the surface of the workpiece 2. In some examples, under the unidirectional illumination, the shadow S can be generated by the undulations on the surface of the workpiece 2. In some examples, under the unidirectional illumination, the shadow S can be generated by the target feature A on the surface of the workpiece 2. For example, taking the target feature A as a step, when the step faces away from the direction of the unidirectional illumination, the step can generate a shadow S (refer to Figure 4A ). Specifically, in the direction of the unidirectional illumination, the two ends of the step can be the shadow S and the bright surface G respectively. At this time, the contrast of the step can be enhanced, so that the step can be clearly reflected in the measurement layer. During the feature recognition process, the accuracy of identifying the step can be improved.
[0054] For another example, in the example shown in Figure 4B , in the direction of the unidirectional illumination, the first step A11 faces away from the direction of the unidirectional illumination, and the two ends of the first step A11 are the shadow S and the bright surface G respectively. Therefore, the contrast of the first step A11 is relatively large; in addition, the second step A12 faces the direction of the unidirectional illumination, and both ends of the second step A12 are bright surfaces G. Therefore, the contrast of the second step A12 is relatively small.
[0055] In some examples, since the target feature A on the surface of the workpiece 2 can generate a shadow S under the unidirectional illumination, when photographing the workpiece 2 under the unidirectional illumination to obtain a measurement layer, the contrast of the target feature A in the measurement layer can meet the preset requirements (for example, the contrast of the first step A11 in Figure 4B meets the preset requirements, while the second step A12 does not meet the preset requirements). In some examples, the preset requirements can refer to the numerically set contrast manually. In some examples, the preset requirements can also represent an empirical value (such as a fixed value).
[0056] In some examples, multiple unidirectional illuminations can be realized by multiple light sources 12, and the multiple light sources 12 can be arranged in a surrounding manner. Thus, multiple different illumination directions can be achieved. For example, for multiple light sources 12 arranged around multiple workpieces 2, multiple unidirectional illuminations can be realized by turning on the light sources 12 in different orientations.
[0057] In some examples, in step S110, multiple unidirectional illuminations can be realized by multiple light sources 12 arranged in a surrounding manner above the workpiece 2 (refer toFigure 5 ) In this case, it is possible to have multiple unidirectional lightings surrounding the workpiece 2. Regardless of the attitude of the workpiece 2 in the shooting field of view, at least one unidirectional lighting causes a shadow S to be generated on the target feature A of the workpiece 2.
[0058] In some examples, referring to Figure 5 , the light source 12 can be a tubular light source. The number of tubular light sources can be 4. Turning on the 4 tubular light sources respectively can achieve four unidirectional lightings around the workpiece 2. In some examples, the light source 12 can be a light source formed by surrounding with multiple LEDs. By controlling the light-emitting LED area, different lighting directions can be achieved.
[0059] In some examples, multiple light sources 12 arranged in a surrounding manner can also be referred to as a ring light source. That is, setting a ring light source above the workpiece 2 can also achieve multiple unidirectional lightings around the workpiece 2.
[0060] In some examples, multiple measurement layers can be obtained by respectively enabling multiple unidirectional lightings to photograph multiple workpieces 2. Among them, the multiple measurement layers can correspond to the multiple unidirectional lightings.
[0061] In some examples, in step S110, the number of workpieces 2 can be multiple. In some examples, multiple workpieces 2 can be respectively photographed under multiple unidirectional lightings surrounding the workpiece 2 to obtain multiple measurement layers corresponding to the unidirectional lightings. In this case, since multiple unidirectional lightings surround the workpiece 2, regardless of whether the placement angles of the multiple workpieces 2 in the shooting field of view are unified, the target feature A of each workpiece 2 can generate a shadow S under one of the unidirectional lightings, thereby reducing the requirements for the placement angles (i.e., attitudes) of the multiple workpieces 2 in the shooting field of view.
[0062] In some examples, in the optical measuring instrument 1, the light source 12 can be arranged between the shooting lens 14 and the workpiece 2. For example, the light source 12 can be arranged below the lens and can move in the vertical direction following the lens. Thereby, it is possible to facilitate setting different beam incident heights to meet different measurement requirements.
[0063] Figure 6 is a schematic top view of the workpiece 2 involved in the example of the present disclosure under uniform lighting.
[0064] In some examples, in step S110, the workpiece 2 can be photographed under uniform lighting to obtain an initial layer. Figure 6 is schematically showing the features on the surface of the workpiece 2 under uniform lighting.
[0065] In some examples, uniform lighting may mean that the light beam received by the workpiece 2 does not tend to a certain direction. In some examples, uniform lighting may mean the case where multiple light sources 12 arranged around above the workpiece 2 are turned on simultaneously. In some examples, uniform lighting may also mean the case where multiple unidirectional lightings are enabled simultaneously.
[0066] In some examples, an initial layer can be obtained by taking pictures of multiple workpieces 2 while enabling multiple unidirectional lightings simultaneously.
[0067] It should be noted that although the undulation changes on the surface of the workpiece 2 in the initial layer are not particularly obvious compared with other measurement layers (for example, the measurement layers obtained under unidirectional lighting), the initial layer can still clearly show the pattern details on the surface of the workpiece 2 (for example, the material of the workpiece 2 involves multiple materials, and the differences in the colors or textures of different materials are reflected in the patterns formed on the surface of the workpiece 2 or the patterns formed by scribing lines). Therefore, it is appropriate to determine the placement angle of the workpiece 2 in the shooting field of view using the pattern details on the surface of the workpiece 2 in the initial layer.
[0068] In addition, in the present disclosure, unidirectional lighting should not be narrowly understood as the direction of the light beam being unique, but rather as a lighting method different from uniform lighting. For example, it can be that one (or more) light sources 12 located above the left side of the workpiece 2 are turned on simultaneously so that the light beam received by the workpiece 2 has a directionality.
[0069] Figure 7 FIG. shows a schematic diagram of multiple workpieces 2 involved in the examples of the present disclosure presenting different placement angles in the shooting field of view. Figure 8 FIG. shows a schematic diagram in which the range of the inclination angle α of the target feature A involved in the examples of the present disclosure is divided into 4 intervals C. Figure 9 FIG. shows a schematic diagram in which the range of the inclination angle α of the target feature A involved in the examples of the present disclosure is divided into 6 intervals C.
[0070] In some examples, referring back to Figure 3 , in step S120, the initial layer can be used for template matching to obtain the inclination angle α of each feature on the surfaces of multiple workpieces 2.
[0071] Specifically, template matching can be performed with the outer contour or pattern details of each workpiece 2 in the initial layer as the judgment basis to obtain the number of workpieces 2 and the placement angles of multiple workpieces 2, and the inclination angle α of each feature on the surfaces of multiple workpieces 2 is determined respectively based on the placement angles of multiple workpieces 2 and the design drawings of the workpiece 2 (see Figure 6 ).
[0072] In some examples, in step S120, the inclination angle α of each feature on the surface of the workpiece 2 may include the inclination angle α of the target feature A. That is, the initial layer can be used for template matching to obtain the inclination angle α of the target feature A of multiple workpieces 2.
[0073] In some examples, the outer contour (i.e., the contour) of the workpiece 2 may be centrosymmetric. In some examples, referring to Figure 7 , since the outer contour of the workpiece 2 is centrosymmetric, when using the outer contour of the workpiece 2 as the judgment reference for template matching to unify the placement angles of multiple workpieces 2 in the shooting field of view, although the placement angles of multiple workpieces 2 seem to be unified from the outer contour of the workpiece 2, in fact, some workpieces 2 present different placement angles in the shooting field of view. In other words, the placement angles of multiple workpieces 2 in the shooting field of view are not unified.
[0074] In some examples, the placement angle of the workpiece 2 may refer to the posture presented by the workpiece 2 in the shooting field of view. In some examples, the placement angle of the workpiece 2 may refer to the included angle of the workpiece 2 relative to the specified direction DA. In some examples, the placement angle of the workpiece 2 may refer to the included angle of the specified edge on the workpiece 2 relative to the specified direction DA (refer to Figure 7 ). For example, in the example shown in Figure 7 , the placement angles of the first workpiece 2a and the second workpiece 2b are 0 degrees, the placement angle of the third workpiece 2c is 90 degrees, the placement angle of the fourth workpiece 2d is -90 degrees, the placement angle of the fifth workpiece 2e is 180 degrees, and the placement angle of the sixth workpiece 2f is 45 degrees. In some examples, the value range of the placement angle of the workpiece 2 can be within 360 degrees.
[0075] In some examples, template matching may refer to comparing the initial layer with the design file of the workpiece 2 and determining the position and posture of the workpiece 2. Among them, the design file of the workpiece 2 may refer to a file containing the design drawing of the workpiece 2.
[0076] In some examples, the inclination angle α of the target feature A can be customized, and the inclination angle α of the target feature A can be obtained based on the posture of the target feature A from a top view perspective (refer to Figure 6 ).
[0077] In some examples, the inclination angle α of the target feature A may refer to the included angle of the target feature A relative to the specified direction DA. In some examples, the inclination angle α of the target feature A may refer to the included angle of the target feature A relative to the coordinate axis in the shooting field of view.
[0078] In some examples, the inclination angle α of the target feature A can represent the included angle of the target feature A relative to the positive direction of the X-axis or the Y-axis in the shooting field of view. In some examples, the inclination angle α of the target feature A can also represent the included angle of the extension direction of the target feature A in the initial layer relative to the positive direction of the X-axis or the Y-axis. For example, in Figure 6 the example shown, the inclination angle α1 of the first target feature A1 can be 0 degrees, the inclination angle α2 of the second target feature A2 can be 90 degrees, and the inclination angle α3 of the third target feature A3 can be 45 degrees.
[0079] In some examples, the inclination angle α of the target feature A can also characterize the orientation of the target feature A. For example, the inclination angle α of the target feature A being 90 degrees can indicate that the target feature A is oriented towards the negative direction of the X-axis; in addition, the inclination angle α of the target feature A being -90 degrees can indicate that the target feature A is oriented towards the positive direction of the X-axis.
[0080] In some examples, in response to the target feature A being a step, the inclination angle α can also be expressed as the orientation of the step side.
[0081] In some examples, the type of the target feature A can include a straight line and an arc. In some examples, referring to Figure 6 , in response to the type of the target feature A being a straight line, the inclination angle α of the target feature A can be the inclination angle α of the straight line (for example, the included angle between the straight line and the positive direction of the X-axis).
[0082] In some examples, in response to the type of the target feature A being an arc, the inclination angle α of the target feature A can be the inclination angle α of the tangent line at the midpoint of the arc (for example, the included angle between the tangent line and the positive direction of the X-axis). Thus, the inclination angle α of the target feature A can be determined quickly and accurately according to the type of the target feature A.
[0083] In some examples, the range of the inclination angle α of the target feature A can be within 360 degrees. In some examples, the inclination angle α of the target feature A in the shooting field of view can take values in the range of 0 to 360 degrees. In some examples, the inclination angle α of the target feature A in the shooting field of view can take values in the ranges of, for example, -30 to 330 degrees, -45 to 315 degrees, or -60 to 300 degrees. Regarding the specific value range of the inclination angle α of the target feature A, it can be set according to different lighting directions or actual measurement requirements, and the present disclosure does not limit this.
[0084] In some examples, the range of the inclination angle α can be divided based on multiple unidirectional illuminations to obtain multiple intervals C (refer to Figure 8)。In some examples, the range of the tilt angle α of the target feature A can be divided into multiple intervals C, and the multiple intervals C can correspond to multiple unidirectional illuminations. In some examples, there can be a one-to-one correspondence between the multiple intervals C and the multiple unidirectional illuminations.
[0085] In some examples, the sizes (i.e., ranges) of the respective intervals C can be equal. In some examples, the middle direction between two adjacent unidirectional illuminations can be used as the dividing line L for dividing the multiple intervals C. That is, the direction of the dividing line L can be the same as the middle direction. Thus, the convenience and accuracy of dividing the multiple intervals C can be improved. In some examples, the middle direction can represent the direction of the angle bisector formed by the directions of two adjacent unidirectional illuminations.
[0086] For example, in Figure 8 the example shown, if there are a total of 4 unidirectional illuminations, in the top-down view, the direction D1 of the first unidirectional illumination can be 90 degrees, the direction D2 of the second unidirectional illumination can be 270 degrees, the direction D3 of the third unidirectional illumination can be 180 degrees, the direction D4 of the fourth unidirectional illumination can be 0 degrees, the corresponding number of intervals C can be 4, and the dividing lines L for dividing the 4 intervals C can be -45 degrees, 45 degrees, 135 degrees, and 225 degrees respectively. The first interval C1 corresponding to the first unidirectional illumination can be 45 degrees to 135 degrees, the second interval C2 corresponding to the second unidirectional illumination can be 225 degrees to 315 degrees, the third interval C3 corresponding to the third unidirectional illumination can be 135 degrees to 225 degrees, and the fourth interval C4 corresponding to the fourth unidirectional illumination can be -45 degrees to 45 degrees.
[0087] Again, for example, in Figure 9 the example shown, if there are a total of 6 unidirectional illuminations, in the top-down view, the direction D1 of the first unidirectional illumination can be 0 degrees, the direction D2 of the second unidirectional illumination can be 60 degrees, the direction D3 of the third unidirectional illumination can be 120 degrees, the direction D4 of the fourth unidirectional illumination can be 180 degrees, the direction D5 of the fifth unidirectional illumination can be 240 degrees, the direction D6 of the sixth unidirectional illumination can be 300 degrees, the corresponding number of intervals C can be 6, and the dividing lines L for dividing the 6 intervals C can be -30 degrees, 30 degrees, 90 degrees, 150 degrees, 210 degrees, and 270 degrees respectively. The first interval C1 corresponding to the first unidirectional illumination can be -30 degrees to 30 degrees, the second interval C2 corresponding to the second unidirectional illumination can be 30 degrees to 90 degrees, the third interval C3 corresponding to the third unidirectional illumination can be 90 degrees to 150 degrees, the fourth interval C4 corresponding to the fourth unidirectional illumination can be 150 degrees to 210 degrees, the fifth interval C5 corresponding to the fifth unidirectional illumination can be 210 degrees to 270 degrees, and the sixth interval C6 corresponding to the sixth unidirectional illumination can be 270 degrees to 330 degrees.
[0088] In some examples, there may be a corresponding relationship between the direction of the unidirectional lighting and the orientation of the target feature A. In some examples, the orientation of the target feature A can be made to face away from (or be opposite to) the direction of the unidirectional lighting so as to establish a corresponding relationship between the direction of the unidirectional lighting and the orientation of the target feature A. In this case, when dividing the range of the tilt angle α of the target feature A into multiple intervals C based on multiple unidirectional lightings, by making full use of the corresponding relationship between the direction of the unidirectional lighting and the orientation of the target feature A, it is possible to make the division of the interval C accurately fit the tilt angle α of the target feature A, so that the target feature A generates a shadow S in the corresponding interval C, thereby improving the accuracy of automatically selecting the target layer according to the tilt angle α of the target feature A.
[0089] For example, in Figure 8 the example shown, the direction D4 of the fourth unidirectional lighting being 0 degrees can correspond to the orientation of the target feature A (such as the side of a step) being upward (i.e., the positive Y-axis direction), the direction D1 of the first unidirectional lighting being 90 degrees can correspond to the orientation of the target feature A being to the left (i.e., the negative X-axis direction), the direction D3 of the third unidirectional lighting being 180 degrees can correspond to the orientation of the target feature A being downward (i.e., the negative Y-axis direction), and the direction D2 of the second unidirectional lighting being 270 degrees can correspond to the orientation of the target feature A being to the right (i.e., the positive X-axis direction).
[0090] In some examples, there may be a corresponding relationship between the multiple intervals C and the multiple measurement layers. In some examples, the multiple intervals C can establish a one-to-one corresponding relationship with the multiple measurement layers based on the multiple unidirectional lightings. Specifically, since the multiple measurement layers are obtained by separately photographing the workpiece 2 under the multiple unidirectional lightings, there may be a corresponding relationship between the multiple measurement layers and the multiple unidirectional lightings. Additionally, there may also be a corresponding relationship between the multiple intervals C and the multiple unidirectional lightings. Therefore, the multiple intervals C can establish a one-to-one corresponding relationship with the multiple measurement layers. In this case, by dividing the range of the tilt angle α of the target feature A into multiple intervals C and associating the multiple intervals C with the multiple measurement layers, it is possible to facilitate accurately matching the corresponding measurement layer as the target layer according to the interval C in which the tilt angle α of the target feature A is located.
[0091] In some examples, in step S130, an interval C in which the inclination angle α of the target feature A is located can be determined based on the inclination angle α of the target feature A obtained in step S120, so as to obtain a measurement layer corresponding to the inclination angle α of the target feature A as the target layer. In this case, since the shadow S generated by the target feature A in each measurement layer is related to the posture of the target feature A in the shooting field of view, the corresponding measurement layer can be accurately matched as the target layer according to the interval C in which the inclination angle α of the target feature A is located. That is, the most suitable measurement layer is automatically selected according to the inclination angle α of the target feature A for the recognition of the target feature A, which can not only simplify the operation steps of the measurement process, but also improve the recognition accuracy and / or measurement accuracy of the target feature A.
[0092] Specifically, the interval C in which the inclination angle α is located can be determined according to the value of the inclination angle α of the target feature A, and the measurement layer corresponding to the inclination angle α can be determined based on the measurement layer corresponding to the interval C in which the inclination angle α is located, so that the target layer for recognizing and / or measuring the target feature A can be determined among multiple measurement layers.
[0093] In some examples, the contrast of the target feature A in the target layer can meet the preset requirements. In some examples, the target feature A in the target layer can face away from the direction of the single-sided lighting. In some examples, on one side of the target feature A along the direction of the single-sided lighting in the target layer, there can be a shadow S, and on the other side, it can be illuminated (i.e., the bright surface G). In this case, the contrast of the target feature A can be improved, so that the target feature A can be clearly reflected in the measurement layer, thereby improving the accuracy of recognizing the target feature A.
[0094] In some examples, the target feature A can generate a shadow S in the target layer. In some examples, the target feature A can generate a shadow S in the target layer and the side of the target feature A close to the single-sided lighting is illuminated. Thereby, the contrast of the target feature A in the target layer can be improved, so that the contrast of the target feature A meets the preset requirements.
[0095] In some examples, in response to the inclination angle α of the target feature A being at the dividing line L, the contrast of the target feature A in the two measurement layers corresponding to the adjacent two intervals C can be compared, and the measurement layer with a higher contrast of the target feature A is used as the target layer. In this case, by using the measurement layer with a higher contrast of the target feature A as the target layer, the clarity of the target feature A in the measurement layer can be improved, thereby improving the recognition accuracy and measurement accuracy of the target feature A. In some examples, the inclination angle α being at the dividing line L can mean that the value (or angular value) of the inclination angle α is equal to the angular value of the dividing line L.
[0096] In some examples, in response to a chamfer being formed near the target feature A, the heights of the multiple light sources 12 can be adjusted to cause the target feature A to produce a shadow S in the direction of unidirectional lighting and the side of the target feature A close to the unidirectional lighting to be illuminated (i.e., the bright surface G). In this case, for the case where a chamfer is formed near the target feature A, by changing the height of the light source 12 until the contrast of the target feature A meets the preset requirements, the position of the target feature A can be clearly reflected in the measurement layer, thereby facilitating the accurate identification of the target feature A and reducing the interference of the chamfer on the identification of the target feature A.
[0097] In some examples, the inclination angles α of the target feature A of the multiple workpieces 2 can be different. In some examples, multiple target layers for identifying and / or measuring the target feature A of each workpiece 2 can be respectively determined in multiple measurement layers based on the inclination angles α of the target feature A of the multiple workpieces 2. Thereby, it is possible to facilitate the batch measurement of the multiple workpieces 2, thereby improving the measurement efficiency of the multiple workpieces 2.
[0098] For example, taking the number of measurement layers as 4 as an example, in the case where the measurement layer involves multiple workpieces 2, no matter which workpiece 2's target feature A needs to be identified, the corresponding target layer can be selected (i.e., determined) from the 4 measurement layers.
[0099] Figure 10 It is a flowchart showing the first implementation manner of the identification of determining the target area involved in the examples of the present disclosure. Figure 11 It is a flowchart showing the second implementation manner of the identification of determining the target area involved in the examples of the present disclosure.
[0100] In some examples, the method of adjusting the workpiece application layer can further include: after obtaining the inclination angles α of the respective features on the surfaces of the multiple workpieces 2, determining the target area where the target feature A needs to be identified. In this case, by determining the target area, it is possible to facilitate the identification of the target feature A within the target area, thereby improving the identification efficiency of the target feature A.
[0101] In some examples, in the automatic measurement of the workpiece 2, the target area can be determined in an automatic manner. In some examples, referring to Figure 10 , determining the target area can include: determining the type of the target feature A (step S132); automatically calculating the position of the target feature A based on the design drawing of the workpiece 2, the position and the placement angle of the workpiece 2 (step S134); and obtaining the target area in the initial layer based on the position of the target feature A (step S136). In this case, by automatically obtaining the target area, the efficiency and accuracy of obtaining the target area can be improved, and when identifying the target feature A within the target area, the efficiency and accuracy of identifying the target feature A can be improved.
[0102] In some examples, in step S132, the type of the target feature A can be determined. That is, by determining the type of the target feature A, the system (i.e., the optical measuring instrument 1) can obtain the type of the features that need to be recognized and / or measured on the surface of the workpiece 2.
[0103] In some examples, the initial layer can be used for template matching to obtain the position and the placement angle of the workpiece 2. In some examples, using the initial layer for template matching can obtain the position and the placement angle of the workpiece 2 in the shooting field of view (such as the initial layer).
[0104] In some examples, in step S134, according to the type of the target feature A determined in step S132, the position of the target feature A can be automatically calculated based on the design drawing of the workpiece 2, the position and the placement angle of the workpiece 2. Thereby, the accuracy of obtaining the position of the target feature A can be improved. In some examples, after determining the type of the target feature A, the position of the target feature A in the shooting field of view can be automatically calculated based on the design drawing of the workpiece 2, the position and the placement angle of the workpiece 2.
[0105] In some examples, in step S136, the target area can be obtained in the initial layer based on the position of the target feature A, where the target area can refer to the area in the shooting field of view that contains the target feature A. For example, which areas in the initial layer need to be recognized can be automatically determined according to the position of the target feature A in the initial layer to recognize the target feature A.
[0106] In some examples, the method of adjusting the workpiece application layer can further include: recognizing the target area in the target layer to obtain the target feature A. In this case, since the target area is first determined and the target area is the area where the target feature A is located, by recognizing the target area in the target layer, the efficiency and accuracy of recognizing the target feature A can be improved.
[0107] In some examples, in response to obtaining the target area, the initial layer can be switched to the target layer, and the target area can be recognized in the target layer to obtain the target feature A.
[0108] In some examples, steps S132 to S136 and the step of recognizing the target feature A (i.e., recognizing the target area in the target layer to obtain the target feature A) can be repeatedly executed in sequence until all the target features A required for measurement are recognized in the target layer.
[0109] In some examples, when the measurement layer involves multiple workpieces 2, after identifying or measuring the target feature A, the optical measurement instrument 1 can automatically select the target layer according to the placement angles of the respective workpieces 2 and the tilt angle α of the corresponding target feature A, and identify the position of the target feature A on each workpiece 2 or give the measurement result. By formulating a unified classification rule, the corresponding target layer can be automatically selected according to the performance (such as the presented posture) of each workpiece 2 in different measurement layers, thereby greatly improving the measurement efficiency and reducing the workload of manually observing each workpiece 2 one by one.
[0110] In some examples, during the manual measurement of the workpiece 2, the target area can be determined manually. In some examples, referring to Figure 11 , determining the target area may further include: manually selecting the type of the target feature A (step S131); and manually selecting the area containing the target feature A in the initial layer to obtain the target area (step S133). In this case, by manually obtaining the target area, the target area can be determined flexibly and conveniently, thereby improving the flexibility and convenience of identifying the target feature A, and further improving the flexibility and convenience of measuring the target feature A.
[0111] In some examples, in step S131, the type of the target feature A can be manually selected according to the measurement requirements.
[0112] In some examples, in step S133, according to the type of the target feature A selected in step S131 and the measurement requirements, the area containing the target feature A can be manually selected in the initial layer to obtain the target area.
[0113] Figure 12 FIG. is a flowchart showing another embodiment of the method for adjusting the application layer of the workpiece according to the examples of the present disclosure.
[0114] In some examples, referring to Figure 12 , the method for adjusting the application layer of the workpiece may further include: identifying the target feature A in the target layer and displaying the identified target feature A (step S140); and measuring the target feature A in the target layer (step S150).
[0115] In some examples, in step S140, the target feature A can be identified in the target layer and the identified target feature A can be displayed. That is, after determining the target layer based on the tilt angle α of the target feature A, the target feature A can be identified in the target layer using the target area and the identified target feature A can be displayed. In this case, identifying the target feature A in the target layer can improve the recognition accuracy of the target feature A; in addition, by displaying the identified target feature A in the target layer, it is convenient for the user to intuitively judge whether the identified target feature A meets the measurement requirements.
[0116] In some examples, in step S150, the target feature A can be measured in the target layer to obtain a measurement result. Thus, measuring the target feature A in the target layer can improve the measurement accuracy of the target feature A. In some examples, the measurement result can include, for example, the length of a line, the distance between two lines, and the radius of a circle.
[0117] Figure 13 It is a flowchart showing the placement process involved in the examples of the present disclosure.
[0118] In some examples, referring back Figure 1 , the optical measuring instrument 1 can include a stage 10, and the stage 10 can be used to place the workpiece 2. In some examples, when the number of workpieces 2 on the stage 10 reaches a certain amount, the stage 10 can carry the workpiece 2 and transfer the workpiece 2 to the inspection station, where the target feature A of the workpiece 2 can be identified and / or measured.
[0119] In some examples, the method of adjusting the workpiece application layer can further include the placement process of moving the workpiece 2 from the loading station to the stage 10 of the optical measuring instrument 1. In some examples, the placement angle of the workpiece 2 on the stage 10 can be limited through the placement process (for example, making a certain edge of the workpiece 2 parallel to the specified direction DA).
[0120] In some examples, if the number of workpieces 2 is multiple, after being processed by the placement process, the placement angles of the multiple workpieces 2 on the stage 10 can be unified (for example, a certain edge of the multiple workpieces 2 is parallel to the specified direction DA).
[0121] In some examples, referring to Figure 13, the placement process may include: photographing the workpiece 2 at the loading station to obtain the original layer (step S210); performing template matching using the original layer to obtain the original placement angle of the workpiece 2 (step S220); obtaining the target angle for rotating the workpiece 2 based on the original placement angle and the preset placement angle of the workpiece 2 on the carrier 10 (step S230); and placing the workpiece 2 on the carrier 10 after rotating it by the target angle (step S240). In this case, it is possible to place the workpiece 2 on the carrier 10 at the preset placement angle, so that the placement angles (i.e., postures) of multiple workpieces 2 on the carrier 10 are as unified as possible. Furthermore, the inclination angles α of the target feature A on the surfaces of multiple workpieces 2 are also as much as possible within the same interval C. When identifying and / or measuring the target feature A, the number of target layers used can be reduced (i.e., the number of times of switching target layers is reduced), thereby improving the measurement efficiency.
[0122] In some examples, in step S210, the workpiece 2 at the loading station may be photographed to obtain the original layer. Among them, the original layer may represent an image of the workpiece 2 at the loading station.
[0123] In some examples, a large-field camera may be used to photograph the workpiece 2 at the loading station to obtain the original layer. In this case, the number of workpieces 2 in the original layer can be increased, which is beneficial to improving the processing efficiency of the placement process.
[0124] In some examples, in step S220, template matching may be performed with the contour (i.e., outer contour) of the workpiece 2 in the original layer as the judgment reference to obtain the original placement angle of the workpiece 2. Among them, the original placement angle of the workpiece 2 may represent the placement angle of the workpiece 2 at the loading station.
[0125] In some examples, template matching may refer to comparing the original layer with the design file of the workpiece 2. In some examples, template matching may be performed with the outer contour of the workpiece 2 in the original layer as the judgment reference to obtain the original placement angle of the workpiece 2.
[0126] In some examples, in step S230, the target angle for rotating the workpiece 2 may be obtained based on the original placement angle and the preset placement angle of the workpiece 2 on the carrier 10. That is to say, the angle by which the workpiece 2 at the loading station needs to be rotated to return to the preset placement angle can be determined based on the difference between the original placement angle and the preset placement angle.
[0127] In some examples, the preset placement angle of the workpiece 2 on the stage 10 can be specified by the system or manually. In some examples, the preset placement angle of the workpiece 2 on the stage 10 may mean that the edge of the workpiece 2 is parallel to the specified direction DA, and additionally, the specified direction DA can be set by the system or manually. For example, for a rectangular workpiece 2, the preset placement angle may mean that the edge of the workpiece 2 is substantially parallel to the edge of the stage 10.
[0128] In some examples, in step S240, the workpiece 2 can be rotated by a target angle and then placed on the stage 10. Specifically, after determining the target angle, the robot arm can pick up the workpiece 2 from the loading station, rotate the workpiece 2 by the target angle, and then place it on the stage 10 at the preset placement angle.
[0129] Although the present disclosure has been specifically described above in conjunction with the accompanying drawings and examples, it is to be understood that the above description does not limit the present disclosure in any way. Those skilled in the art can make deformations and changes to the present disclosure as needed without departing from the essential spirit and scope of the present disclosure, and these deformations and changes all fall within the scope of the present disclosure.
Claims
1. A method for determining a workpiece application layer, applied to an optical measuring instrument to identify target features on a plurality of workpiece surfaces and determine a target layer from a plurality of measurement layers, characterized in that: include: Photographing a plurality of workpieces respectively under a plurality of unidirectional lightings and obtaining a plurality of measurement layers corresponding to the plurality of unidirectional lightings, and photographing a plurality of workpieces under uniform lighting to obtain an initial layer; Using the initial layer to perform template matching to obtain the inclination angle of each feature on the surface of multiple workpieces, wherein the range of the inclination angle is divided into multiple intervals corresponding to the multiple unidirectional lighting, and the multiple intervals have a corresponding relationship with the multiple measurement layers; And based on the inclination angle of the target feature, the interval in which the inclination angle of the target feature is located is determined to obtain a measurement layer corresponding to the inclination angle of the target feature as the target layer, wherein the contrast of the target feature in the target layer is not less than a preset value.
2. The method for determining the application layer of a workpiece according to claim 1, characterized in that: Obtaining the inclination angle of each feature includes: Performing template matching based on the outer contour or pattern details of each workpiece in the initial layer as a judgment basis to obtain the number of workpieces and the placement angles of multiple workpieces; And based on the placement angles of the multiple workpieces and the design drawings of the workpieces, the inclination angles of the various features on the surfaces of the multiple workpieces are determined respectively.
3. The method for determining the application layer of a workpiece according to claim 1, characterized in that: After acquiring the inclination angles of the respective features on the surfaces of a plurality of workpieces, a target area where the target features need to be identified is determined.
4. The method for determining the application layer of a workpiece according to claim 3, characterized in that: Selecting an area including the target feature in the initial layer to obtain the target area; or Using the initial layer to perform template matching to obtain the positions and placement angles of multiple workpieces, and calculating the position of the target feature based on the design drawings of the workpieces, the positions and placement angles of the multiple workpieces; And based on the position of the target feature, a target area containing the target feature is obtained in the initial layer.
5. The method for determining the application layer of a workpiece according to claim 3 or 4, characterized in that: In response to acquiring the target area, the initial layer is switched to the target layer, and the target area is identified in the target layer to acquire the target feature.
6. The method for determining the application layer of a workpiece according to claim 5, characterized in that: The steps of determining the target area, switching the target layer, and identifying the target area are repeated in sequence until all the target features required for measurement are identified in the target layer.
7. The method for determining the application layer of a workpiece according to claim 1, characterized in that: The multiple unidirectional lighting is achieved by multiple light sources arranged in a surrounding manner above the multiple workpieces.
8. The method for determining the application layer of a workpiece according to claim 1, characterized in that: The target feature generates a shadow in the target layer.
9. The method for determining the application layer of a workpiece according to claim 1, characterized in that: The middle direction between two adjacent unidirectional lightings is used as a dividing line for dividing the multiple intervals.
10. The method for determining the application layer of a workpiece according to claim 9, characterized in that: In response to the inclination angle of the target feature being at the boundary line, the contrast of the target feature in two measurement layers corresponding to two adjacent intervals is compared, and the measurement layer with the higher contrast of the target feature is used as the target layer.