CN116935039A - New energy battery welding defect detection method based on machine vision - Google Patents

New energy battery welding defect detection method based on machine vision Download PDF

Info

Publication number
CN116935039A
CN116935039A CN202311188035.8A CN202311188035A CN116935039A CN 116935039 A CN116935039 A CN 116935039A CN 202311188035 A CN202311188035 A CN 202311188035A CN 116935039 A CN116935039 A CN 116935039A
Authority
CN
China
Prior art keywords
area
gray value
welding
acquiring
fan ring
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
CN202311188035.8A
Other languages
Chinese (zh)
Other versions
CN116935039B (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.)
Shenzhen Zexin Intelligent Equipment Co ltd
Original Assignee
Shenzhen Zexin 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 Shenzhen Zexin Intelligent Equipment Co ltd filed Critical Shenzhen Zexin Intelligent Equipment Co ltd
Priority to CN202311188035.8A priority Critical patent/CN116935039B/en
Publication of CN116935039A publication Critical patent/CN116935039A/en
Application granted granted Critical
Publication of CN116935039B publication Critical patent/CN116935039B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

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

Abstract

The invention relates to the technical field of image processing, in particular to a new energy battery welding defect detection method based on machine vision, which comprises the following steps: acquiring a welding image, and further acquiring a welding area; acquiring each fan ring area according to the welding area; obtaining the average gray value of each sector ring area; acquiring a plurality of fixed areas according to the average gray value of each fan ring area; acquiring each gray value change curve of two adjacent fan ring areas, and further acquiring the arc length ratio of each gray value change curve; obtaining the merging probability of two adjacent fan ring areas according to the average gray value of the two adjacent fan ring areas and the arc length ratio of each gray value change curve, and further obtaining each merging area; and acquiring welding defects according to each merging area. The invention can identify welding defect more accurately.

Description

New energy battery welding defect detection method based on machine vision
Technical Field
The invention relates to the technical field of image processing, in particular to a new energy battery welding defect detection method based on machine vision.
Background
The quality of the power battery plays a decisive role in the quality of the new energy automobile, the quality of the power battery depends on a laser welding technology, the power battery post laser welding technology is a welding technology for carrying out high-precision and high-interconnection on a positive plate and a negative plate and a copper post of a lithium ion battery by using the laser technology, compared with other welding technologies, the laser welding technology has excellent precision and speed, so that the laser welding technology is suitable for high-speed continuous welding in the production process of the power battery, but in the laser welding process, a welding through phenomenon exists, so that the quality problem exists in the power battery, and therefore, the timely recognition of the welding through defect is particularly important in the welding process.
In the welding process, the high temperature can cause thermal expansion of a welding area, and thermal stress is caused by shrinkage in the cooling process, so that the welding area has a rough texture phenomenon, the gray value of the welding area is similar to that of a welding defect, and when the traditional threshold segmentation algorithm is used for segmenting the welding-through defect, the rough texture area can be segmented at the same time, and the finally identified welding-through defect is inaccurate.
Disclosure of Invention
The invention provides a new energy battery welding defect detection method based on machine vision, which aims to solve the existing problems.
The new energy battery welding defect detection method based on machine vision adopts the following technical scheme:
the embodiment of the invention provides a new energy battery welding defect detection method based on machine vision, which comprises the following steps:
collecting a welding image; acquiring a welding area according to the welding image;
acquiring each fan ring area according to the welding area; obtaining the average gray value of each sector ring area; acquiring a plurality of fixed areas according to the average gray value of each fan ring area; acquiring each gray value change curve of two adjacent fan ring areas; acquiring the arc length ratio of each gray value change curve according to each gray value change curve of two adjacent fan ring areas; acquiring the merging probability of two adjacent fan ring areas according to the average gray value of the two adjacent fan ring areas and the arc length ratio of each gray value change curve; acquiring each merging region according to the merging probability of a plurality of fixed regions and two adjacent fan ring regions;
and acquiring welding defects according to each merging area.
Preferably, the step of obtaining the welding area according to the welding image includes the following specific steps:
acquiring gradient amplitude values of each pixel point in a welding image, acquiring gradient median values of all pixel points in the welding image, marking the pixel points with gradient amplitude values larger than or equal to the gradient median values as possible edge points, acquiring gradient directions of all the possible edge points, acquiring intersection points between the gradient directions of all the possible edge points, performing density clustering on all the intersection points, acquiring mass centers of the category with the maximum density as circle centers, taking the possible edge points corresponding to the gradient directions corresponding to the intersection points in the category with the maximum density as edge points of a welding area, connecting the edge points of the welding area by using connectivity analysis to obtain a multi-connected domain, and marking the pixel points of the multi-connected domain as followsThe pixels of the remaining regions are marked +.>And obtaining a mark binary image, and multiplying the mark binary image by the welding image to obtain a welding area.
Preferably, the obtaining each sector ring area according to the welding area includes the following specific steps:
preset angle numberAccording to the angle>Equally dividing the central angle of the welding area, and marking the fan ring area corresponding to the equally divided central angle on the welding area as the fan ring area.
Preferably, the obtaining a plurality of fixed areas according to the average gray value of each sector ring area includes the following specific steps:
the method comprises the steps of obtaining the median value of the average gray values of all the fan ring areas, marking the fan ring area with the average gray value smaller than the gray median value as a target fan ring area, comparing the average gray value of each target fan ring area and two adjacent fan ring areas, and taking the current target fan ring area as a fixed area if the average gray value of the current target fan ring area is smaller than the average gray value of the two adjacent fan ring areas.
Preferably, the step of obtaining each gray value change curve of two adjacent sector ring areas includes the following specific steps:
the number of preset segmentsIntersection of two adjacent sector ring areas according to +.>The method comprises the steps of segmenting a segment, marking segmentation points, generating a plurality of arc curves for two adjacent fan ring areas by taking the distance from each marked segmentation point to the circle center of a welding area as a radius, taking the circle center of the welding area as the circle center, numbering pixel points on each arc curve, obtaining gray values of each pixel point, and obtaining gray value change curves corresponding to each arc curve by taking the number of each pixel point as an abscissa and the gray values as an ordinate.
Preferably, the obtaining the arc length ratio of each gray value change curve according to each gray value change curve of two adjacent fan ring areas includes the following specific steps:
acquiring the slope of each pixel point of each gray value change curve in two adjacent sector ring areas, and acquiring the slope direction of each gray value change curveDifference, preset slope variance thresholdWhen the slope variance of the gray value variation curve is smaller than the slope variance threshold +.>When the method is used, the ratio of the arc length between the last pixel point of the gray value change curve and the segmentation point of the last pixel point to the total arc length of the arc curve corresponding to the gray value change curve is obtained and is used as the arc length ratio of the gray value change curve; when the gradient variance of the gray value change curve is greater than or equal to the gradient variance threshold +.>And when the average slope of the gray value change curve is obtained, taking the first pixel point which is larger than the average slope in the gray value change curve as a sudden increase point, and obtaining the ratio of the arc length between the sudden increase point and the segmentation point thereof to the total arc length of the arc curve corresponding to the gray value change curve as the arc length ratio of the gray value change curve.
Preferably, the obtaining the merging probability of the two adjacent fan ring areas according to the average gray value of the two adjacent fan ring areas and the arc length ratio of each gray value change curve includes the following specific steps:
in the method, in the process of the invention,representing the number of gray value transformation curves of two adjacent fan ring areas; />Represents the +.>Arc length ratio of the gray value transformation curves; />Representing the average gray value of the first sector ring region in the two adjacent sector ring regions; />Representing the average gray value of the second sector ring region in the two adjacent sector ring regions; />Representing the merging probability of two adjacent sector ring areas; />Representing an exponential function based on a natural constant.
Preferably, the step of obtaining each merging region according to the merging probabilities of the plurality of fixed regions and the two adjacent fan ring regions includes the following specific steps:
presetting a merge thresholdTraversing any fixed area, and carrying out merging operation in a clockwise direction on the fixed area, wherein the merging operation comprises the following steps:
when the merging probability of the fixed area and the sector ring area adjacent to the fixed area in the clockwise direction is more than or equal to the merging threshold valueWhen the new fixed area and the fan ring area adjacent to the fixed area in the clockwise direction are combined, the probability of combining the new fixed area and the fan ring area adjacent to the fixed area in the clockwise direction is larger than +>At the same time, the new fixed area is merged with the adjacent sector ring area in the clockwise direction, and so on until the merging probability of the new fixed area and the adjacent sector ring area in the clockwise direction is smaller than the merging threshold value +.>When the combination is stopped clockwise;
and carrying out merging operation in the anticlockwise direction on the new fixed area, and taking the finally obtained fixed area as a merging area.
Preferably, the step of obtaining the welding defect according to each merging area includes the following specific steps:
threshold segmentation is carried out on any merging region to obtain a binary image, each connected region formed by pixel points with gray values of 0 in the binary image is respectively used as a threshold segmentation region, the minimum circumcircle of each threshold segmentation region is obtained, the ratio of each threshold segmentation region to the area of the corresponding minimum circumcircle is obtained, and the area threshold is presetWhen the area ratio is equal to or greater than the area threshold +.>In this case, the threshold dividing region is defined as a welding defect.
Preferably, the step of obtaining the average gray value of each sector ring area includes the following specific steps:
in the method, in the process of the invention,is->The number of pixel points of each fan ring area; />Is->The first part of the sector ring region>Gray values of the individual pixels; />Is->Average gray value of each sector ring area.
The technical scheme of the invention has the beneficial effects that: according to the invention, the welding image is acquired, so that a welding area is acquired; acquiring each fan ring area according to the welding area; obtaining the average gray value of each sector ring area; obtaining a plurality of fixed areas according to the average gray value of each fan ring area; acquiring each gray value change curve of two adjacent fan ring areas; acquiring the arc length ratio of each gray value change curve according to each gray value change curve of two adjacent fan ring areas; acquiring the merging probability of two adjacent fan ring areas according to the average gray value of the two adjacent fan ring areas and the arc length ratio of each gray value change curve; acquiring each merging region according to the merging probability of a plurality of fixed regions and two adjacent fan ring regions; according to the gray value characteristics of the welding defects, the welding areas are divided into the fan-shaped areas to obtain fixed areas, the merging probability of two adjacent fan-shaped areas is obtained according to the gray value continuity and the gray value similarity of the welding defects, and the merging areas containing the welding defects and the texture rough areas are obtained.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of a new energy battery welding defect detection method based on machine vision;
FIG. 2 is a graph showing a first gray value variation;
FIG. 3 is a second gray value variation curve;
fig. 4 is a third gray value variation curve.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of the new energy battery welding defect detection method based on machine vision according to the invention, which is provided by combining the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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 following specifically describes a specific scheme of the new energy battery welding defect detection method based on machine vision provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a new energy battery welding defect detection method based on machine vision according to an embodiment of the invention is shown, and the method includes the following steps:
s001, collecting welding images.
The battery module was photographed using an industrial camera, and the photographed image was subjected to graying processing to obtain a gray-scale image, which was recorded as a welding image, because the color information in the image collected by the industrial camera was large.
S002, acquiring a welding area according to the welding image.
It should be noted that, because the welding material is heated unevenly to cause the welding region to generate welding penetration, the welding penetration defect only exists in the welding region, therefore, the welding region needs to be obtained according to the welding image to perform subsequent analysis, and because the welding region is a circular ring region, and the outer circle edge of the circular ring region has larger gray value difference from the background region of the welding image, the inner circle edge of the circular ring region has larger gray value difference from the battery post region of the welding image, therefore, the edge pixel point of the welding region has larger gradient value, and the edge point which may be the welding region is obtained according to the gradient value of each pixel point in the welding image and is recorded as the possible edge point.
In the embodiment of the invention, a sobel operator is used to obtain the gradient amplitude value of each pixel point in a welding image, the gradient median value of all the pixel points in the image is obtained as a gradient threshold value, and the pixel points with the gradient value larger than or equal to the gradient threshold value are marked, wherein the marked pixel points may be edge points of a welding area.
It should be noted that, because the welding region has a welding defect and a rough texture region, the gray values of the two regions are lower and different from the gray value of the welding region, the obtained possible edge points include pixel points inside the welding region, and because the welding region is a circular ring, the gradient directions of the edge points of the welding region all point to the center of the welding region, and therefore, the edge points of the welding region are obtained according to the gradient directions of the possible edge points, and the welding region is obtained.
In the embodiment of the invention, a sobel operator is used for acquiring gradient directions of all possible edge points, intersection points between every two gradient directions of all possible edge points are acquired, density clustering is carried out on all intersection points, the centroid of the category with the maximum density is acquired as the circle center, the possible edge points corresponding to the gradient directions corresponding to the intersection points in the category with the maximum density are taken as the edge points of a welding area, connectivity analysis is used for connecting the edge points of the welding area, a multi-connected domain is obtained, and pixel points of the multi-connected domain are marked asThe pixels of the remaining regions are marked +.>And obtaining a mark binary image, and multiplying the mark binary image by the welding image to obtain a welding area.
So far, a welding area is obtained.
S003, acquiring each merging area according to the welding area.
It should be noted that, the welding area has a rough texture area and a welding defect, the gray value of the texture defect is similar to the gray value of the welding defect, and when the conventional threshold segmentation algorithm is used for segmenting the welding defect, the rough texture area may be segmented at the same time, so that the finally identified welding defect is inaccurate. Therefore, the welding area is divided into all the sector ring areas, all the sector ring areas are analyzed and combined to obtain the area containing the welding-through defects or the rough textures, and the two areas are conveniently and accurately analyzed to accurately identify the defects.
It should be further noted that the center of the welding area is obtained in step S002, which is knownIs the number of central angles, thus setting the number of angles +.>Equally dividing the central angle of the welding area, marking the sector ring area corresponding to the equally divided central angle on the welding area as the sector ring area, setting the angle degree in order to enable each sector ring area to contain welding defects>As small as possible, so in an embodiment of the invention +.>In other embodiments, the practitioner can set +.>Is a value of (2).
It should be noted that, because the welding defect is a welding problem caused by uneven heating of welding materials, the method is characterized in that a darker area exists in the welding area, namely, the gray value of the welding defect is lower, so that the average gray value of each sector ring area is obtained, the lower the gray value is, the more likely the sector ring area is the welding defect or the rough texture area, according to the average gray value of each sector ring area, the sector ring area corresponding to the average gray value with a plurality of local minimum is selected as each fixed area, and the sector ring areas around the fixed areas are conveniently analyzed and combined by taking each fixed area as a starting point.
In the embodiment of the invention, the average gray value of each sector ring area is obtained:
in the method, in the process of the invention,is->The number of pixel points of each fan ring area; />Is->The first part of the sector ring region>Gray values of the individual pixels; />Is->Average gray value of each sector ring area.
It should be noted that, the sector ring area with the small gray average value may be a weld defect or a rough texture area, so that each sector ring area with the smallest local average gray value is selected as each fixed area according to the average gray value of each sector ring area.
In the embodiment of the invention, the median value of the average gray values of all the fan ring areas is obtained and is marked as the gray median value, the fan ring area with the average gray value smaller than the gray median value is marked as the target fan ring area, the average gray values of two adjacent fan ring areas of each target fan ring area are compared, and if the average gray value of the current target fan ring area is smaller than the average gray value of the two adjacent fan ring areas, the current target fan ring area is taken as the fixed area.
A plurality of fixed areas is thus obtained.
It should be noted that, the fixing area includes a region with a penetration defect or a rough texture, and because the penetration defect is mutually communicated, any fixing area needs to be traversed clockwise to merge adjacent fan ring areas of the fixing area, and then traversed anticlockwise to merge adjacent fan ring areas of the fixing area to obtain a merged area of the current fixing area.
It should be further noted that, since the weld-through defect has continuity, if merging is to be performed between the adjacent fan-ring areas, the adjacent two fan-ring areas need to have similarity of gray values, that is, the difference of average gray values between the adjacent fan-ring areas is small, and further, the continuity of gray values needs to be provided, that is, the gray values at the intersection between the two adjacent areas are continuous, so that the gray value change curves of the adjacent two fan-ring areas are obtained according to the feature, and then whether the adjacent two fan-ring areas can be merged is judged by analyzing the gray value change curves between the adjacent two fan-ring areas.
In the embodiment of the invention, the intersecting lines of two adjacent sector ring areas are according to the followingThe pixel points are segmented into one segment, and the segmented points are marked, and it is to be noted that the intersection line of two adjacent sector areas is the common edge of the two adjacent sector areas, and the number of segments is set in the embodiment of the invention>In other embodiments, the practitioner can set +.>The method includes the steps that the distance from each marked segmentation point to the circle center of a welding area is taken as a radius, the circle center of the welding area is taken as the circle center, a plurality of arc curves are generated for two adjacent fan ring areas, one of the two adjacent fan ring areas is a fixed area, and the other area is an area to be combined, so that in the embodiment of the invention, pixels on each arc curve are numbered sequentially from the pixels in the fixed area, gray values of the pixels are obtained, the numbers of the pixels are taken as horizontal coordinates, and gray values are taken as vertical coordinates to obtain gray value change curves corresponding to each arc curve. Thus, all gray value change curves of two adjacent sector ring areas are obtained.
It should be noted that if two adjacent fan ring areas can be combined, that is, two adjacent fan ring areas each have a penetration area or a texture rough area, it is described that the continuity of gray values is provided between the two adjacent fan ring areas, then each gray value change curve of the two adjacent fan ring areas always tends to be stable after reaching the segmentation point or tends to be stable after reaching the segmentation point, see fig. 2 and fig. 3, if two adjacent fan ring areas can not be combined, that is, two adjacent fan ring areas are respectively provided with a penetration defect or a texture rough area, a penetration defect or a normal area and a texture rough area, the continuity of gray values is not provided between the types of the two adjacent fan ring areas, so that a phenomenon that a part of gray value change curve increases after reaching the segmentation point occurs in the types of the two adjacent fan ring areas, and therefore, for the two adjacent fan ring areas, the ratio of the increase point of each gray value change curve to the corresponding curve length of the segmentation point to the corresponding curve of the two adjacent fan ring change curves is obtained, the ratio of the total gray value change curve length of the two adjacent fan ring change curves to the corresponding gray value change curve of the two arc change points is recorded, and the ratio of the total gray value change curve of the two arc change curve length of the two arc change curves is recorded as the total gray value of the arc change curve of the two arc change curve of the arc values of the arc change curve is recorded, and the ratio of the arc length of the curve between the two arc change curves is equal to the length of the curve is recorded.
In the embodiment of the invention, the arc length ratio of each gray value change curve of two adjacent fan ring areas is obtained: acquiring the slope of each pixel point of each gray value change curve in two adjacent sector ring areas, acquiring the slope variance of each gray value change curve, and setting a slope variance thresholdWhen the slope variance of the gray value variation curve is smaller than the slope variance threshold +.>When the gray value change curve is obtained, the ratio of the arc length of the arc curve corresponding to the last pixel point of the gray value change curve to the total arc length of the arc curve corresponding to the gray value change curve is obtained; when the gradient variance of the gray value change curve is greater than or equal to the gradient variance threshold +.>When the average slope of the gray value change curve is obtained, a first pixel point which is larger than the average slope in the gray value change curve is obtained as a sudden increase point, and the ratio of the arc length of the arc curve corresponding to the sudden increase point to the segment point to the total arc length of the arc curve corresponding to the gray value change curve is obtained, in the embodiment of the invention, the slope variance threshold value is set>In other embodiments, the practitioner can set +.>Is a value of (2).
Acquiring the merging probability of two adjacent fan ring areas:
in the method, in the process of the invention,representing the number of gray value transformation curves of two adjacent fan ring areas; />Represents the +.>Arc length ratio of the gray value transformation curves; />Representing the average gray value of the first sector ring region in the two adjacent sector ring regions; />Representing the average gray value of the second sector ring region in the two adjacent sector ring regions; />Representing the merging probability of two adjacent sector-ring areas, when the difference between the average gray values of the two adjacent sector-ring areas is smaller and the sum of the arc length ratios of the gray value change curves is larger, the +.>The larger the value of (c) is, the more the adjacent two sector ring regions need to be merged, indicating that the two sector ring regions have similarity and continuity of gray values.
Setting a merge threshold in embodiments of the present inventionIn other embodiments, the practitioner can set +.>Traversing any fixed region, performing a merging operation in a clockwise direction on the fixed region, including:
when the merging probability of the fixed area and the sector ring area adjacent to the fixed area in the clockwise direction is more than or equal to the merging threshold valueWhen the new fixed area and the fan ring area adjacent to the fixed area in the clockwise direction are combined, the probability of combining the new fixed area and the fan ring area adjacent to the fixed area in the clockwise direction is larger than +>At the same time, the new fixed area is merged with the adjacent sector ring area in the clockwise direction, and so on until the merging probability of the new fixed area and the adjacent sector ring area in the clockwise direction is smaller than the merging threshold value +.>When the combination is stopped clockwise;
and carrying out merging operation in the anticlockwise direction on the new fixed area, and taking the finally obtained fixed area as a merging area.
So far, each merging area is obtained according to the welding area.
S004, according to each merging area, obtaining welding defects.
It should be noted that, each obtained merging region contains a complete penetration defect or a complete rough texture region, and known penetration defects generally appear as obvious holes or perforations in an image, and have obvious regularity, while rough texture regions are texture changes of the surface and have irregularity, so that the penetration defect is obtained by quantifying the regularity of the penetration defect and the rough texture regions.
In the embodiment of the invention, any merging region is subjected to threshold segmentation to obtain a binary image, and each connected region formed by pixel points with gray values of 0 in the binary image is respectively used as a threshold segmentation regionAcquiring the minimum circumscribing circle of each threshold segmentation area, acquiring the area ratio of each threshold segmentation area to the corresponding minimum circumscribing circle, and setting an area thresholdWhen the area ratio is equal to or greater than the area threshold +.>In this case, the threshold dividing region is defined as a welding defect. In the embodiment of the invention, an area threshold value is set +.>In other embodiments, the practitioner can set +.>Is a value of (2). Since the gradation value of the welding defect is low, each connected region formed by the pixel point having the gradation value of 0 is selected as the threshold dividing region in the binary image.
So far, the welding defect is obtained.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (10)

1. The new energy battery welding defect detection method based on machine vision is characterized by comprising the following steps of:
collecting a welding image; acquiring a welding area according to the welding image;
acquiring each fan ring area according to the welding area; obtaining the average gray value of each sector ring area; acquiring a plurality of fixed areas according to the average gray value of each fan ring area; acquiring each gray value change curve of two adjacent fan ring areas; acquiring the arc length ratio of each gray value change curve according to each gray value change curve of two adjacent fan ring areas; acquiring the merging probability of two adjacent fan ring areas according to the average gray value of the two adjacent fan ring areas and the arc length ratio of each gray value change curve; acquiring each merging region according to the merging probability of a plurality of fixed regions and two adjacent fan ring regions;
and acquiring welding defects according to each merging area.
2. The welding defect detection method for the new energy battery based on machine vision according to claim 1, wherein the step of obtaining the welding area according to the welding image comprises the following specific steps:
acquiring gradient amplitude values of each pixel point in a welding image, acquiring gradient median values of all pixel points in the welding image, marking the pixel points with gradient amplitude values larger than or equal to the gradient median values as possible edge points, acquiring gradient directions of all the possible edge points, acquiring intersection points between the gradient directions of all the possible edge points, performing density clustering on all the intersection points, acquiring mass centers of the category with the maximum density as circle centers, taking the possible edge points corresponding to the gradient directions corresponding to the intersection points in the category with the maximum density as edge points of a welding area, connecting the edge points of the welding area by using connectivity analysis to obtain a multi-connected domain, and marking the pixel points of the multi-connected domain as followsThe pixels of the remaining regions are marked +.>And obtaining a mark binary image, and multiplying the mark binary image by the welding image to obtain a welding area.
3. The welding defect detection method for the new energy battery based on machine vision according to claim 1, wherein the step of obtaining each sector ring area according to the welding area comprises the following specific steps:
preset angle numberAccording to the angle>Equally dividing the central angle of the welding area, and marking the fan ring area corresponding to the equally divided central angle on the welding area as the fan ring area.
4. The welding defect detection method for new energy battery based on machine vision according to claim 1, wherein the obtaining a plurality of fixed areas according to the average gray value of each sector ring area comprises the following specific steps:
the method comprises the steps of obtaining the median value of the average gray values of all the fan ring areas, marking the fan ring area with the average gray value smaller than the gray median value as a target fan ring area, comparing the average gray value of each target fan ring area and two adjacent fan ring areas, and taking the current target fan ring area as a fixed area if the average gray value of the current target fan ring area is smaller than the average gray value of the two adjacent fan ring areas.
5. The method for detecting welding defects of a new energy battery based on machine vision according to claim 1, wherein the step of obtaining each gray value change curve of two adjacent sector ring areas comprises the following specific steps:
the number of preset segmentsIntersection of two adjacent sector ring areas according to +.>Segmenting a segment, marking segmentation points, generating a plurality of arc curves for two adjacent sector ring areas by taking the distance from each marked segmentation point to the circle center of a welding area as a radius and taking the circle center of the welding area as the circle center, numbering pixel points on each arc curve, acquiring gray values of each pixel point, and acquiring gray values by taking the number of each pixel point as an abscissa and taking the gray values as an ordinateAnd taking a gray value change curve corresponding to each arc curve.
6. The machine vision-based new energy battery welding defect detection method according to claim 1, wherein the obtaining the arc length ratio of each gray value change curve according to each gray value change curve of two adjacent fan ring areas comprises the following specific steps:
acquiring the slope of each pixel point of each gray value change curve in two adjacent sector ring areas, acquiring the slope variance of each gray value change curve, and presetting a slope variance threshold valueWhen the slope variance of the gray value variation curve is smaller than the slope variance threshold +.>When the method is used, the ratio of the arc length between the last pixel point of the gray value change curve and the segmentation point of the last pixel point to the total arc length of the arc curve corresponding to the gray value change curve is obtained and is used as the arc length ratio of the gray value change curve; when the gradient variance of the gray value change curve is greater than or equal to the gradient variance threshold +.>And when the average slope of the gray value change curve is obtained, taking the first pixel point which is larger than the average slope in the gray value change curve as a sudden increase point, and obtaining the ratio of the arc length between the sudden increase point and the segmentation point thereof to the total arc length of the arc curve corresponding to the gray value change curve as the arc length ratio of the gray value change curve.
7. The method for detecting welding defects of a new energy battery based on machine vision according to claim 1, wherein the obtaining the merging probability of two adjacent fan ring areas according to the average gray value of the two adjacent fan ring areas and the arc length ratio of each gray value change curve comprises the following specific steps:
in the method, in the process of the invention,representing the number of gray value transformation curves of two adjacent fan ring areas; />Represents the +.>Arc length ratio of the gray value transformation curves; />Representing the average gray value of the first sector ring region in the two adjacent sector ring regions; />Representing the average gray value of the second sector ring region in the two adjacent sector ring regions; />Representing the merging probability of two adjacent sector ring areas; />Representing an exponential function based on a natural constant.
8. The machine vision-based new energy battery welding defect detection method according to claim 1, wherein the obtaining each merging region according to the merging probabilities of a plurality of fixed regions and two adjacent fan ring regions comprises the following specific steps:
presetting a merge thresholdTraversing any fixed area, and carrying out merging operation in a clockwise direction on the fixed area, wherein the merging operation comprises the following steps:
when the merging probability of the fixed area and the sector ring area adjacent to the fixed area in the clockwise direction is more than or equal to the merging threshold valueWhen the new fixed area and the fan ring area adjacent to the fixed area in the clockwise direction are combined, the probability of combining the new fixed area and the fan ring area adjacent to the fixed area in the clockwise direction is larger than +>At the same time, the new fixed area is merged with the adjacent sector ring area in the clockwise direction, and so on until the merging probability of the new fixed area and the adjacent sector ring area in the clockwise direction is smaller than the merging threshold value +.>When the combination is stopped clockwise;
and carrying out merging operation in the anticlockwise direction on the new fixed area, and taking the finally obtained fixed area as a merging area.
9. The welding defect detection method for the new energy battery based on machine vision according to claim 1, wherein the step of obtaining the welding defect according to each merging area comprises the following specific steps:
threshold segmentation is carried out on any merging region to obtain a binary image, each connected region formed by pixel points with gray values of 0 in the binary image is respectively used as a threshold segmentation region, the minimum circumcircle of each threshold segmentation region is obtained, the ratio of each threshold segmentation region to the area of the corresponding minimum circumcircle is obtained, and the area threshold is presetWhen the ratio of the areas is greater than or equal to the surfaceAccumulation threshold->In this case, the threshold dividing region is defined as a welding defect.
10. The method for detecting welding defects of a new energy battery based on machine vision according to claim 1, wherein the step of obtaining the average gray value of each sector ring area comprises the following specific steps:
in the method, in the process of the invention,is->The number of pixel points of each fan ring area; />Is->The first part of the sector ring region>Gray values of the individual pixels;is->Average gray value of each sector ring area.
CN202311188035.8A 2023-09-15 2023-09-15 New energy battery welding defect detection method based on machine vision Active CN116935039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311188035.8A CN116935039B (en) 2023-09-15 2023-09-15 New energy battery welding defect detection method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311188035.8A CN116935039B (en) 2023-09-15 2023-09-15 New energy battery welding defect detection method based on machine vision

Publications (2)

Publication Number Publication Date
CN116935039A true CN116935039A (en) 2023-10-24
CN116935039B CN116935039B (en) 2023-12-29

Family

ID=88386402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311188035.8A Active CN116935039B (en) 2023-09-15 2023-09-15 New energy battery welding defect detection method based on machine vision

Country Status (1)

Country Link
CN (1) CN116935039B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105931227A (en) * 2016-04-14 2016-09-07 北京工业大学 Weld surface defect feature extraction method based on image gray scale B sweeping curve
CN107843602A (en) * 2017-10-31 2018-03-27 宁波蓝鼎电子科技有限公司 A kind of detection method for quality of welding line based on image
WO2022027949A1 (en) * 2020-08-04 2022-02-10 湖南大学 Machine vision-based detecting method and system for glass bottle bottom defects
CN115018833A (en) * 2022-08-05 2022-09-06 山东鲁芯之光半导体制造有限公司 Processing defect detection method of semiconductor device
CN115272316A (en) * 2022-09-27 2022-11-01 山东华太新能源电池有限公司 Intelligent detection method for welding quality of battery cover based on computer vision
CN115719332A (en) * 2022-10-18 2023-02-28 江苏思锐装备科技有限公司 Welding quality detection method
CN115797358A (en) * 2023-02-10 2023-03-14 济宁安泰矿山设备制造有限公司 Metal shell automatic welding defect detection method based on machine vision
CN115829923A (en) * 2022-09-23 2023-03-21 杭州安脉盛智能技术有限公司 Battery weld joint detection method, device and equipment and readable storage medium
CN115965588A (en) * 2022-12-07 2023-04-14 苏州镁伽科技有限公司 Defect detection method, system, electronic device and storage medium
CN116258713A (en) * 2023-05-11 2023-06-13 青岛穗禾信达金属制品有限公司 Welding processing detection method for metal cabinet

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105931227A (en) * 2016-04-14 2016-09-07 北京工业大学 Weld surface defect feature extraction method based on image gray scale B sweeping curve
CN107843602A (en) * 2017-10-31 2018-03-27 宁波蓝鼎电子科技有限公司 A kind of detection method for quality of welding line based on image
WO2022027949A1 (en) * 2020-08-04 2022-02-10 湖南大学 Machine vision-based detecting method and system for glass bottle bottom defects
CN115018833A (en) * 2022-08-05 2022-09-06 山东鲁芯之光半导体制造有限公司 Processing defect detection method of semiconductor device
CN115829923A (en) * 2022-09-23 2023-03-21 杭州安脉盛智能技术有限公司 Battery weld joint detection method, device and equipment and readable storage medium
CN115272316A (en) * 2022-09-27 2022-11-01 山东华太新能源电池有限公司 Intelligent detection method for welding quality of battery cover based on computer vision
CN115719332A (en) * 2022-10-18 2023-02-28 江苏思锐装备科技有限公司 Welding quality detection method
CN115965588A (en) * 2022-12-07 2023-04-14 苏州镁伽科技有限公司 Defect detection method, system, electronic device and storage medium
CN115797358A (en) * 2023-02-10 2023-03-14 济宁安泰矿山设备制造有限公司 Metal shell automatic welding defect detection method based on machine vision
CN116258713A (en) * 2023-05-11 2023-06-13 青岛穗禾信达金属制品有限公司 Welding processing detection method for metal cabinet

Also Published As

Publication number Publication date
CN116935039B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN113822890B (en) Microcrack detection method, device and system and storage medium
CN108562589B (en) Method for detecting surface defects of magnetic circuit material
CN109141232B (en) Online detection method for disc castings based on machine vision
CN107918931B (en) Image processing method and system and computer readable storage medium
CN115423813B (en) Method for detecting welding defects on surface of welded pipe
CN107203990A (en) A kind of labeling damage testing method based on template matches and image quality measure
CN113239930B (en) Glass paper defect identification method, system, device and storage medium
JP2013167596A (en) Defect inspection device, defect inspection method, and program
CN110544231B (en) Lithium battery electrode surface defect detection method based on background standardization and centralized compensation algorithm
CN115063423B (en) Self-adaptive identification method for cold and hot cracks of mechanical castings based on computer vision
CN108509950B (en) Railway contact net support number plate detection and identification method based on probability feature weighted fusion
CN114910480A (en) Wafer surface defect detection method based on machine vision
CN111126393A (en) Vehicle appearance refitting judgment method and device, computer equipment and storage medium
CN111815564A (en) Method and device for detecting silk ingots and silk ingot sorting system
CN113034474A (en) Test method for wafer map of OLED display
CN114359190A (en) Plastic product molding control method based on image processing
CN113240623A (en) Pavement disease detection method and device
CN113516619A (en) Product surface flaw identification method based on image processing technology
CN116205876A (en) Unsupervised notebook appearance defect detection method based on multi-scale standardized flow
CN113609736B (en) Numerical calculation model construction method based on hole fracture structure digital image
CN112364881A (en) Advanced sampling consistency image matching algorithm
CN117333489B (en) Film damage detection device and detection system
CN114170168A (en) Display module defect detection method, system and computer readable storage medium
CN116935039B (en) New energy battery welding defect detection method based on machine vision
CN110717910B (en) CT image target detection method based on convolutional neural network and CT scanner

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