[go: up one dir, main page]

CN116228684A - Method and device for image processing of appearance defect of battery case - Google Patents

Method and device for image processing of appearance defect of battery case Download PDF

Info

Publication number
CN116228684A
CN116228684A CN202310073609.0A CN202310073609A CN116228684A CN 116228684 A CN116228684 A CN 116228684A CN 202310073609 A CN202310073609 A CN 202310073609A CN 116228684 A CN116228684 A CN 116228684A
Authority
CN
China
Prior art keywords
image
defect
battery case
images
defects
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.)
Pending
Application number
CN202310073609.0A
Other languages
Chinese (zh)
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.)
Changzhou Supersonic Intelligent Equipment Co ltd
Original Assignee
Changzhou Supersonic Intelligent Equipment 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 Changzhou Supersonic Intelligent Equipment Co ltd filed Critical Changzhou Supersonic Intelligent Equipment Co ltd
Priority to CN202310073609.0A priority Critical patent/CN116228684A/en
Publication of CN116228684A publication Critical patent/CN116228684A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a battery shell appearance defect image processing method and device, which relate to the technical field of image processing and comprise the following steps: acquiring images of all sides of a target battery shell; synthesizing a plurality of images of the light sources with different angles of the target battery into a plurality of pictures with different types; inputting a standard image template; performing gray scale comparison on a plurality of different types of pictures synthesized by the target battery and a standard image template, and positioning a defect area of the target battery; classifying the defect type of the target battery through deep learning; screening images with defects, and traversing the images with defects into a rule judging algorithm; outputting the defect type, defect size and defect coordinate position of the target shell. The image processing method disclosed by the invention can be suitable for defects of different surface forms and different types, reduces the influence of water stains and greasy dirt on an algorithm, and improves the detection efficiency.

Description

一种电池壳体外观缺陷图像处理方法及装置Method and device for image processing of appearance defect of battery case

技术领域technical field

本发明涉及图像处理技术领域,特别涉及一种电池壳体外观缺陷图像处理方法及装置。The invention relates to the technical field of image processing, in particular to an image processing method and device for appearance defects of a battery casing.

背景技术Background technique

锂电池壳体主要分为钢壳、铝壳、软壳三大类,目前针对锂电池壳体表面缺陷的检测仍然是以人工检测为主,在长期的单一重复性工作中,工人容易产生疲劳,导致不合格的产品流入到应用市场中。不同的工人操作的手法力度宽严也不尽相同,对于极限件合格性的判断会产生主观不一致。铝电池壳体表面形状复杂、缺陷类型多样,并且在生产过程中出现的水渍、油污、加工纹理等易被误识别为缺陷,对检测结果造成干扰。Lithium battery shells are mainly divided into three categories: steel shells, aluminum shells, and soft shells. At present, the detection of surface defects on lithium battery shells is still mainly manual inspection. During long-term single repetitive work, workers are prone to fatigue , resulting in unqualified products flowing into the application market. Different workers operate with different degrees of latitude and strictness, and there will be subjective inconsistencies in the judgment of the qualification of extreme parts. The surface shape of the aluminum battery case is complex and the types of defects are diverse, and water stains, oil stains, and processing textures that appear during the production process are easily misidentified as defects, which interferes with the test results.

发明内容Contents of the invention

鉴于现有技术中铝电池壳体表面形状复杂、缺陷类型多样,并且在生产过程中出现的水渍、油污、加工纹理等易被误识别为缺陷,对检测结果造成干扰,因此本发明提供一种电池壳体外观缺陷图像处理方法及装置,具体内容如下:In view of the complex surface shape and various defect types of aluminum battery casings in the prior art, and the water stains, oil stains, and processing textures that appear during the production process are easily misidentified as defects and interfere with the test results, so the present invention provides a A battery case appearance defect image processing method and device, the specific content is as follows:

一种电池壳体外观缺陷图像处理方法,包括以下步骤:A method for processing an image of a battery case appearance defect, comprising the following steps:

通过获取目标电池壳体各面的图像;By acquiring images of each side of the target battery case;

将目标电池的多张不同角度光源的图像合成多张不同类型的图片;Combining multiple images of light sources from different angles of the target battery into multiple images of different types;

输入标准图像模板;Input standard image template;

将合成的多张不同类型的图片与标准图像模板进行灰阶比对,定位目标电池的缺陷区域;Comparing multiple synthesized images of different types with the standard image template in gray scale to locate the defect area of the target battery;

通过深度学习,分类目标电池壳体的缺陷类型;Through deep learning, classify the defect type of the target battery case;

筛选具有缺陷的图像,将具有缺陷的图像遍历规则判定算法;Screen the images with defects, and traverse the rule judgment algorithm for the images with defects;

输出目标电池壳体的缺陷类型、缺陷大小及缺陷坐标位置。Output the defect type, defect size and defect coordinate position of the target battery case.

进一步的,所述不同角度光源的图像通过2.5D相机扫描得到。Further, the images of the light sources at different angles are scanned by a 2.5D camera.

进一步的,所述不同光源的图像包括标准图、第一形状图、第二形状图、光泽比例图、漫反射图和正反射图。Further, the images of the different light sources include a standard map, a first shape map, a second shape map, a gloss ratio map, a diffuse reflection map and a regular reflection map.

进一步的,所述目标电池壳体各面的图像还包括通过3D相机扫描得到的带有高度信息的图像。Further, the images of each surface of the target battery casing also include images with height information scanned by a 3D camera.

进一步的,所述带有高度信息的图像包括3D高度图和3D灰度图。Further, the image with height information includes a 3D height map and a 3D grayscale image.

进一步的,所述正反射图和所述漫反射图组合识别目标电池壳体是否存在划痕或磨伤;Further, the combination of the regular reflection image and the diffuse reflection image identifies whether there are scratches or abrasions on the target battery case;

所述光泽比率图、所述第一形状图和所述第二形状图组合使用,识别目标电池壳体多种不良。The gloss ratio map, the first shape map and the second shape map are used in combination to identify various defects of the target battery case.

进一步的,所述规则判定算法包括以下步骤:Further, the rule determination algorithm includes the following steps:

判断所述具有缺陷的图像是否属于小面积缺陷,若属小面积缺陷则输出目标壳体的缺陷类型、缺陷大小及缺陷坐标位置;Judging whether the image with defects is a small-area defect, and if it is a small-area defect, output the defect type, defect size and defect coordinate position of the target shell;

若所述具有缺陷的图像不属于小面积缺陷,则将缺陷图像分为点类型图像和线类型图像;If the image with defects does not belong to a small-area defect, the defect image is divided into a point type image and a line type image;

所述点类型图像和所述线类型图像通过相应的面积、长度、数目规则输出缺陷大小。The point-type image and the line-type image output defect sizes through corresponding area, length, and number rules.

进一步的,所述点类型图像通过面积规则和数目规则计算缺陷大小。Further, the point type image calculates the size of the defect through the area rule and the number rule.

进一步的,所述线类型图像通过长度规则计算缺陷大小。Further, the line type image calculates the defect size through the length rule.

进一步的,被执行于前述的一种电池壳体外观缺陷图像处理方法,包括:包括检测系统,依次设置在电池壳体生产流水线上;控制组件,用于控制所述检测系统;其中,检测系统包括:第一扫码枪,设置用于扫描电池壳体长度方向外观;第二扫码枪,设置用于扫描电池壳体高度方向外观;第一侧向定位机构,设置用于限定电池壳体在生产流水线上的横向位置;直角坐标机械组件,设置在电池壳体生产流水线侧面;第一视觉检测组件,设置安装在所述直角坐标机械组件上,设置为在所述直角坐标机械组件的驱动下在三维空间内移动,用于检测电池壳体外观;激光定位组件,设置在电池壳体生产流水线上,用于对电池壳体定位。Further, the aforementioned image processing method for appearance defects of a battery case includes: a detection system arranged sequentially on the battery case production line; a control component used to control the detection system; wherein, the detection system Including: the first code scanning gun, configured to scan the appearance of the battery case in the length direction; the second code scanning gun, configured to scan the appearance of the battery case in the height direction; the first lateral positioning mechanism, configured to limit the appearance of the battery case The horizontal position on the production line; the Cartesian coordinate mechanical assembly is arranged on the side of the battery case production line; the first visual detection assembly is installed on the rectangular coordinate mechanical assembly, and is set to drive the rectangular coordinate mechanical assembly The lower part moves in three-dimensional space to detect the appearance of the battery case; the laser positioning component is set on the battery case production line for positioning the battery case.

考虑到传统人工检测方式以及传统视觉的检测方式,采用本发明公开的图像处理方法可以适应不同表面形态、不同类型的缺陷,降低因水渍、油污对算法的影响,提高了检测的效率。同一套算法模型适用不同类型的铝压铸件产品缺陷的检测,实现了一次标注训练,适应所有类似的缺陷检测,降低了企业的运营成本,提高后期设备的研发效率。Considering the traditional manual detection method and the traditional visual detection method, the image processing method disclosed by the present invention can adapt to different surface shapes and different types of defects, reduce the influence of water stains and oil stains on the algorithm, and improve the detection efficiency. The same set of algorithm models is applicable to the detection of defects of different types of aluminum die-casting products, realizing one-time labeling training, adapting to all similar defect detection, reducing the operating costs of enterprises, and improving the efficiency of later equipment research and development.

附图说明Description of drawings

图1为本发明实施例中一种电池壳体外观缺陷图像处理方法步骤流程图;FIG. 1 is a flow chart of steps in a method for processing an image of a battery casing appearance defect in an embodiment of the present invention;

图2为本发明实施例中规则判定算法步骤流程图。Fig. 2 is a flow chart of the steps of the rule determination algorithm in the embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图对本公开实施例进行详细描述。Embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings.

以下通过特定的具体实例说明本公开的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本公开的其他优点与功效。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。本公开还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本公开的精神下进行各种修饰或改变。需说明的是,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。Embodiments of the present disclosure are described below through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Apparently, the described embodiments are only some of the embodiments of the present disclosure, not all of them. The present disclosure can also be implemented or applied through different specific implementation modes, and various modifications or changes can be made to the details in this specification based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, in the case of no conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present disclosure.

如图1所示,一种电池壳体外观缺陷图像处理方法,包括以下步骤:As shown in Figure 1, an image processing method for appearance defects of a battery case includes the following steps:

S1、通过获取目标电池壳体各面的图像;S1, by acquiring images of each side of the target battery case;

进一步的,在本申请的一种优选实施例中,所述不同角度光源的图像通过2.5D相机扫描得到。Further, in a preferred embodiment of the present application, the images of the light sources at different angles are scanned by a 2.5D camera.

2.5D自动影像测量仪是利用表面光或轮廓光照明后,经变焦距物镜通过摄像头,摄取影像再通过S端子传送到电脑屏幕上,然后以十字线发生器,在显示器上产生的视频十字线为基准,对被测物进行瞄准测量,并通过工作台带动光学尺,在XY方向上移动由多功能数据处理器进行数据处理,通过软件进行计算完成测量。The 2.5D automatic image measuring instrument uses surface light or contour light to illuminate, passes through the camera through the zoom objective lens, captures the image and then transmits it to the computer screen through the S terminal, and then uses the crosshair generator to generate the video crosshair on the display. The benchmark is to aim at the measured object, and drive the optical ruler through the workbench to move in the XY direction. The multi-function data processor performs data processing, and the software performs calculation to complete the measurement.

进一步的,在本申请的一种优选实施例中,所述不同光源的图像包括标准图、第一形状图、第二形状图、光泽比例图、漫反射图和正反射图。Further, in a preferred embodiment of the present application, the images of the different light sources include a standard map, a first shape map, a second shape map, a gloss ratio map, a diffuse reflection map and a regular reflection map.

在本申请实施例中,主要采用3D相机对目标电池壳体的底部平面度、大面口部、大面凸起和大面凹陷进行检测,从而判断大面平整度;采用2.5D线扫相机对目标电池壳体的大面、底面、侧面外观进行检测。In the embodiment of this application, a 3D camera is mainly used to detect the flatness of the bottom of the target battery case, the mouth of the large surface, the protrusion of the large surface, and the depression of the large surface, so as to judge the flatness of the large surface; a 2.5D line scan camera is used Detect the appearance of the large surface, bottom surface and side surface of the target battery case.

进一步的,在本申请的一种优选实施例中,所述目标电池壳体各面的图像还包括通过3D相机扫描得到的带有高度信息的图像。Further, in a preferred embodiment of the present application, the images of each surface of the target battery case further include an image with height information scanned by a 3D camera.

进一步的,在本申请的一种优选实施例中,所述带有高度信息的图像包括3D高度图和3D灰度图。Further, in a preferred embodiment of the present application, the image with height information includes a 3D height map and a 3D grayscale image.

在本申请实施例中,2.5D相机一次扫描多张不同角度光源的图像,另外,还会通过3D相机扫描输出带有高度信息的图像。In the embodiment of this application, the 2.5D camera scans multiple images of light sources from different angles at one time, and in addition, the 3D camera scans and outputs images with height information.

S2、将目标电池的多张不同角度光源的图像合成多张不同类型的图片;S2. Synthesizing multiple images of light sources at different angles of the target battery into multiple pictures of different types;

进一步的,在本申请的一种优选实施例中,所述正反射图和所述漫反射图组合识别目标电池壳体是否存在划痕或磨伤;Further, in a preferred embodiment of the present application, the combination of the regular reflection image and the diffuse reflection image identifies whether there are scratches or abrasions on the target battery case;

所述光泽比率图、所述第一形状图和所述第二形状图组合使用,识别目标电池壳体多种不良。The gloss ratio map, the first shape map and the second shape map are used in combination to identify various defects of the target battery case.

S3、输入标准图像模板;S3, input standard image template;

S4、将合成的多张不同类型的图片与标准图像模板进行灰阶比对,定位目标电池的缺陷区域;S4. Comparing the multiple synthesized pictures of different types with the standard image template in gray scale, and locating the defect area of the target battery;

S5、通过深度学习,分类目标电池壳体的缺陷类型;S5. Classify the defect type of the target battery casing through deep learning;

深度学习是一类模式分析方法的统称,就具体研究内容而言,主要涉及三类方法:Deep learning is a general term for a class of pattern analysis methods. In terms of specific research content, it mainly involves three types of methods:

(1)基于卷积运算的神经网络系统,即卷积神经网络(CNN)。(1) A neural network system based on convolution operations, that is, a convolutional neural network (CNN).

(2)基于多层神经元的自编码神经网络,包括自编码(Autoencoder)以及近年来受到广泛关注的稀疏编码两类(Sparsecoding)。(2) Autoencoder neural network based on multi-layer neurons, including Autoencoder and Sparsecoding, which have received widespread attention in recent years.

(3)以多层自编码神经网络的方式进行预训练,进而结合鉴别信息进一步优化神经网络权值的深度置信网络(DBN)。(3) Pre-training in the form of a multi-layer self-encoding neural network, and further optimizing the deep belief network (DBN) of the weight of the neural network by combining the identification information.

通过多层处理,逐渐将初始的"低层"特征表示转化为“高层”特征表示后,用”简单模型"即可完成复杂的分类等学习任务。由此可将深度学习理解为进行“特征学习”(featurelearing)或“表示学习”(representationlearing)。Through multi-layer processing, the initial "low-level" feature representation is gradually transformed into a "high-level" feature representation, and complex classification and other learning tasks can be completed with a "simple model". Therefore, deep learning can be understood as "feature learning" or "representation learning".

在本申请实施例中,可应用其中一类深度学习方法分类目标电池的缺陷类型,也可应用多类深度学习方法分类目标电池壳体的缺陷类型。In the embodiment of the present application, one type of deep learning method can be applied to classify the defect type of the target battery, and multiple types of deep learning methods can also be used to classify the defect type of the target battery case.

S6、筛选具有缺陷的图像,将具有缺陷的图像遍历规则判定算法;S6. Screening the images with defects, and traversing the rule determination algorithm for the images with defects;

进一步的,如图2所示,在本申请的一种优选实施例中,所述规则判定算法包括以下步骤:Further, as shown in Figure 2, in a preferred embodiment of the present application, the rule determination algorithm includes the following steps:

S601、判断所述具有缺陷的图像是否属于小面积缺陷,若属小面积缺陷则输出目标壳体的缺陷类型、缺陷大小及缺陷坐标位置;S601. Determine whether the image with defects is a small-area defect, and if it is a small-area defect, output the defect type, defect size, and defect coordinate position of the target shell;

S602、若所述具有缺陷的图像不属于小面积缺陷,则将缺陷图像分为点类型图像和线类型图像;S602. If the image with the defect does not belong to a small-area defect, divide the defect image into a dot-type image and a line-type image;

S603、所述点类型图像和所述线类型图像通过相应的面积、长度、数目规则输出缺陷大小。S603, the point type image and the line type image output defect size according to the corresponding area, length, and number rules.

进一步的,在本申请的一种优选实施例中,所述点类型图像通过面积规则和数目规则计算缺陷大小。Further, in a preferred embodiment of the present application, the point type image calculates the size of the defect by using an area rule and a number rule.

进一步的,在本申请的一种优选实施例中,所述线类型图像通过长度规则计算缺陷大小。Further, in a preferred embodiment of the present application, the line type image calculates the size of the defect through a length rule.

S7、输出目标电池壳体的缺陷类型、缺陷大小及缺陷坐标位置。S7. Outputting the defect type, defect size and defect coordinate position of the target battery case.

将缺陷图像分为点类型图像和线类型图像后,首先把经预处理后图像X分割成均匀的若干小块X={X1,X2,…,Xn},在分割时,每个小块可以全部为背景,也可以是背景和缺陷的组合,但不能全部为缺陷,接着计算每小块图像的方差,并按方差由小到大的顺序排列成有序序列{σ21(j)};然后从{σ21(j)}中去掉由小到大60%(微小缺陷的区域面积与整幅图像的面积比值小于0.5)的方差值对应的图像块,再将{σ21(j)}中剩余的40%的方差组成新的方差序列,此时{σ21(j)}所对应的图像块中,一部分是包含缺陷的图像块,同时还有一部分是背景区域图像块。After the defect image is divided into point-type images and line-type images, the preprocessed image X is first divided into several uniform small blocks X={X1, X2,...,Xn}, and each small block can be All are backgrounds, or a combination of backgrounds and defects, but not all defects, then calculate the variance of each small block of images, and arrange them into an ordered sequence {σ21(j)} in order of variance from small to large; then From {σ21(j)}, remove the image block corresponding to the variance value from small to large (the ratio of the area of the small defect to the area of the entire image is less than 0.5), and then the remaining in {σ21(j)} 40% of the variance of , constitutes a new variance sequence. At this time, among the image blocks corresponding to {σ21(j)}, some are image blocks containing defects, and some are image blocks in the background area.

对{σ21(j)}对应的每一个图像块进行如下操作:Perform the following operations on each image block corresponding to {σ21(j)}:

首先初步确定缺陷目标点,计算每个图像块的均值,记为fmean从左到右、从上到下遍历每个图像块的像元,若像元fi,j满足下面条件,则标记为背景点:fi,j>fmean。First determine the defect target point initially, calculate the mean value of each image block, and record it as fmean, traverse the pixels of each image block from left to right, and from top to bottom. If the pixel fi, j meets the following conditions, it is marked as the background Point: fi, j > fmean.

遍历fi,j后的像元若满足下面条件:fi,j+1-fi,j<αfmean则认为像元fi,j+1同前一个像元fi,j性质相同,同标记为背景点或缺陷目标点,否则当前像元与前一个像元性质相反。If the pixel after traversing fi, j satisfies the following conditions: fi, j+1-fi, j<αfmean, it is considered that the pixel fi, j+1 has the same properties as the previous pixel fi, j, and is marked as a background point or Defect target point, otherwise the current pixel is opposite to the previous one.

在初次遍历结束后,每一小块图像中的像元被分割为背景和缺陷目标2部分,在这个过程中,有少部分背景被错分为缺陷目标,所以需要剔除初次遍历后的伪目标点。缺陷目标以一定大小的连通域存在,为了判断初次遍历中所标记的缺陷像元是否为真正的缺陷,以当前像元为核心,在形成3×3窗口中,若至少包含有一半以上的缺陷像元,则认为该像元为缺陷点。After the initial traversal, the pixels in each small image are divided into two parts: the background and the defect target. During this process, a small part of the background is misclassified as a defect target, so it is necessary to remove the false targets after the initial traversal. point. The defect target exists in a connected domain of a certain size. In order to judge whether the defect pixel marked in the initial traversal is a real defect, take the current pixel as the core and form a 3×3 window. If at least half of the defects are included pixel, it is considered as a defect point.

进一步的,在本申请的一种优选实施例中,被执行于前述的一种电池壳体外观缺陷图像处理方法,包括:包括检测系统,依次设置在电池壳体生产流水线上;控制组件,用于控制所述检测系统;其中,检测系统包括:第一扫码枪,设置用于扫描电池壳体长度方向外观;第二扫码枪,设置用于扫描电池壳体高度方向外观;第一侧向定位机构,设置用于限定电池壳体在生产流水线上的横向位置;直角坐标机械组件,设置在电池壳体生产流水线侧面;第一视觉检测组件,设置安装在所述直角坐标机械组件上,设置为在所述直角坐标机械组件的驱动下在三维空间内移动,用于检测电池壳体外观;激光定位组件,设置在电池壳体生产流水线上,用于对电池壳体定位。Further, in a preferred embodiment of the present application, the above-mentioned image processing method for appearance defects of a battery case includes: a detection system, which is sequentially arranged on the battery case production line; For controlling the detection system; wherein, the detection system includes: a first code scanning gun, configured to scan the appearance of the battery case in the longitudinal direction; a second code scanning gun, configured to scan the appearance of the battery case in the height direction; the first side The orientation positioning mechanism is set to limit the lateral position of the battery case on the production line; the Cartesian coordinate mechanical component is set on the side of the battery case production line; the first visual inspection component is set and installed on the Cartesian coordinate mechanical component, It is set to move in three-dimensional space under the drive of the rectangular coordinate mechanical component, and is used to detect the appearance of the battery case; the laser positioning component is set on the production line of the battery case, and is used to position the battery case.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-onlymemory)、随机存取存储器(RAM,randomaccessmemory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk, and other media that can store program codes.

Claims (10)

1.一种电池壳体外观缺陷图像处理方法,其特征在于,包括以下步骤:1. A battery case appearance defect image processing method, is characterized in that, comprises the following steps: 通过获取目标电池壳体各面的图像;By acquiring images of each side of the target battery case; 将目标电池的多张不同角度光源的图像合成多张不同类型的图片;Combining multiple images of light sources from different angles of the target battery into multiple images of different types; 输入标准图像模板;Input standard image template; 将合成的多张不同类型的图片与标准图像模板进行灰阶比对,定位目标电池的缺陷区域;Comparing multiple synthesized images of different types with the standard image template in gray scale to locate the defect area of the target battery; 通过深度学习,分类目标电池壳体的缺陷类型;Through deep learning, classify the defect type of the target battery case; 筛选具有缺陷的图像,将具有缺陷的图像遍历规则判定算法;Screen the images with defects, and traverse the rule judgment algorithm for the images with defects; 输出目标电池壳体的缺陷类型、缺陷大小及缺陷坐标位置。Output the defect type, defect size and defect coordinate position of the target battery case. 2.根据权利要求1所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述不同角度光源的图像通过2.5D相机扫描得到。2 . The image processing method for appearance defects of a battery case according to claim 1 , wherein the images of the light sources at different angles are scanned by a 2.5D camera. 3 . 3.根据权利要求1所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述不同光源的图像包括标准图、第一形状图、第二形状图、光泽比例图、漫反射图和正反射图。3. The image processing method for appearance defects of a battery case according to claim 1, wherein the images of the different light sources include a standard image, a first shape image, a second shape image, a gloss ratio image, and a diffuse reflection image. diagrams and regular reflection diagrams. 4.根据权利要求1所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述目标电池壳体各面的图像还包括通过3D相机扫描得到的带有高度信息的图像。4 . The method for processing an image of an appearance defect of a battery case according to claim 1 , wherein the images of each surface of the target battery case further include an image with height information scanned by a 3D camera. 5.根据权利要求4所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述带有高度信息的图像包括3D高度图和3D灰度图。5 . The method for processing an image of a battery casing appearance defect according to claim 4 , wherein the image with height information includes a 3D height map and a 3D grayscale image. 6 . 6.根据权利要求3所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述正反射图和所述漫反射图组合识别目标电池壳体是否存在划痕或磨伤;6. The method for processing an image of a battery case appearance defect according to claim 3, wherein the regular reflection image and the diffuse reflection image are combined to identify whether there are scratches or abrasions on the target battery case; 所述光泽比率图、所述第一形状图和所述第二形状图组合使用,识别目标电池壳体多种不良。The gloss ratio map, the first shape map and the second shape map are used in combination to identify various defects of the target battery case. 7.根据权利要求1所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述规则判定算法包括以下步骤:7. The method for processing an image of a battery case appearance defect according to claim 1, wherein the rule determination algorithm comprises the following steps: 判断所述具有缺陷的图像是否属于小面积缺陷,若属小面积缺陷则输出目标电池壳体的缺陷类型、缺陷大小及缺陷坐标位置;Judging whether the image with defects is a small-area defect, and if it is a small-area defect, output the defect type, defect size and defect coordinate position of the target battery case; 若所述具有缺陷的图像不属于小面积缺陷,则将缺陷图像分为点类型图像和线类型图像;If the image with defects does not belong to a small-area defect, the defect image is divided into a point type image and a line type image; 所述点类型图像和所述线类型图像通过相应的面积、长度、数目规则输出缺陷大小。The point-type image and the line-type image output defect sizes through corresponding area, length, and number rules. 8.根据权利要求7所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述点类型图像通过面积规则和数目规则计算缺陷大小。8 . The method for processing an image of a battery casing appearance defect according to claim 7 , wherein the size of the defect is calculated in the dot type image by using an area rule and a number rule. 9.根据权利要求7所述的一种电池壳体外观缺陷图像处理方法,其特征在于,所述线类型图像通过长度规则计算缺陷大小。9 . The method for processing an image of a battery casing appearance defect according to claim 7 , wherein the size of the defect is calculated using a length rule in the line type image. 10 . 10.一种电池壳体外观缺陷图像处理装置,其特征在于,被执行于权利要求1至9任一项所述的一种电池壳体外观缺陷图像处理方法,包括:包括检测系统,依次设置在电池壳体生产流水线上;控制组件,用于控制所述检测系统;其中,检测系统包括:第一扫码枪,设置用于扫描电池壳体长度方向外观;第二扫码枪,设置用于扫描电池壳体高度方向外观;第一侧向定位机构,设置用于限定电池壳体在生产流水线上的横向位置;直角坐标机械组件,设置在电池壳体生产流水线侧面;第一视觉检测组件,设置安装在所述直角坐标机械组件上,设置为在所述直角坐标机械组件的驱动下在三维空间内移动,用于检测电池壳体外观;激光定位组件,设置在电池壳体生产流水线上,用于对电池壳体定位。10. An image processing device for appearance defects of battery casings, characterized in that it is implemented in the method for processing images of appearance defects of battery casings according to any one of claims 1 to 9, comprising: a detection system, sequentially set On the battery case production line; the control component is used to control the detection system; wherein, the detection system includes: a first code scanning gun, configured to scan the appearance of the battery case in the length direction; a second code scanning gun, configured for To scan the appearance of the battery case in the height direction; the first lateral positioning mechanism is set to limit the lateral position of the battery case on the production line; the Cartesian coordinate mechanical component is set on the side of the battery case production line; the first visual inspection component , set and installed on the rectangular coordinate mechanical assembly, set to move in three-dimensional space under the drive of the rectangular coordinate mechanical assembly, for detecting the appearance of the battery case; the laser positioning assembly is arranged on the battery case production line , for positioning the battery case.
CN202310073609.0A 2023-02-03 2023-02-03 Method and device for image processing of appearance defect of battery case Pending CN116228684A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310073609.0A CN116228684A (en) 2023-02-03 2023-02-03 Method and device for image processing of appearance defect of battery case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310073609.0A CN116228684A (en) 2023-02-03 2023-02-03 Method and device for image processing of appearance defect of battery case

Publications (1)

Publication Number Publication Date
CN116228684A true CN116228684A (en) 2023-06-06

Family

ID=86572394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310073609.0A Pending CN116228684A (en) 2023-02-03 2023-02-03 Method and device for image processing of appearance defect of battery case

Country Status (1)

Country Link
CN (1) CN116228684A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116626053A (en) * 2023-07-24 2023-08-22 宁德微图智能科技有限公司 Cell blue film defect detection method and device
CN117726574A (en) * 2023-09-13 2024-03-19 东莞市言科新能源有限公司 Packaging system and method for polymer lithium-ion battery production
CN118671004A (en) * 2024-08-21 2024-09-20 杭州灵西机器人智能科技有限公司 Product surface defect detection method and system
CN120318234A (en) * 2025-06-17 2025-07-15 天津昊宸智能科技有限公司 A method and system for rapid detection of visual defects of square power battery casing
CN120374552A (en) * 2025-04-11 2025-07-25 南京莱特威特轻量化技术研究院有限公司 Battery pack frame appearance quality inspection method and system based on machine vision

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070036420A1 (en) * 2003-02-18 2007-02-15 Marena Systems Corporation Methods for analyzing defect artifacts to precisely locate corresponding defects
CN108445010A (en) * 2018-03-12 2018-08-24 昆山国显光电有限公司 Automatic optical detection method and device
CN110018167A (en) * 2019-04-04 2019-07-16 武汉精立电子技术有限公司 A kind of Curved screen open defect rapid detection method and system
CN110715936A (en) * 2019-11-14 2020-01-21 北京海研自动化科技有限公司 Household appliance shell appearance automatic detection system based on visual images
CN112950618A (en) * 2021-03-25 2021-06-11 深圳市华汉伟业科技有限公司 Appearance defect detection method and system
CN115494080A (en) * 2022-09-22 2022-12-20 章鱼博士智能技术(上海)有限公司 A method and system for detecting appearance defects of battery pack blue film

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070036420A1 (en) * 2003-02-18 2007-02-15 Marena Systems Corporation Methods for analyzing defect artifacts to precisely locate corresponding defects
CN108445010A (en) * 2018-03-12 2018-08-24 昆山国显光电有限公司 Automatic optical detection method and device
CN110018167A (en) * 2019-04-04 2019-07-16 武汉精立电子技术有限公司 A kind of Curved screen open defect rapid detection method and system
CN110715936A (en) * 2019-11-14 2020-01-21 北京海研自动化科技有限公司 Household appliance shell appearance automatic detection system based on visual images
CN112950618A (en) * 2021-03-25 2021-06-11 深圳市华汉伟业科技有限公司 Appearance defect detection method and system
CN115494080A (en) * 2022-09-22 2022-12-20 章鱼博士智能技术(上海)有限公司 A method and system for detecting appearance defects of battery pack blue film

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116626053A (en) * 2023-07-24 2023-08-22 宁德微图智能科技有限公司 Cell blue film defect detection method and device
CN116626053B (en) * 2023-07-24 2023-11-03 宁德微图智能科技有限公司 Cell blue film defect detection method and device
CN117726574A (en) * 2023-09-13 2024-03-19 东莞市言科新能源有限公司 Packaging system and method for polymer lithium-ion battery production
CN117726574B (en) * 2023-09-13 2024-04-26 东莞市言科新能源有限公司 Packaging system and method for polymer lithium-ion battery production
CN118671004A (en) * 2024-08-21 2024-09-20 杭州灵西机器人智能科技有限公司 Product surface defect detection method and system
CN118671004B (en) * 2024-08-21 2024-12-24 杭州灵西机器人智能科技有限公司 Product surface defect detection method and system
CN120374552A (en) * 2025-04-11 2025-07-25 南京莱特威特轻量化技术研究院有限公司 Battery pack frame appearance quality inspection method and system based on machine vision
CN120318234A (en) * 2025-06-17 2025-07-15 天津昊宸智能科技有限公司 A method and system for rapid detection of visual defects of square power battery casing
CN120318234B (en) * 2025-06-17 2025-09-05 天津昊宸智能科技有限公司 Method and system for rapidly detecting visual defects of square power battery shell

Similar Documents

Publication Publication Date Title
CN116228684A (en) Method and device for image processing of appearance defect of battery case
CN110634140B (en) Large-diameter tubular object positioning and inner wall defect detection method based on machine vision
CN113920107A (en) A method of insulator damage detection based on improved yolov5 algorithm
CN113221889A (en) Anti-interference recognition method and device for chip characters
CN114332004A (en) Method and device for detecting surface defects of ceramic tiles, electronic equipment and storage medium
CN111462120A (en) Defect detection method, device, medium and equipment based on semantic segmentation model
CN110929795B (en) Method for quickly identifying and positioning welding spot of high-speed wire welding machine
CN106373127A (en) Laser scanning parallel detection method for wood species and surface defects
CN113116377B (en) Ultrasonic imaging navigation method, ultrasonic equipment and storage medium
CN113134683A (en) Laser marking method and device based on machine learning
CN114841992A (en) Defect detection method based on cyclic generation countermeasure network and structural similarity
CN118865338A (en) A material recognition method based on polarized attention guidance mechanism
JP2019185730A (en) Image processing device, image processing method, and program
CN117557658A (en) A stranded wire defect detection method based on wire structured light and deep learning
CN118396919A (en) Deep learning defect detection method and device based on positive sample
CN115760747A (en) Thread defect detection method and device, computing equipment and storage medium
CN119086443A (en) A method and device for intelligent detection of industrial products
CN118505708A (en) Product repairing system based on image reconstruction technology
CN119130912A (en) Strip steel surface defect detection method and system based on depth map
US20240037728A1 (en) System and method for generating training image data for supervised machine learning, and non-transitory recording medium
CN116935174A (en) Multi-mode fusion method and system for detecting surface defects of metal workpiece
CN119832317B (en) Point counting-based steel bar semi-finished product point inspection embedded system
JP2022111539A (en) Visual inspection preparation device, visual inspection preparation method, and automatic visual inspection device
CN120031791A (en) A two-stage tool surface defect detection method and system
CN115420277B (en) Object pose measurement method and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20230606

RJ01 Rejection of invention patent application after publication