CN117392469B - Perovskite battery surface coating detection method and system based on machine vision - Google Patents

Perovskite battery surface coating detection method and system based on machine vision Download PDF

Info

Publication number
CN117392469B
CN117392469B CN202311684105.9A CN202311684105A CN117392469B CN 117392469 B CN117392469 B CN 117392469B CN 202311684105 A CN202311684105 A CN 202311684105A CN 117392469 B CN117392469 B CN 117392469B
Authority
CN
China
Prior art keywords
defective
cluster
pixel points
pixel point
target pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311684105.9A
Other languages
Chinese (zh)
Other versions
CN117392469A (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 Freshen Technology Co ltd
Original Assignee
Shenzhen Freshen Technology 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 Freshen Technology Co ltd filed Critical Shenzhen Freshen Technology Co ltd
Priority to CN202311684105.9A priority Critical patent/CN117392469B/en
Publication of CN117392469A publication Critical patent/CN117392469A/en
Application granted granted Critical
Publication of CN117392469B publication Critical patent/CN117392469B/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/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • 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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • G01N2021/8861Determining coordinates of flaws
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • 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
    • Y02E10/00Energy generation through renewable energy sources
    • Y02E10/50Photovoltaic [PV] energy
    • Y02E10/549Organic PV cells

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a perovskite battery surface coating detection method and system based on machine vision, comprising the following steps: acquiring a target pixel point according to the gradient amplitude of the pixel point in the perovskite battery surface image; constructing a three-dimensional space coordinate system according to the target pixel points; obtaining a clustering radius, and clustering target pixel points in a three-dimensional space coordinate system to obtain a cluster; obtaining the optimization degree of the target pixel point of each cluster as a defective pixel point, and further obtaining the defective pixel point; clustering the defective pixel points to obtain defective clusters; obtaining the degree of abnormality of each defective pixel point in each defective cluster as a reference pixel point, thereby obtaining the reference pixel point of each defective cluster; acquiring the possibility that each defective pixel point in each defective cluster is a seed point, and further acquiring the seed point of each defective cluster; according to the seed points of each defective cluster, the defect area corresponding to each defective cluster is obtained, and the accurate defect area can be extracted.

Description

Perovskite battery surface coating detection method and system based on machine vision
Technical Field
The invention relates to the technical field of image processing, in particular to a perovskite battery surface coating detection method and system based on machine vision.
Background
In the manufacturing process of the perovskite battery, the surface of the perovskite battery needs to be subjected to film coating treatment, the surface film coating not only plays a role of a protective layer in the perovskite battery, but also can optimize optical, electronic transmission and interface characteristics, improve the efficiency, stability and service life of the battery, and because certain defects exist in the process, film coating materials and the like during film coating, when the surface of the perovskite battery is coated, uneven conditions exist in the appearance of the film coating, and the like, the internal components of the battery cannot be well protected in the thin part of the film coating, and the situation is that the film coating is coated with an unqualified product, and the film coating treatment is needed to be performed again on the surface of the perovskite battery, so that the thin part of the film coating, namely a defect area, needs to be detected.
When the traditional image segmentation algorithm is used for extracting and segmenting the defect region in the perovskite battery surface image, the segmented defect region is inaccurate due to the influence of the internal element on the battery surface.
Disclosure of Invention
In order to solve the problems, the invention discloses a perovskite battery surface coating film detection method and system based on machine vision.
The perovskite battery surface coating film detection method based on machine vision adopts the following technical scheme:
one embodiment of the invention provides a perovskite battery surface coating film detection method based on machine vision, which comprises the following steps:
collecting a perovskite battery surface image;
acquiring a plurality of target pixel points according to gradient amplitude values of the pixel points in the perovskite battery surface image, wherein the target pixel points comprise defect pixel points in the perovskite battery surface image; taking three attributes of a gray value, a gradient amplitude and a gradient direction as three coordinate axes in a three-dimensional space coordinate system, and constructing each target pixel point into the three-dimensional space coordinate system according to the gradient amplitude, the gradient direction and the gray value of each target pixel point; obtaining a clustering radius according to a target pixel point in a three-dimensional space rectangular coordinate system; clustering the target pixel points in the three-dimensional space coordinate system according to the clustering radius to obtain each cluster;
acquiring the preference degree of the target pixel points of each cluster as defective pixel points according to the distance fluctuation among the target pixel points in each cluster and the density of the target pixel points; obtaining defective pixel points in the perovskite battery surface image according to the preference degree of the target pixel point of each cluster as the defective pixel point;
clustering defective pixel points in the perovskite battery surface image to obtain a plurality of defective clusters; obtaining the abnormality degree of each defective pixel point in each defective cluster as a reference pixel point according to the difference between the gray value of the defective pixel point in each defective cluster and the gray average value of the pixel points in the adjacent defective clusters, and obtaining the reference pixel point of each defective cluster; according to the gray level difference and the abnormality difference between the defective pixel point in each defective cluster and the reference pixel point of each defective cluster, the possibility that each defective pixel point in each defective cluster is a seed point is obtained, the seed point of each defective cluster is subjected to area growth, the defective area corresponding to each defective cluster is obtained, and all the defective areas in the perovskite battery surface image are obtained.
Preferably, the obtaining a plurality of target pixel points according to the gradient amplitude of the pixel points in the perovskite battery surface image includes the following specific steps:
and acquiring the gradient amplitude of each pixel point in the perovskite battery surface image by using a sobel operator, and marking the pixel point with the gradient amplitude of not 0 as a target pixel point.
Preferably, the step of obtaining the cluster radius according to the target pixel point in the rectangular coordinate system of the three-dimensional space includes the following specific steps:
in the method, in the process of the invention,for the cluster radius>Representing the +.f. in perovskite cell surface image>Gray value of each target pixel point;Representing the gray average value of all target pixel points in the perovskite battery surface image; />Representing the maximum gray value in all target pixel points of the perovskite battery surface image; />Representing the +.f. in perovskite cell surface image>Gradient direction of each target pixel point; />Representing the average value of gradient directions of all target pixel points in the perovskite battery surface image; />Representing the +.f. in perovskite cell surface image>Gradient amplitude values of the target pixel points; />Representing the average value of gradient amplitude values of all target pixel points in the perovskite battery surface image; />Representing the maximum gradient amplitude in all target pixel points of the perovskite battery surface image; />Representing the number of target pixel points in the perovskite cell surface image; />Is an absolute value symbol; />Representing the amplification factor.
Preferably, the clustering is performed on the target pixel points in the three-dimensional space coordinate system according to the clustering radius, and each cluster is obtained, including the following specific steps:
the minimum number of samples of the preset cluster isAnd clustering target pixel points in the three-dimensional space coordinate system according to the minimum sample number and the cluster radius of the clusters by using a DBSCAN clustering algorithm to obtain each cluster.
Preferably, the obtaining the target pixel point of each cluster as the preference of the defective pixel point includes the following specific steps:
in the method, in the process of the invention,represents->The target pixel points of the clustering clusters are the preference degree of the defective pixel points; />Represents->DB indexes of the cluster clusters; />Represents->The>The nearest first pixel point to the target pixel point>Distance values of the target pixel points; />Represents->The>The nearest first pixel point to the target pixel pointDistance values of the target pixel points; />Represents->The cluster is associated with->The nearest +.>A plurality of pixel points; />Represents->The number of target pixel points in each cluster; />Representing a normalization function; />Representing absolute value symbols.
Preferably, the obtaining the defective pixel point in the perovskite battery surface image according to the preference degree that the target pixel point of each cluster is the defective pixel point includes the following specific steps:
the method comprises the steps of presetting a preference threshold, and when the preference of a target pixel point of any cluster is a defect pixel point and is larger than the preference threshold, the target pixel point in the cluster is the defect pixel point in the perovskite battery surface image.
Preferably, the clustering of defective pixel points in the perovskite battery surface image to obtain a plurality of defective clusters includes the following specific steps:
and clustering defective pixel points in the perovskite battery surface image by using a mean shift clustering method to obtain a plurality of defective clusters.
Preferably, the obtaining the abnormality degree of each defective pixel point in each defective cluster as a reference pixel point to obtain the reference pixel point of each defective cluster includes the following specific steps:
in the method, in the process of the invention,represents->The>The defect pixel points are the abnormality degree of the reference pixel points; />Represents->The>Gray values of the defective pixels; />Indicate->The>Eighth in the eight neighborhoods of the defective pixel>Gray values of the individual pixels; get->Each defective pixel point in the defective clusters is the degree of abnormality of the reference pixel point, and the defective pixel point with the minimum degree of abnormality is marked as the +.>Reference pixel points of the defect clusters;
and acquiring the anomaly degree of each defective pixel point in each defective cluster as a reference pixel point, and marking the defective pixel point with the minimum anomaly degree in each defective cluster as the reference pixel point of each defective cluster.
Preferably, the obtaining the possibility that each defective pixel point in each defective cluster is a seed point, obtaining the seed point of each defective cluster, and performing region growth on the seed point of each defective cluster to obtain a defective region corresponding to each defective cluster, includes the following specific steps:
in the method, in the process of the invention,represents->The>The probability that the defective pixel points are seed points; />Represents the firstThe>Gray values of the defective pixels; />Represents->Gray values of reference pixel points of the defect clusters;represents->The>The defect pixel points are the abnormality degree of the reference pixel points; />Represents->Abnormality degrees of reference pixel points in the defect clusters; />Representing absolute value symbols;
presetting a likelihood thresholdWhen->The>The probability that the defective pixel point is the seed point is greater than the probability threshold +.>At the time->The defective pixel is +.>A seed point of the defective cluster, obtain +.>Seed points of the defect clusters;
acquiring the possibility that each defective pixel point in each defective cluster is a seed point, and judging according to a probability threshold value to acquire the seed point of each defective cluster;
will be the firstThe gray average value of any seed point in the defect cluster and all pixel points in the eight neighborhood is used as the +.>The growth threshold of the seed point in the defective cluster, and for +.>The seed point in the defective cluster is subjected to region growth to obtain a growth region for +.>Each seed point in each defective cluster is subjected to regional growth to obtain a plurality of growth regions, and the growth regions are combined to obtain the +.>And obtaining the defect areas corresponding to each defect cluster.
The invention also provides a perovskite battery surface coating film detection system based on machine vision, which comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes any one of the steps when executing the computer program.
The technical scheme of the invention has the beneficial effects that: according to the method, firstly, target pixel points are obtained according to gray value distribution characteristics of a qualified coating region and a defective region in a perovskite battery surface image, namely the target pixel points can be possibly defective pixel points in the perovskite battery surface image; then constructing a three-dimensional space coordinate system according to gradient amplitude, gradient direction and gray value of the target pixel points, clustering the target pixel points in the three-dimensional space coordinate system to obtain each cluster, gathering the pixel points at the edge of the internal element of the battery into one type, gathering the defective pixel points into one type, and obtaining the preference of the target pixel point of each cluster as the defective pixel point according to the distance fluctuation among the target pixel points in each cluster and the density of the target pixel point, thereby obtaining the defective pixel point in the perovskite battery surface image; then clustering defective pixel points in the perovskite battery surface image to obtain each defective cluster, gathering the defective pixel points of the same defective area together, obtaining the abnormality degree of each defective pixel point in each defective cluster as a reference pixel point, further obtaining the reference pixel point of each defective cluster, and obtaining the possibility that each defective pixel point in each defective cluster is a seed point according to the gray level difference and the abnormality degree difference of the defective pixel point and the reference pixel point in the defective cluster, so as to obtain the seed point of each defective cluster; and finally, carrying out region growth on seed points of each defective cluster to obtain a defective region corresponding to each defective cluster, and obtaining all defective regions in the perovskite battery surface image.
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 method for detecting a coating film on a perovskite battery surface based on machine vision.
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 specific implementation, structure, characteristics and effects of the perovskite battery surface coating film detection method based on machine vision according to the invention in combination with 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 specific scheme of the perovskite battery surface coating film detection method based on machine vision provided by the invention is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for detecting a coating film on a surface of a perovskite battery based on machine vision according to an embodiment of the invention is shown, the method comprises the following steps:
s001, acquiring a perovskite battery surface image.
It should be noted that, the object of the present invention is to detect whether there is a thin coating film area, i.e. a defect area, on the surface of the perovskite battery to complete quality detection of the perovskite battery, so that an image of the surface of the perovskite battery needs to be collected, and the coating film on the surface of the perovskite battery is transparent or colorless in a normal case, and when the conventional overlooking method is adopted to collect the image of the surface of the perovskite battery, the coating condition of the coating film on the surface of the perovskite battery cannot be well obtained due to the transparent color characteristic of the coating film, so that in the embodiment of the present invention, uniformity and proper brightness of a light source in a photographing environment are maintained. And setting the shooting angle of the high-definition camera to be an included angle of 30 degrees with the horizontal plane of the perovskite battery, shooting the surface of the perovskite battery, and marking the shot image as a perovskite battery surface image after carrying out gray-scale treatment.
Thus, a perovskite battery surface image was obtained.
S002, obtaining target pixel points in the perovskite battery surface image, obtaining a clustering radius according to the target pixel points, and clustering the target pixel points according to the clustering radius to obtain each cluster.
In addition, the quality of the perovskite battery is not too high because the thin coating film on the surface of the perovskite battery can not well maintain the internal components of the battery, when the collected perovskite battery surface image is analyzed, if the influence of the internal components of the battery is not considered, the surface of the region qualified by the coating film is relatively flat, the reflection degree of light is relatively consistent, the surface evenness of the region unqualified by the coating film is poor, the reflection degree of light is inconsistent, a concave region is formed in the region thinner by the coating film, the reflection degree of the region qualified by the coating film and the reflection degree of the region unqualified by the coating film are inconsistent, the gray value of the region qualified by the coating film in the perovskite battery surface image is brighter than the gray value of the defect region, and the gray value of the defect region has a certain gradient characteristic, and the gray value of the region qualified by the coating film is even consistent.
It should be further noted that, because there is a larger gradient amplitude in the pixel points at the edge of the internal element of the battery, there may be pixel points at the edge of the internal element of the battery in the obtained target pixel points, so that the pixel points belonging to the edge of the internal element of the battery in the target pixel points need to be excluded, and the internal element of the battery is known to be regular, so that the gray value, gradient amplitude and gradient direction of the pixel points at the edge of the internal element of the battery are relatively close, therefore, in the embodiment of the invention, a three-dimensional space coordinate system is constructed according to the gray value, gradient amplitude and gradient direction of each target pixel point, and all the target pixel points in the three-dimensional space coordinate system are clustered by using a DBSCAN clustering algorithm, so that the pixel points at the edge of the internal element of the battery can be clustered, but when the DBSCAN clustering algorithm is used, the selection of the cluster radius has an influence on the clustering effect.
In the embodiment of the invention, a sobel operator is used for acquiring the gradient amplitude of each pixel point in the perovskite battery surface image, the pixel point with the gradient amplitude not being 0 is marked as a target pixel point, three attributes of a gray value, the gradient amplitude and the gradient direction are used as three coordinate axes in a three-dimensional space coordinate system, the gradient amplitude, the gradient direction and the gray value of each target pixel point are acquired, and each target pixel point is mapped into the three-dimensional space coordinate system.
Obtaining a cluster radius:
in the method, in the process of the invention,for the cluster radius>Representing the +.f. in perovskite cell surface image>Gray values of the target pixel points;representing the gray average value of all target pixel points in the perovskite battery surface image; />Representing the maximum gray value in all target pixel points of the perovskite battery surface image; />Representing the +.f. in perovskite cell surface image>Gradient direction of each target pixel point; />Representing the average value of gradient directions of all target pixel points in the perovskite battery surface image; />Representing the +.f. in perovskite cell surface image>Gradient amplitude values of the target pixel points; />Representing the average value of gradient amplitude values of all target pixel points in the perovskite battery surface image; />Representing the maximum gradient amplitude in all target pixel points of the perovskite battery surface image; />Representing the number of target pixel points in the perovskite cell surface image; />Is an absolute value symbol; />Represents the amplification factor for->The value range is [0,1 ]]Therefore, it is necessary to amplify it, and in the embodiment of the present invention, the amplification factor is preset +.>In other embodiments, the practitioner may be +.>Is a value of (2); />Representing the +.f. in perovskite cell surface image>The average value of the sum of the gray value and the gray average value difference absolute value of each target pixel point, the gradient amplitude and the gradient amplitude average value difference absolute value, and the average value difference absolute value of the gradient direction and the gradient direction average value is marked as +.>Characteristic value of each target pixel, +.>The average value of the characteristic values representing all the target pixel points is used as a clustering radius, so that the density difference of the target pixel points in each dimension and the overall dimension in the three-dimensional space coordinate system can be well measured, and a better clustering effect is obtained.
The minimum number of samples of the preset cluster isClustering target pixel points in a three-dimensional space coordinate system according to the minimum sample number and the cluster radius of the clusters by using a DBSCAN clustering algorithm to obtain each cluster, wherein in the embodiment of the invention, the minimum sample number of the clusters is preset>In other embodiments, the practitioner can set +.>Is a value of (2).
So far, acquiring target pixel points in the perovskite battery surface image, acquiring a clustering radius according to the target pixel points, and clustering the target pixel points according to the clustering radius to obtain each cluster.
S003, obtaining the preference degree of the target pixel point of each cluster as a defect pixel point; and obtaining the defective pixel point in the perovskite battery surface image according to the preference degree of the target pixel point of each cluster as the defective pixel point.
It should be noted that, in step S002, the target pixel points in the three-dimensional space coordinate system are clustered to obtain clusters, the pixel points at the edges of the internal elements of the battery are clustered to form clusters, the defective pixel points in the defective area are clustered to form clusters, the internal elements of the battery are known to be regular, the gray values, gradient magnitudes and gradient directions of the pixel points at the edges of the internal elements of the battery are relatively close, so that the distribution of the pixel points at the edges of the internal elements of the battery in the three-dimensional space coordinate system is dense, the distances among the pixel points are consistent, that is, the distance fluctuation is small, the distribution of the defective pixel points is dispersed, and the distance fluctuation among the defective pixel points is large.
In the embodiment of the invention, the optimization degree that the target pixel point of each cluster is the defective pixel point is obtained:
in the method, in the process of the invention,represents->The target pixel points of the clustering clusters are the preference degree of the defective pixel points; />Represents->DB indexes of the cluster clusters; it should be noted that, the DB index is an index for evaluating the quality of a cluster, and obtaining the DB index of the cluster is in the prior art, and in the embodiment of the present invention, excessive description is not repeated; />Represents->The>The nearest first pixel point to the target pixel point>Distance values of the target pixel points; />Represents->The>The nearest first pixel point to the target pixel point>Distance values of the target pixel points; />Represents->The cluster is associated with->The nearest +.>A plurality of pixel points; in the embodiment of the invention, the +.>In other embodiments, the practitioner can set +.>The first 8 target pixel points are acquired to participate in calculation according to the sequence from small to large; />Represents->The number of target pixel points in each cluster; />Representing normalization function, adopting linear normalization, normalizing object to obtain all cluster clustersThe method comprises the steps of carrying out a first treatment on the surface of the When->The greater the value of (2) indicates +.>The density of target pixel points of each cluster is small, and the defect area of the surface of the known battery is irregular and uneven in shape, so the defect area is formed by +.>The greater the value of (2), the description of +.>The target pixel of each cluster is more likely to be a defective pixel, and the shape of the internal element of the battery is known to be regular, so that +.>The smaller the value of (2) indicates +.>The density of the target pixel points of the cluster clusters is larger, which indicates the +.>The target pixel points of the clusters are more likely to be defective pixel pointsRepresents->The distance between the target pixel points of the clusters fluctuates, and the greater the value thereof, the description of the +.>The target pixel of each cluster is more likely to be a defective pixel.
Similarly, obtaining the preference degree of the target pixel point of each cluster as the defect pixel point; presetting a preference thresholdWhen the preference degree of the target pixel point of the cluster as the defect pixel point is larger than the preference degree threshold value, the target pixel point in the cluster is considered as the defect pixel point in the perovskite battery surface image. In the embodiment of the invention, a threshold value of the preference degree is presetIn other embodiments, the practitioner can set +.>Is a value of (2).
So far, obtaining the preference degree of the target pixel point of each cluster as the defect pixel point; and obtaining the defective pixel point in the perovskite battery surface image according to the preference degree of the target pixel point of each cluster as the defective pixel point.
S004, clustering defective pixel points in the perovskite battery surface image to obtain each defective cluster, obtaining seed points of each defective cluster, carrying out region growth on the seed points of each defective cluster to obtain a defective region corresponding to each defective cluster, and obtaining all defective regions of the perovskite battery surface image.
It should be noted that, the above steps obtain the defective pixel points in the perovskite battery surface image, and the defective area in the perovskite battery surface image may have multiple positions, so that the defective pixel points in the perovskite battery surface image need to be clustered, and the defective pixel points that may be the same defective area are clustered into one type.
In the embodiment of the invention, each defective cluster is acquired: the method for clustering the defect pixel points in the perovskite battery surface image by using the mean shift clustering method is used for obtaining each defect cluster, and the mean shift clustering algorithm is the prior art, and in the embodiment of the invention, redundant description is not needed.
It should be noted that, when each defect cluster is obtained, the defective pixel point in each defect cluster needs to be subjected to region growth, so as to obtain each complete defect region, however, when a part of the defect region is located in an internal element of the battery and a part of the defect region is located in a surface area of the battery, the gray level value of the defect region is inconsistent, so that when the defective pixel point in each defect cluster is subjected to region growth, a plurality of seed points need to be obtained, when the difference between the gray level value of any defective pixel point in the defect cluster and the gray level average value of the pixel points in the adjacent defect cluster is smaller, the more likely the defective pixel point is a seed point, so that according to the characteristic, the abnormal degree of each defective pixel point in the defect cluster is obtained as a reference pixel point, one seed point in the defect cluster is obtained, then all the seed points in the defect cluster need to be obtained according to the gray level difference and the abnormal degree difference between the rest pixel points in the defect cluster and the reference pixel point, and when the difference between the gray level of any defective pixel point in the defect cluster and the reference pixel point is larger, the defect point is considered as the seed point, the defect point can not grow.
In the embodiment of the invention, the first is acquiredThe>The defect pixel points are the abnormality degree of the reference pixel points;
in the method, in the process of the invention,represents->The>The defect pixel points are the abnormality degree of the reference pixel points; />Represents->The>Gray values of the defective pixels; />Indicate->The>Eighth in the eight neighborhoods of the defective pixel>Gray values of the individual pixels; />Indicate->The>The absolute value of the difference between the gray value of each defective pixel and the gray average value of the pixels in the eight neighborhoods of the defective pixel is that the defective pixel is more likely to be a reference pixel when the absolute value of the difference is smaller, and the degree of abnormality of the defective pixel which is the reference pixel is lower, and the first pixel is obtained>Each defective pixel point in the defective clusters is the degree of abnormality of the reference pixel point, and the defective pixel point with the minimum degree of abnormality is marked as the +.>Reference pixel point of defective cluster, also +.>The first seed point of the defective cluster. And similarly, acquiring the anomaly degree of each defective pixel point in each defective cluster as a reference pixel point, and marking the defective pixel point with the minimum anomaly degree in each defective cluster as the reference pixel point of each defective cluster.
Acquisition of the firstThe>The probability that each defective pixel is a seed point:
in the method, in the process of the invention,represents->The>Defects ofThe likelihood that the pixel point is a seed point; />Represents the firstThe>Gray values of the defective pixels; />Represents->Gray values of reference pixel points of the defect clusters;represents->The>The gray value of each defective pixel point is different from the gray value of the reference pixel point, and the difference is smaller, the +.>The>The defective pixels can be grown by the reference pixels, the +.>The>The less likely that each defective pixel is a seed point; the greater the difference, the description of +.>The>The defective pixels cannot be grown by the reference pixels, the +.>The>The greater the likelihood that the defective pixel is a seed, the more +.>Represents->The>The defect pixel points are the abnormality degree of the reference pixel points; />Represents->Abnormality degrees of reference pixel points in the defect clusters; when->The smaller the difference, the description of +.>The>The gray level change difference of the neighborhood pixel points of the defective pixel point and the reference pixel point is small, which indicates the +.>The>The defective pixels can be grown by the reference pixels, the +.>The>The less likely that each defective pixel is a seed point, whenThe greater the difference, the description of +.>The>The gray level change difference of the neighborhood pixel points of the defective pixel point and the reference pixel point is large, which indicates the +.>The>The defective pixel points can not be grown by the reference pixel points, the firstThe>The greater the likelihood that the defective pixel points are seed points. And similarly, obtaining the possibility that each defective pixel point in each defective cluster is a seed point.
Similarly, obtain the firstThe probability that each defective pixel point in the defective clusters is a seed point is preset with a probability threshold value +.>When->The probability that any defective pixel point in the defective clusters is a seed point is greater thanLikelihood threshold +.>Consider the defective pixel to be the +.>A seed point of the defective cluster, obtaining +.>Seed points of the defective clusters. And similarly, obtaining the possibility that each defective pixel point in each defective cluster is a seed point, and judging according to a probability threshold value to obtain the seed point of each defective cluster.
In the embodiment of the invention, the first is acquiredDefect areas corresponding to the individual defect clusters: will be->The gray average value of any seed point in the defect cluster and all pixel points in the eight neighborhood is used as the +.>The growth threshold of the seed point in the defective cluster, and for +.>The seed point in the defective cluster is subjected to region growth to obtain a growth region for +.>Each seed point in each defective cluster is subjected to regional growth to obtain a plurality of growth regions, and the growth regions are combined to obtain the +.>Defect areas corresponding to the defective clusters.
And similarly, obtaining a defect area corresponding to each defect cluster.
The method comprises the steps of clustering defective pixel points in a perovskite battery surface image to obtain each defective cluster, obtaining seed points of each defective cluster, carrying out region growth on the seed points of each defective cluster to obtain a defective region corresponding to each defective cluster, and obtaining all defective regions in all perovskite battery surface images.
The embodiment provides a perovskite battery surface coating film detection system based on machine vision, which comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes steps S001 to S004 when executing the computer program.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.

Claims (7)

1. The perovskite battery surface coating film detection method based on machine vision is characterized by comprising the following steps of:
collecting a perovskite battery surface image;
acquiring a plurality of target pixel points according to gradient amplitude values of the pixel points in the perovskite battery surface image, wherein the target pixel points comprise defect pixel points in the perovskite battery surface image; taking three attributes of a gray value, a gradient amplitude and a gradient direction as three coordinate axes in a three-dimensional space coordinate system, and constructing each target pixel point into the three-dimensional space coordinate system according to the gradient amplitude, the gradient direction and the gray value of each target pixel point; obtaining a clustering radius according to a target pixel point in a three-dimensional space rectangular coordinate system; clustering the target pixel points in the three-dimensional space coordinate system according to the clustering radius to obtain each cluster;
acquiring the preference degree of the target pixel points of each cluster as defective pixel points according to the distance fluctuation among the target pixel points in each cluster and the density of the target pixel points; the obtaining the optimization degree of the target pixel point of each cluster as the defect pixel point comprises the following specific steps:
in the method, in the process of the invention,represents->The target pixel points of the clustering clusters are the preference degree of the defective pixel points; />Represents->DB indexes of the cluster clusters; />Represents->The>The nearest first pixel point to the target pixel point>Distance values of the target pixel points; />Represents->The>The nearest first pixel point to the target pixel point>Distance values of the target pixel points; />Represents->The cluster is associated with->The nearest +.>A plurality of pixel points; />Represents->The number of target pixel points in each cluster; />Representing a normalization function; />Representing absolute value symbols;
obtaining defective pixel points in the perovskite battery surface image according to the preference degree of the target pixel point of each cluster as the defective pixel point; the method for obtaining the defect pixel point in the perovskite battery surface image according to the preference degree that the target pixel point of each cluster is the defect pixel point comprises the following specific steps:
presetting a preference threshold, and when the preference of the target pixel point of any cluster as a defect pixel point is larger than the preference threshold, the target pixel point in the cluster is the defect pixel point in the perovskite battery surface image;
clustering defective pixel points in the perovskite battery surface image to obtain a plurality of defective clusters; obtaining the abnormality degree of each defective pixel point in each defective cluster as a reference pixel point according to the difference between the gray value of the defective pixel point in each defective cluster and the gray average value of the pixel points in the adjacent defective clusters, and obtaining the reference pixel point of each defective cluster; obtaining the possibility that each defective pixel point in each defective cluster is a seed point according to the gray level difference and the abnormality difference of the defective pixel point in each defective cluster and the reference pixel point of each defective cluster, obtaining the seed point of each defective cluster, carrying out region growth on the seed point of each defective cluster, and obtaining the defect region corresponding to each defective cluster, thereby obtaining all the defect regions in the perovskite cell surface image; the method comprises the following specific steps of:
in the method, in the process of the invention,represents->The>The probability that the defective pixel points are seed points; />Represents->The>Gray values of the defective pixels; />Represents->Gray values of reference pixel points of the defect clusters; />Represents->The>The defect pixel points are the abnormality degree of the reference pixel points; />Represents->Abnormality degrees of reference pixel points in the defect clusters; />Representing absolute value symbols;
presetting a likelihood thresholdWhen->The>The probability that the defective pixel point is the seed point is greater than the probability threshold +.>At the time->Defective pixelsThe point is +.>A seed point of the defective cluster, obtain +.>Seed points of the defect clusters;
acquiring the possibility that each defective pixel point in each defective cluster is a seed point, and judging according to a probability threshold value to acquire the seed point of each defective cluster;
will be the firstThe gray average value of any seed point in the defect cluster and all pixel points in the eight neighborhood is used as the +.>The growth threshold of the seed point in the defective cluster, and for +.>The seed point in the defective cluster is subjected to region growth to obtain a growth region for +.>Each seed point in each defective cluster is subjected to regional growth to obtain a plurality of growth regions, and the growth regions are combined to obtain the +.>And obtaining the defect areas corresponding to each defect cluster.
2. The machine vision-based perovskite battery surface coating film detection method as claimed in claim 1, wherein the step of obtaining a plurality of target pixel points according to gradient magnitudes of the pixel points in the perovskite battery surface image comprises the following specific steps:
and acquiring the gradient amplitude of each pixel point in the perovskite battery surface image by using a sobel operator, and marking the pixel point with the gradient amplitude of not 0 as a target pixel point.
3. The machine vision-based perovskite battery surface coating film detection method as claimed in claim 1, wherein the step of obtaining the cluster radius according to the target pixel point in the three-dimensional space rectangular coordinate system comprises the following specific steps:
in the method, in the process of the invention,for the cluster radius>Representing the +.f. in perovskite cell surface image>Gray values of the target pixel points; />Representing the gray average value of all target pixel points in the perovskite battery surface image; />Representing the maximum gray value in all target pixel points of the perovskite battery surface image; />Representing the +.f. in perovskite cell surface image>Gradient direction of each target pixel point; />Representing the average value of gradient directions of all target pixel points in the perovskite battery surface image; />Representing the +.f. in perovskite cell surface image>Gradient amplitude values of the target pixel points; />Representing the average value of gradient amplitude values of all target pixel points in the perovskite battery surface image; />Representing the maximum gradient amplitude in all target pixel points of the perovskite battery surface image; />Representing the number of target pixel points in the perovskite cell surface image; />Is an absolute value symbol; />Representing the amplification factor.
4. The machine vision-based perovskite battery surface coating film detection method as claimed in claim 1, wherein the clustering of target pixel points in a three-dimensional space coordinate system according to a clustering radius to obtain each cluster comprises the following specific steps:
the minimum number of samples of the preset cluster isClustering target pixel points in a three-dimensional space coordinate system according to the minimum sample number and the cluster radius of the clusters by using a DBSCAN clustering algorithm to obtainEach cluster.
5. The machine vision-based perovskite battery surface coating film detection method as claimed in claim 1, wherein the step of clustering defective pixel points in the perovskite battery surface image to obtain a plurality of defective clusters comprises the following specific steps:
and clustering defective pixel points in the perovskite battery surface image by using a mean shift clustering method to obtain a plurality of defective clusters.
6. The method for detecting a surface coating film of a perovskite battery based on machine vision according to claim 4, wherein the step of obtaining the degree of abnormality of each defective pixel in each defective cluster as a reference pixel to obtain the reference pixel of each defective cluster comprises the following specific steps:
in the method, in the process of the invention,represents->The>The defect pixel points are the abnormality degree of the reference pixel points; />Represents->The>Gray values of the defective pixels; />Indicate->The>Eighth in the eight neighborhoods of the defective pixel>Gray values of the individual pixels; get->Each defective pixel point in the defective clusters is the degree of abnormality of the reference pixel point, and the defective pixel point with the minimum degree of abnormality is marked as the +.>Reference pixel points of the defect clusters;
and acquiring the anomaly degree of each defective pixel point in each defective cluster as a reference pixel point, and marking the defective pixel point with the minimum anomaly degree in each defective cluster as the reference pixel point of each defective cluster.
7. A machine vision based perovskite battery surface coating film detection system comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that the processor, when executing the computer program, realizes the steps of the machine vision based perovskite battery surface coating film detection method according to any one of claims 1-6.
CN202311684105.9A 2023-12-11 2023-12-11 Perovskite battery surface coating detection method and system based on machine vision Active CN117392469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311684105.9A CN117392469B (en) 2023-12-11 2023-12-11 Perovskite battery surface coating detection method and system based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311684105.9A CN117392469B (en) 2023-12-11 2023-12-11 Perovskite battery surface coating detection method and system based on machine vision

Publications (2)

Publication Number Publication Date
CN117392469A CN117392469A (en) 2024-01-12
CN117392469B true CN117392469B (en) 2024-02-20

Family

ID=89465126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311684105.9A Active CN117392469B (en) 2023-12-11 2023-12-11 Perovskite battery surface coating detection method and system based on machine vision

Country Status (1)

Country Link
CN (1) CN117392469B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117745724B (en) * 2024-02-20 2024-04-26 高唐县瑞景精密机械有限公司 Stone polishing processing defect region segmentation method based on visual analysis
CN117934483B (en) * 2024-03-25 2024-05-31 青岛佳美洋食品有限公司 Cod sausage production and processing quality detection method based on computer vision
CN118115499A (en) * 2024-04-29 2024-05-31 深圳市金利源绝缘材料有限公司 Visual detection method for production quality of electric power copper bar

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113030093A (en) * 2020-12-30 2021-06-25 凌云光技术股份有限公司 Battery diaphragm surface defect detection method and system
CN115511889A (en) * 2022-11-23 2022-12-23 江苏惠汕新能源集团有限公司 Method for detecting welding defects on surface of solar cell panel bracket
CN115578362A (en) * 2022-10-24 2023-01-06 盛景智能科技(嘉兴)有限公司 Defect detection method and device for electrode coating, electronic device and medium
CN116310360A (en) * 2023-05-18 2023-06-23 实德电气集团有限公司 Reactor surface defect detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102623933B1 (en) * 2021-03-26 2024-01-11 주식회사 엘지에너지솔루션 Roll map in coating proecss for electrode, making up method of roll map and making up system thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113030093A (en) * 2020-12-30 2021-06-25 凌云光技术股份有限公司 Battery diaphragm surface defect detection method and system
CN115578362A (en) * 2022-10-24 2023-01-06 盛景智能科技(嘉兴)有限公司 Defect detection method and device for electrode coating, electronic device and medium
CN115511889A (en) * 2022-11-23 2022-12-23 江苏惠汕新能源集团有限公司 Method for detecting welding defects on surface of solar cell panel bracket
CN116310360A (en) * 2023-05-18 2023-06-23 实德电气集团有限公司 Reactor surface defect detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于灰度共生矩阵和分层聚类的刨花板表面图像缺陷提取方法;郭慧;王霄;刘传泽;周玉成;;林业科学;20181115(第11期);全文 *

Also Published As

Publication number Publication date
CN117392469A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN117392469B (en) Perovskite battery surface coating detection method and system based on machine vision
CN114723701B (en) Gear defect detection method and system based on computer vision
CN111815564B (en) Method and device for detecting silk ingots and silk ingot sorting system
CN115187602A (en) Injection molding part defect detection method and system based on image processing
CN115082451B (en) Stainless steel soup ladle defect detection method based on image processing
CN116740070A (en) Plastic pipeline appearance defect detection method based on machine vision
CN107563384A (en) The recognition methods end to end of adhesion pig based on broad sense Hough clusters
CN116843692B (en) Regenerated active carbon state detection method based on artificial intelligence
CN113554638A (en) Method and system for establishing chip surface defect detection model
CN117333489B (en) Film damage detection device and detection system
CN117237646B (en) PET high-temperature flame-retardant adhesive tape flaw extraction method and system based on image segmentation
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN115131346B (en) Fermentation tank processing procedure detection method and system based on artificial intelligence
CN117557820B (en) Quantum dot optical film damage detection method and system based on machine vision
CN116664565A (en) Hidden crack detection method and system for photovoltaic solar cell
CN116523898A (en) Tobacco phenotype character extraction method based on three-dimensional point cloud
CN117437228B (en) Photovoltaic steel structure component fracture detection method based on image characteristics
CN117315289B (en) Aeroengine blade contour edge detection method based on image processing
CN117705815B (en) Printing defect detection method based on machine vision
CN117522864B (en) European pine plate surface flaw detection method based on machine vision
CN114663393A (en) Convolutional neural network-based detection method for defect of poor spacing between photovoltaic modules
CN117351214B (en) Heat tracing cable detection method and system based on image processing
CN107133958B (en) Optical remote sensing ship slice segmentation method based on block particle size pre-judging balance histogram
CN116993719A (en) OCA optical film surface defect visual detection method and system
CN116900412A (en) Steel plate equidistant automatic cutting regulation and control method based on visual processing

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