[go: up one dir, main page]

CN118887519A - Method for obtaining angle based on template matching to adjust the applied layer of workpiece - Google Patents

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

Info

Publication number
CN118887519A
CN118887519A CN202411395537.2A CN202411395537A CN118887519A CN 118887519 A CN118887519 A CN 118887519A CN 202411395537 A CN202411395537 A CN 202411395537A CN 118887519 A CN118887519 A CN 118887519A
Authority
CN
China
Prior art keywords
target
workpiece
target feature
layer
angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202411395537.2A
Other languages
Chinese (zh)
Other versions
CN118887519B (en
Inventor
霍阔
赖圣辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chotest Technology Inc
Original Assignee
Chotest Technology Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chotest Technology Inc filed Critical Chotest Technology Inc
Priority to CN202411395537.2A priority Critical patent/CN118887519B/en
Publication of CN118887519A publication Critical patent/CN118887519A/en
Application granted granted Critical
Publication of CN118887519B publication Critical patent/CN118887519B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/98Detection or correction of errors, e.g. by rescanning the pattern or by human intervention; Evaluation of the quality of the acquired patterns
    • G06V10/993Evaluation of the quality of the acquired pattern
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/12Details of acquisition arrangements; Constructional details thereof
    • G06V10/14Optical characteristics of the device performing the acquisition or on the illumination arrangements
    • G06V10/145Illumination specially adapted for pattern recognition, e.g. using gratings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/42Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/60Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • G06V10/7515Shifting the patterns to accommodate for positional errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10141Special mode during image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The present disclosure describes a method for obtaining angles according to template matching to adjust an application layer of a workpiece, comprising respectively shooting a plurality of workpieces under a plurality of unidirectional lighting and obtaining a plurality of measurement layers corresponding to the unidirectional lighting, wherein the unidirectional lighting is realized by a plurality of light sources arranged above the plurality of workpieces in a surrounding manner; shooting a plurality of workpieces under uniform polishing and obtaining an initial image layer; template matching is carried out by utilizing an initial image layer to obtain the inclination angles of all the characteristics of the surfaces of a plurality of workpieces, the range of the inclination angles is divided into a plurality of sections corresponding to a plurality of unidirectional polishing, and the plurality of sections establish corresponding relations with a plurality of measuring image layers based on the plurality of unidirectional polishing; and determining an interval in which the tilt angle of the target feature is located based on the tilt angle of the target feature to acquire a measurement layer corresponding to the tilt angle of the target feature as a target layer, the target feature generating shadows in the target layer. Thus, the recognition accuracy and the measurement accuracy of the target feature can be improved by using the target layer.

Description

根据模板匹配获取角度以调整工件应用图层的方法Method for obtaining angle based on template matching to adjust the applied layer of workpiece

技术领域Technical Field

本公开大体涉及智能制造装备产业,具体涉及一种根据模板匹配获取角度以调整工件应用图层的方法。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

光学测量仪器(例如尺寸筛选仪、影像仪等)是利用光源照明来测量样品的尺寸、形状以及位置等参数的仪器。光学测量仪器能够批量且精确地对样品进行测量,相较于人工测量,光学测量仪器在测量效率和测量精度方面具有十分显著的优势。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.

以尺寸筛选仪为例,尺寸筛选仪通常包括上料引导视觉系统和尺寸检测视觉系统。上料引导视觉系统通常使用大视野的镜头拍摄上料工位的样品以获取图像,但由于大视野镜头获得的图像中样品的微小特征不清晰,因此上料引导视觉系统主要是利用图像中相对比较清晰的样品的外轮廓进行模板匹配以确认样品在上料工位的摆放角度。机械臂拾取上料工位的样品后基于样品的摆放角度将样品旋转至合适的倾斜角后再摆放至载物台,使得载物台上各个样品的摆放角度统一。待载物台上的样品达到一定数量后,载物台可以承载着样品将样品转移至尺寸检测视觉系统。尺寸检测视觉系统以合适的角度打光并拍摄样品以获得包含有多个样品的图像(也即图层),其中,各个样品表面待测量的特征(也即目标特征)均为图层中清晰的图案细节。处理软件对图层中各个样品的目标特征进行识别和/或测量以获取测量结果。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.

然而,通过上述方法将某些类型的样品(例如外轮廓为圆形、矩形、或多边形等中心对称形状的样品)摆放至载物台之后,多个样品的摆放角度可能依然存在偏差(例如,从样品的外轮廓看,可能各个样品的摆放角度是统一的,但有些样品实际偏转了90度、180度或270度),另外机械臂可能因受到不期望的碰撞或发生故障也会导致载物台上多个样品的摆放角度存在偏差。因此,载物台上各个样品的摆放角度往往难以统一。在这种情况下,在尺寸检测视觉系统获取的图层中,有些样品的目标特征并不是图层中清晰的图案细节,导致难以识别到目标特征。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

本公开是有鉴于上述的状况而提出,目的在于提供一种根据模板匹配获取角度以调整工件应用图层的方法,该方法能够基于目标特征的倾斜角调整用于识别和/或测量目标特征的测量图层,通过自动选取最合适的测量图层进行目标特征的识别,不仅能够简化测量过程的操作步骤,还能够提高目标特征的识别精度和测量精度。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.

为此,本公开提供一种根据模板匹配获取角度以调整工件应用图层的方法,是光学测量仪器为识别多个工件表面的目标特征而从多个测量图层中确定目标图层的方法,包括:在多个单向打光下分别拍摄多个工件并获取多个与所述单向打光对应的测量图层,其中,多个所述单向打光由以环绕方式设置于多个工件上方的多个光源实现;在均匀打光下拍摄多个工件并获取初始图层;利用所述初始图层进行模板匹配以获取多个工件表面的各个特征的倾斜角,其中,所述倾斜角的范围被划分为与多个所述单向打光对应的多个区间,并且多个所述区间基于多个所述单向打光与多个所述测量图层建立一一对应的关系;并且基于所述目标特征的倾斜角确定所述目标特征的倾斜角所处的区间以获取所述目标特征的倾斜角对应的测量图层作为所述目标图层,其中,所述目标特征在所述目标图层中产生阴影。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.

在本公开中,多个单向打光由以环绕方式设置于工件上方的多个光源实现,能够使得多个单向打光围绕工件。当在多个单向打光下分别拍摄工件时,无论工件在拍摄视野中的姿态如何,至少有一个单向打光使得工件的目标特征产生阴影,也即在多个测量图层中至少有一个测量图层使得工件的目标特征的对比度满足预设要求。在这种情况下,由于在每个测量图层中目标特征产生的阴影与目标特征在拍摄视野中的姿态相关,通过将目标特征的倾斜角的范围划分为多个区间且多个区间与多个测量图层对应关联,能够便于根据目标特征的倾斜角所处的区间准确地匹配对应的测量图层作为目标图层,也即根据目标特征的倾斜角自动选取最合适的测量图层进行目标特征的识别,不仅能够简化测量过程的操作步骤,还能够提高目标特征的识别精度和/或测量精度。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,还包括:在所述目标图层中识别所述目标特征并显示识别出的所述目标特征;并且在所述目标图层中对所述目标特征进行测量。在这种情况下,在目标图层中对目标特征进行识别能够提高目标特征的识别精度;另外,通过在目标图层中显示识别出的目标特征,能够便于用户直观地判断识别出的目标特征是否符合测量需求;另外,在目标图层中对目标特征进行测量能够提高目标特征的测量精度。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,在获取多个工件表面的各个特征的倾斜角后,确定需要识别所述目标特征的目标区域。在这种情况下,通过确定目标区域能够便于在目标区域内对目标特征进行识别,从而提高目标特征的识别效率。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,利用所述初始图层进行模板匹配以获取多个工件的位置和摆放角度,确定所述目标区域包括:确定所述目标特征的类型;基于工件的设计图纸、多个工件的位置和摆放角度自动计算所述目标特征的位置;并且基于所述目标特征的位置在所述初始图层中获取包含有所述目标特征的目标区域。在这种情况下,通过自动方式获取目标区域,能够提高获取目标区域的效率和准确率,当在目标区域内对目标特征进行识别时,能够提高识别目标特征的效率和准确率。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,确定所述目标区域包括:人工选择所述目标特征的类型;并且人工在所述初始图层中框选包含有所述目标特征的区域以获取所述目标区域。在这种情况下,通过手动方式获取目标区域,能够灵活且便捷地确定目标区域,从而能够提高识别目标特征的灵活性和便捷性,进而提高测量目标特征的灵活性和便捷性。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,在所述目标图层中对所述目标区域进行识别以获取所述目标特征。在这种情况下,由于先确定目标区域且目标区域即为目标特征所处的区域,通过在目标图层中对目标区域进行识别,能够提高识别目标特征的效率和准确率。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,以相邻两个所述单向打光的中间方向作为划分多个所述区间的分界线。由此,能够提高划分多个区间的便捷性和准确率。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,响应于所述目标特征的倾斜角处于所述分界线,比较相邻两个所述区间对应的两个测量图层中所述目标特征的对比度,并且以所述目标特征的对比度较高的测量图层作为所述目标图层。在这种情况下,通过以目标特征的对比度较高的测量图层作为目标图层,能够提高目标特征在测量图层中的清晰度,从而提高目标特征的识别精度和测量精度。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,还包括将工件从上料工位移动至所述光学测量仪器的载物台的摆放过程,所述摆放过程包括:拍摄位于所述上料工位的工件以获取原始图层;以所述原始图层中工件的轮廓为判断基准进行模板匹配以获取工件的原始摆放角度;基于所述原始摆放角度和工件位于所述载物台的预设摆放角度获取旋转工件的目标角度;并且令工件旋转所述目标角度后放置于所述载物台。在这种情况下,能够使得工件以预设摆放角度放置于载物台,从而使得多个工件位于载物台的摆放角度(也即姿态)尽可能统一,进而使得多个工件表面的目标特征的倾斜角也尽可能处于同一个区间,在识别和/或测量目标特征时能够减少所使用的目标图层的数量,从而提高测量效率。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.

另外,在本公开所涉及的调整工件应用图层的方法中,可选地,响应于所述目标特征的附近形成有倒角,调节多个所述光源的高度以在所述单向打光上使所述目标特征产生阴影且所述目标特征靠近所述单向打光的一侧受到光照。在这种情况下,对于目标特征的附近形成有倒角的情形,通过改变光源的高度的方式,直至目标特征的对比度满足预设要求,能够清晰地在测量图层中体现目标特征的位置,从而便于准确地识别目标特征,减少倒角对识别目标特征的干扰。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.

根据本公开,能够提供一种根据模板匹配获取角度以调整工件应用图层的方法,该方法能够基于目标特征的倾斜角调整用于识别和/或测量目标特征的测量图层,通过自动选取最合适的测量图层进行目标特征的识别,不仅能够简化测量过程的操作步骤,还能够提高目标特征的识别精度和测量精度。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

现在将仅通过参考附图的例子进一步详细地解释本公开。The present disclosure will now be explained in further detail, by way of example only, with reference to the accompanying drawings.

图1是示出了本公开示例所涉及的光学测量仪器的结构示意图。FIG. 1 is a schematic diagram showing the structure of an optical measuring instrument according to an example of the present disclosure.

图2是示出了本公开示例所涉及的工件的部分区域和目标特征的侧视视角示意图。FIG. 2 is a schematic diagram showing a partial area and target features of a workpiece according to an example of the present disclosure from a side view perspective.

图3是示出了本公开示例所涉及的调整工件应用图层的方法的流程图。FIG. 3 is a flow chart showing a method for adjusting a workpiece application layer according to an example of the present disclosure.

图4A是示出了本公开示例所涉及的工件在单向打光下的俯视视角示意图。FIG. 4A is a schematic diagram showing a top view of a workpiece according to an example of the present disclosure under unidirectional lighting.

图4B是示出了本公开示例所涉及的工件的部分区域在单向打光下的侧视视角示意图。FIG. 4B is a schematic diagram showing a side view of a partial area of a workpiece involved in an example of the present disclosure under unidirectional lighting.

图5是示出了本公开示例所涉及的多个光源以环绕方式设置于工件上方的示意图。FIG. 5 is a schematic diagram showing that a plurality of light sources according to an example of the present disclosure are disposed above a workpiece in a surrounding manner.

图6是示出了本公开示例所涉及的工件在均匀打光下的俯视视角示意图。FIG. 6 is a schematic diagram showing a top view of a workpiece according to an example of the present disclosure under uniform lighting.

图7是示出了本公开示例所涉及的多个工件在拍摄视野中呈现不同摆放角度的示意图。FIG. 7 is a schematic diagram showing multiple workpieces involved in the example of the present disclosure at different placement angles in a shooting field of view.

图8是示出了本公开示例所涉及的目标特征的倾斜角的范围被划分为4个区间的示意图。FIG. 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.

图9是示出了本公开示例所涉及的目标特征的倾斜角的范围被划分为6个区间的示意图。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.

图10是示出了本公开示例所涉及的确定目标区域的第1实施方式的流程图。FIG. 10 is a flowchart showing a first embodiment of determining a target area according to the example of the present disclosure.

图11是示出了本公开示例所涉及的确定目标区域的第2实施方式的流程图。FIG. 11 is a flowchart showing a second embodiment of the process of determining a target area according to the present disclosure example.

图12是示出了本公开示例所涉及的调整工件应用图层的方法另一个实施例的流程图。FIG. 12 is a flow chart showing another embodiment of a method for adjusting a workpiece application layer according to an example of the present disclosure.

图13是示出了本公开示例所涉及的摆放过程的流程图。FIG. 13 is a flow chart showing the placement process involved in the example of the present disclosure.

具体实施方式DETAILED DESCRIPTION

下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。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.

需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。在下面的说明中,对于相同的部件赋予相同的符号,省略重复的说明。另外,附图只是示意性的图,部件相互之间的尺寸的比例或者部件的形状等可以与实际的不同。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.

本公开涉及的根据模板匹配获取角度以调整工件应用图层的方法通过模板匹配的方式获取工件表面的目标特征的倾斜角,基于目标特征的倾斜角调整识别和/或测量目标特征所用的测量图层,以提高目标特征在测量图层中的对比度为目的确定用于识别和/或测量目标特征的测量图层,通过自动选取最合适的测量图层进行目标特征的识别,不仅能够简化测量过程的操作步骤,还能够提高目标特征的识别精度和测量精度。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.

在一些示例中,应用图层可以是指用于识别和/或测量工件表面的目标特征的测量图层。另外,调整工件应用图层可以是指从多个测量图层中确定用于识别和/或测量工件表面的目标特征的测量图层。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.

在一些示例中,根据模板匹配获取角度以调整工件应用图层的方法可以简称为调整工件应用图层的方法,有时候也可以称为确定工件应用图层的方法、或者确定目标图层以测量工件的方法等。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.

以下,结合附图对本公开所涉及的调整工件应用图层的方法进行说明。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.

图1是示出了本公开示例所涉及的光学测量仪器1的结构示意图。图2是示出了本公开示例所涉及的工件2的部分区域和目标特征A的侧视视角示意图。Fig. 1 is a schematic diagram showing the structure of an optical measuring instrument 1 according to an example of the present disclosure. Fig. 2 is a schematic diagram showing a side view of a partial area of a workpiece 2 and a target feature A according to an example of the present disclosure.

在一些示例中,调整工件应用图层的方法可以应用于如图1所示的光学测量仪器1中。在一些示例中,光学测量仪器1可以执行调整工件应用图层的方法以对工件2表面的目标特征A进行识别和/或测量。In some examples, the method for adjusting the workpiece applied layer can be applied to the optical measuring instrument 1 shown in Figure 1. In some examples, the optical measuring instrument 1 can perform the method for adjusting the workpiece applied layer to identify and/or measure the target feature A on the surface of the workpiece 2.

在一些示例中,调整工件应用图层的方法可以是用于光学测量仪器1从多个测量图层中确定目标图层的方法,其中,光学测量仪器1可以使用目标图层识别和/或测量工件2表面的目标特征A。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 .

在一些示例中,光学测量仪器1可以是指利用光源12(稍后描述)照明工件2并拍摄工件2且基于拍摄获得的拍摄图像测量工件2的仪器。在一些示例中,光学测量仪器1可以为尺寸筛选仪、闪测仪、或影像仪等。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.

在一些示例中,工件2可以是指待测量的物体。另外,工件2也可以称为样品或待测物等。在一些示例中,参见图2,工件2可以包括目标特征A。在一些示例中,目标特征A可以是指工件2表面待测量的特征。在一些示例中,待测量的特征可以是表征工件2表面起伏的特征(例如表征台阶的特征)。图2示意性地示出了目标特征A可以包括第一台阶A11和第二台阶A12。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. In some examples, referring to FIG. 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 on the surface of the workpiece 2 (e.g., a feature that characterizes a step). FIG. 2 schematically shows that the target feature A may include a first step A11 and a second step A12.

在一些示例中,若工件2表面出现台阶,则会在台阶处形成轮廓,该轮廓可以是直线、弧线或圆等特征。在一些示例中,目标特征A可以是指在工件2表面的台阶处形成的例如直线、弧线或圆等轮廓特征。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.

以下,以待测量的特征为表征工件2表面起伏的特征为例对本公开所涉及的调整工件应用图层的方法进行说明。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.

在一些示例中,测量图层可以是指包含有工件2的图像。在一些示例中,测量图层可以是指光学测量仪器1的视觉系统(例如图1所示出的拍摄镜头14)拍摄的包含有工件2的图像。另外,在一些示例中,目标图层可以是指用于对目标特征A进行识别和/或测量的图像。In some examples, the measurement layer may refer to an image containing the workpiece 2. In some examples, the measurement layer may refer to an image containing the workpiece 2 captured by the visual system of the optical measuring instrument 1 (e.g., the shooting lens 14 shown in FIG. 1 ). In addition, in some examples, the target layer may refer to an image used to identify and/or measure the target feature A.

图3是示出了本公开示例所涉及的调整工件应用图层的方法的流程图。图4A是示出了本公开示例所涉及的工件2在单向打光下的俯视视角示意图。图4B是示出了本公开示例所涉及的工件2的部分区域在单向打光下的侧视视角示意图。图5是示出了本公开示例所涉及的多个光源12以环绕方式设置于工件2上方的示意图。FIG3 is a flow chart showing a method for adjusting a workpiece application layer involved in the example of the present disclosure. FIG4A is a schematic diagram showing a top view of a workpiece 2 involved in the example of the present disclosure under unidirectional lighting. FIG4B is a schematic diagram showing a side view of a partial area of a workpiece 2 involved in the example of the present disclosure under unidirectional lighting. FIG5 is a schematic diagram showing a plurality of light sources 12 involved in the example of the present disclosure arranged above the workpiece 2 in a surrounding manner.

需要说明的是,图4B是为了便于展示单向打光对目标特征A的对比度的影响而省略了工件2的大部分结构,这不应当理解为对本公开的限定。It should be noted that FIG. 4B omits most of the structures of the workpiece 2 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.

在一些示例中,参见图3,调整工件应用图层的方法可以包括:在不同打光方向下拍摄多个工件2以获取多个测量图层且在均匀打光下拍摄多个工件2以获取初始图层(步骤S110);利用初始图层进行模板匹配以获取多个工件2表面的各个特征的倾斜角(步骤S120);并且基于目标特征A的倾斜角α确定目标特征A的倾斜角α所处的区间C以获取目标特征A的倾斜角α对应的测量图层作为目标图层(步骤S130)。In some examples, referring to FIG. 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).

在一些示例中,在步骤S110中,可以在多个单向打光下分别拍摄多个工件2并获取多个与单向打光对应的测量图层。其中,一个单向打光可以表示在一个方向进行打光。在一些示例中,单向打光可以是指工件2受到的光束具有方向性且光束的方向至少不是竖直方向。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.

在一些示例中,测量图层可以与打光的方向对应。在一些示例中,测量图层的数量可以与打光的方向的数量相同。换言之,多个测量图层可以与多个单向打光相对应。例如,在俯视视角下,围绕工件2的上下左右可以设有四个单向打光,在四个单向打光下分别拍摄工件2可以获得对应的四个测量图层。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.

在一些示例中,参见图4A,单向打光可以在工件2表面形成阴影S。在一些示例中,在单向打光下,阴影S可以由工件2表面的起伏产生。在一些示例中,在单向打光下,阴影S可以由工件2表面的目标特征A产生。例如,以目标特征A为台阶为例,当台阶背向单向打光的方向时,台阶可以产生阴影S(参见图4A)。具体而言,在单向打光的方向上,台阶的两端可以分别为阴影S和亮面G,此时能够增强台阶的对比度,使得台阶清晰地在测量图层中体现出来,在特征识别过程中,能够提高识别出台阶的准确率。In some examples, see FIG4A , 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 is facing away from the direction of the unidirectional lighting, the step can generate a shadow S (see FIG4A ). Specifically, in the direction of the 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.

又例如,在图4B所示出的示例中,在单向打光的方向上,第一台阶A11背向单向打光的方向,第一台阶A11的两端分别为阴影S和亮面G,因此第一台阶A11的对比度较大;另外,第二台阶A12朝向单向打光的方向,第二台阶A12的两端均为亮面G,因此第二台阶A12的对比度较小。For another example, in the example shown in FIG4B , 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 a shadow S and a 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 bright surfaces G, so the contrast of the second step A12 is relatively small.

在一些示例中,由于工件2表面的目标特征A在单向打光下可以产生阴影S,在单向打光下拍摄工件2获得测量图层时,目标特征A在测量图层中的对比度可以满足预设要求(例如图4B中的第一台阶A11的对比度满足预设要求,第二台阶A12不满足预设要求)。在一些示例中,预设要求可以是指人工设定的对比度的数值。在一些示例中,预设要求也可以表示一个经验值(例如固定值)。In some examples, since the target feature A on the surface of the workpiece 2 can 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 can meet the preset requirements (for example, the contrast of the first step A11 in FIG. 4B meets the preset requirements, and the second step A12 does not meet the preset requirements). In some examples, the preset requirements may refer to a manually set contrast value. In some examples, the preset requirements may also represent an empirical value (for example, a fixed value).

在一些示例中,多个单向打光可以由多个光源12实现,多个光源12可以以环绕方式设置。由此,能够实现多种不同的打光方向。例如,对于环绕设置于多个工件2上方的多个光源12,可以通过开启不同方位的光源12以实现多个单向打光。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.

在一些示例中,在步骤S110中,多个单向打光可以由以环绕方式设置于工件2上方的多个光源12实现(参见图5)。在这种情况下,能够使得多个单向打光围绕工件2,无论工件2在拍摄视野中的姿态如何,至少有一个单向打光使得工件2的目标特征A产生阴影S。In some examples, in step S110, multiple unidirectional lighting can be implemented by multiple light sources 12 arranged in a surrounding manner above the workpiece 2 (see FIG. 5 ). In this case, multiple unidirectional lighting can surround the workpiece 2, and no matter what the posture of the workpiece 2 in the shooting field of view is, at least one unidirectional lighting causes the target feature A of the workpiece 2 to produce a shadow S.

在一些示例中,参见图5,光源12可以为管状光源,管状光源的数量可以为4个,分别开启4个管状光源可以实现围绕工件2四周的四个单向打光。在一些示例中,光源12可以为通过多个LED环绕形成的光源,通过控制发光的LED区域可以实现不同的打光方向。In some examples, referring to FIG. 5 , the light source 12 may be a tubular light source, and the number of the tubular light sources may be four. Turning on the four 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 surrounding a plurality of LEDs, and different lighting directions may be realized by controlling the LED area that emits light.

在一些示例中,以环绕方式设置的多个光源12也可以称为环形光源。也即,在工件2上方设置一个环形光源也可以实现围绕工件2的多个单向打光。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 .

在一些示例中,可以通过分别启用多个单向打光拍摄多个工件2的方式获取多个测量图层,其中,多个测量图层可以与多个单向打光相对应。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.

在一些示例中,在步骤S110中,工件2的数量可以为多个。在一些示例中,可以在围绕工件2的多个单向打光下分别拍摄多个工件2以获取多个与单向打光对应的测量图层。在这种情况下,由于多个单向打光围绕着工件2,无论多个工件2在拍摄视野中的摆放角度是否统一,每个工件2的目标特征A都能够在其中一个单向打光下产生阴影S,从而降低了对多个工件2在拍摄视野中的摆放角度(也即姿态)的要求。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.

在一些示例中,在光学测量仪器1中,光源12可以设置于拍摄镜头14与工件2之间。例如,光源12可以设置于镜头下方且可以跟随镜头在竖直方向移动。由此,能够便于设定不同的光束入射高度以满足不同的测量需求。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.

图6是示出了本公开示例所涉及的工件2在均匀打光下的俯视视角示意图。FIG. 6 is a schematic diagram showing a top view of the workpiece 2 involved in the example of the present disclosure under uniform lighting.

在一些示例中,在步骤S110中,可以在均匀打光下拍摄工件2以获取初始图层。图6是示意性地示出了均匀打光下的工件2表面的特征。In some examples, in step S110, the workpiece 2 may be photographed under uniform lighting to obtain an initial layer. Fig. 6 schematically shows features of the surface of the workpiece 2 under uniform lighting.

在一些示例中,均匀打光可以是指工件2受到的光束没有倾向于某一个方向。在一些示例中,均匀打光可以是指环绕设置于工件2上方的多个光源12同时开启的情况。在一些示例中,均匀打光也可以是指同时启用多个单向打光的情况。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.

在一些示例中,可以通过同时启用多个单向打光拍摄多个工件2的方式获取初始图层。In some examples, the initial layer may be acquired by simultaneously enabling multiple unidirectional lighting to photograph multiple workpieces 2 .

需要说明的是,虽然初始图层中工件2表面的起伏变化相对其他测量图层(例如在单向打光下获取的测量图层)并不是特别明显,但初始图层仍可以清晰地显示工件2表面的图案细节(例如工件2的材质涉及多种材料,不同材料的颜色或质感的区别体现在工件2表面形成的图案或通过刻线所形成的图案)。因此,利用初始图层中工件2表面的图案细节确定工件2在拍摄视野下的摆放角度是合适的。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.

另外,在本公开中,单向打光不应局限地理解为光束的方向是唯一的,而是区别于均匀打光的打光方式。例如,可以是位于工件2左侧上方的一个(或多个)光源12同时开启以使工件2受到的光束具有方向性。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.

图7是示出了本公开示例所涉及的多个工件2在拍摄视野中呈现不同摆放角度的示意图。图8是示出了本公开示例所涉及的目标特征A的倾斜角α的范围被划分为4个区间C的示意图。图9是示出了本公开示例所涉及的目标特征A的倾斜角α的范围被划分为6个区间C的示意图。FIG7 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. FIG8 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 4 intervals C. FIG9 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.

在一些示例中,返回参见图3,在步骤S120中,可以利用初始图层进行模板匹配以获取多个工件2表面的各个特征的倾斜角α。In some examples, referring back to FIG. 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 the plurality of workpieces 2 .

具体而言,可以以初始图层中各个工件2的外轮廓或图案细节为判断基准进行模板匹配以获取工件2的数量以及多个工件2的摆放角度,并且基于多个工件2的摆放角度和工件2的设计图纸分别确定多个工件2表面的各个特征的倾斜角α(参见图6)。Specifically, template matching can be performed based on the outer contours or pattern details of each workpiece 2 in the initial layer to obtain the number of workpieces 2 and the placement angles of multiple workpieces 2, and the inclination angle α 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).

在一些示例中,在步骤S120中,工件2表面的各个特征的倾斜角α可以包括目标特征A的倾斜角α。也即,可以利用初始图层进行模板匹配以获取多个工件2的目标特征A的倾斜角α。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 .

在一些示例中,工件2的外轮廓(也即轮廓)可以呈中心对称状。在一些示例中,参见图7,由于工件2的外轮廓呈中心对称状,当以工件2的外轮廓作为判断基准进行模板匹配以统一多个工件2在拍摄视野中的摆放角度时,虽然从工件2的外轮廓看多个工件2的摆放角度已经统一,但实际上有些工件2在拍摄视野中呈现的摆放角度不同。换言之,多个工件2在拍摄视野中的摆放角度并不统一。In some examples, the outer contour (i.e., the outline) of the workpiece 2 may be centrally symmetrical. In some examples, see FIG. 7 , since the outer contour of the workpiece 2 is centrally symmetrical, when the template matching is performed based on the outer contour of the workpiece 2 as a judgment reference 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.

在一些示例中,工件2的摆放角度可以是指工件2在拍摄视野中呈现的姿态。在一些示例中,工件2的摆放角度可以是指工件2相对于指定方向DA的夹角。在一些示例中,工件2的摆放角度可以是指工件2上指定的边缘相对于指定方向DA的夹角(参见图7)。例如,在图7所示出的示例中,第一工件2a和第二工件2b的摆放角度为0度,第三工件2c的摆放角度为90度,第四工件2d的摆放角度为-90度,第五工件2e的摆放角度为180度,第六工件2f的摆放角度为45度。在一些示例中,工件2的摆放角度的取值范围可以在360度以内。In some examples, the placement angle of workpiece 2 may refer to the posture of workpiece 2 in the shooting field of view. In some examples, the placement angle of workpiece 2 may refer to the angle of workpiece 2 relative to a specified direction DA. In some examples, the placement angle of workpiece 2 may refer to the angle of a specified edge on workpiece 2 relative to a specified direction DA (see FIG. 7 ). For example, in the example shown in FIG. 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 workpiece 2 may be within 360 degrees.

在一些示例中,模板匹配可以是指将初始图层与工件2的设计文件进行比对并确定工件2的位置和姿态。其中,工件2的设计文件可以是指含有工件2的设计图纸的文件。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.

在一些示例中,目标特征A的倾斜角α可以是自定义的,可以基于俯视视角下目标特征A的姿态获取目标特征A的倾斜角α(参见图6)。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 acquired based on the posture of the target feature A in a top-down perspective (see FIG. 6 ).

在一些示例中,目标特征A的倾斜角α可以是指目标特征A相对于指定方向DA的夹角。在一些示例中,目标特征A的倾斜角α可以是指目标特征A在拍摄视野中相对于坐标轴的夹角。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.

在一些示例中,目标特征A的倾斜角α可以表示目标特征A在拍摄视野中相对于X轴正方向或Y轴正方向的夹角。在一些示例中,目标特征A的倾斜角α也可以表示目标特征A在初始图层中的延伸方向相对于X轴正方向或Y轴正方向的夹角。例如,在图6所示出的示例中,第一目标特征A1的倾斜角α1可以为0度,第二目标特征A2的倾斜角α2可以为90度,第三目标特征A3的倾斜角α3可以为45度。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. For example, in the example shown in FIG6 , the tilt angle α1 of the first target feature A1 may be 0 degrees, the tilt angle α2 of the second target feature A2 may be 90 degrees, and the tilt angle α3 of the third target feature A3 may be 45 degrees.

在一些示例中,目标特征A的倾斜角α也可以表征目标特征A的朝向。例如,目标特征A的倾斜角α为90度可以表示目标特征A朝向X轴负方向;另外,目标特征A的倾斜角α为-90度可以表示目标特征A朝向X轴正方向。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.

在一些示例中,响应于目标特征A为台阶,倾斜角α也可以表示为台阶侧面的朝向。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.

在一些示例中,目标特征A的类型可以包括直线和弧线。在一些示例中,参见图6,响应于目标特征A的类型为直线,目标特征A的倾斜角α可以为直线的倾斜角α(例如,直线与X轴正方向之间的夹角)。In some examples, the type of target feature A may include a straight line and an arc. In some examples, referring to FIG6 , in response to the type of target feature A being a straight line, the inclination angle α of 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).

在一些示例中,响应于目标特征A的类型为弧线,目标特征A的倾斜角α可以为弧线中点的切线的倾斜角α(例如,切线与X轴正方向之间的夹角)。由此,能够根据目标特征A的类型快速且准确地确定目标特征A的倾斜角α。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.

在一些示例中,目标特征A的倾斜角α的范围可以在360度以内。在一些示例中,在拍摄视野中目标特征A的倾斜角α可以在0至360度的范围内取值。在一些示例中,在拍摄视野中目标特征A的倾斜角α可以在例如-30至330度、-45至315度、或者-60至300度的范围内取值。关于目标特征A的倾斜角α具体的取值范围,可以根据不同的打光方向或实际测量需求进行设定,本公开对此不作限定。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.

在一些示例中,可以基于多个单向打光对倾斜角α的范围进行划分以获得多个区间C(参见图8)。在一些示例中,目标特征A的倾斜角α的范围可以被划分为多个区间C,多个区间C可以与多个单向打光对应。在一些示例中,多个区间C可以与多个单向打光具有一一对应的关系。In some examples, the range of the inclination angle α can be divided based on multiple unidirectional lighting to obtain multiple intervals C (see FIG. 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.

在一些示例中,各个区间C的大小(也即范围)可以相等。在一些示例中,可以以相邻两个单向打光的中间方向作为划分多个区间C的分界线L。也即,分界线L的方向可以与中间方向一致。由此,能够提高划分多个区间C的便捷性和准确率。在一些示例中,中间方向可以表示相邻两个单向打光的方向所形成夹角的角平分线的方向。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.

例如,在图8所示出的示例中,如果总共有4个单向打光,在俯视视角下,第一单向打光的方向D1可以为90度、第二单向打光的方向D2可以为270度、第三单向打光的方向D3可以为180度、第四单向打光的方向D4可以为0度,对应的区间C的数量可以有4个,划分4个区间C的分界线L可以分别为-45度、45度、135度、225度。对应第一单向打光的第一区间C1可以为45度至135度、对应第二单向打光的第二区间C2可以为225度至315度、对应第三单向打光的第三区间C3可以为135度至225度、对应第四单向打光的第四区间C4可以为-45度至45度。For example, in the example shown in FIG8 , if there are a total of 4 unidirectional lighting, in a top-down perspective, the direction D1 of the first unidirectional lighting may be 90 degrees, the direction D2 of the second unidirectional lighting may be 270 degrees, the direction D3 of the third unidirectional lighting may be 180 degrees, and the direction D4 of the fourth unidirectional lighting may be 0 degrees. The number of corresponding intervals C may be 4, and the dividing lines L dividing the 4 intervals C may be -45 degrees, 45 degrees, 135 degrees, and 225 degrees, respectively. The first interval C1 corresponding to the first unidirectional lighting may be 45 degrees to 135 degrees, the second interval C2 corresponding to the second unidirectional lighting may be 225 degrees to 315 degrees, the third interval C3 corresponding to the third unidirectional lighting may be 135 degrees to 225 degrees, and the fourth interval C4 corresponding to the fourth unidirectional lighting may be -45 degrees to 45 degrees.

又例如,在图9所示出的示例中,如果总共有6个单向打光,在俯视视角下,第一单向打光的方向D1可以为0度、第二单向打光的方向D2可以为60度、第三单向打光的方向D3可以为120度、第四单向打光的方向D4可以为180度、第五单向打光的方向D5可以为240度、第六单向打光的方向D6可以为300度,对应的区间C的数量可以有6个,划分6个区间C的分界线L可以分别为-30度、30度、90度、150度、210度、270度。对应第一单向打光的第一区间C1可以为-30度至30度、对应第二单向打光的第二区间C2可以为30度至90度、对应第三单向打光的第三区间C3可以为90度至150度、对应第四单向打光的第四区间C4可以为150度至210度、对应第五单向打光的第五区间C5可以为210度至270度、对应第六单向打光的第六区间C6可以为270度至330度。For another example, in the example shown in Figure 9, if there are a total of 6 unidirectional lightings, in 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.

在一些示例中,单向打光的方向与目标特征A的朝向可以具有对应关系。在一些示例中,可以令目标特征A的朝向背对(或背向)单向打光的方向以使单向打光的方向与目标特征A的朝向建立对应关系。在这种情况下,在基于多个单向打光将目标特征A的倾斜角α的范围划分为多个区间C时,通过充分利用单向打光的方向与目标特征A的朝向的对应关系,能够使得区间C的划分准确地贴合目标特征A的倾斜角α,使得目标特征A在对应的区间C产生阴影S,从而提高根据目标特征A的倾斜角α自动选取目标图层的准确率。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.

例如,在图8所示出的示例中,第四单向打光的方向D4为0度可以对应目标特征A(例如台阶的侧面)的朝向为朝向上方(也即Y轴正方向),第一单向打光的方向D1为90度可以对应目标特征A的朝向为朝向左边(也即X轴负方向),第三单向打光的方向D3为180度可以对应目标特征A的朝向为朝向下方(也即Y轴负方向),第二单向打光的方向D2为270度可以对应目标特征A的朝向为朝向右边(也即X轴正方向)。For example, in the example shown in Figure 8, the fourth unidirectional lighting direction D4 is 0 degrees, which can correspond to the orientation of the target feature A (such as the side of the step) being upward (that is, the positive direction of the Y-axis), the first unidirectional lighting direction D1 is 90 degrees, which can correspond to the orientation of the target feature A being toward the left (that is, the negative direction of the X-axis), the third unidirectional lighting direction D3 is 180 degrees, which can correspond to the orientation of the target feature A being downward (that is, the negative direction of the Y-axis), and the second unidirectional lighting direction D2 is 270 degrees, which can correspond to the orientation of the target feature A being toward the right (that is, the positive direction of the X-axis).

在一些示例中,多个区间C与多个测量图层可以具有对应关系。在一些示例中,多个区间C可以基于多个单向打光与多个测量图层建立一一对应的关系。具体而言,由于多个测量图层是在多个单向打光下分别拍摄工件2获得的,多个测量图层与多个单向打光可以具有对应关系,另外,多个区间C与多个单向打光也可以具有对应关系,因此,多个区间C可以与多个测量图层建立一一对应的关系。在这种情况下,通过将目标特征A的倾斜角α的范围划分为多个区间C且多个区间C与多个测量图层对应关联,能够便于根据目标特征A的倾斜角α所处的区间C准确地匹配对应的测量图层作为目标图层。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.

在一些示例中,在步骤S130中,可以基于由步骤S120获得的目标特征A的倾斜角α确定目标特征A的倾斜角α所处的区间C以获取目标特征A的倾斜角α对应的测量图层作为目标图层。在这种情况下,由于在每个测量图层中目标特征A产生的阴影S与目标特征A在拍摄视野中的姿态相关,根据目标特征A的倾斜角α所处的区间C能够准确地匹配对应的测量图层作为目标图层,也即根据目标特征A的倾斜角α自动选取最合适的测量图层进行目标特征A的识别,不仅能够简化测量过程的操作步骤,还能够提高目标特征A的识别精度和/或测量精度。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.

具体而言,可以根据目标特征A的倾斜角α的取值确定倾斜角α所处的区间C,基于倾斜角α所处的区间C对应的测量图层可以确定倾斜角α对应的测量图层,从而可以在多个测量图层中确定用于识别和/或测量目标特征A的目标图层。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.

在一些示例中,目标特征A在目标图层中的对比度可以满足预设要求。在一些示例中,目标特征A在目标图层中可以背向单向打光的方向。在一些示例中,在目标图层中沿单向打光的方向目标特征A的一侧可以为阴影S、另一侧可以受到光照(也即亮面G)。在这种情况下,能够提高目标特征A的对比度,使得目标特征A在测量图层中清晰地体现出来,从而提高识别出目标特征A的准确率。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.

在一些示例中,目标特征A可以在目标图层中产生阴影S。在一些示例中,目标特征A可以在目标图层中产生阴影S且目标特征A靠近单向打光的一侧受到光照。由此,能够提高目标特征A在目标图层中的对比度,使目标特征A的对比度满足预设要求。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.

在一些示例中,响应于目标特征A的倾斜角α处于分界线L,可以比较相邻两个区间C对应的两个测量图层中目标特征A的对比度,并且以目标特征A的对比度较高的测量图层作为目标图层。在这种情况下,通过以目标特征A的对比度较高的测量图层作为目标图层,能够提高目标特征A在测量图层中的清晰度,从而提高目标特征A的识别精度和测量精度。在一些示例中,倾斜角α处于分界线L可以表示倾斜角α的取值(或角度值)等于分界线L的角度值。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.

在一些示例中,响应于目标特征A的附近形成有倒角,可以调节多个光源12的高度以在单向打光的方向上使目标特征A产生阴影S且目标特征A靠近单向打光的一侧受到光照(也即亮面G)。在这种情况下,对于目标特征A的附近形成有倒角的情形,通过改变光源12的高度的方式,直至目标特征A的对比度满足预设要求,能够清晰地在测量图层中体现目标特征A的位置,从而便于准确地识别目标特征A,减少倒角对识别目标特征A的干扰。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.

在一些示例中,多个工件2的目标特征A的倾斜角α可以不同。在一些示例中,可以基于多个工件2的目标特征A的倾斜角α在多个测量图层中分别确定用于识别和/或测量各个工件2的目标特征A的多个目标图层。由此,能够便于实现对多个工件2的批量测量,从而提高对多个工件2的测量效率。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.

例如,以测量图层的数量为4个为例,在测量图层涉及多个工件2的情况下,无论是需要识别哪个工件2的目标特征A,都可以在4个测量图层中选取(也即确定)相应的目标图层。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.

图10是示出了本公开示例所涉及的确定目标区域的识别的第1实施方式的流程图。图11是示出了本公开示例所涉及的确定目标区域的识别的第2实施方式的流程图。Fig. 10 is a flowchart showing a first embodiment of the identification of a determination target area according to an example of the present disclosure. Fig. 11 is a flowchart showing a second embodiment of the identification of a determination target area according to an example of the present disclosure.

在一些示例中,调整工件应用图层的方法还可以包括:在获取多个工件2表面的各个特征的倾斜角α后,确定需要识别目标特征A的目标区域。在这种情况下,通过确定目标区域能够便于在目标区域内对目标特征A进行识别,从而提高目标特征A的识别效率。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.

在一些示例中,在自动测量工件2中,可以以自动的方式确定目标区域。在一些示例中,参见图10,确定目标区域可以包括:确定目标特征A的类型(步骤S132);基于工件2的设计图纸、工件2的位置和摆放角度自动计算目标特征A的位置(步骤S134);并且基于目标特征A的位置在初始图层中获取目标区域(步骤S136)。在这种情况下,通过自动方式获取目标区域,能够提高获取目标区域的效率和准确率,当在目标区域内对目标特征A进行识别时,能够提高识别目标特征A的效率和准确率。In some examples, in the automatic measurement of workpiece 2, the target area can be determined in an automatic manner. In some examples, referring to FIG. 10 , determining the target area can 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 the target feature A is identified in the target area, the efficiency and accuracy of identifying the target feature A can be improved.

在一些示例中,在步骤S132中,可以确定目标特征A的类型。也即,通过确定目标特征A的类型以使系统(也即光学测量仪器1)获取工件2表面需要识别和/或测量的特征的类型。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 .

在一些示例中,可以利用初始图层进行模板匹配以获取工件2的位置和摆放角度。在一些示例中,利用初始图层进行模板匹配可以获取工件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 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).

在一些示例中,在步骤S134中,可以根据步骤S132所确定的目标特征A的类型,基于工件2的设计图纸、工件2的位置和摆放角度自动计算目标特征A的位置。由此,能够提高获取目标特征A的位置的准确率。在一些示例中,在确定目标特征A的类型后,可以基于工件2的设计图纸、工件2的位置和摆放角度自动计算目标特征A在拍摄视野中的位置。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.

在一些示例中,在步骤S136中,可以基于目标特征A的位置在初始图层中获取目标区域,其中,目标区域可以是指拍摄视野中包含有目标特征A的区域。例如,可以根据目标特征A在初始图层中的位置自动确定对初始图层中的哪些区域进行识别以将目标特征A识别出来。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.

在一些示例中,调整工件应用图层的方法还可以包括:在目标图层中对目标区域进行识别以获取目标特征A。在这种情况下,由于先确定目标区域且目标区域即为目标特征A所处的区域,通过在目标图层中对目标区域进行识别,能够提高识别目标特征A的效率和准确率。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.

在一些示例中,响应于获取目标区域,可以将初始图层切换为目标图层,并在目标图层中对目标区域进行识别以获取目标特征A。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.

在一些示例中,步骤S132至步骤S136以及识别目标特征A的步骤(即在目标图层中对目标区域进行识别以获取目标特征A)可以依次重复执行直至在在目标图层中识别出测量所需的所有目标特征A。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.

在一些示例中,在测量图层涉及多个工件2的情况下,可以在执行对目标特征A进行识别或测量后,光学测量仪器1可以依次根据各个工件2的摆放角度和对应的目标特征A的倾斜角α自动选择目标图层并识别出目标特征A在各个工件2上的位置或给出测量结果。通过制定统一的分类规则,自动针对每个工件2在不同测量图层的表现(例如呈现的姿态)选取对应的目标图层,由此能够大幅提高测量效率,减少人工逐个对工件2进行观察的工作量。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.

在一些示例中,在人工测量工件2中,可以以人工的方式确定目标区域。在一些示例中,参见图11,确定目标区域还可以包括:人工选择目标特征A的类型(步骤S131);并且人工在初始图层中框选包含有目标特征A的区域以获取目标区域(步骤S133)。在这种情况下,通过手动方式获取目标区域,能够灵活且便捷地确定目标区域,从而能够提高识别目标特征A的灵活性和便捷性,进而提高测量目标特征A的灵活性和便捷性。In some examples, in the manual measurement of the workpiece 2, the target area can be determined manually. In some examples, referring to FIG. 11, determining the target area can also 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.

在一些示例中,在步骤S131中,可以根据测量需求人工选择目标特征A的类型。In some examples, in step S131 , the type of target feature A may be manually selected according to measurement requirements.

在一些示例中,在步骤S133中,可以根据步骤S131所选择的目标特征A的类型以及测量需求,人工在初始图层中框选包含有目标特征A的区域以获取目标区域。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.

图12是示出了本公开示例所涉及的调整工件应用图层的方法另一个实施例的流程图。FIG. 12 is a flow chart showing another embodiment of a method for adjusting a workpiece application layer according to an example of the present disclosure.

在一些示例中,参见图12,调整工件应用图层的方法还可以包括:在目标图层中识别目标特征A并显示识别出的目标特征A(步骤S140);并且在目标图层中对目标特征A进行测量(步骤S150)。In some examples, referring to 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 ).

在一些示例中,在步骤S140中,可以在目标图层中识别目标特征A并显示识别出的目标特征A。也即,基于目标特征A的倾斜角α确定目标图层后,可以利用目标区域在目标图层中识别出目标特征A并显示识别出的目标特征A。在这种情况下,在目标图层中对目标特征A进行识别能够提高目标特征A的识别精度;另外,通过在目标图层中显示识别出的目标特征A能够便于用户直观地判断识别出的目标特征A是否符合测量需求。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.

在一些示例中,在步骤S150中,可以在目标图层中对目标特征A进行测量以获取测量结果。由此,在目标图层中对目标特征A进行测量能够提高目标特征A的测量精度。在一些示例中,测量结果可以包括例如线条的长度、两个线条之间的距离以及圆的半径等。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.

图13是示出了本公开示例所涉及的摆放过程的流程图。FIG. 13 is a flow chart showing the placement process involved in the example of the present disclosure.

在一些示例中,返回参见图1,光学测量仪器1可以包括载物台10,载物台10可以用于放置工件2。在一些示例中,当载物台10上的工件2到达一定数量后,载物台10可以承载着工件2将工件2转移至检测工位,在检测工位可以对工件2的目标特征A进行识别和/或测量。In some examples, referring back to FIG. 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.

在一些示例中,调整工件应用图层的方法还可以包括将工件2从上料工位移动至光学测量仪器1的载物台10的摆放过程。在一些示例中,通过摆放过程可以对工件2在载物台10的摆放角度进行限定(例如,令工件2的某个边缘可以平行于指定方向DA)。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).

在一些示例中,若工件2的数量为多个,经摆放过程处理后,多个工件2在载物台10的摆放角度可以统一(例如,多个工件2的某个边缘均平行于指定方向DA)。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).

在一些示例中,参见图13,摆放过程可以包括:拍摄位于上料工位的工件2以获取原始图层(步骤S210);利用原始图层进行模板匹配以获取工件2的原始摆放角度(步骤S220);基于原始摆放角度和工件2位于载物台10的预设摆放角度获取旋转工件2的目标角度(步骤S230);并且令工件2旋转目标角度后放置于载物台10(步骤S240)。在这种情况下,能够使得工件2以预设摆放角度放置于载物台10,从而使得多个工件2位于载物台10的摆放角度(也即姿态)尽可能统一,进而使得多个工件2表面的目标特征A的倾斜角α也尽可能处于同一个区间C,在识别和/或测量目标特征A时能够减少所使用的目标图层的数量(也即减少切换目标图层的次数),从而提高测量效率。In some examples, referring to 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 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., the number of times the target layer is switched is reduced), thereby improving the measurement efficiency.

在一些示例中,在步骤S210中,可以拍摄位于上料工位的工件2以获取原始图层。其中,原始图层可以表示位于上料工位的工件2的图像。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.

在一些示例中,可以利用大视野的相机拍摄位于上料工位的工件2以获取原始图层。在这种情况下,能够增加原始图层中工件2的数量,从而有利于提高摆放过程的处理效率。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.

在一些示例中,在步骤S220中,可以以原始图层中工件2的轮廓(也即外轮廓)为判断基准进行模板匹配以获取工件2的原始摆放角度。其中,工件2的原始摆放角度可以表示工件2在上料工位的摆放角度。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.

在一些示例中,模板匹配可以是指将原始图层与工件2的设计文件进行比对。在一些示例中,可以以原始图层中工件2的外轮廓为判断基准进行模板匹配以获取工件2的原始摆放角度。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.

在一些示例中,在步骤S230中,可以基于原始摆放角度和工件2位于载物台10的预设摆放角度获取旋转工件2的目标角度。也就是说,可以基于原始摆放角度与预设摆放角度的差值确定上料工位的工件2为回归到预设摆放角度需要旋转的角度。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.

在一些示例中,工件2位于载物台10的预设摆放角度可以由系统或人工指定。在一些示例中,工件2位于载物台10的预设摆放角度可以是指工件2的边缘平行于指定方向DA,另外,该指定方向DA可以由系统或人工设定。例如,对于矩形的工件2,预设摆放角度可以是指工件2的边缘与载物台10的边缘大致平行。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.

在一些示例中,在步骤S240中,可以令工件2旋转目标角度后放置于载物台10。具体而言,在确定目标角度后,可以利用机械臂从上料工位取出工件2并将工件2旋转目标角度后以预设摆放角度放置于载物台10。In some examples, in step S240, the workpiece 2 may be rotated to a target angle and placed on the stage 10. Specifically, after determining the target angle, 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.

虽然以上结合附图和示例对本公开进行了具体说明,但是可以理解,上述说明不以任何形式限制本公开。本领域技术人员在不偏离本公开的实质精神和范围的情况下可以根据需要对本公开进行变形和变化,这些变形和变化均落入本公开的范围内。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 (10)

1.一种根据模板匹配获取角度以调整工件应用图层的方法,是光学测量仪器为识别多个工件表面的目标特征而从多个测量图层中确定目标图层的方法,其特征在于,包括:1. A method for adjusting the applied layer of a workpiece by obtaining 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 multiple workpiece surfaces, characterized in that it includes: 在多个单向打光下分别拍摄多个工件并获取多个与所述单向打光对应的测量图层,其中,多个所述单向打光由以环绕方式设置于多个工件上方的多个光源实现;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.根据权利要求1所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.根据权利要求1所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.根据权利要求3所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,4. The method for adjusting the workpiece application layer by obtaining an angle based on template matching according to claim 3, characterized in that: 利用所述初始图层进行模板匹配以获取多个工件的位置和摆放角度,The initial layer is used to perform template matching to obtain the positions and placement angles of multiple workpieces. 确定所述目标区域包括:Determining the target area includes: 确定所述目标特征的类型;determining a type of the target feature; 基于工件的设计图纸、多个工件的位置和摆放角度自动计算所述目标特征的位置;并且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.根据权利要求3所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.根据权利要求4或5所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.根据权利要求1所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.根据权利要求7所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.根据权利要求1所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.根据权利要求1所述的根据模板匹配获取角度以调整工件应用图层的方法,其特征在于,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.
CN202411395537.2A 2024-10-08 2024-10-08 Method for obtaining angle based on template matching to adjust the applied layer of workpiece Active CN118887519B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411395537.2A CN118887519B (en) 2024-10-08 2024-10-08 Method for obtaining angle based on template matching to adjust the applied layer of workpiece

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411395537.2A CN118887519B (en) 2024-10-08 2024-10-08 Method for obtaining angle based on template matching to adjust the applied layer of workpiece

Publications (2)

Publication Number Publication Date
CN118887519A true CN118887519A (en) 2024-11-01
CN118887519B CN118887519B (en) 2025-01-17

Family

ID=93232994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411395537.2A Active CN118887519B (en) 2024-10-08 2024-10-08 Method for obtaining angle based on template matching to adjust the applied layer of workpiece

Country Status (1)

Country Link
CN (1) CN118887519B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5038258A (en) * 1989-03-02 1991-08-06 Carl-Zeiss-Stiftung Illuminating arrangement for illuminating an object with incident light
CN104145276A (en) * 2012-01-17 2014-11-12 厉动公司 Enhanced contrast for object detection and characterization by optical imaging
CN110892413A (en) * 2017-08-22 2020-03-17 富士胶片富山化学株式会社 Medicine identification device, image processing device, image processing method, and program
CN115222956A (en) * 2022-07-15 2022-10-21 深圳市中图仪器股份有限公司 Measuring system and measuring method for importing multiple layers
CN115930783A (en) * 2023-01-06 2023-04-07 广东普密斯视觉技术有限公司 Image measuring instrument
US20240274431A1 (en) * 2023-02-13 2024-08-15 Disco Corporation Wafer, and front/back surface determination method for wafer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5038258A (en) * 1989-03-02 1991-08-06 Carl-Zeiss-Stiftung Illuminating arrangement for illuminating an object with incident light
CN104145276A (en) * 2012-01-17 2014-11-12 厉动公司 Enhanced contrast for object detection and characterization by optical imaging
CN110892413A (en) * 2017-08-22 2020-03-17 富士胶片富山化学株式会社 Medicine identification device, image processing device, image processing method, and program
CN115222956A (en) * 2022-07-15 2022-10-21 深圳市中图仪器股份有限公司 Measuring system and measuring method for importing multiple layers
CN115930783A (en) * 2023-01-06 2023-04-07 广东普密斯视觉技术有限公司 Image measuring instrument
US20240274431A1 (en) * 2023-02-13 2024-08-15 Disco Corporation Wafer, and front/back surface determination method for wafer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张巧芬;高健;: "机器视觉中照明技术的研究进展", 照明工程学报, no. 02, 15 April 2011 (2011-04-15) *

Also Published As

Publication number Publication date
CN118887519B (en) 2025-01-17

Similar Documents

Publication Publication Date Title
TWI558996B (en) System and method for capturing illumination reflected in multiple directions
US7421108B2 (en) Method and apparatus for detecting a workpiece, and method and apparatus for inspecting a workpiece
CN102439708B (en) Check method and the connected structure inspection machine of the connected structure of substrate
US7079678B2 (en) Electronic component products made according to a process that includes a method for three dimensional inspection
CN110308153A (en) Metal workpiece defect detection method, system, storage medium, and device based on monocular stereo vision
WO2004011876A1 (en) Apparatus and method for automatically arranging three dimensional scan data using optical marker
JP6322335B2 (en) Appearance inspection device
JP2007240434A (en) Surface condition testing method and surface condition testing device
JP2010122777A (en) Workpiece identifying method and workpiece identifying device
CN113500593A (en) Method for grabbing designated part of shaft workpiece for loading
CN114088738A (en) High-precision defect detection method and device for annular welding seam
JP7119584B2 (en) Three-dimensional measuring device, position display method and program for three-dimensional measuring device
CN118887519A (en) Method for obtaining angle based on template matching to adjust the applied layer of workpiece
JP2020197983A (en) Object measurement method, measuring device, program, and computer-readable recording medium
JP2017198470A (en) Measurement device, measurement method, system, and goods manufacturing method
JP6624911B2 (en) Measuring device, measuring method and article manufacturing method
JP7458733B2 (en) Image processing method, image processing device, robot system, article manufacturing method using robot system, inspection method, control program, and recording medium
CN115615350A (en) Detection method and system thereof
WO2020124460A1 (en) Image acquisition method and system
CN117881959A (en) Appearance inspection device and appearance inspection method
JP5280918B2 (en) Shape measuring device
TWI747500B (en) Automatic image capturing method and apparatus for object
JP2016161331A (en) Surface inspection apparatus and surface inspection method
CN118521564B (en) Circuit board defect detection system and method
WO2022202655A1 (en) Three-dimensional measurement system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Huo Kuo

Inventor after: Lai Shenghui

Inventor before: Huo Kuo

Inventor before: Lai Shenghui

GR01 Patent grant
GR01 Patent grant