WO2017107533A1 - 一种电子元件样本标注方法及装置 - Google Patents

一种电子元件样本标注方法及装置 Download PDF

Info

Publication number
WO2017107533A1
WO2017107533A1 PCT/CN2016/096888 CN2016096888W WO2017107533A1 WO 2017107533 A1 WO2017107533 A1 WO 2017107533A1 CN 2016096888 W CN2016096888 W CN 2016096888W WO 2017107533 A1 WO2017107533 A1 WO 2017107533A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic component
matching
value
component samples
samples
Prior art date
Application number
PCT/CN2016/096888
Other languages
English (en)
French (fr)
Inventor
林建民
Original Assignee
广州视源电子科技股份有限公司
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 广州视源电子科技股份有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2017107533A1 publication Critical patent/WO2017107533A1/zh

Links

Images

Classifications

    • 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/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • 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

Definitions

  • the invention relates to the field of automatic optical detection, and in particular to a method and device for marking electronic components.
  • Automated Optical Inspection is an effective method for industrial automation. It uses machine vision as a standard for inspection and is widely used in LCD/TFT, transistor and PCB industry processes. Automated optical inspection is a common method commonly used in industrial processes. It uses optical methods to obtain the surface state of finished products, and image processing to detect foreign matter or pattern anomalies.
  • the identification and labeling of electronic component samples is becoming more and more important for automated optical inspection systems.
  • the identification and labeling of electronic component samples can be used not only as a training model to improve the polarity recognition of (polar) electronic components. It can also be used to detect the leakage of electronic components (the leakage of electronic components is a two-class identification case).
  • the embodiment of the invention provides a method and a device for marking an electronic component sample, which can improve the labeling efficiency of the electronic component sample.
  • Embodiments of the present invention provide a method for labeling electronic component samples, including:
  • the matching the image of each of the electronic component samples with the template image to obtain the matching value of each of the electronic component samples includes:
  • the image of each of the electronic component samples is secondarily matched with the template image to obtain a matching value of each of the electronic component samples.
  • the matching the image of each of the electronic component samples with the template image to obtain the first matching value of each of the electronic component samples includes:
  • a template matching algorithm is used to match an image of each of the electronic component samples with the template image, and a first matching value of each of the electronic component samples is calculated.
  • the image of the electronic component sample is matched with the template image to obtain a matching value of each of the electronic component samples, which specifically includes:
  • the image of each of the electronic component samples is secondarily matched with the template image, and a second matching value of each of the electronic component samples is calculated;
  • the sorting the N electronic component samples according to the matching degree value, and identifying and marking the required electronic component samples from the sorted N electronic component samples specifically include:
  • an embodiment of the present invention further provides an electronic component sample labeling apparatus, including:
  • a sample image obtaining module configured to acquire an image of the N electronic component samples to be identified; wherein, N ⁇ 1;
  • a matching module configured to match an image of each electronic component sample with a template image to obtain a matching value of each of the electronic component samples
  • the identification labeling module is configured to sort the N electronic component samples according to the matching degree value, and identify and label the required electronic component samples from the sorted N electronic component samples.
  • the matching module specifically includes:
  • a first matching unit configured to match an image of each of the electronic component samples with the template image to obtain a first matching value of each of the electronic component samples
  • a calculating unit configured to calculate an average value of the minimum M first matching values; wherein, M ⁇ 1;
  • a determining unit configured to determine whether the average value is less than a preset threshold
  • a matching degree value obtaining unit configured to use, as the matching degree value, the first matching value of each electronic component sample when the determining unit determines to be YES;
  • a second matching unit configured to perform a second matching of the image of each of the electronic component samples and the template image when the determining unit determines to be no, to obtain a matching value of each of the electronic component samples.
  • the first matching unit is specifically configured to use a template matching algorithm to match an image of each electronic component sample with the template image, and calculate a first matching value of each electronic component sample.
  • the second matching unit specifically includes:
  • a matching value calculation subunit configured to perform a second matching on the image of each of the electronic component samples and the template image by using a texture information matching algorithm, and obtain a second matching value of each of the electronic component samples;
  • a matching degree value obtaining subunit configured to calculate the first matching value of each of the electronic component samples And an average of the second matching values, and the calculated average value is used as the matching value of the electronic component sample.
  • identification and labeling module specifically includes:
  • a sorting unit configured to sort the N electronic component samples in ascending order according to the matching degree value, and divide the N electronic component samples into P groups according to an arrangement order;
  • the identification unit is configured to separately identify each set of electronic component samples and label the identified required electronic component samples.
  • the electronic component sample labeling method and device provided by the embodiments of the present invention can match the image of each electronic component sample with the template image, and sort all the electronic component samples according to the matching degree information of each electronic component sample after matching. Therefore, the required electronic component samples are quickly labeled from the sorted electronic component samples, and the labeling efficiency of the electronic component samples is improved.
  • the template matching is performed first, and when the result of the template matching does not reach the expected effect, the texture information matching is performed to improve the accuracy of the matching degree, thereby improving the accuracy of the sorting. Sex, thereby improving the labeling efficiency of electronic component samples.
  • FIG. 1 is a schematic flow chart of an embodiment of an electronic component sample labeling method provided by the present invention
  • step S2 is a schematic flow chart of an embodiment of step S2 in the method for labeling electronic component samples provided by the present invention
  • FIG. 3 is a schematic structural view of an embodiment of an electronic component sample labeling device provided by the present invention.
  • FIG. 4 is a schematic structural view of an embodiment of a matching module in an electronic component sample labeling device provided by the present invention.
  • a schematic flowchart of an embodiment of an electronic component sample labeling method provided by the present invention includes:
  • the image of the N electronic component samples to be labeled is an image of all electronic component samples in the sample database to be labeled.
  • the images of each electronic component sample are respectively matched with the template image, thereby obtaining the matching degree value Q i of each electronic component sample.
  • the template image is an image of a desired electronic component sample, that is, a positive sample image
  • i is an id of an image of each electronic component sample stored in the sample database, that is, a file name of an image of each electronic component sample.
  • the N electronic component samples are sorted according to the matching degree value, and the sorted N electronic component samples are identified and labeled to obtain a positive sample.
  • the matching the image of each of the electronic component samples with the template image to obtain the matching value of each of the electronic component samples includes:
  • step S23 Determine whether the average value is less than a preset threshold; if yes, execute step S24, if no, Go to step S25;
  • the first matching value of each of the electronic component samples is used as a matching value thereof.
  • the image of each electronic component sample is first matched with the template image to obtain a first matching value S i of each electronic component sample.
  • the average of the smallest M first matching values is calculated and compared to a threshold to determine if the N electronic component samples require a secondary match. If the average value is less than the threshold, it indicates that the M electronic component samples with poor matching have fewer positive samples or no positive samples, and the first matching value S i can be directly used as the matching value Q i of the electronic component samples; If the value is less than the threshold, it means that most of the M electronic component samples with poor matching are positive samples, and the first-level matching does not achieve the expected matching effect.
  • the N electronic component samples need to be matched twice, so according to the second matching result. Obtain the matching value Q i of the electronic component sample.
  • the image of the M electronic component samples having the smallest first matching value is displayed on a picture in a sub-picture manner, and the sub-pictures of the positive samples in the picture are manually visually inspected. The number is used to determine whether N electronic component samples need to be matched twice. If the manual visually detects that the picture contains fewer positive sample sub-pictures or no positive sample sub-pictures, the first matching value S i may be directly used as the matching degree value Q i of the electronic component samples; The picture contains most of the positive sample sub-pictures, indicating that the first-level matching does not achieve the expected matching effect, and the N electronic component samples need to be matched twice, so as to obtain the matching value of the electronic component samples according to the second matching result. i .
  • the matching the image of each of the electronic component samples with the template image to obtain the first matching value of each of the electronic component samples includes:
  • a template matching algorithm is used to match an image of each of the electronic component samples with the template image, and a first matching value of each of the electronic component samples is calculated.
  • the image of the electronic component sample is matched with the template image to obtain a matching value of each of the electronic component samples, which specifically includes:
  • the image of each of the electronic component samples is secondarily matched with the template image, and a second matching value of each of the electronic component samples is calculated;
  • the LBP Local Binary Patterns
  • the texture information matching algorithm is used to match the image of each electronic component sample with the template image, and the calculation is performed.
  • the similarity D i of the electronic component samples is performed.
  • the LBP feature matching method is a histogram intersection method.
  • an average value of the first matching value S i and the second matching value L i is obtained to obtain a matching degree value Q i of each electronic component sample.
  • the sorting the N electronic component samples according to the matching degree value, and identifying and marking the required electronic component samples from the sorted N electronic component samples specifically include:
  • Each set of electronic component samples is identified separately, and the identified required electronic component samples are labeled.
  • the N electronic component samples are sorted according to the matching degree value from small to large, and then the N electronic component samples are divided into P groups in order, and each set of electronic component samples is separately identified and labeled.
  • the images of each set of electronic component samples can be combined in a large picture in the form of a sub-picture, and each large picture is separately provided to the manual for visual inspection.
  • the identification process there are fewer positive samples in the electronic component samples in the front group, and more positive samples in the electronic component samples in the lower group, so that the rapid identification of the electronic component samples can be realized.
  • the identified positive samples are marked, and the unlabeled electronic component samples are automatically marked as negative samples, thereby improving the The efficiency of labeling electronic component samples is required.
  • the electronic component sample labeling method provided by the embodiment of the invention can match the image of each electronic component sample with the template image, and sort all the electronic component samples according to the matching degree information of each electronic component sample after matching, thereby The sorted electronic component samples quickly mark out the required electronic component samples to improve the labeling efficiency of the electronic component samples.
  • the template matching is performed first, and when the result of the template matching does not reach the expected effect, the texture information matching is performed to improve the accuracy of the matching degree, thereby improving the accuracy of the sorting. Sex, thereby improving the labeling efficiency of electronic component samples.
  • the present invention also provides an electronic component sample labeling apparatus, which can implement all the processes of the electronic component sample labeling method in the above embodiment.
  • FIG. 3 is a schematic structural diagram of an embodiment of an electronic component sample labeling apparatus provided by the present invention, including:
  • a sample image obtaining module 1 for acquiring an image of N electronic component samples to be identified; wherein N ⁇ 1;
  • a matching module 2 configured to match an image of each electronic component sample with a template image to obtain a matching value of each of the electronic component samples
  • the identification labeling module 3 is configured to sort the N electronic component samples according to the matching degree value, and identify and mark the required electronic component samples from the sorted N electronic component samples.
  • the matching module 2 specifically includes:
  • a first matching unit 21 configured to match an image of each of the electronic component samples with the template image to obtain a first matching value of each of the electronic component samples
  • the calculating unit 22 is configured to calculate an average value of the minimum M first matching values; wherein, M ⁇ 1;
  • the determining unit 23 is configured to determine whether the average value is less than a preset threshold
  • the matching degree value obtaining unit 24 is configured to, when the determining unit determines to be YES, use the first matching value of each electronic component sample as its matching degree value;
  • a second matching unit 25 configured to: when the determining unit determines to be no, each of the electronic components The image of the sample is secondarily matched with the template image to obtain a matching value of each of the electronic component samples.
  • the first matching unit is specifically configured to use a template matching algorithm to match an image of each electronic component sample with the template image, and calculate a first matching value of each electronic component sample.
  • the second matching unit specifically includes:
  • a matching value calculation subunit configured to perform a second matching on the image of each of the electronic component samples and the template image by using a texture information matching algorithm, and obtain a second matching value of each of the electronic component samples;
  • a matching degree value obtaining subunit configured to calculate an average value of the first matching value and the second matching value of each electronic component sample, and use the calculated average value as a matching of the electronic component sample Degree value.
  • identification and labeling module specifically includes:
  • a sorting unit configured to sort the N electronic component samples in ascending order according to the matching degree value, and divide the N electronic component samples into P groups according to an arrangement order;
  • the identification unit is configured to separately identify each set of electronic component samples and label the identified required electronic component samples.
  • the electronic component sample identification device can match the image of each electronic component sample with the template image, and sort all the electronic component samples according to the matching degree information of each electronic component sample after matching, thereby The sorted electronic component samples quickly mark out the required electronic component samples to improve the labeling efficiency of the electronic component samples.
  • the template matching is performed first, and when the result of the template matching does not reach the expected effect, the texture information matching is performed to improve the accuracy of the matching degree, thereby improving the accuracy of the sorting. Sex, thereby improving the labeling efficiency of electronic component samples.

Abstract

本发明公开了一种电子元件样本标注方法,包括:获取待标注的N个电子元件样本的图像;其中,N≥1;将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值;根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中标注出所需的电子元件样本。相应的,本发明还公开了一种电子元件样本标注装置。采用本发明实施例,能够提高电子元件样本的标注效率。

Description

一种电子元件样本标注方法及装置 技术领域
本发明涉及自动光学检测领域,尤其涉及一种电子元件样本标注方法及装置。
背景技术
自动光学检测(AOI,Automated Optical Inspection)为工业自动化有效的检测方法,使用机器视觉作为检测标准技术,大量应用于LCD/TFT、晶体管与PCB工业制程上。自动光学检测是工业制程中常见的代表性手法,利用光学方式取得成品的表面状态,以影像处理来检出异物或图案异常等瑕疵。
对电子元件样本进行识别和标注对自动光学检测系统来说越来越重要,识别并标注出的电子元件样本,不但可以用来作为训练模型,提高(有极性)电子元件的极性识别效果,也可以用来检测电子元件的漏件情况(电子元件的漏件是一种二分类识别情况)。
目前,现有技术中最常见的电子元件样本标注方法是通过全人工识别标注方法,即人工遍历所有待识别的电子元件样本,并对每个电子元件样本进行识别,进而标注标签。这种全人工的标注方法速度慢、效率低,及其耗时耗力。
发明内容
本发明实施例提出一种电子元件样本标注方法及装置,能够提高电子元件样本的标注效率。
本发明实施例提供一种电子元件样本标注方法,包括:
获取待标注的N个电子元件样本的图像;其中,N≥1;
将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值;
根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本。
进一步地,所述将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值,具体包括:
将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值;
计算最小的M个第一匹配值的平均值;其中,M≥1;
判断所述平均值是否小于预设的阈值;
若是,则将所述每个电子元件样本的第一匹配值作为其匹配度值;
若否,则将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值。
进一步地,所述将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值,具体包括:
采用模板匹配算法,将所述每个电子元件样本的图像与所述模板图像进行匹配,计算获得所述每个电子元件样本的第一匹配值。
进一步地,所述将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值,具体包括:
采用纹理信息匹配算法,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,计算获得所述每个电子元件样本的第二匹配值;
计算所述每个电子元件样本的所述第一匹配值和所述第二匹配值的平均值,并将计算获得的平均值作为所述电子元件样本的匹配度值。
进一步地,所述根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本,具体包括:
根据所述匹配度值对所述N个电子元件样本进行升序排列,并按照排列顺序将N个电子元件样本划分为P组;P≥1;
分别对每组电子元件样本进行识别,并对识别出的所需的电子元件样本进 行标注。
相应的,本发明实施例还提供一种电子元件样本标注装置,包括:
样本图像获取模块,用于获取待识别的N个电子元件样本的图像;其中,N≥1;
匹配模块,用于将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值;以及,
识别标注模块,用于根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本。
进一步地,所述匹配模块具体包括:
第一匹配单元,用于将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值;
计算单元,用于计算最小的M个第一匹配值的平均值;其中,M≥1;
判断单元,用于判断所述平均值是否小于预设的阈值;
匹配度值获取单元,用于在所述判断单元判定为是时,将所述每个电子元件样本的第一匹配值作为其匹配度值;以及,
第二匹配单元,用于在所述判断单元判定为否时,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值。
进一步地,所述第一匹配单元具体用于采用模板匹配算法,将所述每个电子元件样本的图像与所述模板图像进行匹配,计算获得所述每个电子元件样本的第一匹配值。
进一步地,所述第二匹配度单元具体包括:
匹配值计算子单元,用于采用纹理信息匹配算法,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,计算获得所述每个电子元件样本的第二匹配值;以及,
匹配度值获取子单元,用于计算所述每个电子元件样本的所述第一匹配值 和所述第二匹配值的平均值,并将计算获得的平均值作为所述电子元件样本的匹配度值。
进一步地,所述识别标注模块具体包括:
排序单元,用于根据所述匹配度值对所述N个电子元件样本进行升序排列,并按照排列顺序将N个电子元件样本划分为P组;以及,
识别标注单元,用于分别对每组电子元件样本进行识别,并对识别出的所需的电子元件样本进行标注。
实施本发明实施例,具有如下有益效果:
本发明实施例提供的电子元件样本标注方法及装置,能够将每个电子元件样本的图像与模板图像进行匹配,并根据匹配后每个电子元件样本的匹配度信息对所有电子元件样本进行排序,从而从排序后的电子元件样本中快速标注出所需的电子元件样本,提高电子元件样本的标注效率。
而且,在对每个电子元件样本的图像进行匹配时,先进行模板匹配,在模板匹配的结果未达到预期效果时,再进行纹理信息匹配,以提高匹配度的准确性,进而提高排序的准确性,从而提高电子元件样本的标注效率。
附图说明
图1是本发明提供的电子元件样本标注方法的一个实施例的流程示意图;
图2是本发明提供的电子元件样本标注方法中步骤S2的一个实施例的流程示意图;
图3是本发明提供的电子元件样本标注装置的一个实施例的结构示意图;
图4是本发明提供的电子元件样本标注装置中匹配模块的一个实施例的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是 全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1,本发明提供的电子元件样本标注方法的一个实施例的流程示意图,包括:
S1、获取待标注的N个电子元件样本的图像;其中,N≥1;
S2、将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值;
S3、根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本。
需要说明的是,待标注的N个电子元件样本的图像为待标注的样本数据库中所有的电子元件样本的图像。在获取N个电子元件样本的图像后,分别将每个电子元件样本的图像与模板图像进行匹配,从而获得每个电子元件样本的匹配度值Qi。其中,模板图像为所需电子元件样本的图像,即正样本图像,而i为每个电子元件样本的图像保存在样本数据库中的id,即每个电子元件样本的图像的文件名。在获取匹配度值后,按照匹配度值的大小对N个电子元件样本进行排序,并对排序后的N个电子元件样本进行识别和标注,获得正样本。另外,在对N个电子元件样本进行排序后,还可提供人工进行目检识别,通过人工点击选择电子元件样本的图像,将该电子元件样本标注为正样本,而其余未选择的电子元件样本则自动标注为负样本。按照每个电子元件样本与正样本模板的匹配度进行排序,进而从排序后的电子元件样本中识别并标注出正样本,有效提高电子元件样本的标注效率。
进一步地,如图2所示,所述将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值,具体包括:
S21、将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值;
S22、计算最小的M个第一匹配值的平均值;其中,M≥1;
S23、判断所述平均值是否小于预设的阈值;若是,则执行步骤S24,若否, 执行步骤S25;
S24、将所述每个电子元件样本的第一匹配值作为其匹配度值;
S25、将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值。
需要说明的是,在获取匹配度值时,先将每个电子元件样本的图像与模板图像进行一级匹配,获得每个电子元件样本的第一匹配值Si。在一个优选地实施方式中,计算最小的M个第一匹配值的平均值,并将该平均值与阈值进行比较以判断N个电子元件样本是否需要进行二次匹配。若平均值小于阈值,则说明匹配度较差的M个电子元件样本具有较少正样本或没有正样本,可直接将第一匹配值Si作为电子元件样本的匹配度值Qi;若平均值小于阈值,则说明匹配度较差的M个电子元件样本大部分为正样本,一级匹配未达到预期的匹配效果,需对N个电子元件样本进行二次匹配,从而根据二次匹配结果获取电子元件样本的匹配度值Qi
在另一个优选地实施方式中,将第一匹配值最小的M个电子元件样本的图像以子图的方式显示在一张图片上,并通过人工目检该图片中为正样本的子图片的数量来判断N个电子元件样本是否需要进行二次匹配。若人工目检出该图片中包含较少的正样本子图片或没有正样本子图片,则可直接将第一匹配值Si作为电子元件样本的匹配度值Qi;若人工目检出该图片中包含大部分的正样本子图片,则说明一级匹配未达到预期的匹配效果,需对N个电子元件样本进行二次匹配,从而根据二次匹配结果获取电子元件样本的匹配度值Qi
进一步地,所述将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值,具体包括:
采用模板匹配算法,将所述每个电子元件样本的图像与所述模板图像进行匹配,计算获得所述每个电子元件样本的第一匹配值。
进一步地,所述将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值,具体包括:
采用纹理信息匹配算法,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,计算获得所述每个电子元件样本的第二匹配值;
计算所述每个电子元件样本的所述第一匹配值和所述第二匹配值的平均值,并将计算获得的平均值作为所述电子元件样本的匹配度值。
需要说明的是,在二次匹配中,采用LBP(Local Binary Patterns,局部二值模式)特征匹配方法,即纹理信息匹配算法来将每个电子元件样本的图像与模板图像进行匹配,计算获得每个电子元件样本的相似度Di
其中,LBP特征匹配方法为直方图相交法,由于根据该方法计算出的相似度Di为0时,表示两个图像完全相似,相似度Di为1时,表示两个图像完全不相似,即两个图像越相似,相似度Di越小,则还需根据相似度Di计算获得每个电子元件样本的第二匹配值Li=1-Di。最后,求取第一匹配值Si和第二匹配值Li的平均值,获得每个电子元件样本的匹配度值Qi
进一步地,所述根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本,具体包括:
根据所述匹配度值对所述N个电子元件样本进行升序排列,并按照排列顺序将N个电子元件样本划分为P组;P≥1;
分别对每组电子元件样本进行识别,并对识别出的所需的电子元件样本进行标注。
其中,一般按照匹配度值的大小从小到大对N个电子元件样本进行排序,再按照顺序将N个电子元件样本划分为P组,并分别对每组电子元件样本进行识别和标注。另外,还可将每组电子元件样本的图像以子图片的形式组合在一张大图里,并分别将每张大图提供给人工进行目检识别。在识别过程中,组别靠前的电子元件样本中具有的正样本较少,组别靠后的电子元件样本中具有的正样本较多,从而能实现对电子元件样本的快速识别,识别后,对识别出的正样本进行标注,而未被标注的电子元件样本则自动标注为负样本,从而提高所 需电子元件样本的标注效率。
本发明实施例提供的电子元件样本标注方法,能够将每个电子元件样本的图像与模板图像进行匹配,并根据匹配后每个电子元件样本的匹配度信息对所有电子元件样本进行排序,从而从排序后的电子元件样本中快速标注出所需的电子元件样本,提高电子元件样本的标注效率。而且,在对每个电子元件样本的图像进行匹配时,先进行模板匹配,在模板匹配的结果未达到预期效果时,再进行纹理信息匹配,以提高匹配度的准确性,进而提高排序的准确性,从而提高电子元件样本的标注效率。
相应的,本发明还提供一种电子元件样本标注装置,能够实现上述实施例中的电子元件样本标注方法的所有流程。
参见图3,是本发明提供的电子元件样本标注装置的一个实施例的结构示意图,包括:
样本图像获取模块1,用于获取待识别的N个电子元件样本的图像;其中,N≥1;
匹配模块2,用于将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值;以及,
识别标注模块3,用于根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本。
进一步地,如图4所示,所述匹配模块2具体包括:
第一匹配单元21,用于将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值;
计算单元22,用于计算最小的M个第一匹配值的平均值;其中,M≥1;
判断单元23,用于判断所述平均值是否小于预设的阈值;
匹配度值获取单元24,用于在所述判断单元判定为是时,将所述每个电子元件样本的第一匹配值作为其匹配度值;以及,
第二匹配单元25,用于在所述判断单元判定为否时,将所述每个电子元件 样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值。
进一步地,所述第一匹配单元具体用于采用模板匹配算法,将所述每个电子元件样本的图像与所述模板图像进行匹配,计算获得所述每个电子元件样本的第一匹配值。
进一步地,所述第二匹配度单元具体包括:
匹配值计算子单元,用于采用纹理信息匹配算法,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,计算获得所述每个电子元件样本的第二匹配值;以及,
匹配度值获取子单元,用于计算所述每个电子元件样本的所述第一匹配值和所述第二匹配值的平均值,并将计算获得的平均值作为所述电子元件样本的匹配度值。
进一步地,所述识别标注模块具体包括:
排序单元,用于根据所述匹配度值对所述N个电子元件样本进行升序排列,并按照排列顺序将N个电子元件样本划分为P组;以及,
识别标注单元,用于分别对每组电子元件样本进行识别,并对识别出的所需的电子元件样本进行标注。
本发明实施例提供的电子元件样本识别装置,能够将每个电子元件样本的图像与模板图像进行匹配,并根据匹配后每个电子元件样本的匹配度信息对所有电子元件样本进行排序,从而从排序后的电子元件样本中快速标注出所需的电子元件样本,提高电子元件样本的标注效率。而且,在对每个电子元件样本的图像进行匹配时,先进行模板匹配,在模板匹配的结果未达到预期效果时,再进行纹理信息匹配,以提高匹配度的准确性,进而提高排序的准确性,从而提高电子元件样本的标注效率。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (10)

  1. 一种电子元件样本标注方法,其特征在于,包括:
    获取待标注的N个电子元件样本的图像;其中,N≥1;
    将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值;
    根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本。
  2. 如权利要求1所述的电子元件样本标注方法,其特征在于,所述将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值,具体包括:
    将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值;
    计算最小的M个第一匹配值的平均值;其中,M≥1;
    判断所述平均值是否小于预设的阈值;
    若是,则将所述每个电子元件样本的第一匹配值作为其匹配度值;
    若否,则将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值。
  3. 如权利要求2所述的电子元件样本标注方法,其特征在于,所述将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值,具体包括:
    采用模板匹配算法,将所述每个电子元件样本的图像与所述模板图像进行匹配,计算获得所述每个电子元件样本的第一匹配值。
  4. 如权利要求2所述的电子元件样本标注方法,其特征在于,所述将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元 件样本的匹配度值,具体包括:
    采用纹理信息匹配算法,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,计算获得所述每个电子元件样本的第二匹配值;
    计算所述每个电子元件样本的所述第一匹配值和所述第二匹配值的平均值,并将计算获得的平均值作为所述电子元件样本的匹配度值。
  5. 如权利要求1至4任一项所述的电子元件样本标注方法,其特征在于,所述根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本,具体包括:
    根据所述匹配度值对所述N个电子元件样本进行升序排列,并按照排列顺序将N个电子元件样本划分为P组;P≥1;
    分别对每组电子元件样本进行识别,并对识别出的所需的电子元件样本进行标注。
  6. 一种电子元件样本标注装置,其特征在于,包括:
    样本图像获取模块,用于获取待标注的N个电子元件样本的图像;其中,N≥1;
    匹配模块,用于将每个电子元件样本的图像与模板图像进行匹配,获得所述每个电子元件样本的匹配度值;以及,
    识别标注模块,用于根据所述匹配度值对所述N个电子元件样本进行排序,并从排序后的所述N个电子元件样本中识别并标注出所需的电子元件样本。
  7. 如权利要求6所述的电子元件样本标注装置,其特征在于,所述匹配模块具体包括:
    第一匹配单元,用于将所述每个电子元件样本的图像与所述模板图像进行匹配,获得所述每个电子元件样本的第一匹配值;
    计算单元,用于计算最小的M个第一匹配值的平均值;其中,M≥1;
    判断单元,用于判断所述平均值是否小于预设的阈值;
    匹配度值获取单元,用于在所述判断单元判定为是时,将所述每个电子元件样本的第一匹配值作为其匹配度值;以及,
    第二匹配单元,用于在所述判断单元判定为否时,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,获得所述每个电子元件样本的匹配度值。
  8. 如权利要求7所述的电子元件样本标注装置,其特征在于,所述第一匹配单元具体用于采用模板匹配算法,将所述每个电子元件样本的图像与所述模板图像进行匹配,计算获得所述每个电子元件样本的第一匹配值。
  9. 如权利要求7所述的电子元件样本标注装置,其特征在于,所述第二匹配度单元具体包括:
    匹配值计算子单元,用于采用纹理信息匹配算法,将所述每个电子元件样本的图像与所述模板图像进行二次匹配,计算获得所述每个电子元件样本的第二匹配值;以及,
    匹配度值获取子单元,用于计算所述每个电子元件样本的所述第一匹配值和所述第二匹配值的平均值,并将计算获得的平均值作为所述电子元件样本的匹配度值。
  10. 如权利要求6至9任一项所述的电子元件样本标注装置,其特征在于,所述识别标注模块具体包括:
    排序单元,用于根据所述匹配度值对所述N个电子元件样本进行升序排列,并按照排列顺序将N个电子元件样本划分为P组;以及,
    识别标注单元,用于分别对每组电子元件样本进行识别,并对识别出的所需的电子元件样本进行标注。
PCT/CN2016/096888 2015-12-22 2016-08-26 一种电子元件样本标注方法及装置 WO2017107533A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510980802.8A CN105631458B (zh) 2015-12-22 2015-12-22 一种电子元件样本标注方法及装置
CN201510980802.8 2015-12-22

Publications (1)

Publication Number Publication Date
WO2017107533A1 true WO2017107533A1 (zh) 2017-06-29

Family

ID=56046370

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096888 WO2017107533A1 (zh) 2015-12-22 2016-08-26 一种电子元件样本标注方法及装置

Country Status (2)

Country Link
CN (1) CN105631458B (zh)
WO (1) WO2017107533A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705630A (zh) * 2019-09-27 2020-01-17 聚时科技(上海)有限公司 半监督学习式目标检测神经网络训练方法、装置及应用
CN111429512A (zh) * 2020-04-22 2020-07-17 北京小马慧行科技有限公司 图像处理方法和装置、存储介质及处理器

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631458B (zh) * 2015-12-22 2018-05-22 广州视源电子科技股份有限公司 一种电子元件样本标注方法及装置
CN107958454A (zh) * 2017-12-04 2018-04-24 江苏维普光电科技有限公司 基于精密平台进行掩膜版图像的快速匹配方法及系统
CN112990366B (zh) * 2021-04-23 2021-09-07 视睿(杭州)信息科技有限公司 目标标注方法及装置
CN117152157B (zh) * 2023-10-31 2023-12-29 南通三喜电子有限公司 基于人工智能的电子元件识别方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0611160A2 (en) * 1993-02-12 1994-08-17 General Electric Company Classifying and sorting crystalline objects
US20110110597A1 (en) * 2008-04-16 2011-05-12 Yuichi Abe Image inspection apparatus
CN102938077A (zh) * 2012-10-25 2013-02-20 渭南师范学院 基于双阈值二值化的在线式aoi图像检索方法
CN104463178A (zh) * 2014-12-29 2015-03-25 广州视源电子科技股份有限公司 电子元件识别方法和系统
CN105631458A (zh) * 2015-12-22 2016-06-01 广州视源电子科技股份有限公司 一种电子元件样本标注方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8855400B2 (en) * 2012-03-08 2014-10-07 Kla-Tencor Corporation Detection of thin lines for selective sensitivity during reticle inspection using processed images
CN104730074B (zh) * 2015-03-05 2017-05-31 广州视源电子科技股份有限公司 一种金针类元件的引脚检测方法及装置
CN105139399A (zh) * 2015-08-25 2015-12-09 广州视源电子科技股份有限公司 一种二极管极性检测方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0611160A2 (en) * 1993-02-12 1994-08-17 General Electric Company Classifying and sorting crystalline objects
US20110110597A1 (en) * 2008-04-16 2011-05-12 Yuichi Abe Image inspection apparatus
CN102938077A (zh) * 2012-10-25 2013-02-20 渭南师范学院 基于双阈值二值化的在线式aoi图像检索方法
CN104463178A (zh) * 2014-12-29 2015-03-25 广州视源电子科技股份有限公司 电子元件识别方法和系统
CN105631458A (zh) * 2015-12-22 2016-06-01 广州视源电子科技股份有限公司 一种电子元件样本标注方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705630A (zh) * 2019-09-27 2020-01-17 聚时科技(上海)有限公司 半监督学习式目标检测神经网络训练方法、装置及应用
CN111429512A (zh) * 2020-04-22 2020-07-17 北京小马慧行科技有限公司 图像处理方法和装置、存储介质及处理器
CN111429512B (zh) * 2020-04-22 2023-08-25 北京小马慧行科技有限公司 图像处理方法和装置、存储介质及处理器

Also Published As

Publication number Publication date
CN105631458B (zh) 2018-05-22
CN105631458A (zh) 2016-06-01

Similar Documents

Publication Publication Date Title
WO2017107533A1 (zh) 一种电子元件样本标注方法及装置
CN111179251B (zh) 基于孪生神经网络利用模板比对的缺陷检测系统及方法
WO2021143343A1 (zh) 一种产品质量检测方法及装置
CN111693534B (zh) 表面缺陷的检测方法、模型训练方法、装置、设备和介质
CN111080622A (zh) 神经网络训练方法、工件表面缺陷分类与检测方法及装置
CN103439348A (zh) 基于差影法的遥控器按键缺陷检测方法
WO2024002187A1 (zh) 缺陷检测方法、缺陷检测设备及存储介质
CN111126143A (zh) 一种基于深度学习的运动评判指导方法及系统
TWI707137B (zh) 智能產線監測系統及監測方法
CN113222913A (zh) 一种电路板缺陷检测定位方法、装置和存储介质
CN103258218B (zh) 蒙版检测框架生成方法、装置、缺陷检测方法及装置
CN114897868A (zh) 极片缺陷识别及模型训练方法、装置及电子设备
CN110689447A (zh) 一种基于深度学习的社交软件用户发布内容的实时检测方法
CN113744252A (zh) 用于标记和检测缺陷的方法、设备、存储介质和程序产品
CN109102486B (zh) 基于机器学习的表面缺陷检测方法及装置
CN114226262A (zh) 瑕疵检测方法、瑕疵分类方法及其系统
CN116958052A (zh) 一种基于yolo和注意力机制的印刷电路板缺陷检测方法
CN114998357B (zh) 基于多信息分析的工业检测方法、系统、终端和介质
KR20210008352A (ko) 촬상된 품목의 결함을 검출하기 위한 시스템 및 방법
TWI747686B (zh) 缺陷檢測方法及檢測裝置
Yusro et al. Testing the performance of a single pole detection algorithm using the confusion matrix model
JP2021157550A (ja) 検出装置及びプログラム
Bertalya et al. Classification of ceramic tiles by identifying defect on ceramic tile surface using local texture feature
Xue et al. Complete approach to automatic identification and subpixel center location for ellipse feature
CN111724352B (zh) 一种基于核密度估计的贴片led瑕疵标注方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16877345

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/11/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16877345

Country of ref document: EP

Kind code of ref document: A1