Method for obtaining angle based on template matching to adjust the applied layer of workpiece

By setting up a surround light source and template matching technology in the optical measurement instrument, the problem of inconsistent sample placement angles is solved, the recognition and measurement accuracy of target features is improved, the measurement process is simplified, and the efficiency is improved.

CN118887519BActive Publication Date: 2025-01-17CHOTEST TECH INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411395537.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-17
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

During the measurement process of optical measurement instruments, especially dimension screening instruments, it is difficult to align the positioning angle of the sample, resulting in unclear target features in the measurement layer, affecting the identification and measurement accuracy.

Method used

By setting up a surround light source in the optical measurement instrument, multiple unidirectional light shooting can be achieved. The shooting workpiece obtains multiple measurement layers from different angles, and the initial layer is used to match templates, determine the inclination angle interval of the target feature, and automatically select the most Suitable measurement layers to improve the recognition and measurement accuracy of target features.

Benefits of technology

The measurement process is simplified, the recognition accuracy and measurement accuracy of target features are improved, the uniform placement angle of samples on the stage is ensured, the number of target layers is reduced, and the measurement efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887519B_ABST
    Figure CN118887519B_ABST
Patent Text Reader

Abstract

The present disclosure describes a method for adjusting the application layer of a workpiece by obtaining an angle based on template matching, including photographing multiple workpieces under multiple unidirectional lightings and obtaining multiple measurement layers corresponding to the unidirectional lightings, wherein the multiple unidirectional lightings are realized by multiple light sources arranged above the multiple workpieces in a surrounding manner; photographing multiple workpieces under uniform lightings and obtaining an initial layer; performing template matching using the initial layer to obtain the inclination angles of various features on the surfaces of multiple workpieces, wherein the range of the inclination angles is divided into multiple intervals corresponding to the multiple unidirectional lightings, wherein the multiple intervals establish a corresponding relationship with the multiple measurement layers based on the multiple unidirectional lightings; and determining the interval in which 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 the target feature generates a shadow in the target layer. Thus, using the target layer can improve the recognition accuracy and measurement accuracy of the target feature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the intelligent manufacturing equipment industry, and more particularly to a method for adjusting a workpiece application layer by acquiring an angle based on template matching. Background Art

[0002] Optical measuring instruments (such as size screening instruments, imagers, etc.) are instruments that use light sources to measure parameters such as the size, shape, and position of samples. Optical measuring instruments can measure samples in batches and accurately. Compared with manual measurement, optical measuring instruments have significant advantages in measurement efficiency and measurement accuracy.

[0003] Taking the size screening instrument as an example, the size screening instrument usually includes a feeding guidance vision system and a size detection vision system. The feeding guidance vision system usually uses a lens with a wide field of view to shoot the sample at the feeding station to obtain an image. However, since the tiny features of the sample in the image obtained by the wide field of view lens are not clear, the feeding guidance vision system mainly uses the outer contour of the relatively clear sample in the image for template matching to confirm the placement angle of the sample at the feeding station. After the robot arm picks up the sample at the feeding station, it rotates the sample to a suitable inclination angle based on the placement angle of the sample and then places it on the stage, so that the placement angle of each sample on the stage is uniform. When the number of samples on the stage reaches a certain number, the stage can carry the sample and transfer the sample to the size detection vision system. The size detection vision system illuminates and shoots the sample at a suitable angle to obtain an image (i.e., a layer) containing multiple samples, wherein the features to be measured on the surface of each sample (i.e., the target features) are all clear pattern details in the layer. The processing software identifies and / or measures the target features of each sample in the layer to obtain the measurement results.

[0004] However, after placing certain types of samples (e.g., samples with circular, rectangular, polygonal, or other centrally symmetrical outer contours) on the stage using the above method, the placement angles of multiple samples may still deviate (e.g., from the outer contour of the sample, the placement angles of each sample may be uniform, but some samples are actually deflected by 90, 180, or 270 degrees). In addition, the robotic arm may be subjected to unexpected collisions or failures, which may also cause deviations in the placement angles of multiple samples on the stage. Therefore, it is often difficult to unify the placement angles of each sample on the stage. In this case, in the layer obtained by the size detection vision system, the target features of some samples are not clear pattern details in the layer, making it difficult to identify the target features. Summary of the invention

[0005] The present disclosure is proposed in view of the above situation, and aims to provide a method for adjusting the application layer of a workpiece by acquiring an angle according to template matching. The method can adjust the measurement layer used to identify and / or measure the target feature based on the inclination angle of the target feature, and automatically select the most suitable measurement layer to identify the target feature, which can not only simplify the operating steps of the measurement process, but also improve the recognition accuracy and measurement accuracy of the target feature.

[0006] To this end, the present disclosure provides a method for adjusting the application layer of a workpiece by acquiring an angle according to template matching, which is a method for an optical measuring instrument to determine a target layer from multiple measurement layers in order to identify target features on the surfaces of multiple workpieces, comprising: photographing multiple workpieces respectively under multiple unidirectional lighting and acquiring multiple measurement layers corresponding to the unidirectional lighting, wherein the multiple unidirectional lightings are realized by multiple light sources arranged above the multiple workpieces in a surrounding manner; photographing multiple workpieces under uniform lighting and acquiring an initial layer; performing template matching using the initial layer to acquire the inclination angle of each feature on the surfaces of multiple workpieces, wherein the range of the inclination angle is divided into multiple intervals corresponding to the multiple unidirectional lightings, and the multiple intervals establish a one-to-one correspondence with the multiple measurement layers based on the multiple unidirectional lightings; and determining the interval in which the inclination angle of the target feature is located based on the inclination angle of the target feature to acquire the measurement layer corresponding to the inclination angle of the target feature as the target layer, wherein the target feature generates a shadow in the target layer.

[0007] In the present disclosure, multiple unidirectional lightings are realized by multiple light sources arranged above the workpiece in a surrounding manner, so that the multiple unidirectional lightings can surround the workpiece. When the workpiece is photographed separately under multiple unidirectional lightings, no matter what the posture of the workpiece is in the shooting field of view, at least one unidirectional lighting causes the target feature of the workpiece to produce a shadow, 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 produced by the target feature in each measurement layer is related to the posture of the target feature in the shooting field of view, by dividing the range of the inclination angle of the target feature into multiple intervals and the multiple intervals are correspondingly associated with 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 according to the inclination angle of the target feature to identify the target feature, which can not only simplify the operating steps of the measurement process, but also improve the recognition accuracy and / or measurement accuracy of the target feature.

[0008] In addition, in the method for adjusting the workpiece application layer involved in the present disclosure, optionally, it also 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 recognition 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.

[0009] In addition, in the method for adjusting the workpiece application layer involved in the present disclosure, optionally, after obtaining the inclination angles of each feature on the surface of the plurality of workpieces, a target area where the target feature needs to be identified is determined. In this case, by determining the target area, it is easy to identify the target feature within the target area, thereby improving the recognition efficiency of the target feature.

[0010] In addition, in the method for adjusting the workpiece application layer involved in the present disclosure, optionally, the initial layer is used for template matching 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, by automatically acquiring the target area, the efficiency and accuracy of acquiring the target area can be improved, and when the target feature is identified in the target area, the efficiency and accuracy of identifying the target feature can be improved.

[0011] In addition, in the method for adjusting the workpiece application layer 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, 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, and further improving the flexibility and convenience of measuring the target feature.

[0012] In addition, in the method for adjusting the workpiece application layer 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 determined first and the target area is the area where the target feature is located, the efficiency and accuracy of identifying the target feature can be improved by identifying the target area in the target layer.

[0013] In addition, in the method for adjusting the workpiece application layer involved in the present disclosure, optionally, the middle direction of two adjacent unidirectional lighting is used as the dividing line for dividing the multiple intervals, thereby improving the convenience and accuracy of dividing the multiple intervals.

[0014] In addition, in the method for adjusting the workpiece application layer involved in the present disclosure, optionally, in response to the inclination angle of the target feature being at the dividing line, the contrast of the target feature in the two measurement layers corresponding to the two adjacent intervals is compared, and the measurement layer with the higher contrast of the target feature is used as the target layer. In this case, by using the measurement layer with the 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.

[0015] In addition, in the method for adjusting the application layer of the workpiece involved in the present disclosure, optionally, it also includes a 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 as a judgment basis to obtain the original placement angle of the workpiece; obtaining the target angle of the rotating 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 a preset placement angle, so that the placement angles (i.e., postures) of multiple workpieces on the stage are as uniform as possible, and the inclination angles of the target features on the surfaces of multiple workpieces are also in the same range as much as possible, and the number of target layers used can be reduced when identifying and / or measuring target features, thereby improving measurement efficiency.

[0016] In addition, in the method for adjusting the workpiece application layer involved in the present disclosure, optionally, in response to the formation of a chamfer near the target feature, the heights of the plurality of light sources are adjusted so that the target feature is shadowed on the one-way lighting and the side of the target feature close to the one-way lighting is illuminated. In this case, in 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 accurate identification of the target feature and reducing the interference of the chamfer on the identification of the target feature.

[0017] According to the present disclosure, a method for adjusting the application layer of a workpiece by acquiring an angle based on template matching can be provided. The method can adjust the measurement layer used to identify and / or measure the target feature based on the inclination angle of the target feature, and identify the target feature by automatically selecting the most suitable measurement layer, which can not only simplify the operating steps of the measurement process, but also improve the recognition accuracy and measurement accuracy of the target feature. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The present disclosure will now be explained in further detail, by way of example only, with reference to the accompanying drawings.

[0019] Figure 1 Schematic diagram showing the structure of an optical measuring instrument involved in the example of the present disclosure.

[0020] Figure 2 1 is a schematic diagram showing a partial area and target features of a workpiece involved in an example of the present disclosure from a side view perspective.

[0021] Figure 3 Detailed description is a flowchart showing a method for adjusting a workpiece application layer according to an example of the present disclosure.

[0022] Figure 4A It is a schematic diagram showing a top view of the workpiece involved in the example of the present disclosure under unidirectional lighting.

[0023] Figure 4B It is a schematic diagram showing a side view of a partial area of ​​a workpiece involved in the example of the present disclosure under unidirectional lighting.

[0024] Figure 5 is a schematic diagram showing that a plurality of light sources involved in an example of the present disclosure are arranged above a workpiece in a surrounding manner.

[0025] Figure 6 Schematic diagram showing a top view of a workpiece involved in the example of the present disclosure under uniform lighting.

[0026] Figure 7 It is a schematic diagram showing that multiple workpieces involved in the example of the present disclosure are placed at different angles in the shooting field of view.

[0027] Figure 8 is a schematic diagram showing that the range of the inclination angle of the target feature involved in the example of the present disclosure is divided into four intervals.

[0028] Fig. 9 is a schematic diagram showing that the range of the inclination angle of the target feature involved in the example of the present disclosure is divided into 6 intervals.

[0029] Fig.10 1 is a flowchart showing a first embodiment of determining a target area according to the example of the present disclosure.

[0030] Fig.11 1 is a flowchart showing a second embodiment of determining a target area according to the present disclosure example.

[0031] Fig.12 FIG. 1 is a flowchart showing another embodiment of a method for adjusting a workpiece application layer according to an example of the present disclosure.

[0032] Fig.13 is a flow chart showing the placement process involved in the examples of the present disclosure. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0034] 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-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. 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 may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices. In the following description, the same symbols are given to the same components, and repeated descriptions are omitted. In addition, the drawings are only schematic diagrams, and the ratio of the sizes of the components to each other or the shapes of the components may be different from the actual ones.

[0035] The method disclosed herein obtains an angle based on template matching to adjust an applied layer of a workpiece, obtains an inclination angle of a target feature on a workpiece surface by means of template matching, adjusts a measurement layer used for identifying and / or measuring the target feature based on the inclination angle of the target feature, determines a measurement layer used for identifying and / or measuring the target feature for the purpose of improving the contrast of the target feature in the measurement layer, and automatically selects the most appropriate measurement layer for identifying the target feature, thereby not only simplifying the operating steps of the measurement process, but also improving the recognition accuracy and measurement accuracy of the target feature.

[0036] In some examples, the application layer may refer to a measurement layer for identifying and / or measuring target features on the workpiece surface. In addition, adjusting the workpiece application layer may refer to determining a measurement layer for identifying and / or measuring target features on the workpiece surface from a plurality of measurement layers.

[0037] In some examples, the method of obtaining an angle based on template matching to adjust the workpiece application layer can be simply referred to as a method of adjusting the workpiece application layer, and sometimes it can also be called a method of determining the workpiece application layer, or a method of determining the target layer to measure the workpiece, etc.

[0038] Hereinafter, the method for adjusting the application layer of a workpiece involved in the present disclosure will be described with reference to the accompanying drawings.

[0039] Figure 1 Schematic diagram showing the structure of an optical measuring instrument 1 according to an example of the present disclosure. Figure 2 1 is a schematic diagram showing a side view of a partial area of ​​a workpiece 2 and a target feature A involved in the example of the present disclosure.

[0040] In some examples, the method of adjusting the layer applied to a workpiece can be applied to Figure 1 In the optical measuring instrument 1 shown. In some examples, the optical measuring instrument 1 can perform a method for adjusting a workpiece application layer to identify and / or measure a target feature A on the surface of the workpiece 2 .

[0041] In some examples, the method for adjusting the workpiece application layer may be a method for the optical measuring instrument 1 to determine a target layer from a plurality of measurement layers, wherein the optical measuring instrument 1 may use the target layer to identify and / or measure a target feature A on the surface of the workpiece 2 .

[0042] In some examples, the optical measuring instrument 1 may refer to an instrument that illuminates the workpiece 2 using a light source 12 (described later), photographs the workpiece 2, and measures the workpiece 2 based on the photographed image obtained by the photographing. In some examples, the optical measuring instrument 1 may be a size screening instrument, a flash measuring instrument, or an imager, etc.

[0043] In some examples, the workpiece 2 may refer to an object to be measured. In addition, the workpiece 2 may also be referred to as a sample or an object to be measured. Figure 2 , the workpiece 2 may include a target feature A. In some examples, the target feature A may refer to a feature to be measured on the surface of the workpiece 2. In some examples, the feature to be measured may be a feature that characterizes the undulations of the surface of the workpiece 2 (eg, a feature that characterizes a step). Figure 2 It is schematically shown that the target feature A may include a first step A11 and a second step A12.

[0044] In some examples, if a step appears on the surface of the workpiece 2, a contour will be formed at the step, and the contour can be a straight line, an arc, a circle, etc. 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.

[0045] Hereinafter, the method for adjusting the applied layer of a workpiece involved in the present disclosure is described by taking the feature to be measured as a feature characterizing the surface undulation of the workpiece 2 as an example.

[0046] In some examples, the measurement layer may refer to an image containing the workpiece 2. In some examples, the measurement layer may refer to a visual system (eg, Figure 1 The image captured by the shooting lens 14 shown contains the image of the workpiece 2. In addition, in some examples, the target layer may refer to an image used to identify and / or measure the target feature A.

[0047] Figure 3 Detailed description is a flowchart showing a method for adjusting a workpiece application layer according to an example of the present disclosure. Figure 4A It is a schematic diagram showing a top view of the workpiece 2 involved in the example of the present disclosure under unidirectional lighting. Figure 4B It is a schematic diagram showing a side view of a partial area of ​​the workpiece 2 involved in the example of the present disclosure under unidirectional lighting. Figure 5 2 is a schematic diagram showing that a plurality of light sources 12 according to an example of the present disclosure are disposed above a workpiece 2 in a surrounding manner.

[0048] It should be noted that Figure 4B Most of the structures of the workpiece 2 are omitted in order to facilitate the demonstration of the effect of unidirectional lighting on the contrast of the target feature A, which should not be understood as a limitation of the present disclosure.

[0049] For some examples, see Figure 3 The method for adjusting the workpiece application layer 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 various 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).

[0050] In some examples, in step S110, multiple workpieces 2 may be photographed under multiple unidirectional lighting conditions and multiple measurement layers corresponding to the unidirectional lighting may be obtained. One unidirectional lighting condition may refer to lighting in one direction. In some examples, unidirectional lighting condition may refer to that the light beam received by the workpiece 2 is directional and the direction of the light beam is at least not in a vertical direction.

[0051] In some examples, the measurement layer may correspond to the direction of the lighting. In some examples, the number of measurement layers may be the same as the number of lighting directions. In other words, multiple measurement layers may correspond to multiple unidirectional lighting. For example, in a top-down perspective, four unidirectional lightings may be provided around the workpiece 2, and four corresponding measurement layers may be obtained by photographing the workpiece 2 under the four unidirectional lightings.

[0052] For some examples, see Figure 4A , unidirectional lighting can form a shadow S on the surface of the workpiece 2. In some examples, under unidirectional lighting, the shadow S can be generated by the undulations on the surface of the workpiece 2. In some examples, under unidirectional lighting, 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 lighting, the step can generate a shadow S (see Figure 4A ). Specifically, in the direction of unidirectional lighting, the two ends of the step can be a shadow S and a bright surface G respectively. At this time, the contrast of the step can be enhanced, so that the step is clearly reflected in the measurement layer, and in the feature recognition process, the accuracy of identifying the step can be improved.

[0053] For example, in Figure 4B In the example shown, in the direction of unidirectional lighting, the first step A11 faces away from the direction of unidirectional lighting, and both ends of the first step A11 are the shadow S and the bright surface G respectively, so the contrast of the first step A11 is relatively large; in addition, the second step A12 faces the direction of unidirectional lighting, and both ends of the second step A12 are the bright surface G, so the contrast of the second step A12 is relatively small.

[0054] In some examples, since the target feature A on the surface of the workpiece 2 may generate a shadow S under unidirectional lighting, when the workpiece 2 is photographed under unidirectional lighting to obtain a measurement layer, the contrast of the target feature A in the measurement layer may meet the preset requirements (for example, Figure 4B The contrast of the first step A11 in the image meets the preset requirement, while the contrast of the second step A12 does not meet the preset requirement). In some examples, the preset requirement may refer to a manually set contrast value. In some examples, the preset requirement may also represent an empirical value (eg, a fixed value).

[0055] In some examples, multiple unidirectional lighting can be achieved by multiple light sources 12, and the multiple light sources 12 can be arranged in a surrounding manner. Thus, multiple different lighting directions can be achieved. For example, for multiple light sources 12 arranged in a surrounding manner above multiple workpieces 2, multiple unidirectional lighting can be achieved by turning on light sources 12 in different directions.

[0056] In some examples, in step S110, multiple unidirectional lighting can be achieved by multiple light sources 12 arranged in a surrounding manner above the workpiece 2 (see Figure 5 In this case, multiple one-way lighting can surround the workpiece 2, and no matter what the posture of the workpiece 2 is in the shooting field of view, at least one one-way lighting causes the target feature A of the workpiece 2 to produce a shadow S.

[0057] For some examples, see Figure 5 The light source 12 may be a tubular light source, and the number of the tubular light sources may be 4. Turning on the 4 tubular light sources separately may realize four unidirectional lighting around the workpiece 2. In some examples, the light source 12 may be a light source formed by a plurality of LEDs surrounding the workpiece 2, and different lighting directions may be realized by controlling the LED area that emits light.

[0058] In some examples, the plurality of light sources 12 arranged in a surrounding manner may also be referred to as an annular light source, that is, a ring-shaped light source may be arranged above the workpiece 2 to achieve multiple unidirectional lighting around the workpiece 2 .

[0059] In some examples, multiple measurement layers may be acquired by respectively enabling multiple unidirectional lightings to photograph multiple workpieces 2 , wherein the multiple measurement layers may correspond to the multiple unidirectional lightings.

[0060] In some examples, in step S110, the number of workpieces 2 may be multiple. In some examples, multiple workpieces 2 may be photographed separately under multiple unidirectional lightings surrounding the workpieces 2 to obtain multiple measurement layers corresponding to the unidirectional lightings. In this case, since multiple unidirectional lightings surround the workpieces 2, regardless of whether the placement angles of the multiple workpieces 2 in the shooting field of view are uniform, 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., postures) of the multiple workpieces 2 in the shooting field of view.

[0061] In some examples, in the optical measuring instrument 1, the light source 12 can be disposed between the shooting lens 14 and the workpiece 2. For example, the light source 12 can be disposed below the lens and can move in the vertical direction with the lens. Thus, different light beam incident heights can be easily set to meet different measurement requirements.

[0062] Figure 6 Schematic diagram showing a top view of the workpiece 2 involved in the example of the present disclosure under uniform lighting.

[0063] In some examples, in step S110 , the workpiece 2 may be photographed under uniform lighting to obtain an initial layer. Figure 6 Schematically shows the features of the surface of the workpiece 2 under uniform lighting.

[0064] In some examples, uniform lighting may refer to the light beam received by the workpiece 2 not being inclined in a certain direction. In some examples, uniform lighting may refer to the situation where multiple light sources 12 disposed around the workpiece 2 are turned on at the same time. In some examples, uniform lighting may also refer to the situation where multiple unidirectional lighting is enabled at the same time.

[0065] In some examples, the initial layer may be acquired by simultaneously enabling multiple unidirectional lighting to photograph multiple workpieces 2 .

[0066] It should be noted that, although the fluctuations of the surface of the workpiece 2 in the initial layer are not particularly obvious compared to other measurement layers (for example, the measurement layer obtained under unidirectional lighting), the initial layer can still clearly display the pattern details on the surface of the workpiece 2 (for example, the material of the workpiece 2 involves a variety of materials, and the difference in color or texture of different materials is reflected in the pattern formed on the surface of the workpiece 2 or the pattern formed by the engraved lines). Therefore, it is appropriate to use the pattern details on the surface of the workpiece 2 in the initial layer to determine the placement angle of the workpiece 2 in the shooting field of view.

[0067] In addition, in the present disclosure, unidirectional lighting should not be limited to the understanding that the direction of the light beam is unique, but it is a lighting method different from uniform lighting. For example, one (or more) light sources 12 located above the left side of the workpiece 2 can be turned on at the same time so that the light beam received by the workpiece 2 has directionality.

[0068] Figure 7 It is a schematic diagram showing that a plurality of workpieces 2 involved in the example of the present disclosure are placed at different angles in the shooting field of view. Figure 8 1 is a schematic diagram showing that the range of the inclination angle α of the target feature A involved in the example of the present disclosure is divided into four intervals C. Fig. 9 2 is a schematic diagram showing that the range of the inclination angle α of the target feature A involved in the example of the present disclosure is divided into 6 intervals C.

[0069] In some examples, return to Figure 3 In step S120, the initial layer may be used to perform template matching to obtain the inclination angle α of each feature on the surface of multiple workpieces 2.

[0070] Specifically, the outer contour or pattern details of each workpiece 2 in the initial layer can be used as a judgment basis to perform template matching to obtain the number of workpieces 2 and the placement angles of the multiple workpieces 2, and the inclination angles α of each feature on the surface of the multiple workpieces 2 can be determined based on the placement angles of the multiple workpieces 2 and the design drawings of the workpieces 2 (see Figure 6 ).

[0071] 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 may be used to perform template matching to obtain the inclination angles α of the target features A of the plurality of workpieces 2 .

[0072] In some examples, the outer contour (ie, the profile) of the workpiece 2 may be centrally symmetrical. Figure 7 Since the outer contour of the workpiece 2 is centrally symmetrical, when the outer contour of the workpiece 2 is used as a 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 are unified from the outer contour of the workpiece 2, in fact, some workpieces 2 have 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.

[0073] In some examples, the placement angle of the workpiece 2 may refer to the posture of the workpiece 2 in the shooting field of view. In some examples, the placement angle of the workpiece 2 may refer to the 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 angle of a specified edge on the workpiece 2 relative to the specified direction DA (see Figure 7 ). For example, in Figure 7 In the example shown, the first workpiece 2a and the second workpiece 2b are placed at an angle of 0 degrees, the third workpiece 2c is placed at an angle of 90 degrees, the fourth workpiece 2d is placed at an angle of -90 degrees, the fifth workpiece 2e is placed at an angle of 180 degrees, and the sixth workpiece 2f is placed at an angle of 45 degrees. In some examples, the range of the placement angle of the workpiece 2 can be within 360 degrees.

[0074] 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. The design file of the workpiece 2 may refer to a file containing the design drawings of the workpiece 2.

[0075] In some examples, the inclination angle α of the target feature A may be customized, and the inclination angle α of the target feature A may be obtained based on the posture of the target feature A in a top-down perspective (see Figure 6 ).

[0076] In some examples, the inclination angle α of the target feature A may refer to the angle of the target feature A relative to the designated direction DA. In some examples, the inclination angle α of the target feature A may refer to the angle of the target feature A relative to the coordinate axis in the shooting field of view.

[0077] In some examples, the tilt angle α of the target feature A may represent the angle of the target feature A in the shooting field of view relative to the positive direction of the X axis or the positive direction of the Y axis. In some examples, the tilt angle α of the target feature A may also represent the 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 positive direction of the Y axis. Figure 6 In the example shown, the inclination angle α1 of the first target feature A1 may be 0 degrees, the inclination angle α2 of the second target feature A2 may be 90 degrees, and the inclination angle α3 of the third target feature A3 may be 45 degrees.

[0078] In some examples, the inclination angle α of the target feature A may also represent the orientation of the target feature A. For example, if the inclination angle α of the target feature A is 90 degrees, it may indicate that the target feature A is oriented in the negative direction of the X-axis; in addition, if the inclination angle α of the target feature A is -90 degrees, it may indicate that the target feature A is oriented in the positive direction of the X-axis.

[0079] In some examples, in response to the target feature A being a step, the inclination angle α may also be expressed as the orientation of the side surface of the step.

[0080] In some examples, the type of target feature A may include a straight line and an arc. Figure 6 In response to the type of the target feature A being a straight line, the inclination angle α of the target feature A may be the inclination angle α of the straight line (eg, the angle between the straight line and the positive direction of the X-axis).

[0081] In some examples, in response to the type of the target feature A being an arc, the inclination angle α of the target feature A may be the inclination angle α of the tangent to the midpoint of the arc (for example, the angle between the tangent 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.

[0082] 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 range of, for example, -30 to 330 degrees, -45 to 315 degrees, or -60 to 300 degrees. The specific range of values ​​of the inclination angle α of the target feature A can be set according to different lighting directions or actual measurement requirements, and the present disclosure is not limited to this.

[0083] In some examples, the range of the tilt angle α can be divided into multiple intervals C based on multiple unidirectional lighting (see Figure 8). In some examples, the range of the inclination angle α of the target feature A can be divided into multiple intervals C, and the multiple intervals C can correspond to multiple unidirectional lighting. In some examples, the multiple intervals C can have a one-to-one correspondence with the multiple unidirectional lighting.

[0084] In some examples, the sizes (i.e., ranges) of the various intervals C may be equal. In some examples, the middle direction of two adjacent one-way lightings may be used as the dividing line L for dividing multiple intervals C. That is, the direction of the dividing line L may be consistent with the middle direction. Thus, the convenience and accuracy of dividing multiple intervals C can be improved. In some examples, the middle direction may represent the direction of the angle bisector of the angle formed by the directions of two adjacent one-way lightings.

[0085] For example, in Figure 8 In the example shown, if there are a total of 4 unidirectional lighting, in a top-down perspective, the direction D1 of the first unidirectional lighting can be 90 degrees, the direction D2 of the second unidirectional lighting can be 270 degrees, the direction D3 of the third unidirectional lighting can be 180 degrees, and the direction D4 of the fourth unidirectional lighting can be 0 degrees. The number of corresponding intervals C can be 4, and the dividing lines L 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 lighting can be 45 degrees to 135 degrees, the second interval C2 corresponding to the second unidirectional lighting can be 225 degrees to 315 degrees, the third interval C3 corresponding to the third unidirectional lighting can be 135 degrees to 225 degrees, and the fourth interval C4 corresponding to the fourth unidirectional lighting can be -45 degrees to 45 degrees.

[0086] For example, in Fig. 9 In the example shown, if there are a total of 6 unidirectional lightings, from a top-down perspective, the direction D1 of the first unidirectional lighting can be 0 degrees, the direction D2 of the second unidirectional lighting can be 60 degrees, the direction D3 of the third unidirectional lighting can be 120 degrees, the direction D4 of the fourth unidirectional lighting can be 180 degrees, the direction D5 of the fifth unidirectional lighting can be 240 degrees, and the direction D6 of the sixth unidirectional lighting can be 300 degrees. The number of corresponding intervals C can be 6, and the dividing lines L 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 lighting can be -30 degrees to 30 degrees, the second interval C2 corresponding to the second unidirectional lighting can be 30 degrees to 90 degrees, the third interval C3 corresponding to the third unidirectional lighting can be 90 degrees to 150 degrees, the fourth interval C4 corresponding to the fourth unidirectional lighting can be 150 degrees to 210 degrees, the fifth interval C5 corresponding to the fifth unidirectional lighting can be 210 degrees to 270 degrees, and the sixth interval C6 corresponding to the sixth unidirectional lighting can be 270 degrees to 330 degrees.

[0087] In some examples, the direction of the one-way lighting may correspond to the orientation of the target feature A. In some examples, the orientation of the target feature A may be directed away from (or away from) the direction of the one-way lighting so that a correspondence is established between the direction of the one-way lighting and the orientation of the target feature A. In this case, when the range of the inclination angle α of the target feature A is divided into multiple intervals C based on multiple one-way lightings, by making full use of the correspondence between the direction of the one-way lighting and the orientation of the target feature A, the division of the intervals C can accurately fit the inclination 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 inclination angle α of the target feature A.

[0088] For example, in Figure 8 In the example shown, the fourth unidirectional lighting direction D4 is 0 degrees, which may correspond to the target feature A (such as the side of the step) being oriented upward (i.e., the positive direction of the Y-axis), the first unidirectional lighting direction D1 is 90 degrees, which may correspond to the target feature A being oriented to the left (i.e., the negative direction of the X-axis), the third unidirectional lighting direction D3 is 180 degrees, which may correspond to the target feature A being oriented downward (i.e., the negative direction of the Y-axis), and the second unidirectional lighting direction D2 is 270 degrees, which may correspond to the target feature A being oriented to the right (i.e., the positive direction of the X-axis).

[0089] In some examples, multiple intervals C may have a corresponding relationship with multiple measurement layers. In some examples, multiple intervals C may establish a one-to-one corresponding relationship with multiple measurement layers based on multiple unidirectional lightings. Specifically, since multiple measurement layers are obtained by photographing the workpiece 2 under multiple unidirectional lightings, multiple measurement layers may have a corresponding relationship with multiple unidirectional lightings. In addition, multiple intervals C may also have a corresponding relationship with multiple unidirectional lightings. Therefore, multiple intervals C may establish a one-to-one corresponding relationship with multiple measurement layers. In this case, by dividing the range of the inclination angle α of the target feature A into multiple intervals C and correspondingly associating multiple intervals C with multiple measurement layers, it is possible to accurately match the corresponding measurement layer as the target layer according to the interval C where the inclination angle α of the target feature A is located.

[0090] In some examples, in step S130, the interval C where 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 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 where 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 to identify 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.

[0091] 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 identifying and / or measuring the target feature A can be determined from multiple measurement layers.

[0092] 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 one-way lighting. In some examples, one side of the target feature A in the target layer along the direction of the one-way lighting can be a shadow S, and the other side can be illuminated (i.e., a bright surface G). In this case, the contrast of the target feature A can be improved, so that the target feature A is clearly reflected in the measurement layer, thereby improving the accuracy of identifying the target feature A.

[0093] In some examples, the target feature A may generate a shadow S in the target layer. In some examples, the target feature A may generate a shadow S in the target layer and the side of the target feature A close to the one-way lighting is illuminated. Thus, 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.

[0094] 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 two adjacent intervals C may be compared, and the measurement layer with the higher contrast of the target feature A may be used as the target layer. In this case, by using the measurement layer with the higher contrast of the target feature A as the target layer, the clarity of the target feature A in the measurement layer may 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 may indicate that the value (or angle value) of the inclination angle α is equal to the angle value of the dividing line L.

[0095] In some examples, in response to a chamfer 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 the one-way lighting and to illuminate the side of the target feature A close to the one-way lighting (i.e., the bright surface G). In this case, in 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 accurate identification of the target feature A and reducing the interference of the chamfer on the identification of the target feature A.

[0096] In some examples, the inclination angles α of the target features A of the multiple workpieces 2 may be different. In some examples, multiple target layers for identifying and / or measuring the target features A of the multiple workpieces 2 may be determined in the multiple measurement layers based on the inclination angles α of the target features A of the multiple workpieces 2. Thus, batch measurement of the multiple workpieces 2 can be easily achieved, thereby improving the measurement efficiency of the multiple workpieces 2.

[0097] For example, taking the number of measurement layers as 4, when the measurement layers involve multiple workpieces 2, no matter which workpiece 2 the target feature A needs to be identified, the corresponding target layer can be selected (ie, determined) from the 4 measurement layers.

[0098] Fig.10 1 is a flowchart showing a first embodiment of identifying a specific target area according to an example of the present disclosure. Fig.11 1 is a flowchart showing a second embodiment of the identification of a specific target area according to the example of the present disclosure.

[0099] In some examples, the method for adjusting the workpiece application layer may further include: after obtaining the inclination angle α of each feature on the surface of the plurality of workpieces 2, determining a target area where the target feature A needs to be identified. In this case, by determining the target area, it is easy to identify the target feature A within the target area, thereby improving the recognition efficiency of the target feature A.

[0100] In some examples, in the automatic measurement of the workpiece 2, the target area can be determined in an automatic manner. In some examples, see Fig.10 , determining the target area may include: determining the type of target feature A (step S132); automatically calculating the position of target feature A based on the design drawing of workpiece 2, the position of workpiece 2 and the placement angle (step S134); and acquiring the target area in the initial layer based on the position of target feature A (step S136). In this case, acquiring the target area in an automatic manner can improve the efficiency and accuracy of acquiring the target area, and when identifying target feature A in the target area, the efficiency and accuracy of identifying target feature A can be improved.

[0101] In some examples, in step S132 , the type of the target feature A may be determined. That is, the type of the target feature A is determined so that the system (ie, the optical measuring instrument 1 ) can obtain the type of feature that needs to be identified and / or measured on the surface of the workpiece 2 .

[0102] In some examples, the initial layer may be used for template matching to obtain the position and placement angle of the workpiece 2. In some examples, the initial layer may be used for template matching to obtain the position and placement angle of the workpiece 2 in the shooting field of view (eg, the initial layer).

[0103] In some examples, in step S134, the position of the target feature A can be automatically calculated based on the design drawing of the workpiece 2, the position of the workpiece 2, and the placement angle according to the type of the target feature A determined in step S132. Thereby, it is possible to improve the accuracy of obtaining the position of the target feature A. 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 of the workpiece 2, and the placement angle.

[0104] In some examples, in step S136, a target area may be obtained in the initial layer based on the position of the target feature A, wherein the target area may refer to an area in the shooting field of view that includes the target feature A. For example, it may be automatically determined which areas in the initial layer are to be identified in order to identify the target feature A based on the position of the target feature A in the initial layer.

[0105] In some examples, the method for adjusting the workpiece application layer may further include: identifying a target area in a target layer to obtain a 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, the efficiency and accuracy of identifying the target feature A can be improved by identifying the target area in the target layer.

[0106] In some examples, in response to acquiring the target area, the initial layer may be switched to the target layer, and the target area may be identified in the target layer to acquire the target feature A.

[0107] In some examples, steps S132 to S136 and the step of identifying target feature A (i.e., identifying the target area in the target layer to obtain target feature A) can be repeatedly executed in sequence until all target features A required for measurement are identified in the target layer.

[0108] In some examples, when the measurement layer involves multiple workpieces 2, after performing identification or measurement of the target feature A, the optical measuring instrument 1 can automatically select the target layer and identify the position of the target feature A on each workpiece 2 or give the measurement result according to the placement angle of each workpiece 2 and the corresponding inclination angle α of the target feature A. By formulating a unified classification rule, the corresponding target layer is automatically selected according to the performance (such as the posture) of each workpiece 2 on different measurement layers, thereby greatly improving the measurement efficiency and reducing the workload of manually observing the workpieces 2 one by one.

[0109] In some examples, in manually measuring the workpiece 2, the target area can be determined manually. Fig.11 , determining the target area may also include: manually selecting the type of target feature A (step S131); and manually selecting the area containing 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 target feature A, and further improving the flexibility and convenience of measuring target feature A.

[0110] In some examples, in step S131 , the type of target feature A may be manually selected according to measurement requirements.

[0111] In some examples, in step S133 , based on the type of target feature A selected in step S131 and measurement requirements, an area including the target feature A may be manually selected in the initial layer to obtain the target area.

[0112] Fig.12 FIG. 1 is a flowchart showing another embodiment of a method for adjusting a workpiece application layer according to an example of the present disclosure.

[0113] For some examples, see Fig.12 The method for adjusting the workpiece application layer may further include: identifying a 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).

[0114] In some examples, in step S140, the target feature A may be identified in the target layer and the identified target feature A may be displayed. That is, after the target layer is determined based on the inclination angle α of the target feature A, the target feature A may be identified in the target layer using the target area and the identified target feature A may 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 determine whether the identified target feature A meets the measurement requirements.

[0115] In some examples, in step S150, the target feature A may 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 may include, for example, the length of a line, the distance between two lines, and the radius of a circle.

[0116] Fig.13 is a flow chart showing the placement process involved in the examples of the present disclosure.

[0117] In some examples, return to Figure 1 The optical measuring instrument 1 may include a stage 10, which may be used to place workpieces 2. In some examples, when a certain number of workpieces 2 are placed on the stage 10, the stage 10 may carry the workpieces 2 and transfer the workpieces 2 to a detection station, where a target feature A of the workpiece 2 may be identified and / or measured.

[0118] In some examples, the method for adjusting the workpiece application layer may further include a 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 may be limited through the placement process (for example, so that a certain edge of the workpiece 2 may be parallel to the specified direction DA).

[0119] In some examples, if there are multiple workpieces 2, after 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).

[0120] For some examples, see Fig.13, the placement process may include: photographing the workpiece 2 located at the loading station to obtain the original layer (step S210); using the original layer to perform template matching to obtain the original placement angle of the workpiece 2 (step S220); obtaining the target angle of rotating the workpiece 2 based on the original placement angle and the preset placement angle of the workpiece 2 on the stage 10 (step S230); and placing the workpiece 2 on the stage 10 after rotating the target angle (step S240). In this case, the workpiece 2 can be placed on the stage 10 at the preset placement angle, so that the placement angles (i.e., postures) of multiple workpieces 2 on the stage 10 are as uniform as possible, and then the inclination angles α of the target features A on the surfaces of the multiple workpieces 2 are also in the same interval C as much as possible, and the number of target layers used can be reduced when identifying and / or measuring the target feature A (i.e., reducing the number of times the target layer is switched), thereby improving the measurement efficiency.

[0121] In some examples, in step S210, the workpiece 2 located at the loading station may be photographed to obtain an original layer, wherein the original layer may represent an image of the workpiece 2 located at the loading station.

[0122] In some examples, a camera with a large field of view can be used to shoot the workpiece 2 located 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 conducive to improving the processing efficiency of the placement process.

[0123] In some examples, in step S220, template matching can be performed based on the outline (ie, outer outline) of the workpiece 2 in the original layer as a judgment reference to obtain the original placement angle of the workpiece 2. The original placement angle of the workpiece 2 can represent the placement angle of the workpiece 2 at the loading station.

[0124] 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 based on the outer contour of the workpiece 2 in the original layer as a judgment reference to obtain the original placement angle of the workpiece 2.

[0125] In some examples, in step S230, the target angle for rotating the workpiece 2 can be obtained based on the original placement angle and the preset placement angle of the workpiece 2 on the stage 10. In other words, the angle that the workpiece 2 at the loading station needs to rotate to return to the preset placement angle can be determined based on the difference between the original placement angle and the preset placement angle.

[0126] 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 can mean that the edge of the workpiece 2 is parallel to the specified direction DA, and the specified direction DA can be set by the system or manually. For example, for a rectangular workpiece 2, the preset placement angle can mean that the edge of the workpiece 2 is roughly parallel to the edge of the stage 10.

[0127] In some examples, in step S240, the workpiece 2 may be rotated to a target angle and placed on the stage 10. Specifically, after the target angle is determined, the workpiece 2 may be taken out from the loading station by a robot arm and rotated to the target angle and placed on the stage 10 at a preset placement angle.

[0128] Although the present disclosure is 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 form. Those skilled in the art may modify and change the present disclosure as needed without departing from the essential spirit and scope of the present disclosure, and these modifications and changes all fall within the scope of the present disclosure.

Claims

1. A method for adjusting the applied layer of a workpiece by obtaining an angle according to template matching, which is applied to an optical measuring instrument to identify target features on multiple workpiece surfaces and determine a target layer from multiple measurement layers, characterized in that: include: Photographing a plurality of workpieces respectively under a plurality of unidirectional lightings and acquiring a plurality of measurement layers corresponding to the unidirectional lightings, wherein the plurality of unidirectional lightings are realized by a plurality of light sources disposed above the plurality of workpieces in a surrounding manner; Photograph multiple workpieces under even lighting and obtain initial layers; Using the initial layer to perform template matching to obtain the inclination angles of various features on the surfaces of multiple workpieces, wherein the range of the inclination angles is divided into multiple intervals corresponding to the multiple one-way lightings, and the multiple intervals establish a one-to-one correspondence with the multiple measurement layers based on the multiple one-way lightings; 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 target feature generates a shadow in the target layer.

2. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 1, characterized in that: The method 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.

3. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 1, characterized in that: After acquiring the inclination angles of the various 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 adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 3, characterized in that: Determining the target area includes: Determine the type of the target feature, and use the initial layer to perform template matching to obtain the positions and placement angles of multiple workpieces; Automatically calculate the position of the target feature based on the design drawing of the workpiece, the positions and placement angles of the multiple workpieces; and A target area including the target feature is obtained in the initial layer based on the position of the target feature.

5. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 3, characterized in that: Determining the target area includes: The type of the target feature is manually selected; and the area containing the target feature is manually selected in the initial layer to obtain the target area.

6. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 4 or 5, characterized in that: The target area is identified in the target layer to obtain the target feature.

7. The method for adjusting the workpiece application layer by obtaining an angle based on template matching 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.

8. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 7, 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.

9. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 1, characterized in that: The process also includes 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 outline of the workpiece in the original layer as a judgment reference to obtain the original placement angle of the workpiece; Acquire a target angle for rotating the workpiece based on the original placement angle and a preset placement angle of the workpiece on the stage; and The workpiece is rotated to the target angle and then placed on the stage.

10. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 1, characterized in that: In response to a chamfer being formed near the target feature, the heights of the plurality of light sources are adjusted so that a shadow is generated on the target feature on the one-way lighting and a side of the target feature close to the one-way lighting is illuminated.

Citation Information

Patent Citations

  • Enhanced contrast for object detection and characterization by optical imaging

    CN104145276A

  • Drug identification device, image processing device, image processing method, and program

    CN110892413A