[go: up one dir, main page]

CN118762016A - A visual inspection method for processing quality of bicycle saddle leather - Google Patents

A visual inspection method for processing quality of bicycle saddle leather Download PDF

Info

Publication number
CN118762016A
CN118762016A CN202411245444.1A CN202411245444A CN118762016A CN 118762016 A CN118762016 A CN 118762016A CN 202411245444 A CN202411245444 A CN 202411245444A CN 118762016 A CN118762016 A CN 118762016A
Authority
CN
China
Prior art keywords
edge point
edge
distribution
local
grayscale
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202411245444.1A
Other languages
Chinese (zh)
Other versions
CN118762016B (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.)
Tianjin Quanfu Automobile Industry Co ltd
Original Assignee
Tianjin Quanfu Automobile 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 Tianjin Quanfu Automobile Industry Co ltd filed Critical Tianjin Quanfu Automobile Industry Co ltd
Priority to CN202411245444.1A priority Critical patent/CN118762016B/en
Publication of CN118762016A publication Critical patent/CN118762016A/en
Application granted granted Critical
Publication of CN118762016B publication Critical patent/CN118762016B/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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/60Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/06Recognition of objects for industrial automation
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Biochemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

本发明涉及缺陷检测技术领域,具体涉及一种自行车鞍座皮革加工质量视觉检测方法、该方法根据边缘点之间的局部灰度偏差的数值相似和分布聚集情况,以及局部边缘分布情况分析,获得边缘点间的近似程度;根据边缘点之间在邻域范围内的整体灰度级分布情况,得到边缘点间的光照差异影响;综合每个边缘点与所有边缘点的近似程度和光照差异影响,确定出疑似缺陷边缘点,依据疑似缺陷边缘点的分布进行质量检测。本发明通过边缘点的局部灰度偏差,局部边缘分布以及灰度级分布情况,减小因鞍座不平整导致的采集光线影响情况,使缺陷确定更准确,进行质量检测的结果更可靠。

The present invention relates to the field of defect detection technology, and specifically to a method for visual inspection of the processing quality of bicycle saddle leather. The method obtains the degree of approximation between edge points based on the numerical similarity and distribution aggregation of local grayscale deviations between edge points, as well as the analysis of local edge distribution; obtains the influence of illumination differences between edge points based on the overall grayscale distribution between edge points within the neighborhood; determines suspected defective edge points by combining the degree of approximation and illumination differences between each edge point and all edge points, and performs quality inspection based on the distribution of suspected defective edge points. The present invention reduces the influence of light collection caused by uneven saddle by using the local grayscale deviation, local edge distribution and grayscale distribution of edge points, so that defect determination is more accurate and the results of quality inspection are more reliable.

Description

一种自行车鞍座皮革加工质量视觉检测方法A visual inspection method for processing quality of bicycle saddle leather

技术领域Technical Field

本发明涉及缺陷检测技术领域,具体涉及一种自行车鞍座皮革加工质量视觉检测方法。The invention relates to the technical field of defect detection, and in particular to a method for visually detecting the processing quality of bicycle saddle leather.

背景技术Background Art

自行车鞍座皮革质量好坏影响着自行车使用过程中的舒适性、耐久性和安全性,自行车皮革鞍座具有耐用且减震性较好的特点,但是若自行车鞍座在皮革加工上就出现了裂纹、划伤或变形等缺陷时,将影响鞍座在骑行中的使用寿命且维护困难,同时也会带来骑行过程中的安全隐患。故对自行车鞍座的质量检测在生产过程中至关重要。The quality of bicycle saddle leather affects the comfort, durability and safety of bicycles. Bicycle leather saddles are durable and have good shock absorption. However, if cracks, scratches or deformations occur in the leather processing of bicycle saddles, the service life of the saddle will be affected and maintenance will be difficult. It will also bring potential safety hazards during riding. Therefore, quality inspection of bicycle saddles is very important in the production process.

在通常的对获取图像与标准图像进行对比分析进行缺陷检测的方法中,由于自行车鞍座的表面不平整性,皮革表面图像的过程会受到环境光照、阴影或反射等多种的影响,极大程度的影响与标准间的判断,且皮革鞍座表面存在复杂不规律的纹理特征,这使得鞍座皮革表面中的缺陷部分更难以准确分析,影响质量检测结果。In the usual method of defect detection by comparing and analyzing the acquired image with the standard image, due to the surface unevenness of the bicycle saddle, the process of the leather surface image will be affected by various factors such as ambient lighting, shadows or reflections, which greatly affects the judgment between the standard and the leather saddle surface. In addition, the leather saddle surface has complex and irregular texture features, which makes it more difficult to accurately analyze the defective parts in the saddle leather surface, affecting the quality inspection results.

发明内容Summary of the invention

为了解决现有技术中鞍座皮革表面中的缺陷部分难以准确分析,影响质量检测结果的技术问题,本发明的目的在于提供一种自行车鞍座皮革加工质量视觉检测方法,所采用的技术方案具体如下:In order to solve the technical problem that it is difficult to accurately analyze the defective parts on the surface of saddle leather in the prior art, which affects the quality inspection results, the purpose of the present invention is to provide a visual inspection method for the processing quality of bicycle saddle leather. The technical solution adopted is as follows:

本发明提供了一种自行车鞍座皮革加工质量视觉检测方法,所述方法包括:The present invention provides a method for visually inspecting the processing quality of bicycle saddle leather, the method comprising:

获取自行车鞍座的皮革表面灰度图像中的边缘点;Obtain edge points in the grayscale image of the leather surface of a bicycle saddle;

在每个边缘点与其他每个边缘点之间,根据局部灰度偏差的数值相似情况和分布聚集情况,以及局部边缘点的分布相似情况,获得每个边缘点与其他每个边缘点的近似程度;Between each edge point and each other edge point, the degree of similarity between each edge point and each other edge point is obtained according to the numerical similarity and distribution aggregation of the local grayscale deviation and the distribution similarity of the local edge points;

在每个边缘点与每个其他边缘点之间,根据预设邻域范围内的灰度级分布偏离程度以及灰度级分布范围对比程度,获得每个边缘点与其他每个边缘点的光照差异影响;Between each edge point and each other edge point, according to the grayscale distribution deviation degree and the grayscale distribution range contrast degree within the preset neighborhood range, the illumination difference influence of each edge point and each other edge point is obtained;

基于每个边缘点与其他所有边缘点的近似程度以及光照差异影响,从所有边缘点中确定疑似缺陷边缘点;根据皮革表面灰度图像中疑似缺陷边缘点的分布情况进行质量检测。Based on the approximation of each edge point to all other edge points and the influence of illumination differences, suspected defective edge points are determined from all edge points; quality inspection is performed based on the distribution of suspected defective edge points in the grayscale image of the leather surface.

进一步地,所述近似程度的获取方法包括:Furthermore, the method for obtaining the degree of approximation includes:

将每个边缘点在预设局部范围内的像素点作为每个边缘点的局部像素点;在每个边缘点与其他每个边缘点之间,根据同分布位置的局部像素点之间的灰度差异,获得每个局部像素点的灰度偏差;The pixel points of each edge point within the preset local range are used as the local pixel points of each edge point; between each edge point and each other edge point, the grayscale deviation of each local pixel point is obtained according to the grayscale difference between the local pixel points at the same distribution position;

在每个边缘点与其他每个边缘点之间,根据所有局部像素点的灰度偏差的数值混乱分布情况,获得每个边缘点与其他每个边缘点的数值分布指标;Between each edge point and each other edge point, according to the numerical chaotic distribution of the grayscale deviations of all local pixels, the numerical distribution index of each edge point and each other edge point is obtained;

在每个边缘点与其他每个边缘点之间,根据局部像素点的灰度偏差的数值大小和局部像素点间的距离分布情况,获得每个边缘点与其他每个边缘点的分布离散指标;Between each edge point and each other edge point, according to the numerical value of the grayscale deviation of the local pixel points and the distance distribution between the local pixel points, the distribution discrete index of each edge point and each other edge point is obtained;

在每个边缘点与其他每个边缘点之间,将预设局部范围内的边缘点总数量之间的差异,作为每个边缘点与其他每个边缘点的边缘分布指标;Between each edge point and each other edge point, the difference between the total number of edge points in a preset local range is used as an edge distribution indicator between each edge point and each other edge point;

结合每个边缘点与其他每个边缘点的数值分布指标、分布离散指标和边缘分布指标,获得每个边缘点与其他每个边缘点的近似程度;数值分布指标和边缘分布指标均与近似程度呈负相关,分布离散指标与近似程度呈正相关。The degree of similarity between each edge point and each other edge point is obtained by combining the numerical distribution index, distribution dispersion index and marginal distribution index of each edge point with each other edge point; the numerical distribution index and marginal distribution index are negatively correlated with the degree of similarity, and the distribution dispersion index is positively correlated with the degree of similarity.

进一步地,所述灰度偏差的获取方法包括:Furthermore, the grayscale deviation acquisition method includes:

将每个边缘点在预设局部范围内的局部像素点按照预设排列顺序进行排列,获得每个边缘点的局部像素序列;Arrange local pixel points of each edge point within a preset local range according to a preset arrangement order to obtain a local pixel sequence of each edge point;

在每个边缘点与其他每个边缘点的局部像素序列之间,将具有相同索引值的局部像素点的灰度差异,作为索引值对应局部像素点的灰度偏差。Between each edge point and the local pixel sequences of each other edge point, the grayscale difference of the local pixel points having the same index value is used as the grayscale deviation of the local pixel point corresponding to the index value.

进一步地,所述分布离散指标的获取方法包括:Furthermore, the method for obtaining the distribution dispersion index includes:

在每个边缘点与其他每个边缘点之间,将所有局部像素点的灰度偏差的上四分位数作为偏差基准;将灰度偏差大于上四分位数的局部像素点,作为每个边缘点与其他每个边缘点之间的异常像素点;Between each edge point and each other edge point, the upper quartile of the grayscale deviation of all local pixels is used as the deviation benchmark; the local pixels with grayscale deviation greater than the upper quartile are regarded as abnormal pixels between each edge point and each other edge point;

在边缘点的预设局部范围内,将两两不相同的异常像素点间距离的累加值,作为每个边缘点与其他每个边缘点的分布离散指标。In the preset local range of edge points, the accumulated value of the distance between two different abnormal pixel points is used as the distribution discrete index of each edge point and each other edge point.

进一步地,所述光照差异影响的获取方法包括:Furthermore, the method for obtaining the influence of illumination difference includes:

在每个边缘点与其他每个边缘点之间,根据预设邻域范围内灰度级分布趋势的相似程度,获得每个边缘点与其他每个边缘点的光照偏离度;Between each edge point and each other edge point, according to the similarity of the gray level distribution trend within the preset neighborhood range, the illumination deviation between each edge point and each other edge point is obtained;

在每个边缘点与其他每个边缘点之间,根据预设邻域范围内在最大灰度级与最小灰度级间的差异情况,获得每个边缘点与其他每个边缘点的范围对比度;Between each edge point and each other edge point, according to the difference between the maximum gray level and the minimum gray level within the preset neighborhood range, the range contrast between each edge point and each other edge point is obtained;

结合每个边缘点与其他每个边缘点的光照偏离度和范围对比度,获得每个边缘点与其他每个边缘点的光照差异影响。The illumination difference impact of each edge point on the other edge points is obtained by combining the illumination deviation and range contrast between each edge point and each other edge point.

进一步地,所述光照偏离度的获取方法包括:Furthermore, the method for obtaining the illumination deviation comprises:

获取每个边缘点在预设邻域范围内的灰度直方图,对灰度直方图中的数据进行曲线拟合,获得每个边缘点的邻域分布曲线;Obtain a grayscale histogram of each edge point within a preset neighborhood range, perform curve fitting on the data in the grayscale histogram, and obtain a neighborhood distribution curve for each edge point;

在每个边缘点与其他每个边缘点之间,将邻域分布曲线之间的DTW值,作为每个边缘点与其他每个边缘点的光照偏离度。Between each edge point and each other edge point, the DTW value between the neighborhood distribution curves is used as the illumination deviation between each edge point and each other edge point.

进一步地,所述范围对比度的获取方法包括:Furthermore, the method for acquiring the range contrast includes:

将每个边缘点在预设邻域范围内的灰度级的极差作为每个边缘点的灰度级范围;The gray level range of each edge point is taken as the gray level range of each edge point within the preset neighborhood range;

在每个边缘点与其他每个边缘点之间,将灰度级范围的差异作为范围偏差;将最小灰度级之间的差异,作为下限偏差;将最大灰度级之间的差异作为上限偏差;The difference in grayscale range between each edge point and each other edge point is taken as the range deviation; the difference between the minimum grayscales is taken as the lower limit deviation; the difference between the maximum grayscales is taken as the upper limit deviation;

在每个边缘点与其他每个边缘点之间,根据范围偏差、下限偏差和上限偏差,获得每个边缘点与其他每个边缘点的范围对比度;范围偏差与范围对比度呈负相关,下限偏差和上限偏差均与范围对比呈正相关。Between each edge point and every other edge point, the range contrast of each edge point and every other edge point is obtained according to the range deviation, lower limit deviation and upper limit deviation; the range deviation is negatively correlated with the range contrast, and the lower limit deviation and upper limit deviation are both positively correlated with the range contrast.

进一步地,所述疑似缺陷边缘点的获取方法包括:Furthermore, the method for obtaining the suspected defect edge point includes:

结合每个边缘点与其他每个边缘点的近似程度和光照差异影响,获得每个边缘点与其他每个边缘点的可信近似度;Combining the approximation degree of each edge point to each other edge point and the influence of illumination difference, the credible approximation degree of each edge point to each other edge point is obtained;

结合每个边缘点与其他所有边缘点的可信近似度,获得每个边缘点的正常可能;Combine the credible approximation of each edge point with all other edge points to obtain the normal possibility of each edge point;

当边缘点的正常可能小于预设正常阈值时,将对应边缘点作为疑似缺陷边缘点。When the normal probability of an edge point is less than a preset normal threshold, the corresponding edge point is regarded as a suspected defect edge point.

进一步地,所述根据皮革表面灰度图像中疑似缺陷边缘点的分布情况进行质量检测,包括:Furthermore, the quality inspection is performed according to the distribution of suspected defect edge points in the grayscale image of the leather surface, including:

将皮革表面灰度图像中疑似缺陷边缘点的总数量,作为皮革表面灰度图像的缺陷数量;The total number of suspected defect edge points in the leather surface grayscale image is taken as the number of defects in the leather surface grayscale image;

根据皮革表面灰度图像中疑似缺陷边缘点之间的局部距离分布情况,获得皮革表面灰度图像的缺陷分布度;According to the local distance distribution between the edge points of suspected defects in the grayscale image of the leather surface, the defect distribution degree of the grayscale image of the leather surface is obtained;

结合皮革表面灰度图像的缺陷数量和缺陷分布度,获得皮革表面的缺陷度;Combining the defect quantity and defect distribution of the grayscale image of the leather surface, the defect degree of the leather surface is obtained;

当缺陷度大于预设质量阈值时,将对应自行车鞍座的皮革表面记为质量不合格。When the defect degree is greater than a preset quality threshold, the leather surface of the corresponding bicycle saddle is marked as unqualified.

进一步地,所述缺陷分布度的获取方法包括:Furthermore, the method for obtaining the defect distribution degree includes:

将每个疑似缺陷边缘点在预设邻域范围内的其他疑似缺陷边缘点作为疑似缺陷边缘点的邻域缺陷边缘点;Taking other suspected defect edge points within a preset neighborhood range of each suspected defect edge point as neighborhood defect edge points of the suspected defect edge point;

统计邻域缺陷边缘点的总数量,获得每个疑似缺陷边缘点的局部数量分布;Count the total number of defect edge points in the neighborhood and obtain the local number distribution of each suspected defect edge point;

将每个疑似缺陷边缘点与每个邻域缺陷边缘点之间距离的和值进行负相关映射,作为每个疑似缺陷边缘点的局部距离分布;Negatively correlate the sum of the distances between each suspected defect edge point and each neighboring defect edge point to serve as the local distance distribution of each suspected defect edge point;

将每个疑似缺陷边缘点的局部数量分布和局部距离分布的乘积,作为每个疑似缺陷边缘点的缺陷聚集度;The product of the local quantity distribution and the local distance distribution of each suspected defect edge point is taken as the defect aggregation degree of each suspected defect edge point;

将所有疑似缺陷边缘点的缺陷聚集度的平均值,作为皮革表面灰度图像的缺陷分布度。The average value of the defect aggregation degree of all suspected defect edge points is taken as the defect distribution degree of the leather surface grayscale image.

本发明具有如下有益效果:The present invention has the following beneficial effects:

本发明考虑皮革纹理与缺陷部分在图像中的边缘特征整体相近程度不同,通过边缘点之间的近似情况分析缺陷可能,首先针对边缘点之间的局部灰度偏差的数值相似和分布聚集情况,以及局部边缘分布情况分析,获得近似程度,考虑鞍座表面图像中出现的局部反光会与缺陷部分一样带来局部灰度偏差,因此单局部灰度偏差不能反映缺陷表征的差异情况,故针对偏差情况的数值分布特点以及局部边缘的连续特征,以减小反光情况对近似程度分析的影响,提高后续缺陷确定的准确性。进一步针对边缘点之间在邻域范围内的整体灰度级分布情况分析,考虑不同边缘处可能由于光照导致的近似情况不真实的问题,得到光照差异影响,以便于在后续对边缘之间缺陷分析时调整近似程度。最终综合每个边缘点与所有边缘点的近似程度和光照差异影响,确定出可能存在异常的疑似缺陷边缘点,减小反光和光照带来的差异情况,提高缺陷点筛选的准确性,并依据疑似缺陷边缘点的分布进行质量检测。本发明通过边缘点的局部灰度偏差,局部边缘分布以及灰度级分布情况,减小因鞍座不平整导致的采集光线影响,使缺陷确定更准确,进行质量检测的结果更可靠。The present invention considers that the overall similarity between the edge features of the leather texture and the defective part in the image is different, and the defect possibility is analyzed through the approximation between the edge points. First, the numerical similarity and distribution aggregation of the local grayscale deviation between the edge points, as well as the local edge distribution analysis, are analyzed to obtain the approximation degree. Considering that the local reflection in the saddle surface image will bring local grayscale deviation like the defective part, so the single local grayscale deviation cannot reflect the difference in defect characterization, the numerical distribution characteristics of the deviation and the continuous characteristics of the local edge are considered to reduce the influence of the reflection on the approximation degree analysis and improve the accuracy of subsequent defect determination. Further, the overall grayscale distribution between the edge points in the neighborhood is analyzed, considering the problem that the approximation at different edges may be unrealistic due to illumination, and the influence of illumination difference is obtained, so as to adjust the approximation degree in the subsequent defect analysis between the edges. Finally, the approximation degree of each edge point and all edge points and the influence of illumination difference are combined to determine the suspected defect edge points that may have abnormalities, reduce the differences caused by reflection and illumination, improve the accuracy of defect point screening, and perform quality inspection based on the distribution of suspected defect edge points. The present invention reduces the influence of collected light caused by uneven saddle through local grayscale deviation of edge points, local edge distribution and grayscale distribution, so that defect determination is more accurate and the result of quality inspection is more reliable.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案和优点,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1为本发明一个实施例所提供的一种自行车鞍座皮革加工质量视觉检测方法流程图;FIG1 is a flow chart of a method for visually inspecting the processing quality of bicycle saddle leather provided by one embodiment of the present invention;

图2为本发明一个实施例所提供的一种皮革纹理灰度示意图;FIG2 is a grayscale diagram of leather texture provided by an embodiment of the present invention;

图3为本发明一个实施例所提供的一种皮革表面划痕缺陷灰度示意图;FIG3 is a grayscale schematic diagram of a leather surface scratch defect provided by an embodiment of the present invention;

图4为本发明一个实施例所提供的一种近似程度的获取方法流程图;FIG4 is a flow chart of a method for obtaining a degree of similarity provided by an embodiment of the present invention;

图5为本发明一个实施例所提供的一种光照差异影响的获取方法流程图。FIG. 5 is a flow chart of a method for obtaining the influence of illumination differences provided by an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为了更进一步阐述本发明为达成预定发明目的所采取的技术手段及功效,以下结合附图及较佳实施例,对依据本发明提出的一种自行车鞍座皮革加工质量视觉检测方法,其具体实施方式、结构、特征及其功效,详细说明如下。在下述说明中,不同的“一个实施例”或“另一个实施例”指的不一定是同一实施例。此外,一或多个实施例中的特定特征、结构或特点可由任何合适形式组合。In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a bicycle saddle leather processing quality visual inspection method proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

下面结合附图具体的说明本发明所提供的一种自行车鞍座皮革加工质量视觉检测方法的具体方案。The specific scheme of the visual inspection method for processing quality of bicycle saddle leather provided by the present invention is described in detail below with reference to the accompanying drawings.

请参阅图1,其示出了本发明一个实施例所提供的一种自行车鞍座皮革加工质量视觉检测方法流程图,该方法包括以下步骤:Please refer to FIG. 1 , which shows a flow chart of a method for visually inspecting the processing quality of bicycle saddle leather provided by an embodiment of the present invention. The method comprises the following steps:

S1:获取自行车鞍座的皮革表面灰度图像中的边缘点。S1: Obtain edge points in the grayscale image of the leather surface of a bicycle saddle.

在本发明实施例中,通过工业相机获取传送带上自行车鞍座的皮革表面图像,并进行图像预处理,获得皮革表面灰度图像。在本发明实施例中,图像预处理过程可以具体包括图像灰度化处理、滤波去噪处理和去背景化处理,需要说明的是,图像预处理过程为本领域技术人员熟知的技术手段,具体可选用灰度加权法进行灰度化,双边滤波法进行滤波去噪和背景差分法进行去背景化等,在此不做赘述。In an embodiment of the present invention, an image of the leather surface of a bicycle saddle on a conveyor belt is obtained by an industrial camera, and image preprocessing is performed to obtain a grayscale image of the leather surface. In an embodiment of the present invention, the image preprocessing process may specifically include image grayscale processing, filtering and denoising processing, and background removal processing. It should be noted that the image preprocessing process is a technical means well known to those skilled in the art, and specifically grayscale weighting method may be used for grayscale conversion, bilateral filtering method for filtering and denoising, and background difference method for background removal, etc., which will not be described in detail here.

由于自行车鞍座的皮革表面需要考虑骑行的透气性和减震效果,皮革纹理通常较细,请参阅图2,其示出了本发明一个实施例所提供的一种皮革纹理灰度示意图。通过边缘检测算法获取皮革表面灰度特征中的边缘点,在皮革表面由加工可能会出现轻微划痕或裂纹情况,这些缺陷往往表现为沿某一方向扩展生成的线状,并且在颜色上与正常的皮革颜色具有一定的差异,因此可通过边缘检测后续从边缘点分析处缺陷情况。请参阅图3,其示出了本发明一个实施例所提供的一种皮革表面划痕缺陷灰度示意图。需要说明的是,边缘检测算法为本领域技术人员熟知的公知技术手段,在此不做限制和赘述。Since the leather surface of the bicycle saddle needs to consider the breathability and shock absorption effect of riding, the leather texture is usually finer. Please refer to Figure 2, which shows a grayscale schematic diagram of leather texture provided by an embodiment of the present invention. The edge points in the grayscale characteristics of the leather surface are obtained by the edge detection algorithm. Slight scratches or cracks may appear on the leather surface due to processing. These defects often appear as lines extending in a certain direction, and have a certain difference in color from the normal leather color. Therefore, the defects can be analyzed from the edge points through edge detection. Please refer to Figure 3, which shows a grayscale schematic diagram of scratch defects on the leather surface provided by an embodiment of the present invention. It should be noted that the edge detection algorithm is a well-known technical means well known to those skilled in the art, and is not limited or elaborated here.

S2:在每个边缘点与其他每个边缘点之间,根据局部灰度偏差的数值相似情况和分布聚集情况,以及局部边缘点的分布相似情况,获得每个边缘点与其他每个边缘点的近似程度。S2: Between each edge point and each other edge point, the degree of similarity between each edge point and each other edge point is obtained according to the numerical similarity and distribution clustering of the local grayscale deviations and the distribution similarity of the local edge points.

由于皮革表面是具有一定纹理的,正常的皮革纹理具有较高的相似性,在皮革表面不同位置的纹理边缘像素点周围像素点的灰度表现也是具有相似性。而缺陷位置却不具有与其他纹理相似的特征,在局部范围像素点的表现也与正常纹理具有差异,因此,在通过局部灰度情况进行边缘点的近似程度分析。Since the leather surface has certain textures, the normal leather texture has a high similarity, and the grayscale performance of the pixels around the texture edge pixels at different locations on the leather surface is also similar. However, the defective position does not have the characteristics similar to other textures, and the performance of the pixels in the local range is also different from the normal texture. Therefore, the approximation degree of the edge points is analyzed through the local grayscale situation.

优选地,在本发明实施例的一些可实现的方式中,近似程度的获取方法请参阅图4,其示出了本发明一个实施例所提供的一种近似程度的获取方法流程图,该方法包括以下步骤:Preferably, in some achievable manners of the embodiments of the present invention, the method for obtaining the degree of similarity is shown in FIG4 , which shows a flow chart of a method for obtaining the degree of similarity provided by an embodiment of the present invention, and the method comprises the following steps:

S201:将每个边缘点在预设局部范围内的像素点作为每个边缘点的局部像素点;在每个边缘点与其他每个边缘点之间,根据同分布位置的局部像素点之间的灰度差异,获得每个局部像素点的灰度偏差。S201: Pixels within a preset local range of each edge point are used as local pixels of each edge point; and the grayscale deviation of each local pixel is obtained based on the grayscale difference between local pixels at the same distribution position between each edge point and every other edge point.

通过每个边缘点与其他边缘点在局部灰度表现上的相似情况进行分析,对于正常皮革表面纹理,其局部灰度差异性是较低的,因此首先分析两个边缘点之间的局部灰度偏差。The similarity between each edge point and other edge points in local grayscale performance is analyzed. For normal leather surface texture, the local grayscale difference is low, so the local grayscale deviation between two edge points is analyzed first.

在本发明实施例的一些可实现的方式中,首先,将每个边缘点在预设局部范围内的局部像素点按照预设排列顺序进行排列,获得每个边缘点的局部像素序列,通过在局部范围内采用相同排列方法排序,使得边缘点的每个局部像素点具有索引值,反映局部范围内的位置分布情况。In some achievable methods of the embodiments of the present invention, first, the local pixel points of each edge point within a preset local range are arranged in a preset arrangement order to obtain a local pixel sequence of each edge point, and by using the same arrangement method to sort within the local range, each local pixel point of the edge point has an index value, reflecting the position distribution within the local range.

进一步地,在每个边缘点与其他每个边缘点的局部像素序列之间,将具有相同索引值的局部像素点的灰度差异,作为索引值对应局部像素点的灰度偏差,具有相同索引值的局部像素点也即为同分布位置的局部像素点。Furthermore, between each edge point and the local pixel sequence of each other edge point, the grayscale difference of the local pixel points with the same index value is used as the grayscale deviation of the local pixel points corresponding to the index value. The local pixel points with the same index value are also the local pixel points with the same distribution position.

在本发明实施例一个具体实现方式中,预设排列顺序设置为从上到下从左到右的顺序,预设局部范围设置为以边缘点为中心,7为边长大小的窗口范围,具体设置可根据具体实施场景进行调控,在此不做限制。In a specific implementation of an embodiment of the present invention, the preset arrangement order is set to be from top to bottom and from left to right, the preset local range is set to be centered on the edge point, and 7 is the window range of the side length. The specific settings can be adjusted according to the specific implementation scenario and are not limited here.

当边缘点为缺陷部分时,局部像素点的灰度偏差会较大,但是由于自行车鞍座的不平整性,获取表面图像中会存在反光现象,也会造成局部像素点的灰度偏差较大,因此需要进一步对灰度偏差的情况进行分析。When the edge point is a defective part, the grayscale deviation of the local pixel will be large. However, due to the unevenness of the bicycle saddle, there will be reflections in the acquired surface image, which will also cause a large grayscale deviation of the local pixel. Therefore, it is necessary to further analyze the grayscale deviation.

S202:在每个边缘点与其他每个边缘点之间,根据所有局部像素点的灰度偏差的数值混乱分布情况,获得每个边缘点与其他每个边缘点的数值分布指标。S202: between each edge point and each other edge point, according to the numerical disorder distribution of the grayscale deviations of all local pixels, obtain a numerical distribution index between each edge point and each other edge point.

首先对边缘点间存在差异情况进行分析,当灰度偏差整体数值分布越一致,则说明边缘点之间的局部灰度相似性是较高的,边缘点之间在灰度表现上的特征越一致。First, the differences between edge points are analyzed. The more consistent the overall numerical distribution of grayscale deviation is, the higher the local grayscale similarity between edge points is, and the more consistent the grayscale characteristics between edge points are.

在本发明实施例中,将所有局部像素点的灰度偏差的方差作为每个边缘点与其他每个边缘点的数值分布指标,通过方差反映数值的混乱分布情况。在本发明其他实施例中,还可通过标准差、变异系数或信息熵等计算反映数值混乱分布情况,在此不做赘述和限制。In the embodiment of the present invention, the variance of the grayscale deviation of all local pixels is used as the numerical distribution index of each edge point and each other edge point, and the chaotic distribution of the numerical values is reflected by the variance. In other embodiments of the present invention, the chaotic distribution of the numerical values can also be reflected by calculating the standard deviation, coefficient of variation or information entropy, which will not be elaborated or limited here.

当方差越大,也即数值分布指标越大,说明整体局部像素点的灰度偏差表现越不一致,则边缘点与其他边缘点在局部范围内的灰度表征一致性越差,近似情况越低。The larger the variance, that is, the larger the numerical distribution index, the more inconsistent the grayscale deviation of the overall local pixel points is, and the worse the grayscale representation consistency between the edge point and other edge points in the local range is, and the lower the approximation is.

S203:在每个边缘点与其他每个边缘点之间,根据局部像素点的灰度偏差的数值大小和局部像素点间的距离分布情况,获得每个边缘点与其他每个边缘点的分布离散指标。S203: between each edge point and each other edge point, according to the value of the grayscale deviation of the local pixel points and the distance distribution between the local pixel points, obtaining a distribution discrete index between each edge point and each other edge point.

考虑到反光问题导致的灰度偏差也较大的情况,首先从产生较大灰度偏差的局部像素点的位置分布上进行分析,当偏差较大的局部像素点分布越聚集,则可能为缺陷情况,反之当偏差较大的局部像素点位置分布是较为离散的话,则说明越可能为反光等干扰情况造成度。Taking into account the situation where the grayscale deviation caused by the reflection problem is also large, we first analyze the position distribution of local pixels that produce large grayscale deviations. When the local pixel points with large deviations are distributed more concentratedly, it is likely to be a defect. On the contrary, when the position distribution of local pixel points with large deviations is more discrete, it is more likely to be caused by interference such as reflection.

在本发明实施例的一些可实现的方式中,在每个边缘点与其他每个边缘点之间,将所有局部像素点的灰度偏差的上四分位数作为偏差基准,将灰度偏差大于上四分位数的局部像素点,作为每个边缘点与其他每个边缘点之间的异常像素点。通过上四分位数可将灰度偏差较大的局部像素点筛选出来,在本发明其他实施例中,偏差基准也可以采用所有灰度偏差的均值表示,仅用于筛选灰度偏差较大的像素点,在此不做限制。In some achievable methods of the embodiments of the present invention, the upper quartile of the grayscale deviation of all local pixels between each edge point and each other edge point is used as a deviation reference, and the local pixels with grayscale deviation greater than the upper quartile are used as abnormal pixels between each edge point and each other edge point. The upper quartile can be used to screen out local pixels with large grayscale deviations. In other embodiments of the present invention, the deviation reference can also be represented by the mean of all grayscale deviations, which is only used to screen out pixels with large grayscale deviations, and is not limited here.

进一步地,在边缘点的预设局部范围内,将两两不相同的异常像素点间距离的累加值,作为每个边缘点与其他每个边缘点的分布离散指标。由于筛选时仅基于灰度偏差大小进行,因此异常像素点在每个边缘点和其他边缘点的局部范围内均对应存在,在局部范围内的分布情况是对应一致的,故位置分析时仅需在单个局部范围内分析密集性即可。需要说明的是,像素点距离的获取可采用欧式距离获取,其为本领域技术人员熟知的技术手段,在此不做赘述。Furthermore, within the preset local range of the edge point, the cumulative value of the distance between two different abnormal pixel points is used as the distribution discrete index of each edge point and each other edge point. Since the screening is only based on the grayscale deviation, the abnormal pixel points exist in the local range of each edge point and other edge points, and the distribution in the local range is consistent. Therefore, when analyzing the position, it is only necessary to analyze the density in a single local range. It should be noted that the pixel distance can be obtained by using the Euclidean distance, which is a technical means well known to those skilled in the art and will not be described in detail here.

当距离的累加值越大,也即为分布离散指标越大,说明局部范围内的灰度偏差较大表征情况分布的越离散,局部范围内偏差情况为缺陷的可能性较低,此时局部范围内的差异影响可信度较低,边缘点的近似情况应更高。The larger the accumulated value of the distance is, that is, the larger the distribution dispersion index is, the larger the grayscale deviation in the local range is, and the more discrete the distribution is. The possibility that the deviation in the local range is a defect is lower. At this time, the credibility of the difference in the local range is lower, and the approximation of the edge points should be higher.

S204:在每个边缘点与其他每个边缘点之间,将预设局部范围内的边缘点总数量之间的差异,作为每个边缘点与其他每个边缘点的边缘分布指标。S204: Between each edge point and each other edge point, a difference between the total number of edge points in a preset local range is used as an edge distribution index between each edge point and each other edge point.

进一步地,由于皮革纹理的方向具有相似性,而边缘点分析时预设局部范围的大小不变,因此可通过边缘点的分布一致情况进一步判断近似程度,减小反光等干扰对灰度判断的影响。Furthermore, since the directions of leather textures are similar and the size of the preset local range remains unchanged during edge point analysis, the degree of similarity can be further determined by the consistency of the distribution of edge points, thereby reducing the impact of interference such as reflection on grayscale judgment.

在本发明实施例中,分别统计每个边缘点在预设局部范围内的边缘点总数量,获得每个边缘点的局部边缘点数量,通过局部边缘点数量反映局部边缘分布特征。将每个边缘点与其他每个边缘点的局部边缘点数量的差异,作为每个边缘点与其他每个边缘点的边缘分布指标。In the embodiment of the present invention, the total number of edge points of each edge point in a preset local range is counted to obtain the number of local edge points of each edge point, and the local edge point number is used to reflect the local edge distribution characteristics. The difference between the number of local edge points of each edge point and each other edge point is used as the edge distribution index of each edge point and each other edge point.

当边缘点总数量间的差异越大,也即边缘分布指标越大,说明边缘点间的局部纹理分布情况越不相似,则边缘点间的近似情况越低。The greater the difference between the total number of edge points, that is, the larger the edge distribution index, the less similar the local texture distribution between the edge points is, and the lower the approximation between the edge points is.

S205:结合每个边缘点与其他每个边缘点的数值分布指标、分布离散指标和边缘分布指标,获得每个边缘点与其他每个边缘点的近似程度;数值分布指标和边缘分布指标均与近似程度呈负相关,分布离散指标与近似程度呈正相关。S205: Combining the numerical distribution index, distribution dispersion index and edge distribution index of each edge point with each other edge point, obtaining the degree of similarity between each edge point and each other edge point; the numerical distribution index and the edge distribution index are both negatively correlated with the degree of similarity, and the distribution dispersion index is positively correlated with the degree of similarity.

最终综合三个方面的分析表征边缘点之间的局部近似情况,在本发明实施例中,在每个边缘点与其他每个边缘点之间,将数值分布指标和边缘分布指标的乘积作为差异分布指标,将分布离散指标与差异分布指标的比值,作为每个边缘点与其他每个边缘点的近似程度。通过比值形式反映数值分布指标和边缘分布指标均与近似程度呈负相关,分布离散指标与近似程度呈正相关。Finally, the local approximation between edge points is characterized by the comprehensive analysis of the three aspects. In the embodiment of the present invention, between each edge point and each other edge point, the product of the numerical distribution index and the edge distribution index is used as the difference distribution index, and the ratio of the distribution dispersion index to the difference distribution index is used as the degree of approximation between each edge point and each other edge point. The ratio reflects that both the numerical distribution index and the edge distribution index are negatively correlated with the degree of approximation, and the distribution dispersion index is positively correlated with the degree of approximation.

在本发明其他实施例中,也可采用其他基础数学运算反映数值分布指标和边缘分布指标均与近似程度呈负相关,如减法或负指数幂等,分布离散指标与近似程度呈正相关,如加法等,在此不做限制。In other embodiments of the present invention, other basic mathematical operations may also be used to reflect that both the numerical distribution index and the marginal distribution index are negatively correlated with the degree of approximation, such as subtraction or negative exponential idempotence, and the distribution discrete index is positively correlated with the degree of approximation, such as addition, etc., without limitation herein.

在本发明实施例的一个具体实施方式中,近似程度的表达式为:In a specific implementation of the embodiment of the present invention, the expression of the approximation degree is:

;式中,表示为第个边缘点与第个边缘点之间的近似程度,表示为第个边缘点与第个边缘点之间的分布离散指标,表示为第个边缘点与第个边缘点之间的数值分布指标,表示为第个边缘点与第个边缘点之间的边缘分布指标。表示为预设调节系数,在本发明实施例中可设置为0.01,其目的是防止分母为零使公式无意义的情况,在此不做限制。 ; In the formula, Expressed as The edge point and The degree of similarity between edge points, Expressed as The edge point and The distribution dispersion index between edge points is Expressed as The edge point and The numerical distribution index between edge points, Expressed as The edge point and The edge distribution index between edge points. It is represented as a preset adjustment coefficient, which can be set to 0.01 in the embodiment of the present invention. Its purpose is to prevent the denominator from being zero, making the formula meaningless. No limitation is made here.

至此,完成对边缘点之间的局部分析,得到近似程度反映边缘点之间的近似情况。At this point, the local analysis between edge points is completed, and the approximation degree reflects the approximation between edge points.

S3:在每个边缘点与每个其他边缘点之间,根据预设邻域范围内的灰度级分布偏离程度以及灰度级分布范围对比程度,获得每个边缘点与其他每个边缘点的光照差异影响。S3: between each edge point and each other edge point, according to the grayscale distribution deviation degree and the grayscale distribution range contrast degree within a preset neighborhood range, obtain the illumination difference influence between each edge point and each other edge point.

由于自行车鞍座的表面不平整情况,必然会在图像获取时产生光线的干扰问题,会导致不同部分的光照情况不一致,可能会产生阴影偏差等情况,进而造成分析的近似程度不能表现出较为真实度的灰度近似情况,因此通过光照分布的一致情况分析边缘点局部分析时受到光照影响的程度。Due to the uneven surface of the bicycle saddle, light interference will inevitably occur during image acquisition, which will lead to inconsistent lighting conditions in different parts and may cause shadow deviations, which in turn cause the approximation degree of the analysis to fail to show a more realistic grayscale approximation. Therefore, the consistency of the lighting distribution is used to analyze the degree to which the edge points are affected by lighting during local analysis.

优选地,在本发明实施例的一些可实现的方式中,光照差异影响的获取方法请参阅图5,其示出了本发明一个实施例所提供的一种光照差异影响的获取方法流程图,该方法包括以下步骤:Preferably, in some achievable manners of the embodiments of the present invention, the method for obtaining the illumination difference effect is shown in FIG5 , which shows a flow chart of a method for obtaining the illumination difference effect provided by an embodiment of the present invention, and the method comprises the following steps:

S301:在每个边缘点与其他每个边缘点之间,根据预设邻域范围内灰度级分布趋势的相似程度,获得每个边缘点与其他每个边缘点的光照偏离度。S301: between each edge point and each other edge point, according to the similarity of gray level distribution trends within a preset neighborhood range, obtaining the illumination deviation between each edge point and each other edge point.

基于灰度级的分布趋势情况反映光照偏离程度,当边缘点之间进行分析的光照情况越一致时,灰度分布的整体趋势是接近的,反之若灰度级分布趋势产生较大差异时,说明邻域内的灰度分布可能受到了光照不同的影响。The grayscale distribution trend reflects the degree of illumination deviation. When the illumination conditions analyzed between edge points are more consistent, the overall trend of grayscale distribution is close. On the contrary, if the grayscale distribution trend is greatly different, it means that the grayscale distribution in the neighborhood may be affected by different illumination.

在本发明实施例的一些可实现的方式中,获取每个边缘点在预设邻域范围内的灰度直方图,对灰度直方图中的数据进行曲线拟合,获得每个边缘点的邻域分布曲线,通过灰度直方图中的数据曲线能够更直观的反映灰度级分布趋势情况。In some achievable methods of the embodiments of the present invention, a grayscale histogram of each edge point within a preset neighborhood is obtained, and curve fitting is performed on the data in the grayscale histogram to obtain a neighborhood distribution curve for each edge point. The data curve in the grayscale histogram can more intuitively reflect the grayscale distribution trend.

进一步地,在每个边缘点与其他每个边缘点之间,将邻域分布曲线之间的DTW值,作为每个边缘点与其他每个边缘点的光照偏离度。通过DTW值反映邻域分布曲线之间的趋势差异程度,DTW值通过动态时间规整算法获取,为本领域技术人员熟知的技术手段,在此不做赘述。在本发明其他实施例中,也可采用皮尔逊相关系数或斯皮尔曼秩相关系数等反映曲线之间的近似情况,通过负相关映射的值反映差异程度,在此不做赘述和限制。Furthermore, between each edge point and each other edge point, the DTW value between the neighborhood distribution curves is used as the illumination deviation between each edge point and each other edge point. The degree of trend difference between the neighborhood distribution curves is reflected by the DTW value, and the DTW value is obtained by a dynamic time warping algorithm, which is a technical means well known to those skilled in the art and will not be elaborated here. In other embodiments of the present invention, the Pearson correlation coefficient or the Spearman rank correlation coefficient can also be used to reflect the approximation between the curves, and the degree of difference is reflected by the value of the negative correlation mapping, which will not be elaborated or limited here.

在本发明实施例的一个具体实现方式中,对于光照范围的整体分析采用比局部范围更大的范围分析,因此预设邻域范围设置为以边缘点为中心,15为边长大小的窗口范围,具体设置实施者可根据实施场景具体调控。In a specific implementation of an embodiment of the present invention, a larger range analysis is adopted for the overall analysis of the illumination range than the local range analysis, so the preset neighborhood range is set to be a window range with an edge point as the center and 15 as the side length. The implementer can make specific adjustments according to the implementation scenario.

当光照偏离度越大,说明边缘点之间的邻域光照的越不一致,可能受到的光照影响程度越高,近似情况的可信程度较低。The greater the illumination deviation, the more inconsistent the neighborhood illumination between edge points is, the higher the possible illumination influence is, and the lower the credibility of the approximation is.

S302:在每个边缘点与其他每个边缘点之间,根据预设邻域范围内在最大灰度级与最小灰度级间的差异情况,获得每个边缘点与其他每个边缘点的范围对比度。S302: between each edge point and each other edge point, according to the difference between the maximum gray level and the minimum gray level within a preset neighborhood range, obtaining a range contrast ratio between each edge point and each other edge point.

当灰度级的分布趋势近似时,还需要考虑灰度级的分布范围,即使灰度级的分布近似,也有可能存在光照偏差或邻域附近可能存在的缺陷情况影响,导致灰度级分布范围存在偏移或对比扩展或收缩,使得边缘点局部分析的可信程度较低。When the grayscale distribution trend is similar, the grayscale distribution range also needs to be considered. Even if the grayscale distribution is similar, there may be illumination deviation or defects in the neighborhood, which may cause the grayscale distribution range to shift or expand or shrink in contrast, making the local analysis of edge points less reliable.

在本发明实施例的一些可能实现的方式中,将每个边缘点在预设邻域范围内的灰度级的极差作为每个边缘点的灰度级范围。在每个边缘点与其他每个边缘点之间,将灰度级范围的差异作为范围偏差,将最小灰度级之间的差异,作为下限偏差,将最大灰度级之间的差异作为上限偏差。综合灰度级变化的分布范围,以及灰度级分布的下限和上边的偏差变化,分析灰度级分布的对比差异程度。In some possible implementations of the embodiments of the present invention, the extreme difference of the gray level of each edge point within a preset neighborhood is used as the gray level range of each edge point. The difference in gray level range between each edge point and each other edge point is used as the range deviation, the difference between the minimum gray levels is used as the lower limit deviation, and the difference between the maximum gray levels is used as the upper limit deviation. The distribution range of gray level changes and the deviation changes of the lower limit and upper side of the gray level distribution are combined to analyze the contrast difference degree of the gray level distribution.

进一步地,在每个边缘点与其他每个边缘点之间,根据范围偏差、下限偏差和上限偏差,获得每个边缘点与其他每个边缘点的范围对比度。Furthermore, between each edge point and each other edge point, a range contrast between each edge point and each other edge point is obtained according to the range deviation, the lower limit deviation and the upper limit deviation.

当下限偏差和上限偏差越大,说明邻域范围内灰度级的分布变化偏差较大,光照偏差影响较为严重。当范围偏差越大,说明灰度级在邻域分布的范围变化较高,此时极有可能邻域本身存在缺陷异常问题,光照的异常可能分析可能较低,反之则说明灰度级的分布变化不大,若在范围上分布上存在偏差,极有可能为光照影响导致。因此范围偏差与范围对比度呈负相关,下限偏差和上限偏差均与范围对比呈正相关。When the lower limit deviation and the upper limit deviation are larger, it means that the distribution deviation of the gray level in the neighborhood is larger, and the influence of the illumination deviation is more serious. When the range deviation is larger, it means that the range of gray level distribution in the neighborhood varies more. At this time, it is very likely that there are defects and abnormalities in the neighborhood itself, and the abnormal illumination may be analyzed to be low. On the contrary, it means that the distribution of gray level does not change much. If there is a deviation in the distribution in the range, it is very likely caused by the influence of illumination. Therefore, the range deviation is negatively correlated with the range contrast, and the lower limit deviation and the upper limit deviation are both positively correlated with the range contrast.

在本发明实施例中,将下限偏差与上限偏差的乘积作为偏差度,将范围偏差进行负相关映射并归一化处理后的值与偏差度的乘积,作为范围对比度。In the embodiment of the present invention, the product of the lower limit deviation and the upper limit deviation is used as the deviation degree, and the product of the value after the range deviation is negatively correlated and normalized and the deviation degree is used as the range contrast.

当范围对比度越大,说明边缘点在邻域分布间受到光照影响的可能越大,边缘点之间的近似分布可信程度更低。The greater the range contrast, the more likely it is that edge points are affected by illumination in the neighborhood distribution, and the approximate distribution between edge points is less credible.

S303:结合每个边缘点与其他每个边缘点的光照偏离度和范围对比度,获得每个边缘点与其他每个边缘点的光照差异影响。S303: Combining the illumination deviation and range contrast between each edge point and each other edge point, obtaining the illumination difference influence between each edge point and each other edge point.

结合灰度级趋势分布和范围分布两个方面,综合反映边缘点之间受到光照的影响情况。在本发明实施例中,将每个边缘点与其他每个边缘点的光照偏离度和范围对比度的乘积进行归一化处理,获得每个边缘点与其他每个边缘点的光照差异影响。Combining the grayscale trend distribution and range distribution, the influence of light on edge points is comprehensively reflected. In an embodiment of the present invention, the product of the light deviation and range contrast of each edge point and each other edge point is normalized to obtain the light difference influence of each edge point and each other edge point.

在本发明实施例的一个具体实现方式中,光照差异影响的表达式为:In a specific implementation of the embodiment of the present invention, the expression of the influence of illumination difference is:

;式中,表示为第个边缘点与第个边缘点之间的光照差异影响,表示为第个边缘点与第个边缘点之间的光照偏离度,表示为第个边缘点与第个边缘点之间的下限偏差,表示为第个边缘点与第个边缘点之间的上限偏差,表示为第个边缘点与第个边缘点之间的范围偏差,表示为以自然常数为底的指数函数,表示为归一化处理函数,需要说明的是,归一化为本领域技术人员熟知的技术手段,归一化函数的选择可以为线性归一化或标准归一化等,具体的归一化方法在此不做限定。 ; In the formula, Expressed as The edge point and The difference in illumination between edge points affects Expressed as The edge point and The illumination deviation between edge points, Expressed as The edge point and The lower limit deviation between edge points, Expressed as The edge point and The upper limit deviation between edge points, Expressed as The edge point and The range deviation between edge points, Expressed as an exponential function with a natural constant as base, It is represented as a normalization processing function. It should be noted that normalization is a technical means well known to those skilled in the art. The normalization function can be linear normalization or standard normalization, etc. The specific normalization method is not limited here.

其中,表示为第个边缘点与第个边缘点之间的范围对比度,当光照偏离度和范围对比度越大,说明边缘点之间在邻域范围上的灰度级整体分布情况偏离程度较高,反映出的光照差异性较大,在分析近似程度的时候真实性降低。in, Expressed as The edge point and The range contrast between edge points. The larger the illumination deviation and range contrast, the higher the deviation of the overall grayscale distribution between edge points in the neighborhood range, which reflects a larger illumination difference and reduces the authenticity when analyzing the degree of approximation.

S4:基于每个边缘点与其他所有边缘点的近似程度以及光照差异影响,从所有边缘点中确定疑似缺陷边缘点;根据皮革表面灰度图像中疑似缺陷边缘点的分布情况进行质量检测。S4: Determine suspected defective edge points from all edge points based on the approximation between each edge point and all other edge points and the influence of illumination differences; perform quality inspection based on the distribution of suspected defective edge points in the grayscale image of the leather surface.

最终通过光照差异影响进一步调整边缘点之间的近似程度,得到更可信的近似分析情况进行疑似缺陷边缘点的筛选,以更大程度的减小在自行车鞍座表面获取时的各种光线影响问题。Finally, the approximation between edge points is further adjusted through the influence of illumination differences, and a more reliable approximate analysis is obtained to screen suspected defective edge points, so as to minimize the various light influence problems when acquiring on the bicycle saddle surface.

优选地,在本发明实施例的一些可实现的方式中,疑似缺陷边缘点的获取方法包括:Preferably, in some achievable manners of the embodiments of the present invention, the method for acquiring suspected defect edge points includes:

首先,结合每个边缘点与其他每个边缘点的近似程度和光照差异影响,获得每个边缘点与其他每个边缘点的可信近似度,在本发明实施例中,将每个边缘点与其他每个边缘点的近似程度和光照差异影响反比例值的乘积,作为每个边缘点与其他每个边缘点的可信近似度,当光照差异影响越大,说明近似程度的分析可信度越低,因此通过反比例值进行调整。First, the credible proximity of each edge point to each other edge point is obtained by combining the degree of similarity between each edge point and each other edge point and the influence of illumination difference. In an embodiment of the present invention, the product of the degree of similarity between each edge point and each other edge point and the inverse proportional value of the illumination difference is used as the credible proximity of each edge point to each other edge point. The greater the influence of illumination difference, the lower the analytical credibility of the degree of similarity is, and therefore adjustment is made through the inverse proportional value.

其次,结合每个边缘点与其他所有边缘点的可信近似度,获得每个边缘点的正常可能,考虑正常皮革纹理边缘在所有边缘点上的特征是相似的,因此结合每个边缘点与其他所有边缘点之间的近似情况综合判断,在本发明实施例中,将每个边缘点与其他所有边缘点的可信近似度的累加值进行归一化处理,获得边缘点的正常可能,当整体的可信近似度越高,说明边缘点为正常边缘点的可能越高。Secondly, the credible approximation between each edge point and all other edge points is combined to obtain the normal possibility of each edge point. Considering that the features of normal leather texture edges at all edge points are similar, a comprehensive judgment is made based on the approximation between each edge point and all other edge points. In an embodiment of the present invention, the accumulated value of the credible approximation between each edge point and all other edge points is normalized to obtain the normal possibility of the edge point. The higher the overall credible approximation, the higher the possibility that the edge point is a normal edge point.

在本发明其他实施例中,也可将每个边缘点与其他所有边缘点的可信近似度的平均值进行归一化处理,获得边缘点的正常可能,在此不做赘述。In other embodiments of the present invention, the average value of the credible approximation between each edge point and all other edge points may be normalized to obtain the normal probability of the edge point, which will not be elaborated here.

最终,当边缘点的正常可能小于预设正常阈值时,说明边缘点与其他边缘点的整体近似程度较低,将对应边缘点作为疑似缺陷边缘点。在本发明实施例中,预设正常阈值设置为0.3,具体数值实施者可根据具体实施情况进行调整,在此不做限制。Finally, when the normal probability of an edge point is less than the preset normal threshold, it indicates that the overall similarity between the edge point and other edge points is low, and the corresponding edge point is regarded as a suspected defect edge point. In the embodiment of the present invention, the preset normal threshold is set to 0.3, and the specific value can be adjusted by the implementer according to the specific implementation situation, and is not limited here.

在本发明其他实施例中,也可将所有正常可能的下四分位数作为正常阈值,筛选出近似程度不高的边缘点进一步分析。In other embodiments of the present invention, all possible normal lower quartiles may be used as normal thresholds to screen out edge points with low approximation for further analysis.

由此得到皮革表面灰度图像中疑似缺陷边缘的点,当这些疑似缺陷边缘点的分布较为多,且集中较高时,说明这些边缘点越可能组成为缺陷情况的点,进而说明皮革表面出现缺陷可能的程度越高,鞍座的皮革加工品质越可能存在问题。Thus, the points of suspected defect edges in the grayscale image of the leather surface are obtained. When these suspected defect edge points are distributed more and have a higher concentration, it means that these edge points are more likely to constitute defect points, which further indicates that the higher the possibility of defects on the leather surface, the more likely there is a problem with the leather processing quality of the saddle.

优选地,在本发明实施例的一些可实现的方式中,根据皮革表面灰度图像中疑似缺陷边缘点的分布情况进行质量检测,包括:Preferably, in some achievable methods of the embodiments of the present invention, quality detection is performed according to the distribution of suspected defect edge points in the grayscale image of the leather surface, including:

首先,将皮革表面灰度图像中疑似缺陷边缘点的总数量,作为皮革表面灰度图像的缺陷数量。当图像中的疑似缺陷边缘点分布数量越多,则存在缺陷的可能更高。First, the total number of suspected defect edge points in the leather surface grayscale image is taken as the number of defects in the leather surface grayscale image. The more the number of suspected defect edge points in the image, the higher the possibility of defects.

其次,根据皮革表面灰度图像中疑似缺陷边缘点之间的局部距离分布情况,获得皮革表面灰度图像的缺陷分布度,对于缺陷边缘点而言,其可能形成的缺陷区域为聚集的区域,因此在缺陷边缘点附近存在其他距离接近的缺陷边缘点。Secondly, according to the local distance distribution between the suspected defect edge points in the grayscale image of the leather surface, the defect distribution degree of the leather surface grayscale image is obtained. For the defect edge points, the defect area that may be formed is a clustered area, so there are other defect edge points with close distances near the defect edge points.

在本发明实施例中,将每个疑似缺陷边缘点在预设邻域范围内的其他疑似缺陷边缘点作为疑似缺陷边缘点的邻域缺陷边缘点,统计邻域缺陷边缘点的总数量,获得每个疑似缺陷边缘点的局部数量分布,当局部范围的疑似缺陷点越多,也即为局部数量分布越大,说明分布越聚集。将每个疑似缺陷边缘点与每个邻域缺陷边缘点之间距离的和值进行负相关映射,作为每个疑似缺陷边缘点的局部距离分布,当距离越接近,也即为局部距离分布越大,说明分布越集中。In an embodiment of the present invention, other suspected defect edge points within a preset neighborhood range of each suspected defect edge point are taken as neighborhood defect edge points of the suspected defect edge point, and the total number of neighborhood defect edge points is counted to obtain the local quantity distribution of each suspected defect edge point. When the number of suspected defect points in the local range is more, that is, the local quantity distribution is larger, the distribution is more concentrated. The sum of the distances between each suspected defect edge point and each neighborhood defect edge point is negatively correlated and mapped as the local distance distribution of each suspected defect edge point. When the distance is closer, that is, the local distance distribution is larger, the distribution is more concentrated.

进一步地,将每个疑似缺陷边缘点的局部数量分布和局部距离分布的乘积,作为每个疑似缺陷边缘点的缺陷聚集度,当每个疑似缺陷边缘点局部其他疑似缺陷边缘点数量越多且距离越近,则说明局部缺陷分布越聚集。将所有疑似缺陷边缘点的缺陷聚集度的平均值,作为皮革表面灰度图像的缺陷分布度,当整体的缺陷聚集度越高,说明缺陷区域存在可能极高。Furthermore, the product of the local number distribution and the local distance distribution of each suspected defect edge point is used as the defect aggregation degree of each suspected defect edge point. The more other suspected defect edge points are in each suspected defect edge point and the closer the distance is, the more aggregated the local defect distribution is. The average value of the defect aggregation degree of all suspected defect edge points is used as the defect distribution degree of the grayscale image of the leather surface. The higher the overall defect aggregation degree is, the more likely it is that there is a defect area.

最终,结合皮革表面灰度图像的缺陷数量和缺陷分布度,获得皮革表面的缺陷度,在本发明实施例中,将缺陷数量和缺陷分布度的乘积进行归一化处理,获得皮革表面的缺陷度,当缺陷数量和缺陷分布度越大,说明图像中缺陷存在可能和存在数量较多,缺陷度越高。Finally, the defect degree of the leather surface is obtained by combining the defect number and defect distribution degree of the grayscale image of the leather surface. In an embodiment of the present invention, the product of the defect number and the defect distribution degree is normalized to obtain the defect degree of the leather surface. The larger the defect number and the defect distribution degree, the more possible and numerous defects there are in the image, and the higher the defect degree.

当缺陷度大于预设质量阈值时,将对应自行车鞍座的皮革表面记为质量不合格。在本发明实施例的一个具体实现方式中,将预设质量阈值设置为0.4,具体数值可根据具体实施场景进行调整,在此不做限制。When the defect degree is greater than the preset quality threshold, the leather surface of the corresponding bicycle saddle is recorded as unqualified. In a specific implementation of the embodiment of the present invention, the preset quality threshold is set to 0.4, and the specific value can be adjusted according to the specific implementation scenario, which is not limited here.

综上,本发明考虑皮革纹理与缺陷部分在图像中的边缘特征整体相近程度不同,通过边缘点之间的近似情况分析缺陷可能,首先针对边缘点之间的局部灰度偏差的数值相似和分布聚集情况,以及局部边缘分布情况分析,获得近似程度,考虑鞍座表面图像中出现的局部反光会与缺陷部分一样带来局部灰度偏差,因此单局部灰度偏差不能反映缺陷表征的差异情况,故针对偏差情况的数值分布特点以及局部边缘的连续特征,以减小反光情况对近似程度分析的影响,提高后续缺陷确定的准确性。进一步针对边缘点之间在邻域范围内的整体灰度级分布情况分析,考虑不同边缘处可能由于光照导致的近似情况不真实的问题,得到光照差异影响,以便于在后续对边缘之间缺陷分析时调整近似程度。最终综合每个边缘点与所有边缘点的近似程度和光照差异影响,确定出可能存在异常的疑似缺陷边缘点,减小反光和光照带来的差异情况,提高缺陷点筛选的准确性,并依据疑似缺陷边缘点的分布进行质量检测。本发明通过边缘点的局部灰度偏差,局部边缘分布以及灰度级分布情况,减小因鞍座不平整导致的采集光线影响,使缺陷确定更准确,进行质量检测的结果更可靠。In summary, the present invention considers that the overall similarity between the edge features of the leather texture and the defective part in the image is different, and the defect possibility is analyzed through the approximation between the edge points. First, the numerical similarity and distribution aggregation of the local grayscale deviation between the edge points, as well as the local edge distribution analysis, are analyzed to obtain the approximation degree. Considering that the local reflection in the saddle surface image will bring local grayscale deviation like the defective part, so the single local grayscale deviation cannot reflect the difference in defect characterization, the numerical distribution characteristics of the deviation and the continuous characteristics of the local edge are considered to reduce the influence of the reflection on the approximation degree analysis and improve the accuracy of subsequent defect determination. Further, the overall grayscale distribution between the edge points in the neighborhood is analyzed, considering the problem that the approximation at different edges may be unrealistic due to illumination, and the influence of illumination difference is obtained, so as to adjust the approximation degree in the subsequent defect analysis between the edges. Finally, the approximation degree of each edge point and all edge points and the influence of illumination difference are combined to determine the suspected defect edge points that may have abnormalities, reduce the differences caused by reflection and illumination, improve the accuracy of defect point screening, and perform quality inspection based on the distribution of suspected defect edge points. The present invention reduces the influence of collected light caused by uneven saddle through local grayscale deviation of edge points, local edge distribution and grayscale distribution, so that defect determination is more accurate and the result of quality inspection is more reliable.

需要说明的是:上述本发明实施例先后顺序仅仅为了描述,不代表实施例的优劣。在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims (10)

1.一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述方法包括:1. A method for visually inspecting the processing quality of bicycle saddle leather, characterized in that the method comprises: 获取自行车鞍座的皮革表面灰度图像中的边缘点;Obtain edge points in the grayscale image of the leather surface of a bicycle saddle; 在每个边缘点与其他每个边缘点之间,根据局部灰度偏差的数值相似情况和分布聚集情况,以及局部边缘点的分布相似情况,获得每个边缘点与其他每个边缘点的近似程度;Between each edge point and each other edge point, the degree of similarity between each edge point and each other edge point is obtained according to the numerical similarity and distribution aggregation of the local grayscale deviation and the distribution similarity of the local edge points; 在每个边缘点与每个其他边缘点之间,根据预设邻域范围内的灰度级分布偏离程度以及灰度级分布范围对比程度,获得每个边缘点与其他每个边缘点的光照差异影响;Between each edge point and each other edge point, according to the grayscale distribution deviation degree and the grayscale distribution range contrast degree within the preset neighborhood range, the illumination difference influence of each edge point and each other edge point is obtained; 基于每个边缘点与其他所有边缘点的近似程度以及光照差异影响,从所有边缘点中确定疑似缺陷边缘点;根据皮革表面灰度图像中疑似缺陷边缘点的分布情况进行质量检测。Based on the approximation of each edge point to all other edge points and the influence of illumination differences, suspected defective edge points are determined from all edge points; quality inspection is performed based on the distribution of suspected defective edge points in the grayscale image of the leather surface. 2.根据权利要求1所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述近似程度的获取方法包括:2. The method for visually inspecting the processing quality of bicycle saddle leather according to claim 1, characterized in that the method for obtaining the degree of similarity comprises: 将每个边缘点在预设局部范围内的像素点作为每个边缘点的局部像素点;在每个边缘点与其他每个边缘点之间,根据同分布位置的局部像素点之间的灰度差异,获得每个局部像素点的灰度偏差;The pixel points of each edge point within the preset local range are used as the local pixel points of each edge point; between each edge point and each other edge point, the grayscale deviation of each local pixel point is obtained according to the grayscale difference between the local pixel points at the same distribution position; 在每个边缘点与其他每个边缘点之间,根据所有局部像素点的灰度偏差的数值混乱分布情况,获得每个边缘点与其他每个边缘点的数值分布指标;Between each edge point and each other edge point, according to the numerical chaotic distribution of the grayscale deviations of all local pixels, the numerical distribution index of each edge point and each other edge point is obtained; 在每个边缘点与其他每个边缘点之间,根据局部像素点的灰度偏差的数值大小和局部像素点间的距离分布情况,获得每个边缘点与其他每个边缘点的分布离散指标;Between each edge point and each other edge point, according to the numerical value of the grayscale deviation of the local pixel points and the distribution of the distance between the local pixel points, the distribution discrete index of each edge point and each other edge point is obtained; 在每个边缘点与其他每个边缘点之间,将预设局部范围内的边缘点总数量之间的差异,作为每个边缘点与其他每个边缘点的边缘分布指标;Between each edge point and each other edge point, the difference between the total number of edge points in a preset local range is used as an edge distribution indicator between each edge point and each other edge point; 结合每个边缘点与其他每个边缘点的数值分布指标、分布离散指标和边缘分布指标,获得每个边缘点与其他每个边缘点的近似程度;数值分布指标和边缘分布指标均与近似程度呈负相关,分布离散指标与近似程度呈正相关。The degree of similarity between each edge point and each other edge point is obtained by combining the numerical distribution index, distribution dispersion index and marginal distribution index of each edge point with each other edge point; the numerical distribution index and marginal distribution index are negatively correlated with the degree of similarity, and the distribution dispersion index is positively correlated with the degree of similarity. 3.根据权利要求2所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述灰度偏差的获取方法包括:3. The method for visually inspecting the processing quality of bicycle saddle leather according to claim 2, wherein the grayscale deviation acquisition method comprises: 将每个边缘点在预设局部范围内的局部像素点按照预设排列顺序进行排列,获得每个边缘点的局部像素序列;Arrange local pixel points of each edge point within a preset local range according to a preset arrangement order to obtain a local pixel sequence of each edge point; 在每个边缘点与其他每个边缘点的局部像素序列之间,将具有相同索引值的局部像素点的灰度差异,作为索引值对应局部像素点的灰度偏差。Between each edge point and the local pixel sequences of each other edge point, the grayscale difference of the local pixel points having the same index value is used as the grayscale deviation of the local pixel point corresponding to the index value. 4.根据权利要求2所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述分布离散指标的获取方法包括:4. The method for visually inspecting the processing quality of bicycle saddle leather according to claim 2, wherein the method for obtaining the distribution discrete index comprises: 在每个边缘点与其他每个边缘点之间,将所有局部像素点的灰度偏差的上四分位数作为偏差基准;将灰度偏差大于上四分位数的局部像素点,作为每个边缘点与其他每个边缘点之间的异常像素点;Between each edge point and each other edge point, the upper quartile of the grayscale deviation of all local pixels is used as the deviation benchmark; the local pixels whose grayscale deviation is greater than the upper quartile are regarded as abnormal pixels between each edge point and each other edge point; 在边缘点的预设局部范围内,将两两不相同的异常像素点间距离的累加值,作为每个边缘点与其他每个边缘点的分布离散指标。In the preset local range of edge points, the accumulated value of the distance between two different abnormal pixel points is used as the distribution discrete index of each edge point and each other edge point. 5.根据权利要求1所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述光照差异影响的获取方法包括:5. The method for visually inspecting the processing quality of bicycle saddle leather according to claim 1, wherein the method for obtaining the influence of illumination difference comprises: 在每个边缘点与其他每个边缘点之间,根据预设邻域范围内灰度级分布趋势的相似程度,获得每个边缘点与其他每个边缘点的光照偏离度;Between each edge point and each other edge point, according to the similarity of the gray level distribution trend within the preset neighborhood range, the illumination deviation between each edge point and each other edge point is obtained; 在每个边缘点与其他每个边缘点之间,根据预设邻域范围内在最大灰度级与最小灰度级间的差异情况,获得每个边缘点与其他每个边缘点的范围对比度;Between each edge point and each other edge point, according to the difference between the maximum gray level and the minimum gray level within the preset neighborhood range, the range contrast between each edge point and each other edge point is obtained; 结合每个边缘点与其他每个边缘点的光照偏离度和范围对比度,获得每个边缘点与其他每个边缘点的光照差异影响。The illumination difference impact of each edge point on the other edge points is obtained by combining the illumination deviation and range contrast between each edge point and each other edge point. 6.根据权利要求5所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述光照偏离度的获取方法包括:6. The method for visually inspecting the processing quality of bicycle saddle leather according to claim 5, characterized in that the method for obtaining the illumination deviation comprises: 获取每个边缘点在预设邻域范围内的灰度直方图,对灰度直方图中的数据进行曲线拟合,获得每个边缘点的邻域分布曲线;Obtain a grayscale histogram of each edge point within a preset neighborhood range, perform curve fitting on the data in the grayscale histogram, and obtain a neighborhood distribution curve for each edge point; 在每个边缘点与其他每个边缘点之间,将邻域分布曲线之间的DTW值,作为每个边缘点与其他每个边缘点的光照偏离度。Between each edge point and each other edge point, the DTW value between the neighborhood distribution curves is used as the illumination deviation between each edge point and each other edge point. 7.根据权利要求5所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述范围对比度的获取方法包括:7. The method for visually inspecting the processing quality of bicycle saddle leather according to claim 5, characterized in that the method for acquiring the range contrast comprises: 将每个边缘点在预设邻域范围内的灰度级的极差作为每个边缘点的灰度级范围;The gray level range of each edge point is taken as the gray level range of each edge point within the preset neighborhood range; 在每个边缘点与其他每个边缘点之间,将灰度级范围的差异作为范围偏差;将最小灰度级之间的差异,作为下限偏差;将最大灰度级之间的差异作为上限偏差;The difference in grayscale range between each edge point and each other edge point is taken as the range deviation; the difference between the minimum grayscales is taken as the lower limit deviation; the difference between the maximum grayscales is taken as the upper limit deviation; 在每个边缘点与其他每个边缘点之间,根据范围偏差、下限偏差和上限偏差,获得每个边缘点与其他每个边缘点的范围对比度;范围偏差与范围对比度呈负相关,下限偏差和上限偏差均与范围对比呈正相关。Between each edge point and every other edge point, the range contrast of each edge point and every other edge point is obtained according to the range deviation, lower limit deviation and upper limit deviation; the range deviation is negatively correlated with the range contrast, and the lower limit deviation and upper limit deviation are both positively correlated with the range contrast. 8.根据权利要求1所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述疑似缺陷边缘点的获取方法包括:8. A method for visually inspecting the processing quality of bicycle saddle leather according to claim 1, characterized in that the method for obtaining the suspected defect edge points comprises: 结合每个边缘点与其他每个边缘点的近似程度和光照差异影响,获得每个边缘点与其他每个边缘点的可信近似度;Combining the approximation degree of each edge point to each other edge point and the influence of illumination difference, the credible approximation degree of each edge point to each other edge point is obtained; 结合每个边缘点与其他所有边缘点的可信近似度,获得每个边缘点的正常可能;Combine the credible approximation of each edge point with all other edge points to obtain the normal possibility of each edge point; 当边缘点的正常可能小于预设正常阈值时,将对应边缘点作为疑似缺陷边缘点。When the normal probability of an edge point is less than a preset normal threshold, the corresponding edge point is regarded as a suspected defect edge point. 9.根据权利要求1所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述根据皮革表面灰度图像中疑似缺陷边缘点的分布情况进行质量检测,包括:9. A method for visually inspecting the processing quality of bicycle saddle leather according to claim 1, characterized in that the quality inspection is performed according to the distribution of suspected defect edge points in the grayscale image of the leather surface, comprising: 将皮革表面灰度图像中疑似缺陷边缘点的总数量,作为皮革表面灰度图像的缺陷数量;The total number of suspected defect edge points in the leather surface grayscale image is taken as the number of defects in the leather surface grayscale image; 根据皮革表面灰度图像中疑似缺陷边缘点之间的局部距离分布情况,获得皮革表面灰度图像的缺陷分布度;According to the local distance distribution between the edge points of suspected defects in the grayscale image of the leather surface, the defect distribution degree of the grayscale image of the leather surface is obtained; 结合皮革表面灰度图像的缺陷数量和缺陷分布度,获得皮革表面的缺陷度;Combining the defect quantity and defect distribution of the grayscale image of the leather surface, the defect degree of the leather surface is obtained; 当缺陷度大于预设质量阈值时,将对应自行车鞍座的皮革表面记为质量不合格。When the defect degree is greater than a preset quality threshold, the leather surface of the corresponding bicycle saddle is marked as unqualified. 10.根据权利要求9所述一种自行车鞍座皮革加工质量视觉检测方法,其特征在于,所述缺陷分布度的获取方法包括:10. The method for visually inspecting the processing quality of bicycle saddle leather according to claim 9, characterized in that the method for obtaining the defect distribution degree comprises: 将每个疑似缺陷边缘点在预设邻域范围内的其他疑似缺陷边缘点作为疑似缺陷边缘点的邻域缺陷边缘点;Taking other suspected defect edge points within a preset neighborhood range of each suspected defect edge point as neighborhood defect edge points of the suspected defect edge point; 统计邻域缺陷边缘点的总数量,获得每个疑似缺陷边缘点的局部数量分布;Count the total number of defect edge points in the neighborhood and obtain the local number distribution of each suspected defect edge point; 将每个疑似缺陷边缘点与每个邻域缺陷边缘点之间距离的和值进行负相关映射,作为每个疑似缺陷边缘点的局部距离分布;Negatively correlate the sum of the distances between each suspected defect edge point and each neighboring defect edge point to serve as the local distance distribution of each suspected defect edge point; 将每个疑似缺陷边缘点的局部数量分布和局部距离分布的乘积,作为每个疑似缺陷边缘点的缺陷聚集度;The product of the local quantity distribution and the local distance distribution of each suspected defect edge point is taken as the defect aggregation degree of each suspected defect edge point; 将所有疑似缺陷边缘点的缺陷聚集度的平均值,作为皮革表面灰度图像的缺陷分布度。The average value of the defect aggregation degree of all suspected defect edge points is taken as the defect distribution degree of the leather surface grayscale image.
CN202411245444.1A 2024-09-06 2024-09-06 Visual detection method for processing quality of bicycle saddle leather Active CN118762016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411245444.1A CN118762016B (en) 2024-09-06 2024-09-06 Visual detection method for processing quality of bicycle saddle leather

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411245444.1A CN118762016B (en) 2024-09-06 2024-09-06 Visual detection method for processing quality of bicycle saddle leather

Publications (2)

Publication Number Publication Date
CN118762016A true CN118762016A (en) 2024-10-11
CN118762016B CN118762016B (en) 2024-11-05

Family

ID=92944004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411245444.1A Active CN118762016B (en) 2024-09-06 2024-09-06 Visual detection method for processing quality of bicycle saddle leather

Country Status (1)

Country Link
CN (1) CN118762016B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004337743A (en) * 2003-03-20 2004-12-02 Honda Motor Co Ltd Work sorting device
CN109544583A (en) * 2018-11-23 2019-03-29 广东工业大学 A kind of method, device and equipment for extracting Leather Image area-of-interest
CN115825115A (en) * 2021-09-16 2023-03-21 赖特兄弟有限公司 Bicycle non-destructive inspection apparatus, method, computer-readable storage medium
CN117274248A (en) * 2023-11-20 2023-12-22 滨州三元家纺有限公司 Visual detection method for fabric printing and dyeing flaws and defects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004337743A (en) * 2003-03-20 2004-12-02 Honda Motor Co Ltd Work sorting device
CN109544583A (en) * 2018-11-23 2019-03-29 广东工业大学 A kind of method, device and equipment for extracting Leather Image area-of-interest
CN115825115A (en) * 2021-09-16 2023-03-21 赖特兄弟有限公司 Bicycle non-destructive inspection apparatus, method, computer-readable storage medium
CN117274248A (en) * 2023-11-20 2023-12-22 滨州三元家纺有限公司 Visual detection method for fabric printing and dyeing flaws and defects

Also Published As

Publication number Publication date
CN118762016B (en) 2024-11-05

Similar Documents

Publication Publication Date Title
CN116777916B (en) Defect detection method based on metal shell of pump machine
CN118014989B (en) Intelligent detection method for surface defects of power adapter
CN115294140B (en) Hardware part defect detection method and system
CN115170576A (en) Aluminum pipe surface defect detection method based on machine vision
CN116758061A (en) Casting surface defect detection method based on computer vision
CN116758083A (en) Quick detection method for metal wash basin defects based on computer vision
CN115049671B (en) Method and system for detecting cloth surface defects based on computer vision
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN118134938B (en) Visual detection method and system for surface defects of refractory bricks
CN118587216B (en) Terminal LCD surface defect detection method based on image processing
CN119090879B (en) Printing material surface quality detection method based on image enhancement
CN118781090A (en) A quality inspection method, device and system for construction projects
CN118570214B (en) Alloy plate rolling defect identification method for building template system
CN119991670B (en) Visual detection method for titanium alloy bar based on image segmentation
CN118501177A (en) Appearance defect detection method and system for formed foil
CN118762016B (en) Visual detection method for processing quality of bicycle saddle leather
CN117173176B (en) Multi-layer photoetching process hot spot detection method based on image processing
CN118446947A (en) Hub quality detection method for skateboard wheel
CN115018792A (en) Deep-drawing part wrinkling detection method based on computer vision technology
CN118470019B (en) A rapid quality detection method for dehydrated vegetables based on image data
CN119904456B (en) Elevator sill surface wear degree recognition method based on computer vision
CN118864483B (en) A visual quality inspection method for copper core wire in automated production process
CN119131012B (en) Busbar surface quality inspection method based on machine vision
CN118967665B (en) A method for detecting surface quality of fiber cloth gypsum board
CN120147322B (en) Aluminum alloy production control method based on image enhancement

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A visual inspection method for the processing quality of bicycle saddle leather

Granted publication date: 20241105

Pledgee: Tianjin Bank Co.,Ltd. Hedong Branch

Pledgor: Tianjin Quanfu Automobile Industry Co.,Ltd.

Registration number: Y2025980012835