[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117351001B - Surface defect identification method for regenerated aluminum alloy template - Google Patents

Surface defect identification method for regenerated aluminum alloy template Download PDF

Info

Publication number
CN117351001B
CN117351001B CN202311537634.6A CN202311537634A CN117351001B CN 117351001 B CN117351001 B CN 117351001B CN 202311537634 A CN202311537634 A CN 202311537634A CN 117351001 B CN117351001 B CN 117351001B
Authority
CN
China
Prior art keywords
defect
image
preset
feature
result
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.)
Active
Application number
CN202311537634.6A
Other languages
Chinese (zh)
Other versions
CN117351001A (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.)
Delta Aluminium Industry Co ltd
Original Assignee
Delta Aluminium Industry Co ltd
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 Delta Aluminium Industry Co ltd filed Critical Delta Aluminium Industry Co ltd
Priority to CN202311537634.6A priority Critical patent/CN117351001B/en
Publication of CN117351001A publication Critical patent/CN117351001A/en
Application granted granted Critical
Publication of CN117351001B publication Critical patent/CN117351001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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/0008Industrial image inspection checking presence/absence
    • 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/54Extraction of image or video features relating to texture
    • 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
    • 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/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • 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/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

本发明提供了一种再生铝合金模板表面缺陷识别方法,涉及铝合金生产技术领域,包括:步骤1:获取模板的实时图像并进行预处理,得到待处理图像;步骤2:对待处理图像进行特征提取,生成缺陷特征信息,并输入预设缺陷识别模型中进行缺陷识别,得到第一结果;步骤3:获取历史缺陷图像信息,并建立历史缺陷图像集,同时,将第一结果、历史缺陷图像集输入预设图像对比模型中进行对比分析,得到第二结果;步骤4:基于缺陷特征信息,在预设模型数据库中筛选得到缺陷分析模型,并将第一结果、第二结果输入缺陷分析模型中进行缺陷分析,得到最终识别结果。本发明可以提升对再生铝合金模板表面缺陷的识别精度,进而提升铝合金生产的质量控制水平。

The present invention provides a method for identifying surface defects of a recycled aluminum alloy template, which relates to the technical field of aluminum alloy production, and includes: step 1: obtaining a real-time image of a template and performing preprocessing to obtain an image to be processed; step 2: performing feature extraction on the image to be processed, generating defect feature information, and inputting the information into a preset defect recognition model for defect recognition to obtain a first result; step 3: obtaining historical defect image information, and establishing a historical defect image set, and at the same time, inputting the first result and the historical defect image set into a preset image comparison model for comparison analysis to obtain a second result; step 4: based on the defect feature information, screening a defect analysis model in a preset model database, and inputting the first result and the second result into the defect analysis model for defect analysis to obtain a final recognition result. The present invention can improve the recognition accuracy of surface defects of recycled aluminum alloy templates, thereby improving the quality control level of aluminum alloy production.

Description

一种再生铝合金模板表面缺陷识别方法A method for identifying surface defects of recycled aluminum alloy templates

技术领域Technical Field

本发明涉及铝合金生产技术领域,特别涉及一种再生铝合金模板表面缺陷识别方法。The invention relates to the technical field of aluminum alloy production, and in particular to a method for identifying surface defects of a recycled aluminum alloy template.

背景技术Background technique

铝合金模板是一种用于制造各种铝合金制品的模具或模型。它通常由铝合金材料制成,具有高强度、耐磨损、耐腐蚀等特点。铝合金模板广泛应用于各个领域,如汽车工业、航空航天、建筑和建筑、电子和电气工业等。Aluminum alloy formwork is a mold or model used to manufacture various aluminum alloy products. It is usually made of aluminum alloy material and has the characteristics of high strength, wear resistance, corrosion resistance, etc. Aluminum alloy formwork is widely used in various fields, such as automotive industry, aerospace, construction and architecture, electronic and electrical industry, etc.

目前,随着工业生产中节能环保意识的提升,再生铝合金模板技术逐渐应用于铝合金生产领域,再生铝合金模板是指利用回收的废旧铝材料进行再生和再利用制造的铝合金模板。再生铝合金模板的使用虽然有助于推动循环经济和可持续发展,减少资源消耗和环境影响。但是由于废旧铝材料的不确定性以及参差不齐的质量,导致再生的铝合金模板的物理特性以及产品性能与原始模板有一定的差距,因此再生铝合金模板的质量控制和检测显得尤为重要。At present, with the improvement of energy-saving and environmental protection awareness in industrial production, recycled aluminum alloy formwork technology has gradually been applied to the field of aluminum alloy production. Recycled aluminum alloy formwork refers to aluminum alloy formwork made by recycling and reusing recycled scrap aluminum materials. Although the use of recycled aluminum alloy formwork helps promote circular economy and sustainable development, reduce resource consumption and environmental impact. However, due to the uncertainty and uneven quality of scrap aluminum materials, the physical properties and product performance of recycled aluminum alloy formworks are somewhat different from those of the original formworks. Therefore, quality control and testing of recycled aluminum alloy formworks are particularly important.

因此,本发明提供一种再生铝合金模板表面缺陷识别方法。Therefore, the present invention provides a method for identifying surface defects of a recycled aluminum alloy template.

发明内容Summary of the invention

本发明提供一种再生铝合金模板表面缺陷识别方法,用以提升对再生铝合金模板表面缺陷的识别精度,进而提升了再生铝合金模板成品的质量水平,从而提升了对铝合金生产的质量控制水平。The present invention provides a method for identifying surface defects of a recycled aluminum alloy template, which is used to improve the recognition accuracy of surface defects of the recycled aluminum alloy template, thereby improving the quality level of the finished product of the recycled aluminum alloy template, thereby improving the quality control level of aluminum alloy production.

本发明提供一种再生铝合金模板表面缺陷识别方法,包括:The present invention provides a method for identifying surface defects of a recycled aluminum alloy template, comprising:

步骤1:通过影像采集设备获取模板的实时图像,对所述实时图像进行预处理,得到待处理图像;Step 1: Acquire a real-time image of the template through an image acquisition device, and pre-process the real-time image to obtain an image to be processed;

步骤2:对所述待处理图像进行特征提取,生成缺陷特征信息,并将所述缺陷特征信息输入预设缺陷识别模型中进行缺陷识别,得到第一结果;Step 2: extracting features from the image to be processed to generate defect feature information, and inputting the defect feature information into a preset defect recognition model to perform defect recognition to obtain a first result;

步骤3:获取模板的历史缺陷图像信息,并建立历史缺陷图像集,同时,将所述第一结果、历史缺陷图像集输入预设图像对比模型中进行对比分析,得到第二结果;Step 3: Obtain historical defect image information of the template and establish a historical defect image set. At the same time, input the first result and the historical defect image set into a preset image comparison model for comparison and analysis to obtain a second result;

步骤4:基于所述缺陷特征信息,在预设模型数据库中筛选得到缺陷分析模型,并将所述第一结果、第二结果输入所述缺陷分析模型中进行缺陷分析,得到最终识别结果。Step 4: Based on the defect feature information, a defect analysis model is obtained by screening in a preset model database, and the first result and the second result are input into the defect analysis model to perform defect analysis to obtain a final recognition result.

优选的,步骤1中,包括:Preferably, step 1 includes:

通过影像采集设备从预设角度对模板表面进行图像采集,得到实时图像,并根据所述实时图像的时间顺序建立实时图像集;The template surface is imaged from a preset angle by an image acquisition device to obtain a real-time image, and a real-time image set is established according to the time sequence of the real-time images;

对所述实时图像集中的每一实时图像进行预处理,并将符合预设第一阈值的实时图像标定为待处理图像。Each real-time image in the real-time image set is preprocessed, and the real-time image that meets a preset first threshold is marked as an image to be processed.

优选的,步骤2中,包括:Preferably, step 2 includes:

获取所述实时图像集中的待处理图像,同时,在预设策略数据库中筛选出适配的特征提取策略;Acquire the image to be processed in the real-time image set, and at the same time, select an adaptive feature extraction strategy from a preset strategy database;

基于所述特征提取策略,在预设策略-方法对照表中选取合适的特征提取方法;Based on the feature extraction strategy, select a suitable feature extraction method from the preset strategy-method comparison table;

基于所述特征提取方法,对所述待处理图像进行特征提取,生成缺陷特征信息。Based on the feature extraction method, feature extraction is performed on the image to be processed to generate defect feature information.

优选的,步骤2中,还包括:Preferably, step 2 further includes:

基于所述缺陷特征信息,在预设特征-模型匹配表中获取模型信息,并基于所述模型信息在预设模型数据库中选取对应的预设缺陷识别模型;Based on the defect feature information, obtaining model information in a preset feature-model matching table, and selecting a corresponding preset defect recognition model in a preset model database based on the model information;

将所述缺陷特征信息输入所述预设缺陷识别模型中进行缺陷识别,得到第一结果。The defect feature information is input into the preset defect recognition model to perform defect recognition and obtain a first result.

优选的,步骤3中,包括:Preferably, step 3 includes:

基于所述缺陷特征信息、第一结果,在历史缺陷数据库中筛选得到匹配度大于第一匹配度的历史缺陷图像信息;Based on the defect feature information and the first result, historical defect image information with a matching degree greater than a first matching degree is screened in a historical defect database;

将所述历史缺陷图像信息进行缺陷分类,并基于分类结果建立历史缺陷图像集;Classifying the historical defect image information, and establishing a historical defect image set based on the classification results;

同时,利用预设图像对比模型对所述第一结果、历史缺陷图像集进行对比分析,得到第二结果。At the same time, a preset image comparison model is used to compare and analyze the first result and the historical defect image set to obtain a second result.

优选的,步骤3中,还包括:Preferably, step 3 further includes:

对所述缺陷特征信息进行内容解析,并基于解析内容建立缺陷特征数据包;Performing content analysis on the defect feature information, and establishing a defect feature data packet based on the analyzed content;

对所述缺陷特征数据包中的所有缺陷特征进行归类分析,并建立缺陷特征分类表;Classify and analyze all defect features in the defect feature data package, and establish a defect feature classification table;

结合预设类别-因子匹配表,获取所述缺陷特征分类表中每一特征种类的第一筛选因子;Combined with the preset category-factor matching table, the first screening factor of each feature type in the defect feature classification table is obtained;

同时,将所述缺陷特征数据包输入预设特征分析模型进行参数计算,得到每一缺陷特征对应的特征参数;At the same time, the defect feature data packet is input into a preset feature analysis model for parameter calculation to obtain feature parameters corresponding to each defect feature;

基于每一缺陷特征的特征参数,利用预设参数-因子对照表获取每一缺陷特征参数的第二筛选因子;Based on the characteristic parameters of each defect characteristic, a second screening factor for each defect characteristic parameter is obtained using a preset parameter-factor comparison table;

结合所述第一筛选因子、第二筛选因子,在历史缺陷数据库中筛选得到匹配度大于第一匹配度的历史缺陷图像信息;In combination with the first screening factor and the second screening factor, historical defect image information having a matching degree greater than a first matching degree is screened in the historical defect database;

根据所述历史缺陷图像信息中携带的特征信息,对所述历史缺陷图像信息进行归类分析,并根据归类分析结果以及相应缺陷特征的特征参数建立历史缺陷图像集;According to the characteristic information carried in the historical defect image information, the historical defect image information is classified and analyzed, and a historical defect image set is established according to the classification analysis result and the characteristic parameters of the corresponding defect characteristics;

将所述缺陷特征分类表和历史缺陷图像集中同一归类下的缺陷特征以及相应的特征参数进行提取,建立对比数据包;Extract the defect features and corresponding feature parameters under the same classification in the defect feature classification table and the historical defect image set to establish a comparison data package;

结合所述第一结果,将每一特征类别对应的所述对比数据包输入预设图像对比分析模型中进行对比分析,得到第二结果。In combination with the first result, the comparison data packet corresponding to each feature category is input into a preset image comparison analysis model for comparison analysis to obtain a second result.

优选的,步骤4中,包括:Preferably, step 4 includes:

对所述缺陷特征信息中的每一缺陷特征进行聚类分析,同时,对聚类分析结果中同一类别下的缺陷特征数量进行统计,并按照每一类别中包含的缺陷特征数量进行降序排列,得到特征降序表;Performing cluster analysis on each defect feature in the defect feature information, and at the same time, counting the number of defect features under the same category in the cluster analysis results, and arranging them in descending order according to the number of defect features contained in each category to obtain a feature descending order table;

对所述特征降序表中序数大于第一序数的特征类别进行提取,并根据预设类别-参数对照表得到第一筛选参数;Extracting feature categories whose ordinal numbers are greater than the first ordinal number in the feature descending table, and obtaining a first screening parameter according to a preset category-parameter comparison table;

同时,将所述缺陷特征信息中的每一缺陷特征与预设特征-优先级对照表进行优先级判定,得到每一缺陷特征对应的优先级;At the same time, each defect feature in the defect feature information is prioritized against a preset feature-priority comparison table to obtain a priority corresponding to each defect feature;

基于每一缺陷特征以及对应的优先级,结合预设优先级-参数对照表获取与每一缺陷特征对应的第二筛选参数;Based on each defect feature and the corresponding priority, a second screening parameter corresponding to each defect feature is obtained in combination with a preset priority-parameter comparison table;

将所述第一筛选参数、第二筛选参数输入预设模型数据库中进行模型匹配,得到匹配度大于第二匹配度的缺陷分析模型;Inputting the first screening parameter and the second screening parameter into a preset model database for model matching, and obtaining a defect analysis model with a matching degree greater than the second matching degree;

获取所述第一结果对应的第一类别信息,同时将所述第一类别信息与所述第一结果进行绑定,得到第一绑定信息;Acquire first category information corresponding to the first result, and bind the first category information to the first result to obtain first binding information;

将所述第一绑定信息、第二结果输入所述缺陷分析模型中,对同一特征类别下的特征参数进行参数分析,得到最终识别结果。The first binding information and the second result are input into the defect analysis model, and parameter analysis is performed on feature parameters under the same feature category to obtain a final recognition result.

优选的,基于所述特征提取方法,对所述待处理图像进行特征提取,生成缺陷特征信息,包括:Preferably, based on the feature extraction method, feature extraction is performed on the image to be processed to generate defect feature information, including:

在所述待处理图像中截取多个不同预设尺寸的方形灰度图像以及预设滤波函数;intercepting a plurality of square grayscale images of different preset sizes and a preset filter function from the image to be processed;

通过预设滤波函数在m个尺度,n个预设方向上对每个所述灰度图像进行滤波处理,得到与每一所述方形灰度图像对应的m*n个滤波核;Perform filtering processing on each of the grayscale images at m scales and n preset directions using a preset filtering function to obtain m*n filtering kernels corresponding to each of the square grayscale images;

将所有所述方形灰度图像的m*n个滤波核进行融合处理,得到第一纹理图像;Fusing the m*n filter kernels of all the square grayscale images to obtain a first texture image;

分别获取所述第一纹理图像的亮度均值ave1以及对应实时图像的亮度均值ave2;Obtaining a brightness mean value ave1 of the first texture image and a brightness mean value ave2 of the corresponding real-time image respectively;

以所述亮度均值ave1对所述实时图像进行调整得到第一待分析图像,同时,以所述亮度均值ave2对所述第一纹理图像进行调整得到第二待分析图像;The real-time image is adjusted by the brightness mean value ave1 to obtain a first image to be analyzed, and at the same time, the first texture image is adjusted by the brightness mean value ave2 to obtain a second image to be analyzed;

当实时图像中第i个像素点的亮度值r1i满足ave1-Δ1≤r1i≤ave1+Δ1条件,将第i个像素点替换为亮度均值ave1,否则,保持第i个像素点不变,进而得到第一待分析图像,其中,Δ1表示再生铝合金模板表面不存缺陷时所对应获取的亮度方差;When the brightness value r1 i of the i-th pixel in the real-time image satisfies the condition ave1-Δ1≤r1 i ≤ave1+Δ1, the i-th pixel is replaced with the brightness mean ave1, otherwise, the i-th pixel is kept unchanged, and the first image to be analyzed is obtained, where Δ1 represents the brightness variance obtained when there is no defect on the surface of the recycled aluminum alloy template;

同时,当第一纹理图像中第j个像素点亮度值r2j满足ave2-Δ2≤r2j≤ave2+Δ2,将第j个像素点替换为亮度均值ave2,否则,保持第j个像素点不变,进而得到第二待分析图像,其中,Δ2表示第一纹理图像与实时图像中初步确定出存在缺陷的所有相同坐标下的亮度方差;At the same time, when the brightness value r2 j of the j-th pixel in the first texture image satisfies ave2-Δ2≤r2 j ≤ave2+Δ2, the j-th pixel is replaced with the brightness mean ave2, otherwise, the j-th pixel is kept unchanged, and then the second image to be analyzed is obtained, where Δ2 represents the brightness variance of all the same coordinates where defects are preliminarily determined to exist in the first texture image and the real-time image;

获取所述第一待分析图像与实时图像的第一亮度方差σ12,同时,获取所述第二待分析图像与第一纹理图像的第二亮度方差σ22Acquire a first brightness variance σ1 2 between the first image to be analyzed and the real-time image, and at the same time, acquire a second brightness variance σ2 2 between the second image to be analyzed and the first texture image;

按照所述亮度均值ave1、亮度均值ave2、第一亮度方差σ12以及第二亮度方差σ22,获取得到所述第一纹理图像的图像质量W;According to the brightness mean ave1, the brightness mean ave2, the first brightness variance σ1 2 and the second brightness variance σ2 2 , the image quality W of the first texture image is obtained;

其中,∝1、∝2、∝3表示重要性参数;N1表示第一待分析图像中存在像素亮度替换的个数;N3表示第一待分析图像中像素点的总个数;N2表示第二待分析图像中存在像素亮度替换的个数;N4表示第二待分析图像中像素点的总个数;Wherein, ∝1, ∝2, ∝3 represent importance parameters; N1 represents the number of pixel brightness replacements in the first image to be analyzed; N3 represents the total number of pixels in the first image to be analyzed; N2 represents the number of pixel brightness replacements in the second image to be analyzed; N4 represents the total number of pixels in the second image to be analyzed;

若所述图像质量W大于等于阈值质量,基于所述第一纹理图像进行特征提取;If the image quality W is greater than or equal to a threshold quality, performing feature extraction based on the first texture image;

否则,根据图像质量W与阈值质量的差值,从差值-清晰调节映射表中确定调节清晰度,同时,分别获取每个方形灰度图像的平均灰度值以及平均模糊值,并基于所述调节清晰度进行分析,得到弱纹理区域以及细节纹理区域;Otherwise, according to the difference between the image quality W and the threshold quality, the adjustment clarity is determined from the difference-clarity adjustment mapping table, and at the same time, the average grayscale value and the average blur value of each square grayscale image are respectively obtained, and the weak texture area and the detail texture area are obtained based on the adjustment clarity.

对所述弱纹理区域按照进行第一清晰倍数调整以及对细节纹理区域按照/>进行第二清晰倍数调整,获取得到第二纹理图像,其中,G1(avehd,avemh)表示基于平均灰度值avehd与平均模糊值avemh的调节函数;β1、β2表示调节权重;Δ(mh)表示基于模糊度mh的变量;Δ(hd,bd)表示基于灰度值hd与标准灰度值bd的变量;G2(avehd,avemh,maxmh,avemh1)表示基于平均灰度值avehd、平均模糊值avemh、最大模糊度maxmh以及满足正态分布概率的平均模糊度avemh1的调节函数;[]表示取整符号;For the weak texture area, Perform the first definition magnification adjustment and adjust the detail texture area according to/> Perform a second definition multiple adjustment to obtain a second texture image, wherein G1(avehd,avemh) represents an adjustment function based on the average gray value avehd and the average blur value avemh; β1 and β2 represent adjustment weights; Δ(mh) represents a variable based on the blur mh; Δ(hd,bd) represents a variable based on the gray value hd and the standard gray value bd; G2(avehd,avemh,maxmh,avemh1) represents an adjustment function based on the average gray value avehd, the average blur value avemh, the maximum blur maxmh and the average blur avemh1 that satisfies the normal distribution probability; [] represents a rounding symbol;

基于所述第二纹理图像进行特征提取。Feature extraction is performed based on the second texture image.

本发明的实施原理以及有益效果是:本发明首先通过对获取的铝合金模板图像进行预处理,提升实时图像的图像质量,随后通过预设滤波函数对待处理图像进行缺陷特征提取,从而生成缺陷特征信息以及金属表面图像;随后在设缺陷识别模型中对模板表面的缺陷进行识别,得到第一结果,同时与匹配的历史缺陷图像进行对比分析,产生第二结果,以历史数据作为参考对当前的缺陷进行判定,大幅提升了缺陷的识别精度,进而通过对第一结果、第二结果的综合分析处理,得到最终的缺陷识别结果,从多元角度对缺陷进行识别分析,减少了误判的可能性,从而大幅提升了对缺陷的检测精度,提升了再生铝合金模板的质控水平。The implementation principle and beneficial effects of the present invention are as follows: the present invention firstly improves the image quality of the real-time image by preprocessing the acquired aluminum alloy template image, and then extracts the defect features of the image to be processed through a preset filter function, thereby generating defect feature information and a metal surface image; then, the defects on the template surface are identified in a set defect recognition model to obtain a first result, and at the same time, a comparison and analysis is performed with the matching historical defect image to generate a second result, and the current defects are judged with reference to the historical data, which greatly improves the recognition accuracy of the defects, and then the final defect recognition result is obtained through comprehensive analysis and processing of the first result and the second result, and the defects are identified and analyzed from multiple perspectives, which reduces the possibility of misjudgment, thereby greatly improving the detection accuracy of the defects and improving the quality control level of the recycled aluminum alloy template.

本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

图1为本发明实施例中一种再生铝合金模板表面缺陷识别方法的流程示意图。FIG1 is a schematic flow chart of a method for identifying surface defects of a recycled aluminum alloy template according to an embodiment of the present invention.

具体实施方式Detailed ways

以下结合附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

参照图1,本发明实施例提供一种再生铝合金模板表面缺陷识别方法,包括:1 , an embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template, comprising:

步骤1:通过影像采集设备获取模板的实时图像,对实时图像进行预处理,得到待处理图像;Step 1: Obtain a real-time image of the template through an image acquisition device, pre-process the real-time image, and obtain an image to be processed;

步骤2:对待处理图像进行特征提取,生成缺陷特征信息,并将缺陷特征信息输入预设缺陷识别模型中进行缺陷识别,得到第一结果;Step 2: extract features from the image to be processed, generate defect feature information, and input the defect feature information into a preset defect recognition model to perform defect recognition, thereby obtaining a first result;

步骤3:获取模板的历史缺陷图像信息,并建立历史缺陷图像集,同时,将第一结果、历史缺陷图像集输入预设图像对比模型中进行对比分析,得到第二结果;Step 3: Obtain historical defect image information of the template and establish a historical defect image set. At the same time, input the first result and the historical defect image set into a preset image comparison model for comparison and analysis to obtain a second result;

步骤4:基于缺陷特征信息,在预设模型数据库中筛选得到缺陷分析模型,并将第一结果、第二结果输入缺陷分析模型中进行缺陷分析,得到最终识别结果。Step 4: Based on the defect feature information, a defect analysis model is obtained by screening in a preset model database, and the first result and the second result are input into the defect analysis model for defect analysis to obtain a final recognition result.

该实施例中,影像采集设备:用于获取再生铝合金模板影像信息的设备,例如相机、摄像机、热成像仪等;In this embodiment, the image acquisition device: a device for acquiring image information of the recycled aluminum alloy template, such as a camera, a video camera, a thermal imager, etc.;

该实施例中,实时图像:通过影像采集设备捕捉的再生铝合金模板的图像;In this embodiment, the real-time image: an image of the recycled aluminum alloy template captured by an image acquisition device;

该实施例中,预处理:在对图像进行后续处理和分析前,对原始的图像进行一系列的处理步骤,用于提高图像的质量、减少噪声、增强图像中的特征等,包括但不限于:图像去噪、图像增强、图像锐化等;In this embodiment, preprocessing: before subsequent processing and analysis of the image, a series of processing steps are performed on the original image to improve the quality of the image, reduce noise, enhance the features in the image, etc., including but not limited to: image denoising, image enhancement, image sharpening, etc.;

该实施例中,待处理图像:经过对实时图像进行预处理后得到的图像;In this embodiment, the image to be processed is: an image obtained by preprocessing the real-time image;

该实施例中,特征提取:从图像中提取出具有代表性的特征的操作,图像特征可以是图像的局部结构、纹理、形状、颜色等开业数值化的表征;In this embodiment, feature extraction refers to the operation of extracting representative features from an image. The image features may be numerical representations of the local structure, texture, shape, color, etc. of the image.

该实施例中,缺陷特征信息:包含有特征提取后生成的所有图像特征的信息;In this embodiment, the defect feature information includes information of all image features generated after feature extraction;

该实施例中,预设缺陷识别模型:用于根据输入的缺陷特征信息对模板图像中的缺陷进行识别的模型,是预先经过大数据训练好的;In this embodiment, the preset defect recognition model: a model used to recognize defects in the template image according to the input defect feature information, is pre-trained with big data;

该实施例中,第一结果:经过预设缺陷识别模型的缺陷识别生成的识别结果;In this embodiment, the first result: a recognition result generated by defect recognition using a preset defect recognition model;

该实施例中,历史缺陷图像信息:即模板的历史缺陷图像;In this embodiment, the historical defect image information: that is, the historical defect image of the template;

该实施例中,历史缺陷图像集:由多个历史缺陷图像信息构成的图像集合;In this embodiment, the historical defect image set: an image set consisting of a plurality of historical defect image information;

该实施例中,预设图像对比模型:用于对输入的第一结果、历史缺陷图像集进行对比分析的模型,是预先设定好的;In this embodiment, the preset image comparison model: the model used for comparing and analyzing the input first result and the historical defect image set is preset;

该实施例中,第二结果:即经过预设图像对比模型对第一结果、历史缺陷图像集进行对比分析后得到的分析结果;In this embodiment, the second result: that is, the analysis result obtained by comparing and analyzing the first result and the historical defect image set through a preset image comparison model;

该实施例中,预设模型数据库:包含有大量用于对图像数据进行处理分析的数据处理模型的数据库;In this embodiment, the preset model database: a database containing a large number of data processing models for processing and analyzing image data;

该实施例中,缺陷分析模型:从预设模型数据库中筛选得到的,且用于对第一结果、第二结果进行缺陷分析的模型;In this embodiment, the defect analysis model is a model obtained by screening from a preset model database and used to perform defect analysis on the first result and the second result;

该实施例中,最终识别结果:通过缺陷分析模型对第一结果、第二结果进行缺陷分析后得到的分析结果。In this embodiment, the final recognition result is: the analysis result obtained after performing defect analysis on the first result and the second result through the defect analysis model.

上述技术方案的工作原理及有益效果是:本发明首先通过对获取的铝合金模板图像进行预处理,提升实时图像的图像质量,随后通过预设滤波函数对待处理图像进行缺陷特征提取,从而生成缺陷特征信息以及金属表面图像;随后在设缺陷识别模型中对模板表面的缺陷进行识别,得到第一结果,同时与匹配的历史缺陷图像进行对比分析,产生第二结果,以历史数据作为参考对当前的缺陷进行判定,大幅提升了缺陷的识别精度,进而通过对第一结果、第二结果的综合分析处理,得到最终的缺陷识别结果,从多元角度对缺陷进行识别分析,减少了误判的可能性,从而大幅提升了对缺陷的检测精度,提升了再生铝合金模板的质控水平。The working principle and beneficial effects of the above technical scheme are as follows: the present invention firstly improves the image quality of the real-time image by preprocessing the acquired aluminum alloy template image, and then extracts the defect features of the processed image through a preset filter function, thereby generating defect feature information and a metal surface image; then, the defects on the template surface are identified in a set defect recognition model to obtain a first result, and at the same time, a comparison and analysis is performed with the matching historical defect image to generate a second result, and the current defects are judged with reference to the historical data, which greatly improves the recognition accuracy of the defects, and then the final defect recognition result is obtained through comprehensive analysis and processing of the first result and the second result, and the defects are identified and analyzed from multiple perspectives, which reduces the possibility of misjudgment, thereby greatly improving the detection accuracy of defects and improving the quality control level of the recycled aluminum alloy template.

本发明实施例提供一种再生铝合金模板表面缺陷识别方法,步骤1中,包括:The embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template, wherein step 1 comprises:

通过影像采集设备从预设角度对模板表面进行图像采集,得到实时图像,并根据实时图像的时间顺序建立实时图像集;The image acquisition device is used to acquire images of the template surface from a preset angle to obtain a real-time image, and a real-time image set is established according to the time sequence of the real-time images;

对实时图像集中的每一实时图像进行预处理,并将符合预设第一阈值的实时图像标定为待处理图像。Each real-time image in the real-time image set is preprocessed, and the real-time image that meets a preset first threshold is marked as an image to be processed.

该实施例中,预设角度:即预先设定好的拍摄角度,可以从多个空间角度对模板表面进行图像采集,减少缺陷误判的可能性;In this embodiment, the preset angle: that is, the pre-set shooting angle, can capture images of the template surface from multiple spatial angles, reducing the possibility of misjudgment of defects;

该实施例中,时间顺序:即实时图像拍摄时间的先后顺序;In this embodiment, the time sequence refers to the sequence of the real-time image shooting time;

该实施例中,实时图像集:多组实时图像按照拍摄时间的先后顺序排列好的图像集;In this embodiment, the real-time image set: an image set in which a plurality of groups of real-time images are arranged in the order of shooting time;

该实施例中,预设第一阈值:用于判定经过预处理后图像是否满足预设条件的阈值,例如对图像大小、信噪比、图像的对比度等参数的阈值,是预先设定好的。In this embodiment, a first threshold is preset: a threshold used to determine whether the image after preprocessing meets a preset condition, for example, thresholds for parameters such as image size, signal-to-noise ratio, and image contrast are preset.

上述技术方案的工作原理及有益效果是:本发明通过从多个预设角度对再生铝合金模板表面的图像进行采集,可以提升对铝合金模板表面的缺陷特征的识别精度,减少了从单一角度缺陷识别发生误判的可能性,同时,通过对按照时间顺序建立好的实时图像集进行预处理,不仅提升了图像质量,而且可以通过对比时间前后的图像确定当前图像是否出现误差,进一步减小了误判的可能性,从而提升了对铝合金模板缺陷的识别精度。The working principle and beneficial effects of the above technical solution are as follows: the present invention can improve the recognition accuracy of defect characteristics on the surface of the aluminum alloy template by collecting images of the surface of the recycled aluminum alloy template from multiple preset angles, and reduce the possibility of misjudgment in defect recognition from a single angle. At the same time, by preprocessing the real-time image set established in chronological order, not only the image quality is improved, but also it can be determined whether there is an error in the current image by comparing the images before and after time, further reducing the possibility of misjudgment, thereby improving the recognition accuracy of aluminum alloy template defects.

本发明实施例提供一种再生铝合金模板表面缺陷识别方法,步骤2中,包括:The embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template, wherein step 2 comprises:

获取实时图像集中的待处理图像,同时,在预设策略数据库中筛选出适配的特征提取策略;Obtain the image to be processed in the real-time image set, and at the same time, select the adapted feature extraction strategy from the preset strategy database;

基于特征提取策略,在预设策略-方法对照表中选取合适的特征提取方法;Based on the feature extraction strategy, select the appropriate feature extraction method from the preset strategy-method comparison table;

基于特征提取方法,对待处理图像进行特征提取,生成缺陷特征信息。Based on the feature extraction method, features are extracted from the image to be processed to generate defect feature information.

该实施例中,预设策略数据库:包含有大量用于对图像特征进行提取的策略的数据库,是预先设定好的;In this embodiment, the preset strategy database: a database containing a large number of strategies for extracting image features, which is preset;

该实施例中,特征提取策略:从预设策略数据库中匹配得到的,且用于对待处理图像中的图像特征进行提取的策略;In this embodiment, the feature extraction strategy is a strategy obtained by matching from a preset strategy database and used to extract image features from the image to be processed;

该实施例中,预设策略-方法对照表:包含有特征提取策略与特征提取方法之间映射关系的表,用于根据输入的特征提取策略向对应的待处理图像分配对应的特征提取方法;In this embodiment, the preset strategy-method comparison table: a table containing mapping relationships between feature extraction strategies and feature extraction methods, used to assign corresponding feature extraction methods to corresponding images to be processed according to the input feature extraction strategies;

该实施例中,特征提取方法:将特征提取策略输入预设策略-方法对照表中得到的用于对待处理图像特征进行提取的方法。In this embodiment, the feature extraction method is a method for extracting features of the image to be processed obtained by inputting the feature extraction strategy into a preset strategy-method comparison table.

上述技术方案的工作原理及有益效果是:本发明首先通过在预设策略数据库筛选得到用于对实时图像集中的待处理图像进行特征提取的策略,可以根据图像的种类或特征匹配相应的特征提取策略,进而通过预设策略-方法对照表获取相应的图像特征提取方法,不仅增大了对待处理图像的兼容性,而且可以根据图像类别适配更精确的特征提取策略和方法,从而提升了图像特征的提取效率和识别精度。The working principle and beneficial effects of the above technical solution are as follows: the present invention first obtains a strategy for feature extraction of the image to be processed in the real-time image set by screening in a preset strategy database, and can match the corresponding feature extraction strategy according to the type or feature of the image, and then obtain the corresponding image feature extraction method through a preset strategy-method comparison table, which not only increases the compatibility with the image to be processed, but also can adapt more accurate feature extraction strategies and methods according to the image category, thereby improving the extraction efficiency and recognition accuracy of image features.

本发明实施例提供一种再生铝合金模板表面缺陷识别方法,步骤2中,还包括:The embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template, wherein step 2 further includes:

基于缺陷特征信息,在预设特征-模型匹配表中获取模型信息,并基于模型信息在预设模型数据库中选取对应的预设缺陷识别模型;Based on the defect feature information, model information is obtained in a preset feature-model matching table, and a corresponding preset defect recognition model is selected in a preset model database based on the model information;

将缺陷特征信息输入预设缺陷识别模型中进行缺陷识别,得到第一结果。The defect feature information is input into a preset defect recognition model to perform defect recognition and obtain a first result.

该实施例中,预设特征-模型匹配表:包含由缺陷特征与缺陷识别模型之间映射联系的匹配表,是预先设定好的,用于根据输入的缺陷特征信息获取相应的缺陷识别模型信息;In this embodiment, the preset feature-model matching table: a matching table including mapping relationships between defect features and defect recognition models, which is preset and used to obtain corresponding defect recognition model information according to input defect feature information;

该实施例中,模型信息:将缺陷特征信息输入预设特征-模型匹配表中得到的缺陷识别模型的信息,用于在预设模型数据库中筛选得到相应的缺陷识别模型。In this embodiment, model information: information of a defect recognition model obtained by inputting defect feature information into a preset feature-model matching table is used to screen and obtain a corresponding defect recognition model in a preset model database.

上述技术方案的工作原理及有益效果是:本发明首先将包含有大量再生铝合金模板图像特征的缺陷特征信息输入预设特征-模型匹配表中,得到模型信息,进而通过模型信息在预设模型数据库中筛选得到与缺陷特征信息匹配的缺陷识别模型,使得缺陷特征信息与缺陷识别模型高度匹配,增加了缺陷识别的精度。The working principle and beneficial effects of the above technical solution are as follows: the present invention first inputs the defect feature information containing a large number of recycled aluminum alloy template image features into a preset feature-model matching table to obtain model information, and then uses the model information to filter out a defect recognition model that matches the defect feature information in a preset model database, so that the defect feature information is highly matched with the defect recognition model, thereby increasing the accuracy of defect recognition.

本发明实施例提供一种再生铝合金模板表面缺陷识别方法,步骤3中,包括:The embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template, wherein step 3 comprises:

基于缺陷特征信息、第一结果,在历史缺陷数据库中筛选得到匹配度大于第一匹配度的历史缺陷图像信息;Based on the defect feature information and the first result, historical defect image information with a matching degree greater than the first matching degree is screened in the historical defect database;

将历史缺陷图像信息进行缺陷分类,并基于分类结果建立历史缺陷图像集;Classify the historical defect image information into defects, and establish a historical defect image set based on the classification results;

同时,利用预设图像对比模型对第一结果、历史缺陷图像集进行对比分析,得到第二结果。At the same time, a preset image comparison model is used to compare and analyze the first result and the historical defect image set to obtain a second result.

该实施例中,历史缺陷数据库:储存有大量铝合金模板缺陷图像的数据库。用于与当前铝合金模板的缺陷特征进行对比;In this embodiment, the historical defect database is a database storing a large number of aluminum alloy template defect images, which is used to compare with the defect characteristics of the current aluminum alloy template;

该实施例中,第一匹配度:用于在历史缺陷数据库中筛选得到与缺陷特征信息、第一结果匹配的历史缺陷图像的阈值,是预先设定好的;In this embodiment, the first matching degree is a threshold used to screen the historical defect images matching the defect feature information and the first result in the historical defect database, which is preset;

该实施例中,缺陷分类:根据历史缺陷图像信息的缺陷类别对其进行划分的操作,便于更好地理解和管理铝合金模板的缺陷。In this embodiment, defect classification: the operation of classifying historical defect image information according to its defect category facilitates better understanding and management of the defects of the aluminum alloy template.

上述技术方案的工作原理及有益效果是:本发明通过根据再生铝合金模板的缺陷特征信息和第一结果在历史缺陷数据库中筛选得到符合预设条件的历史缺陷图像信息,进而根据缺陷种类将历史缺陷信息进行划分,便于后续与第一结果进行对比,随后通过预设图像对比模型将种类划分后的历史缺陷图像集与第一结果进行对比分析,以历史缺陷图像作为参考对当前识别结果进行分析,减少了误判、错判、漏判的可能性,从而提升了缺陷识别的精度。The working principle and beneficial effects of the above technical solution are as follows: the present invention obtains historical defect image information that meets preset conditions by screening in a historical defect database according to the defect feature information of the recycled aluminum alloy template and the first result, and then divides the historical defect information according to the defect type to facilitate subsequent comparison with the first result, and then compares and analyzes the historical defect image set after type division with the first result through a preset image comparison model, and analyzes the current recognition result with the historical defect image as a reference, thereby reducing the possibility of misjudgment, wrong judgment, and missed judgment, thereby improving the accuracy of defect recognition.

本发明实施例提供一种再生铝合金模板表面缺陷识别方法,步骤3中,还包括:The embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template, wherein step 3 further includes:

对缺陷特征信息进行内容解析,并基于解析内容建立缺陷特征数据包;Analyze the defect feature information and create a defect feature data package based on the analyzed content;

对缺陷特征数据包中的所有缺陷特征进行归类分析,并基于分析结果建立缺陷特征分类表;Classify and analyze all defect features in the defect feature data package, and establish a defect feature classification table based on the analysis results;

结合预设类别-因子匹配表,获取缺陷特征分类表中每一特征种类的第一筛选因子;Combined with the preset category-factor matching table, the first screening factor of each feature type in the defect feature classification table is obtained;

同时,将缺陷特征数据包输入预设特征分析模型进行参数计算,得到每一缺陷特征对应的特征参数;At the same time, the defect feature data packet is input into the preset feature analysis model for parameter calculation to obtain the feature parameters corresponding to each defect feature;

基于每一缺陷特征的特征参数,利用预设参数-因子对照表获取每一缺陷特征参数的第二筛选因子;Based on the characteristic parameters of each defect characteristic, a second screening factor for each defect characteristic parameter is obtained using a preset parameter-factor comparison table;

结合第一筛选因子、第二筛选因子,在历史缺陷数据库中筛选得到匹配度大于第一匹配度的历史缺陷图像信息;In combination with the first screening factor and the second screening factor, historical defect image information having a matching degree greater than the first matching degree is screened out in the historical defect database;

根据历史缺陷图像信息中携带的特征信息,对历史缺陷图像信息进行归类分析,并根据归类分析结果以及相应缺陷特征的特征参数建立历史缺陷图像集;According to the characteristic information carried in the historical defect image information, the historical defect image information is classified and analyzed, and a historical defect image set is established according to the classification analysis results and the characteristic parameters of the corresponding defect characteristics;

将缺陷特征分类表和历史缺陷图像集中同一归类下的缺陷特征以及相应的特征参数进行提取,建立对比数据包;Extract the defect features and corresponding feature parameters under the same classification in the defect feature classification table and the historical defect image set, and establish a comparison data package;

结合第一结果,将每一特征类别对应的对比数据包输入预设图像对比分析模型中进行对比分析,得到第二结果。Combined with the first result, the comparison data packet corresponding to each feature category is input into a preset image comparison analysis model for comparison analysis to obtain a second result.

该实施例中,内容解析:即通过对缺陷特征信息进行解析得到其中的信息内容的操作;In this embodiment, content analysis refers to an operation of analyzing defect feature information to obtain information content therein;

该实施例中,缺陷特征数据包:对缺陷特征信息进行内容解析后得到的解析内容转化生成的数据包;In this embodiment, the defect feature data packet is: a data packet generated by converting the analyzed content obtained by performing content analysis on the defect feature information;

该实施例中,归类分析:根据预设标准对缺陷特征数据包中包含的所有缺陷特征进行分类以及分析的操作,以便更好地理解缺陷的本质、原因以及影响,方便后续进行改进;In this embodiment, classification analysis: the operation of classifying and analyzing all defect features contained in the defect feature data packet according to preset standards, so as to better understand the nature, cause and impact of the defect and facilitate subsequent improvements;

该实施例中,缺陷特征分类表:根据对缺陷特征数据包中的所有缺陷特征进行归类分析后产生的的分析结果建立的分类表,包含有不同的类别的缺陷特征;In this embodiment, the defect feature classification table is a classification table established according to the analysis results generated after classifying and analyzing all defect features in the defect feature data packet, and includes defect features of different categories;

该实施例中,预设类别-因子匹配表:包含有缺陷类别与第一筛选因子之间映射关系的表,用于根据输入的缺陷特征的类别获取相应的第一筛选因子,是预先设定好的;In this embodiment, the preset category-factor matching table: a table containing mapping relationships between defect categories and first screening factors, used to obtain corresponding first screening factors according to the category of the input defect feature, is preset;

该实施例中,第一筛选因子:用于在历史缺陷数据库中筛选得到历史缺陷图像信息的筛选条件;In this embodiment, the first screening factor: a screening condition for screening the historical defect image information in the historical defect database;

该实施例中,预设特征分析模型:用于对输入的缺陷特征数据包进行参数计算的模型,是预先设定好的;In this embodiment, the preset feature analysis model: a model used to calculate parameters of an input defect feature data packet is preset;

该实施例中,参数计算:对缺陷特征数据包中的每一缺陷特征对应的参数值进行测定的操作;In this embodiment, parameter calculation: an operation of measuring a parameter value corresponding to each defect feature in a defect feature data packet;

该实施例中,特征参数:即每一缺陷特征对应的参数值,例如大小、形状、位置、分布、数量、严重程度等;In this embodiment, characteristic parameters: i.e., parameter values corresponding to each defect characteristic, such as size, shape, location, distribution, quantity, severity, etc.;

该实施例中,预设参数-因子对照表:包含有特征参数与第二筛选因子之间映射关系的对照表,用于根据输入的缺陷特征参数获取相应的第二筛选因子;In this embodiment, the preset parameter-factor comparison table: a comparison table including a mapping relationship between characteristic parameters and second screening factors, used to obtain the corresponding second screening factors according to the input defect characteristic parameters;

该实施例中,第二筛选因子:用于在历史缺陷数据库中筛选得到历史缺陷图像信息的筛选条件,与第一筛选因子对应;In this embodiment, the second screening factor: a screening condition for screening the historical defect image information in the historical defect database, corresponding to the first screening factor;

该实施例中,特征信息:历史缺陷图像信息中包含的缺陷特征信息;In this embodiment, the feature information: defect feature information contained in the historical defect image information;

该实施例中,同一归类:即缺陷特征分类表和历史缺陷图像集中的交集,换言之,缺陷特征分类表和历史缺陷图像集中的相同缺陷特征类别;In this embodiment, the same classification refers to the intersection of the defect feature classification table and the historical defect image set, in other words, the same defect feature category in the defect feature classification table and the historical defect image set;

该实施例中,对比数据包:对缺陷特征分类表和历史缺陷图像集中包含有同一缺陷特征类别下的缺陷特征以及相应的特征参数进行提取后生成的数据包。In this embodiment, the comparison data packet is a data packet generated by extracting defect features and corresponding feature parameters in the defect feature classification table and the historical defect image set that are included in the same defect feature category.

上述技术方案的工作原理及有益效果是:本发明首先根据当前缺陷特征信息的解析内容建立用于数据处理的缺陷特征数据包,随后对缺陷特征数据包中的缺陷特征进行归类分析,得到缺陷特征分类表,进而根据缺陷-类别匹配表获取第一筛选因子,同时利用预设特征分析模型对缺陷的特征参数进行计算,进而根据预设参数-因子对照表获取第二筛选因子,随后结合第一筛选因子和第二筛选因子在历史缺陷数据库中筛选得到符合预设条件的历史参考图像信息,进一步地通过预设图像对比分析模型对同一归类下的当前缺陷特征和历史缺陷特征以及相应的特征参数进行对比分析,产生第二结果,大幅提升了缺陷特征的识别精度,进而提升了模板缺陷识别的精度,从而保证了再生铝合金生产的质控水平。The working principle and beneficial effects of the above technical scheme are as follows: the present invention first establishes a defect feature data packet for data processing according to the parsed content of the current defect feature information, then classifies and analyzes the defect features in the defect feature data packet to obtain a defect feature classification table, and then obtains a first screening factor according to the defect-category matching table, and at the same time uses a preset feature analysis model to calculate the feature parameters of the defect, and then obtains a second screening factor according to a preset parameter-factor comparison table, and then combines the first screening factor and the second screening factor to screen out historical reference image information that meets preset conditions in the historical defect database, and further compares and analyzes the current defect features and historical defect features and corresponding feature parameters under the same classification through a preset image comparison analysis model to generate a second result, which greatly improves the recognition accuracy of the defect features, and then improves the accuracy of template defect recognition, thereby ensuring the quality control level of recycled aluminum alloy production.

本发明实施例提供一种再生铝合金模板表面缺陷识别方法,步骤4中,包括:The embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template, wherein step 4 comprises:

对缺陷特征信息中的每一缺陷特征进行聚类分析,同时,对聚类分析结果中同一类别下的缺陷特征数量进行统计,并按照每一类别中包含的缺陷特征数量进行降序排列,得到特征降序表;Perform cluster analysis on each defect feature in the defect feature information. At the same time, count the number of defect features in the same category in the cluster analysis results, and arrange them in descending order according to the number of defect features contained in each category to obtain a feature descending order table.

对特征降序表中序数大于第一序数的特征类别进行提取,并根据预设类别-参数对照表得到第一筛选参数;Extract the feature categories whose ordinal numbers are greater than the first ordinal number in the feature descending table, and obtain the first screening parameter according to the preset category-parameter comparison table;

同时,将缺陷特征信息中的每一缺陷特征与预设特征-优先级对照表进行优先级判定,得到每一缺陷特征对应的优先级;At the same time, each defect feature in the defect feature information is prioritized against a preset feature-priority comparison table to obtain the priority corresponding to each defect feature;

基于每一缺陷特征以及对应的优先级,结合预设优先级-参数对照表获取与每一缺陷特征对应的第二筛选参数;Based on each defect feature and the corresponding priority, a second screening parameter corresponding to each defect feature is obtained in combination with a preset priority-parameter comparison table;

将第一筛选参数、第二筛选参数输入预设模型数据库中进行模型匹配,得到匹配度大于第二匹配度的缺陷分析模型;Inputting the first screening parameter and the second screening parameter into a preset model database for model matching, and obtaining a defect analysis model with a matching degree greater than the second matching degree;

获取第一结果对应的第一类别信息,同时将第一类别信息与第一结果进行绑定,得到第一绑定信息;Obtaining first category information corresponding to the first result, and binding the first category information with the first result to obtain first binding information;

将第一绑定信息、第二结果输入缺陷分析模型中,对同一特征类别下的特征参数进行参数分析,得到最终识别结果。The first binding information and the second result are input into the defect analysis model, and parameter analysis is performed on the feature parameters under the same feature category to obtain the final recognition result.

该实施例中,聚类分析:将相似的缺陷特征进行分析处理的操作,有助于发现缺陷之间的模式和关联;In this embodiment, cluster analysis: the operation of analyzing and processing similar defect features helps to discover patterns and associations between defects;

该实施例中,同一类别:即同一聚类类别;In this embodiment, the same category: that is, the same cluster category;

该实施例中,缺陷特征数量:聚类分析结果中同一类别下的所有缺陷特征的数量总和;In this embodiment, the number of defect features is: the sum of the number of all defect features in the same category in the cluster analysis results;

该实施例中,降序排列:按照每一类别包含的缺陷特征数量的降序对聚类结果进行排列;In this embodiment, descending order is used to arrange the clustering results in descending order of the number of defect features contained in each category;

该实施例中,特征降序表:将所有类别按照包含的缺陷特征数量进行降序排列后生成的类别排序表;In this embodiment, the feature descending table is a category sorting table generated by arranging all categories in descending order according to the number of defect features contained;

该实施例中,第一序数:用于在特征降序表中提取出符合预设条件的阈值,例如第一序数为3,则序数为1、2的缺陷类别被提取,剩余的都不提取;In this embodiment, the first ordinal number is used to extract the threshold value that meets the preset condition in the feature descending table. For example, if the first ordinal number is 3, the defect categories with ordinal numbers 1 and 2 are extracted, and the rest are not extracted.

该实施例中,预设类别-参数对照表:包含有特征类别与第一筛选参数之间映射关系的对照表,是预先设定好的,用于根据输入的缺陷特征类别获取相应的第一筛选参数;In this embodiment, the preset category-parameter comparison table: a comparison table containing mapping relationships between feature categories and first screening parameters, which is preset and used to obtain corresponding first screening parameters according to the input defect feature category;

该实施例中,第一筛选参数:用于在预设模型数据库中筛选得到符合预设条件的缺陷分析模型的参数;In this embodiment, the first screening parameter is used to screen the parameters of the defect analysis model that meets the preset conditions in the preset model database;

该实施例中,预设特征-优先级对照表:包含有缺陷特征与优先级之间的映射关系的对照表,是预先设定好的,用于根据输入的缺陷特征获取对应的优先级;In this embodiment, the preset feature-priority comparison table: a comparison table containing mapping relationships between defect features and priorities, which is preset and used to obtain corresponding priorities according to input defect features;

该实施例中,优先级:将缺陷特征输入预设特征-优先级对照表中得出的相应的优先级别,优先级越高,缺陷特征的重要性越高,在所有缺陷特征中的影响占比越高;In this embodiment, priority: the defect feature is input into the preset feature-priority comparison table to obtain the corresponding priority level. The higher the priority, the more important the defect feature is, and the higher the impact ratio among all defect features is.

该实施例中,预设优先级-参数对照表:包含有优先级与第二筛选参数之间映射关系的对照表,用于根据输入的优先级获取相应的第二筛选参数;In this embodiment, the preset priority-parameter comparison table: a comparison table including a mapping relationship between priorities and second screening parameters, used to obtain the corresponding second screening parameters according to the input priority;

该实施例中,第二筛选参数:用于在预设模型数据库中筛选得到符合预设条件的缺陷分析模型的参数,与第一筛选参数对应;In this embodiment, the second screening parameter is used to screen the parameters of the defect analysis model that meets the preset conditions in the preset model database, corresponding to the first screening parameter;

该实施例中,模型匹配:根据输入的第一筛选参数、第二筛选参数在预设模型数据库中筛选得到匹配的缺陷分析模型的匹配过程;In this embodiment, model matching: a matching process of obtaining a matching defect analysis model by screening in a preset model database according to the input first screening parameter and second screening parameter;

该实施例中,第二匹配度:用于在预设模型数据库中筛选得到符合预设条件的缺陷分析模型的阈值,例如,第二匹配度为90%,则匹配度大于90%的缺陷分析模型才可以被选中;In this embodiment, the second matching degree is used to filter out a threshold value of a defect analysis model that meets the preset conditions in the preset model database. For example, if the second matching degree is 90%, only defect analysis models with a matching degree greater than 90% can be selected.

该实施例中,第一类别信息:即缺陷识别结果对应的缺陷类别;In this embodiment, the first category information: that is, the defect category corresponding to the defect recognition result;

该实施例中,第一绑定信息:将第一结果与对应的第一类别信息进行绑定后生成的信息;In this embodiment, the first binding information is information generated by binding the first result with the corresponding first category information;

该实施例中,参数分析:对第一绑定信息、第二结果中同一特征类别下的特征参数进行参数比较和分析的操作,用于获取再生铝合金模板缺陷的最终识别结果。In this embodiment, parameter analysis: an operation of comparing and analyzing the characteristic parameters under the same characteristic category in the first binding information and the second result, so as to obtain the final recognition result of the defect of the recycled aluminum alloy template.

上述技术方案的工作原理及有益效果是:本发明通过对缺陷特征进行聚类分析,可以发现缺陷之间的相似性和差异性,有助于识别常见的缺陷模式和问题根源,从而可以不断提升对缺陷的识别精度和识别速度;同时,通过结合与特征降序表中序数大于第一序数的特征类别对应的第一筛选参数和与优先级对应的第二筛选参数,在预设模型数据库中精确匹配缺陷分析模型,提升了模型与数据之间的适配性,从而提升了数据处理的效率;随后对第一绑定信息和第二结果进行参数分析,得出缺陷的最终识别结果,极大的减少了误判等情况的发生,提升了对再生铝合金模板进行缺陷识别的精度,从而提升了铝合金生产的质控水平。The working principle and beneficial effects of the above technical solution are as follows: the present invention can discover the similarities and differences between defects by clustering the defect features, which is helpful to identify common defect patterns and root causes of problems, thereby continuously improving the recognition accuracy and recognition speed of defects; at the same time, by combining the first screening parameter corresponding to the feature category with an ordinal number greater than the first ordinal number in the feature descending table and the second screening parameter corresponding to the priority, the defect analysis model is accurately matched in the preset model database, thereby improving the adaptability between the model and the data, thereby improving the efficiency of data processing; then, the first binding information and the second result are subjected to parameter analysis to obtain the final recognition result of the defect, which greatly reduces the occurrence of misjudgment and the like, and improves the accuracy of defect recognition for recycled aluminum alloy templates, thereby improving the quality control level of aluminum alloy production.

本发明实施例提供一种再生铝合金模板表面缺陷识别方法,基于特征提取方法,对待处理图像进行特征提取,生成缺陷特征信息,包括:The embodiment of the present invention provides a method for identifying surface defects of a recycled aluminum alloy template. Based on a feature extraction method, feature extraction is performed on an image to be processed to generate defect feature information, including:

在待处理图像中截取多个不同预设尺寸的方形灰度图像以及预设滤波函数;intercepting a plurality of square grayscale images of different preset sizes and a preset filter function from the image to be processed;

通过预设滤波函数在m个尺度,n个预设方向上对每个灰度图像进行滤波处理,得到与每一方形灰度图像对应的m*n个滤波核;Each grayscale image is filtered at m scales and n preset directions by using a preset filter function to obtain m*n filter kernels corresponding to each square grayscale image;

将所有方形灰度图像的m*n个滤波核进行融合处理,得到第一纹理图像;The m*n filter kernels of all square grayscale images are fused to obtain a first texture image;

分别获取第一纹理图像的亮度均值ave1以及对应实时图像的亮度均值ave2;Obtain the brightness mean value ave1 of the first texture image and the brightness mean value ave2 of the corresponding real-time image respectively;

以亮度均值ave1对实时图像进行调整得到第一待分析图像,同时,以亮度均值ave2对第一纹理图像进行调整得到第二待分析图像;The real-time image is adjusted with the brightness mean value ave1 to obtain the first image to be analyzed, and at the same time, the first texture image is adjusted with the brightness mean value ave2 to obtain the second image to be analyzed;

当实时图像中第i个像素点的亮度值r1i满足ave1-Δ1≤r1i≤ave1+Δ1条件,将第i个像素点替换为亮度均值ave1,否则,保持第i个像素点不变,进而得到第一待分析图像,其中,Δ1表示再生铝合金模板表面不存缺陷时所对应获取的亮度方差;When the brightness value r1 i of the i-th pixel in the real-time image satisfies the condition ave1-Δ1≤r1 i ≤ave1+Δ1, the i-th pixel is replaced with the brightness mean ave1, otherwise, the i-th pixel is kept unchanged, and then the first image to be analyzed is obtained, where Δ1 represents the brightness variance obtained when there is no defect on the surface of the recycled aluminum alloy template;

同时,当第一纹理图像中第j个像素点亮度值r2j满足ave2-Δ2≤r2j≤ave2+Δ2,将第j个像素点替换为亮度均值ave2,否则,保持第j个像素点不变,进而得到第二待分析图像,其中,Δ2表示第一纹理图像与实时图像中初步确定出存在缺陷的所有相同坐标下的亮度方差;At the same time, when the brightness value r2 j of the j-th pixel in the first texture image satisfies ave2-Δ2≤r2 j ≤ave2+Δ2, the j-th pixel is replaced with the brightness mean ave2, otherwise, the j-th pixel is kept unchanged, and then the second image to be analyzed is obtained, where Δ2 represents the brightness variance of all the same coordinates where defects are preliminarily determined to exist in the first texture image and the real-time image;

获取第一待分析图像与实时图像的第一亮度方差σ12,同时,获取第二待分析图像与第一纹理图像的第二亮度方差σ22Obtain a first brightness variance σ1 2 between the first image to be analyzed and the real-time image, and at the same time, obtain a second brightness variance σ2 2 between the second image to be analyzed and the first texture image;

按照亮度均值ave1、亮度均值ave2、第一亮度方差σ12以及第二亮度方差σ22,获取得到第一纹理图像的图像质量W;According to the brightness mean ave1, the brightness mean ave2, the first brightness variance σ1 2 and the second brightness variance σ2 2 , the image quality W of the first texture image is obtained;

其中,∝1、∝2、∝3表示重要性参数;N1表示第一待分析图像中存在像素亮度替换的个数;N3表示第一待分析图像中像素点的总个数;N2表示第二待分析图像中存在像素亮度替换的个数;N4表示第二待分析图像中像素点的总个数;Wherein, ∝1, ∝2, ∝3 represent importance parameters; N1 represents the number of pixel brightness replacements in the first image to be analyzed; N3 represents the total number of pixels in the first image to be analyzed; N2 represents the number of pixel brightness replacements in the second image to be analyzed; N4 represents the total number of pixels in the second image to be analyzed;

若图像质量W大于等于阈值质量,基于第一纹理图像进行特征提取;If the image quality W is greater than or equal to the threshold quality, feature extraction is performed based on the first texture image;

否则,根据图像质量W与阈值质量的差值,从差值-清晰调节映射表中确定调节清晰度,同时,分别获取每个方形灰度图像的平均灰度值以及平均模糊值,并基于调节清晰度进行分析,得到弱纹理区域以及细节纹理区域;Otherwise, according to the difference between the image quality W and the threshold quality, the adjustment clarity is determined from the difference-clarity adjustment mapping table. At the same time, the average grayscale value and the average blur value of each square grayscale image are obtained respectively, and the weak texture area and the detail texture area are obtained based on the adjustment clarity.

对弱纹理区域按照进行第一清晰倍数调整以及对细节纹理区域按照/>进行第二清晰倍数调整,获取得到第二纹理图像,其中,G1(avehd,avemh)表示基于平均灰度值avehd与平均模糊值avemh的调节函数;β1、β2表示调节权重;Δ(mh)表示基于模糊度mh的变量;Δ(hd,bd)表示基于灰度值hd与标准灰度值bd的变量;G2(avehd,avemh,maxmh,avemh1)表示基于平均灰度值avehd、平均模糊值avemh、最大模糊度maxmh以及满足正态分布概率的平均模糊度avemh1的调节函数;[]表示取整符号;For weak texture areas, Perform the first definition magnification adjustment and adjust the detail texture area according to/> Perform a second definition multiple adjustment to obtain a second texture image, wherein G1(avehd,avemh) represents an adjustment function based on the average gray value avehd and the average blur value avemh; β1 and β2 represent adjustment weights; Δ(mh) represents a variable based on the blur mh; Δ(hd,bd) represents a variable based on the gray value hd and the standard gray value bd; G2(avehd,avemh,maxmh,avemh1) represents an adjustment function based on the average gray value avehd, the average blur value avemh, the maximum blur maxmh and the average blur avemh1 that satisfies the normal distribution probability; [] represents a rounding symbol;

基于第二纹理图像进行特征提取。Feature extraction is performed based on the second texture image.

该实施例中,预设尺寸:预先设定的方形灰度图像的尺寸大小,例如4*4、5*5、6*6等;In this embodiment, the preset size is a preset size of a square grayscale image, such as 4*4, 5*5, 6*6, etc.;

该实施例中,方形灰度图像:通过在待处理图像中截取得到的具有正方形形状,且包含有灰度级别信息的图像;In this embodiment, the square grayscale image is an image having a square shape and containing grayscale information obtained by intercepting the image to be processed;

该实施例中,预设滤波函数:用于对每个方向灰度图像进行滤波处理的函数,是预先设定好的,例如用于图像纹理特征提取的Gabor函数;In this embodiment, the preset filter function: the function used for filtering the grayscale image in each direction is preset, such as the Gabor function used for image texture feature extraction;

该实施例中,滤波核:根据预设滤波函数生成的,且用于对每一方形灰度图像进行滤波操作的矩阵,与方向灰度图像的尺寸大小一致,例如,方形灰度图像的尺寸为4*4,则滤波核的尺寸也为4*4,用于对方形灰度图像中相同位置的元素进行计算;In this embodiment, the filter kernel is a matrix generated according to a preset filter function and used to perform a filtering operation on each square grayscale image, which is consistent with the size of the directional grayscale image. For example, if the size of the square grayscale image is 4*4, the size of the filter kernel is also 4*4, and is used to calculate the elements at the same position in the square grayscale image;

该实施例中,第一纹理图像:经过对所有方形灰度图像的m*n个滤波核进行融合处理后得到的包含有再生铝合金模板纹理特征的图像;In this embodiment, the first texture image is an image containing texture features of the recycled aluminum alloy template obtained by fusing m*n filter kernels of all square grayscale images;

该实施例中,第一待分析图像:通过第一纹理图像的亮度均值对实时图像进行调整得到的图像;In this embodiment, the first image to be analyzed is: an image obtained by adjusting the real-time image by the brightness mean value of the first texture image;

该实施例中,第二待分析图像:通过实时图像的亮度均值对第一纹理图像进行调整得到的图像;In this embodiment, the second image to be analyzed is: an image obtained by adjusting the first texture image by the brightness mean value of the real-time image;

该实施例中,像素点:图像中的最基本单元,是图像中最小的可见元素,每个像素点都有一个特定的位置以及包含有颜色、透明度、灰度、深度等图像属性信息,例如,图像的大小为5*5,则图像中包含有5*5=25个像素点;In this embodiment, pixel: the most basic unit in an image, which is the smallest visible element in the image. Each pixel has a specific position and contains image attribute information such as color, transparency, grayscale, depth, etc. For example, if the size of an image is 5*5, then the image contains 5*5=25 pixels;

该实施例中,阈值质量:用于判定图像质量W是否满足预设条件的阈值;In this embodiment, threshold quality: a threshold used to determine whether the image quality W meets a preset condition;

该实施例中,差值:即图像质量小于阈值质量时,两者之间的数值差;In this embodiment, the difference value is the numerical difference between the two when the image quality is less than the threshold quality;

该实施例中,差值-清晰调节映射表:包含有差值与调节清晰度之间映射关系的映射表,用于根据输入的差值获取对应的调节清晰度;In this embodiment, the difference-definition adjustment mapping table: a mapping table including a mapping relationship between a difference and an adjustment definition, and used to obtain a corresponding adjustment definition according to an input difference;

该实施例中,平均灰度值:即每个方形灰度图像中的所有像素点的灰度值总和进行平均后得到的平均数;In this embodiment, the average gray value is the average value obtained by averaging the sum of the gray values of all pixels in each square gray image;

该实施例中,平均模糊值:即每个方形灰度图像中的所有像素点的模糊值的平均数;In this embodiment, the average fuzzy value is the average of the fuzzy values of all pixels in each square grayscale image;

该实施例中,模糊值:将图像中的每个像素点周围区域的像素值的平均值作为该像素点的模糊值;In this embodiment, the fuzzy value: the average value of the pixel values of the area around each pixel in the image is taken as the fuzzy value of the pixel;

该实施例中,弱纹理区域:图像中相对缺乏明显纹理特征或纹理细节不明显的区域,例如,各个像素点之间的灰度差较小的区域;In this embodiment, weak texture area: an area in the image that is relatively lacking in obvious texture features or has unclear texture details, for example, an area where the grayscale difference between each pixel is small;

该实施例中,细节纹理区域:包含有明显纹理或纹理细节丰富的区域,例如,各个像素点之间的灰度差较大的区域;In this embodiment, the detailed texture area includes an area with obvious texture or rich texture details, for example, an area with a large grayscale difference between each pixel;

该实施例中,清晰倍数调整:对图像继续放大或缩小操作,以调整图像的清晰度的操作;In this embodiment, the definition adjustment is to continue to zoom in or zoom out the image to adjust the definition of the image;

该实施例中,第二纹理图像:对弱纹理区域进行第一清晰倍数调整以及对细节纹理区域进行第二清晰倍数调整后得到的纹理图像。In this embodiment, the second texture image is a texture image obtained by performing a first definition magnification adjustment on the weak texture area and a second definition magnification adjustment on the detail texture area.

上述技术方案的工作原理及有益效果是:本发明利用预设滤波函数对多个不同大小的方形灰度图像进行滤波处理,从而可以得到包含有再生铝合金模板纹理特征信息的第一纹理图像,进而通过对第一纹理图像以及实时图像分别对应的亮度值进行分析处理,得到第一纹理图像的图像质量,不仅大幅提升了纹理图像的图像质量,而且降低了后续进行纹理识别的难度。同时,本发明还可以通过对弱纹理区域以及细节纹理区域进行清晰度调整来进一步提升第一纹理图像的图像质量,进而得到清晰度更高的第二纹理图像,进一步降低了后续进行纹理特征提取的难度。The working principle and beneficial effects of the above technical solution are as follows: the present invention uses a preset filter function to filter a plurality of square grayscale images of different sizes, thereby obtaining a first texture image containing the texture feature information of the recycled aluminum alloy template, and then analyzing and processing the brightness values corresponding to the first texture image and the real-time image, respectively, to obtain the image quality of the first texture image, which not only greatly improves the image quality of the texture image, but also reduces the difficulty of subsequent texture recognition. At the same time, the present invention can further improve the image quality of the first texture image by adjusting the clarity of the weak texture area and the detail texture area, thereby obtaining a second texture image with higher clarity, further reducing the difficulty of subsequent texture feature extraction.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims (6)

1. The method for identifying the surface defects of the regenerated aluminum alloy template is characterized by comprising the following steps of:
Step 1: acquiring a real-time image of a template through image acquisition equipment, and preprocessing the real-time image to obtain an image to be processed;
Step 2: extracting features of the image to be processed to generate defect feature information, and inputting the defect feature information into a preset defect recognition model to perform defect recognition to obtain a first result;
step 3: acquiring historical defect image information of a template, establishing a historical defect image set, and simultaneously inputting the first result and the historical defect image set into a preset image comparison model for comparison analysis to obtain a second result;
Step 4: screening in a preset model database based on the defect characteristic information to obtain a defect analysis model, and inputting the first result and the second result into the defect analysis model to perform defect analysis to obtain a final identification result;
Wherein, step 2 includes:
Acquiring images to be processed in the real-time image set, and screening out an adaptive feature extraction strategy from a preset strategy database;
selecting a proper feature extraction method from a preset strategy-method comparison table based on the feature extraction strategy;
Based on the feature extraction method, feature extraction is carried out on the image to be processed, and defect feature information is generated, and the method comprises the following steps:
Intercepting a plurality of square gray images with different preset sizes from the image to be processed and presetting a filtering function;
Filtering each gray image in m scales and n preset directions through a preset filter function to obtain m x n filter kernels corresponding to each square gray image;
Fusing all m x n filter kernels of the square gray images to obtain a first texture image;
respectively acquiring a brightness average ave1 of the first texture image and a brightness average ave2 of a corresponding real-time image;
Adjusting the real-time image with the brightness average ave1 to obtain a first image to be analyzed, and simultaneously adjusting the first texture image with the brightness average ave2 to obtain a second image to be analyzed;
When the brightness value of the ith pixel point in the real-time image Satisfy/>Replacing the ith pixel point with a brightness average ave1 under the condition, otherwise, keeping the ith pixel point unchanged, and further obtaining a first image to be analyzed, wherein/>Representing the brightness variance obtained when the surface of the regenerated aluminum alloy template has no defect;
meanwhile, when the brightness value of the jth pixel point in the first texture image Satisfy/>2, Replacing the jth pixel point with a brightness average ave2, otherwise, keeping the jth pixel point unchanged, and further obtaining a second image to be analyzed, wherein/>2, Preliminarily determining the brightness variance of the first texture image and the real-time image under all the same coordinates with defects;
acquiring a first brightness variance of the first image to be analyzed and the real-time image Simultaneously, a second brightness variance/>, of the second image to be analyzed and the first texture image is obtained
According to the brightness average ave1, the brightness average ave2 and the first brightness varianceSecond luminance variance/>Acquiring the image quality W of the first texture image;
;
Wherein, 、/>、/>Representing an importance parameter; n1 represents the number of pixel brightness substitutions existing in the first image to be analyzed; n3 represents the total number of pixel points in the first image to be analyzed; n2 represents the number of pixel brightness substitutions in the second image to be analyzed; n4 represents the total number of pixel points in the second image to be analyzed;
If the image quality W is greater than or equal to a threshold quality, extracting features based on the first texture image;
otherwise, determining the adjustment definition from a difference-definition adjustment mapping table according to the difference value of the image quality W and the threshold quality, respectively acquiring an average gray value and an average fuzzy value of each square gray image, and analyzing based on the adjustment definition to obtain a weak texture region and a detail texture region;
Following the weak texture region First definition multiple adjustment and detail texture area adjustment according to/>Performing second definition multiple adjustment to obtain a second texture image, wherein/>The representation is based on the average gray value/>And mean blur value/>Is a function of the adjustment of (2); /(I)、/>Representing an adjustment weight; /(I)A variable representing a blur degree mh; /(I)A variable representing a gray value hd and a standard gray value bd; /(I)The representation is based on the average gray value/>Average blur value/>An adjustment function of the maximum ambiguity maxmh and the average ambiguity avemh1 satisfying the normal distribution probability; [ ] Representing a rounding symbol;
And extracting features based on the second texture image.
2. The method for identifying surface defects of a recycled aluminum alloy template according to claim 1, wherein in step 1, the method comprises the following steps:
Image acquisition is carried out on the surface of the template from a preset angle through image acquisition equipment to obtain a real-time image, and a real-time image set is established according to the time sequence of the real-time image;
Preprocessing each real-time image in the real-time image set, and calibrating the real-time image meeting a preset first threshold value as an image to be processed.
3. The method for identifying surface defects of a recycled aluminum alloy template according to claim 1, wherein in step 2, the method further comprises:
Acquiring model information from a preset feature-model matching table based on the defect feature information, and selecting a corresponding preset defect identification model from a preset model database based on the model information;
And inputting the defect characteristic information into the preset defect identification model to identify the defects, so as to obtain a first result.
4. The method for identifying surface defects of a recycled aluminum alloy template according to claim 1, wherein in step3, the method comprises the following steps:
Based on the defect characteristic information and the first result, screening historical defect image information with the matching degree larger than the first matching degree from a historical defect database;
performing defect classification on the historical defect image information, and establishing a historical defect image set based on classification results;
and meanwhile, comparing and analyzing the first result and the historical defect image set by using a preset image comparison model to obtain a second result.
5. The method for identifying surface defects of a recycled aluminum alloy template according to claim 4, wherein in step 3, the method further comprises:
performing content analysis on the defect characteristic information, and establishing a defect characteristic data packet based on analysis content;
classifying and analyzing all defect characteristics in the defect characteristic data packet, and establishing a defect characteristic classification table based on analysis results;
Combining a preset category-factor matching table to obtain a first screening factor of each feature category in the defect feature classification table;
meanwhile, inputting the defect characteristic data packet into a preset characteristic analysis model for parameter calculation to obtain characteristic parameters corresponding to each defect characteristic;
Acquiring a second screening factor of each defect characteristic parameter by using a preset parameter-factor comparison table based on the characteristic parameter of each defect characteristic;
Screening historical defect image information with the matching degree larger than the first matching degree in a historical defect database by combining the first screening factor and the second screening factor;
classifying and analyzing the historical defect image information according to the characteristic information carried in the historical defect image information, and establishing a historical defect image set according to the classifying and analyzing result and the characteristic parameters of the corresponding defect characteristics;
Extracting the defect characteristics under the same classification and corresponding characteristic parameters in the defect characteristic classification table and the historical defect image set, and establishing a comparison data packet;
and inputting the comparison data packet corresponding to each characteristic category into a preset image comparison analysis model for comparison analysis by combining the first result to obtain a second result.
6. The method for identifying surface defects of a recycled aluminum alloy template according to claim 1, wherein in step 4, the method comprises the following steps:
Performing cluster analysis on each defect feature in the defect feature information, simultaneously counting the number of defect features in the same category in a cluster analysis result, and performing descending arrangement according to the number of defect features contained in each category to obtain a feature descending list;
Extracting feature categories with ordinal numbers larger than the first ordinal number in the feature descending list, and obtaining first screening parameters according to a preset category-parameter comparison list;
Meanwhile, judging the priority of each defect feature in the defect feature information and a preset feature-priority comparison table to obtain the priority corresponding to each defect feature;
based on each defect feature and the corresponding priority, acquiring a second screening parameter corresponding to each defect feature by combining a preset priority-parameter comparison table;
inputting the first screening parameters and the second screening parameters into a preset model database for model matching to obtain a defect analysis model with matching degree larger than the second matching degree;
Acquiring first type information corresponding to the first result, and binding the first type information with the first result to obtain first binding information;
Inputting the first binding information and the second result into the defect analysis model, and carrying out parameter analysis on the characteristic parameters under the same characteristic category to obtain a final identification result.
CN202311537634.6A 2023-11-16 2023-11-16 Surface defect identification method for regenerated aluminum alloy template Active CN117351001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311537634.6A CN117351001B (en) 2023-11-16 2023-11-16 Surface defect identification method for regenerated aluminum alloy template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311537634.6A CN117351001B (en) 2023-11-16 2023-11-16 Surface defect identification method for regenerated aluminum alloy template

Publications (2)

Publication Number Publication Date
CN117351001A CN117351001A (en) 2024-01-05
CN117351001B true CN117351001B (en) 2024-05-28

Family

ID=89365076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311537634.6A Active CN117351001B (en) 2023-11-16 2023-11-16 Surface defect identification method for regenerated aluminum alloy template

Country Status (1)

Country Link
CN (1) CN117351001B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117805145B (en) * 2024-02-28 2024-05-14 西安汉华建筑实业有限公司 Aluminum template surface defect detection method and system
CN118071731B (en) * 2024-04-01 2024-08-16 泰州职业技术学院 Waste metal identification method

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289808A (en) * 2011-07-22 2011-12-21 清华大学 Method and system for evaluating image fusion quality
CN109559310A (en) * 2018-11-30 2019-04-02 国网山东省电力公司电力科学研究院 Power transmission and transformation inspection image quality evaluating method and system based on conspicuousness detection
CN113838043A (en) * 2021-09-30 2021-12-24 杭州百子尖科技股份有限公司 Machine vision-based quality analysis method in metal foil manufacturing
CN114677336A (en) * 2022-03-10 2022-06-28 四川省建筑科学研究院有限公司 Curtain wall panel damage identification method based on infrared image
CN114757941A (en) * 2022-05-19 2022-07-15 国网智能科技股份有限公司 Transformer substation equipment defect identification method and device, electronic equipment and storage medium
CN114972356A (en) * 2022-08-03 2022-08-30 海门市腾飞橡塑厂 Plastic product surface defect detection and identification method and system
CN115032194A (en) * 2022-06-13 2022-09-09 南通雨奇金属制品有限公司 Intelligent detection and regulation method for components of regenerated aluminum alloy
CN115345802A (en) * 2022-10-18 2022-11-15 苏州迈创信息技术有限公司 Remote monitoring method for operation state of electromechanical equipment
CN115526859A (en) * 2022-09-28 2022-12-27 深圳市海葵信息技术有限公司 Method for identifying production defects, distributed processing platform, equipment and storage medium
CN115760820A (en) * 2022-11-28 2023-03-07 湖北三江航天万峰科技发展有限公司 Plastic part defect image identification method and application
CN116393403A (en) * 2023-04-11 2023-07-07 肇庆市大正铝业有限公司 A method and system for identifying waste impurities on the surface structure of aluminum alloy products
WO2023134792A2 (en) * 2022-12-15 2023-07-20 苏州迈创信息技术有限公司 Led lamp wick defect detection method
CN116563641A (en) * 2023-05-30 2023-08-08 江西软件职业技术大学 Surface defect identification method and system based on small target detection
CN116862913A (en) * 2023-09-04 2023-10-10 深圳市鑫典金光电科技有限公司 Machine vision-based defect detection method and system for composite nickel-copper heat dissipation bottom plate
CN116977727A (en) * 2023-07-27 2023-10-31 上海理工大学 Image processing-based gas combustion flame real-time monitoring method and system
CN117033990A (en) * 2023-06-26 2023-11-10 华能大理风力发电有限公司祥云分公司 Photovoltaic array fault feature extraction and modeling method
CN117390214A (en) * 2023-12-12 2024-01-12 北京云成金融信息服务有限公司 File retrieval method and system based on OCR technology

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI603074B (en) * 2015-07-03 2017-10-21 元智大學 Optical film defect detection method and system thereof
US10769784B2 (en) * 2018-12-21 2020-09-08 Metal Industries Research & Development Centre Image analyzing method and electrical device
CN111583157B (en) * 2020-05-13 2023-06-02 杭州睿琪软件有限公司 Image processing method, system and computer readable storage medium
CN113763296B (en) * 2021-04-28 2024-08-06 腾讯云计算(北京)有限责任公司 Image processing method, device and medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289808A (en) * 2011-07-22 2011-12-21 清华大学 Method and system for evaluating image fusion quality
CN109559310A (en) * 2018-11-30 2019-04-02 国网山东省电力公司电力科学研究院 Power transmission and transformation inspection image quality evaluating method and system based on conspicuousness detection
CN113838043A (en) * 2021-09-30 2021-12-24 杭州百子尖科技股份有限公司 Machine vision-based quality analysis method in metal foil manufacturing
CN114677336A (en) * 2022-03-10 2022-06-28 四川省建筑科学研究院有限公司 Curtain wall panel damage identification method based on infrared image
CN114757941A (en) * 2022-05-19 2022-07-15 国网智能科技股份有限公司 Transformer substation equipment defect identification method and device, electronic equipment and storage medium
CN115032194A (en) * 2022-06-13 2022-09-09 南通雨奇金属制品有限公司 Intelligent detection and regulation method for components of regenerated aluminum alloy
CN114972356A (en) * 2022-08-03 2022-08-30 海门市腾飞橡塑厂 Plastic product surface defect detection and identification method and system
CN115526859A (en) * 2022-09-28 2022-12-27 深圳市海葵信息技术有限公司 Method for identifying production defects, distributed processing platform, equipment and storage medium
CN115345802A (en) * 2022-10-18 2022-11-15 苏州迈创信息技术有限公司 Remote monitoring method for operation state of electromechanical equipment
CN115760820A (en) * 2022-11-28 2023-03-07 湖北三江航天万峰科技发展有限公司 Plastic part defect image identification method and application
WO2023134792A2 (en) * 2022-12-15 2023-07-20 苏州迈创信息技术有限公司 Led lamp wick defect detection method
CN116393403A (en) * 2023-04-11 2023-07-07 肇庆市大正铝业有限公司 A method and system for identifying waste impurities on the surface structure of aluminum alloy products
CN116563641A (en) * 2023-05-30 2023-08-08 江西软件职业技术大学 Surface defect identification method and system based on small target detection
CN117033990A (en) * 2023-06-26 2023-11-10 华能大理风力发电有限公司祥云分公司 Photovoltaic array fault feature extraction and modeling method
CN116977727A (en) * 2023-07-27 2023-10-31 上海理工大学 Image processing-based gas combustion flame real-time monitoring method and system
CN116862913A (en) * 2023-09-04 2023-10-10 深圳市鑫典金光电科技有限公司 Machine vision-based defect detection method and system for composite nickel-copper heat dissipation bottom plate
CN117390214A (en) * 2023-12-12 2024-01-12 北京云成金融信息服务有限公司 File retrieval method and system based on OCR technology

Also Published As

Publication number Publication date
CN117351001A (en) 2024-01-05

Similar Documents

Publication Publication Date Title
CN117351001B (en) Surface defect identification method for regenerated aluminum alloy template
CN109977808B (en) Wafer surface defect mode detection and analysis method
CN108765412B (en) A method for classifying surface defects of strip steel
CN108562589B (en) Method for detecting surface defects of magnetic circuit material
CN113724231B (en) Industrial defect detection method based on semantic segmentation and target detection fusion model
CN118608504B (en) Machine vision-based part surface quality detection method and system
CN105809121A (en) Multi-characteristic synergic traffic sign detection and identification method
CN114926463A (en) Production quality detection method suitable for chip circuit board
CN107437243A (en) Tire method for detecting impurities and device based on x-ray image
CN107909081A (en) The quick obtaining and quick calibrating method of image data set in a kind of deep learning
CN103824091A (en) Vehicle license plate recognition method for intelligent transportation system
CN107945200A (en) Image binaryzation dividing method
CN113324864A (en) Pantograph carbon slide plate abrasion detection method based on deep learning target detection
CN110335262A (en) A method for automatic classification of print defects in machine vision
CN108764361B (en) Working condition identification method of indicator diagram of beam-pumping unit based on integrated learning
CN112036384B (en) Sperm head shape recognition method, device and equipment
CN114820625B (en) Automobile top block defect detection method
WO2024021461A1 (en) Defect detection method and apparatus, device, and storage medium
CN117974601B (en) Method and system for detecting surface defects of silicon wafer based on template matching
CN115311484B (en) Optimized clustering segmentation method for weld data
TW202127371A (en) Image-based defect detection method and computer readable medium thereof
CN113537037A (en) Pavement disease identification method, system, electronic device and storage medium
CN115082776A (en) Electric energy meter automatic detection system and method based on image recognition
CN116664540A (en) Surface defect detection method of rubber sealing ring based on Gaussian line detection
CN115601747A (en) Method and system for calculating confluency of adherent cells

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
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Liu Jun

Inventor before: Liu Jun

Inventor before: Lu Xiaojun