CN116091498B - Visual defect detection method for intelligent charger of lead-acid storage battery - Google Patents

Visual defect detection method for intelligent charger of lead-acid storage battery Download PDF

Info

Publication number
CN116091498B
CN116091498B CN202310362462.7A CN202310362462A CN116091498B CN 116091498 B CN116091498 B CN 116091498B CN 202310362462 A CN202310362462 A CN 202310362462A CN 116091498 B CN116091498 B CN 116091498B
Authority
CN
China
Prior art keywords
detected
pixel
probability
inner hole
determining
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
CN202310362462.7A
Other languages
Chinese (zh)
Other versions
CN116091498A (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.)
Feiyang Power Technology Shenzhen Co ltd
Original Assignee
Feiyang Power Technology Shenzhen 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 Feiyang Power Technology Shenzhen Co ltd filed Critical Feiyang Power Technology Shenzhen Co ltd
Priority to CN202310362462.7A priority Critical patent/CN116091498B/en
Publication of CN116091498A publication Critical patent/CN116091498A/en
Application granted granted Critical
Publication of CN116091498B publication Critical patent/CN116091498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/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/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • 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
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

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

Abstract

The invention relates to the technical field of digital image processing, in particular to a visual defect detection method for an intelligent charger of a lead-acid storage battery. The method comprises the following steps: acquiring a gray image of a charging port, determining an outer hole area and an outer hole center point, and determining the center point distance between a pixel point to be detected and the outer hole center point; determining the inner hole probability of the pixel point to be detected according to the center point distance, and determining the initial edge probability of the pixel point to be detected according to the feature vector average value and the inner hole probability of the pixel point to be detected; determining a bias coefficient according to the feature vector average value of all pixel points in the neighborhood to be detected, and determining the target edge probability; determining a clustering adjustment value according to the target edge probability of the pixel points in the adjacent domain to be detected; and carrying out clustering treatment on all pixel points in the outer hole area according to the clustering adjustment value to obtain an inner hole edge, and carrying out defect detection on the inner hole edge to obtain a detection result. The invention can effectively improve the reliability of defect detection.

Description

Visual defect detection method for intelligent charger of lead-acid storage battery
Technical Field
The invention relates to the technical field of digital image processing, in particular to a visual defect detection method for an intelligent charger of a lead-acid storage battery.
Background
Lead-acid batteries have long been the most widely used secondary battery product with the greatest world output because of their low price, good stability, and relatively mature technology. The lead-acid storage battery is widely applied to small and medium-sized electric automobiles. The automatic charging technology of electric automobiles is gradually mature.
The identification of the charging hole in the automatic charging technology is basically external hole identification, but whether the inside of the charging hole is perfect or not can not be detected only through the external hole identification, and the secondary damage caused by the damage of the inside of the charging hole can be effectively avoided by identifying the inner hole of the charger, so that the visual defect detection of the intelligent charger is realized.
In the related art, texture defect detection is directly performed through the acquisition of the inner hole image and according to the acquired image, and because the charging scenes of the electric vehicles are changeable, the charging hole specifications corresponding to different electric vehicles are possibly different, and the light rays can generate fuzzy areas which are difficult to directly define in different scenes, so that the inner hole edge cannot be accurately extracted, and further the defect detection reliability is insufficient.
Disclosure of Invention
In order to solve the technical problem that the defect detection reliability is insufficient due to the fact that the edges of the inner holes cannot be accurately extracted, the invention provides a visual defect detection method for an intelligent charger of a lead-acid storage battery, which adopts the following technical scheme:
the invention provides a visual defect detection method for an intelligent charger of a lead-acid storage battery, which comprises the following steps:
acquiring a gray level image of a charging port, wherein the gray level image comprises at least one outer hole area, the central point of each outer hole area is respectively determined to be an outer hole central point, a certain pixel point is selected in all the outer hole areas to serve as a pixel point to be detected, and the central point distance between the pixel point to be detected and the outer hole central point is determined;
determining the inner hole probability that the pixel point to be detected is the pixel point of the inner hole area according to the center point distance, and determining the characteristic vector average value of each pixel point in the outer hole area, wherein the characteristic vector average value is used for representing the gray gradient distribution of the pixel point, and determining the initial edge probability that the pixel point to be detected is the pixel point of the inner hole area edge according to the characteristic vector average value and the inner hole probability of the pixel point to be detected;
taking the pixel point to be detected as a center, taking a neighborhood in a preset first size range as a neighborhood to be detected, determining a bias coefficient of the neighborhood to be detected according to a feature vector mean value of all the pixel points in the neighborhood to be detected, and determining a target edge probability of the pixel point to be detected according to the bias coefficient of the neighborhood to be detected and the initial edge probability;
determining a clustering adjustment value of the pixel points to be detected according to the target edge probability of all the pixel points in the adjacent area to be detected; and clustering all pixel points in the outer hole area according to the clustering adjustment value to obtain an inner hole edge, and performing defect detection on the inner hole edge to obtain a detection result.
Further, the determining the feature vector average value of each pixel point in the outer hole area includes:
dividing all the outer hole areas into at least two units according to a preset second size;
constructing a direction gradient histogram of the unit according to a preset feature vector dimension and the gradient direction of the pixel points in the unit, wherein the abscissa of the direction gradient histogram is the preset feature vector dimension, and the ordinate of the direction gradient histogram is a feature vector value corresponding to the preset feature vector dimension, wherein the feature vector value is the number of the pixel points, the gradient direction of the pixel points in the unit meets the preset feature vector dimension;
and calculating the mean value of the characteristic vector values of each dimension in the direction gradient histogram as the characteristic vector mean value of each pixel point in the unit.
Further, the determining the initial edge probability that the pixel to be detected is an edge pixel of the inner hole area according to the feature vector average value of the pixel to be detected and the inner hole probability includes:
determining a neighborhood of a preset third size taking the pixel point to be detected as a central point as a characteristic neighborhood, and calculating standard deviation of characteristic vector means of all pixel points in the characteristic neighborhood as characteristic standard deviation of the pixel point to be detected;
calculating the product of the inner hole probability and a preset first weight as a first probability coefficient, and calculating the product of the characteristic standard deviation and a preset second weight as a second probability coefficient;
and taking the first probability coefficient as a numerator, taking the sum of the second probability coefficient and a preset constant coefficient as a denominator, and calculating to obtain the initial edge probability.
Further, the determining the bias coefficient of the neighborhood to be detected according to the feature vector average value of all the pixel points in the neighborhood to be detected includes:
calculating standard deviation of the feature vector mean values of all pixel points in the neighborhood to be detected as standard deviation to be detected;
and calculating the bias coefficient of the neighborhood to be detected based on a bias coefficient formula according to the standard deviation of the characteristic vector and the average value of the characteristic vector of all the pixel points in the neighborhood to be detected.
Further, the determining the target edge probability of the pixel point to be detected according to the bias coefficient and the initial edge probability of the neighborhood to be detected includes:
and calculating the product of the initial edge probability of the pixel to be detected and the bias coefficient of the neighborhood to be detected where the pixel to be detected is located, and obtaining the target edge probability of the pixel to be detected.
Further, the determining the cluster adjustment value of the pixel to be detected according to the target edge probabilities of all the pixel points in the adjacent area to be detected includes:
performing feature extraction on the target edge probability based on a run matrix to obtain a long run Cheng Jiang adjustment value of the pixel point to be detected;
and taking the long-run emphasized value as a clustering adjustment value of the pixel points to be detected.
Further, the clustering processing is performed on all the pixel points in the outer hole area according to the clustering adjustment value to obtain an inner hole edge, which comprises the following steps:
and taking the clustering adjustment value as an adaptive weighting coefficient, and carrying out adaptive weighted fuzzy clustering on all pixel points in the outer hole area based on a weighted FCM fuzzy clustering algorithm according to the adaptive weighting coefficient to obtain an inner hole edge.
Further, the detecting the defect of the edge of the inner hole to obtain a detection result includes:
comparing the inner hole edge with a preset standard inner hole edge to obtain the defect degree of the inner hole edge, and taking the defect degree as the detection result.
Further, the determining the center point distance between the pixel point to be measured and the center point of the outer hole includes:
and determining the minimum distance value between the pixel point to be detected and the center points of all the outer holes as the center point distance.
Further, the determining the inner hole probability that the pixel to be detected is the pixel in the inner hole area according to the center point distance includes:
and carrying out inverse proportion normalization processing on the center point distance to obtain the inner hole probability that the pixel point to be detected is the pixel point of the inner hole area.
The invention has the following beneficial effects:
according to the method, the center point distance between the pixel point to be detected and the outer hole center point is determined, so that the inner hole probability that the pixel point to be detected belongs to the inner hole area can be effectively determined based on the center point distance, the inner hole probability is determined through the center point distance, the problem of error calculation of the inner hole probability caused by the difference of the size specification of the charger can be effectively avoided, and the accuracy of the inner hole probability is improved; the initial edge probability of the pixel to be detected is determined through the characteristic vector average value and the inner hole probability of the pixel to be detected, and the characteristic vector value and the inner hole probability of the pixel to be detected are combined, so that the distribution condition of the characteristic vector value of the pixel to be detected and the position information of the pixel to be detected can be effectively combined, and the reliability of the initial edge probability is improved; the method comprises the steps of determining the target edge probability of the pixel to be detected through the bias coefficient and the initial edge probability of the neighborhood to be detected, further determining the deviation condition of the characteristic vector mean value of the pixel to be detected through the bias analysis, further accurately determining the texture information corresponding to the pixel to be detected and the surrounding pixels, further accurately determining the target edge probability according to the bias coefficient and the initial edge probability, and simultaneously, in order to eliminate the influence of difficult definition of the inner hole edge, performing clustering on all the pixels in the outer hole area through determining the clustering adjustment value, so that the pixels in the outer hole area can be subjected to self-adaptive fuzzy clustering, the inner hole edge difficult to be defined in fuzzy is effectively determined, the self-adaptive extraction of the inner hole edge is realized, and further the extraction effect of the inner hole edge is improved, and the accuracy and the reliability of defect detection are improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for detecting visual defects of an intelligent charger for lead-acid storage batteries according to an embodiment of the present invention;
fig. 2 is a schematic view of an outer hole area according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following description refers to the specific implementation, structure, characteristics and effects of a visual defect detection method for an intelligent charger for a lead-acid storage battery according to the invention in combination with the accompanying drawings and preferred embodiments. 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 visual defect detection method for the intelligent charger of the lead-acid storage battery.
Referring to fig. 1, a flowchart of a visual defect detection method for an intelligent charger for a lead-acid storage battery according to an embodiment of the present invention is shown, where the method includes:
s101: the method comprises the steps of obtaining a gray image of a charging port, wherein the gray image comprises at least one outer hole area, determining the center point of each outer hole area as an outer hole center point, selecting a pixel point in all outer hole areas as a pixel point to be detected, and determining the center point distance between the pixel point to be detected and the outer hole center point.
In the embodiment of the invention, the image acquisition device can be arranged at the position of the charging pile, when the charging pile detects that equipment is to be charged, the original image at the position of the charging port is automatically identified, and then the original image is subjected to image preprocessing to obtain the gray image, wherein the image preprocessing can specifically comprise image denoising and image graying, and the image preprocessing is a technology well known in the art and is not repeated.
In the embodiment of the invention, an edge detection algorithm can be used for carrying out edge detection on a gray image to obtain at least one outer hole area, an edge detection operator can be specifically used for processing edge textures in the gray image, in order to prevent irregular pits possibly existing in the gray image and caused by daily loss from influencing subsequent analysis, a non-maximum suppression algorithm can be used for screening charging Kong Waikong according to gray values at the charging outer hole, and a contour with larger contribution degree to feature description is reserved as an edge of the outer hole area to correspondingly obtain the outer hole area, wherein the edge detection operator can be specifically used for example as Canny operator, sobel operator and the like, and the method is not limited.
It will be appreciated that, as shown in fig. 2, fig. 2 is a schematic view of an outer hole area provided in an embodiment of the present invention, in which a charger includes an inner hole area formed by a conductive sheet and a wrapping area formed by wrapping an inner hole with an insulating material such as plastic or rubber, then the area formed by the corresponding wrapping area and the inner hole area may be referred to as an outer hole area, that is, the outer hole area includes an area corresponding to the inner hole, and thus, the inner hole area needs to be determined from the outer hole area, so as to facilitate the subsequent defect detection according to the inner hole area.
Further, in the embodiment of the present invention, determining a center point distance between a pixel point to be measured and a center point of an outer hole includes: and determining the minimum distance value between the pixel point to be detected and the center point of all the outer holes as the center point distance.
After the at least one outer hole region is determined, a center point of each outer hole region may be taken as an outer hole center point. Optionally, a certain pixel point in the outer hole area is used as a pixel point to be measured, and a distance between the pixel point to be measured and the center point of the outer hole is calculated by using a distance calculation formula between the two points to be measured as a center point distance. The calculation formula of the distance between two points is a technology well known in the art, and will not be described in detail.
Because the number of the outer hole center points is multiple, and the positions corresponding to the outer hole center points are different, the minimum value of the distances between the pixel points to be detected and all the outer hole center points is calculated as the center point distance, and the center point distance is the distance between the pixel points to be detected and the center point of the outer hole area where the pixel points to be detected are located with high probability. Therefore, the probability that the pixel point to be detected is the pixel point in the inner hole area can be calculated according to the center point distance.
S102: and determining the inner hole probability that the pixel to be detected is the pixel in the inner hole area according to the center point distance, and determining the characteristic vector average value of each pixel in the outer hole area, wherein the characteristic vector average value is used for representing the gray gradient distribution of the pixel, and determining the initial edge probability that the pixel to be detected is the pixel at the edge of the inner hole area according to the characteristic vector average value and the inner hole probability of the pixel to be detected.
Further, in the embodiment of the present invention, determining the inner hole probability that the pixel to be detected is the pixel in the inner hole area according to the center point distance includes: and carrying out inverse proportion normalization processing on the center point distance to obtain the inner hole probability that the pixel point to be detected is the pixel point of the inner hole area.
It can be understood that, as shown in fig. 2, the wrapping area wraps around the inner hole area uniformly, and the closer the pixel point to be measured is to the center point position of the outer hole area, the more likely it is the pixel point of the inner hole area, therefore, the inverse proportion normalization processing is performed to the pixel point to obtain the inner hole probability, and the corresponding calculation formula is:
Figure SMS_1
in the method, in the process of the invention,
Figure SMS_2
indicating +.>
Figure SMS_3
Inner hole probability of each pixel point, +.>
Figure SMS_4
Index representing pixel point in outer hole area, < >>
Figure SMS_5
Indicate->
Figure SMS_6
Center point distance of each pixel point, +.>
Figure SMS_7
In one embodiment of the present invention, the normalization process may be specifically, for example, maximum and minimum normalization processes, and the normalization in the subsequent steps may be performed by using the maximum and minimum normalization processes, and in other embodiments of the present invention, other normalization methods may be selected according to a specific range of values, which will not be described herein.
In the embodiment of the invention, after the inner hole probability is calculated according to the distance between the pixel point to be detected and the nearest center point, the possibility that the pixel point to be detected is the edge of the inner hole region can be determined according to the distribution condition of the pixel points around the pixel point to be detected because the sizes of different outer hole regions in the charger may be different and the distribution, the sizes and the like of the corresponding outer hole regions of the chargers of different models may be different.
Further, in an embodiment of the present invention, determining a feature vector average value of each pixel point in the outer hole area includes: dividing all the outer hole areas into at least two units according to a preset second size; constructing a direction gradient histogram of the unit according to a preset feature vector dimension and the gradient direction of the pixel points in the unit, wherein the abscissa of the direction gradient histogram is the preset feature vector dimension, and the ordinate of the direction gradient histogram is a feature vector value corresponding to the preset feature vector dimension, wherein the feature vector value is the number of the pixel points, the gradient direction of the pixel points in the unit, of which the preset feature vector dimension is satisfied; and calculating the mean value of the characteristic vector value of each dimension in the direction gradient histogram as the characteristic vector mean value of each pixel point in the unit.
Since the gradient direction of the pixel point can be used for representing the maximum change of the gray value of the pixel point in a certain direction. Therefore, the invention can calculate the characteristic vector average value of each pixel point in the unit based on the directional gradient histogram (Histogram of Oriented Gradient, HOG) algorithm.
The preset second size is a preset unit size, alternatively, the preset second size may specifically be, for example, a 5×5 size, which is not limited.
The preset feature vector dimension is dimension information obtained by dividing the gradient direction according to a specific dividing rule, for example, the gradient direction can be taken as a dimension according to an angle of 20 degrees, so that the gradient direction is divided into 9 dimensions in 0-180 degrees, the direction gradient histogram is a distribution histogram of the number of corresponding pixel points in each dimension, the number of corresponding pixel points in each dimension is taken as a corresponding feature vector value in the dimension, and the average value of the feature vector values of all dimensions is obtained to be taken as the feature vector average value of each pixel point in the unit.
Further, in the embodiment of the present invention, determining an initial edge probability that a pixel to be detected is an edge pixel of an inner hole area according to a feature vector average value and the inner hole probability of the pixel to be detected includes: determining a neighborhood of a preset third size taking a pixel to be detected as a central point as a characteristic neighborhood, and calculating standard deviation of characteristic vector means of all pixel points in the characteristic neighborhood as characteristic standard deviation of the pixel to be detected; calculating the product of the inner hole probability and a preset first weight as a first probability coefficient, and calculating the product of the characteristic standard deviation and a preset second weight as a second probability coefficient; and taking the first probability coefficient as a numerator, taking the sum of the second probability coefficient and a preset constant coefficient as a denominator, and calculating to obtain the initial edge probability.
Because the edges of the inner holes of the charger are mostly round, the gray differences around the charger are consistent due to the same structure, and the obtained characteristic vector average value of each pixel point changes less in a smaller range, so that the characteristic standard deviation of the pixel point to be detected and the pixel points around the charger can be used as the characteristic standard deviation of the pixel point to be detected.
The third size is preset, and optionally, the third size may specifically be, for example, 3×3 size, so that pixels in a range of 3×3 size around the pixel to be detected form a feature neighborhood of the pixel to be detected, and a standard deviation of feature vector means of all pixels in the feature neighborhood is calculated based on a standard deviation calculation formula as a feature standard deviation of the pixel to be detected, where the standard deviation calculation formula is a calculation method well known in the art, and is not described herein.
The calculation formula corresponding to the initial edge probability may be:
Figure SMS_8
in the method, in the process of the invention,
Figure SMS_11
indicating +.>
Figure SMS_13
Initial edge probability of individual pixels, +.>
Figure SMS_17
Index representing pixel point in outer hole area, < >>
Figure SMS_10
Indicating +.>
Figure SMS_14
Inner hole probability of each pixel point, +.>
Figure SMS_18
Indicating +.>
Figure SMS_21
Characteristic standard deviation of each pixel point, +.>
Figure SMS_9
Representing a preset first weight, +.>
Figure SMS_12
Representing a preset second weight, optionally, < >>
Figure SMS_16
,/>
Figure SMS_20
Indicate->
Figure SMS_15
First probability coefficient of each pixel, < ->
Figure SMS_19
Indicate->
Figure SMS_22
Second probability coefficient of each pixel, < ->
Figure SMS_23
A preset constant coefficient is represented, which is a safety coefficient set to prevent the denominator from being 0, and optionally, 0.01.
The preset first weight is the weight of the inner hole probability, the preset second weight is the weight of the feature standard deviation, the preset first weight and the preset second weight are both weight values set according to priori knowledge or historical detection conditions, alternatively, the preset first weight is 0.3, and the preset second weight is 0.7.
In the embodiment of the invention, as the pixel point to be detected is closer to the central point position of the outer hole area, the pixel point is more likely to be the pixel point of the inner hole area, namely after the edge feature is shown, the larger the inner hole probability is, the higher the initial edge probability of the corresponding pixel point is, and as the average value of the feature vectors of the pixel point to be detected and the surrounding pixel points is smaller in a smaller range, the larger the probability that the corresponding pixel point to be detected is the inner hole edge of the charger is, namely the feature standard deviation is inversely proportional to the initial edge probability.
The initial edge probability can be used for representing the edge probability that the pixel to be detected is the inner hole edge, and the method can further analyze the pixel to be detected in the follow-up embodiment to obtain more accurate edge probability.
S103: taking a pixel to be detected as a center, taking a neighborhood in a preset first size range as a neighborhood to be detected, determining a bias coefficient of the neighborhood to be detected according to the characteristic vector mean value of all the pixel points in the neighborhood to be detected, and determining a target edge probability of the pixel to be detected according to the bias coefficient and the initial edge probability of the neighborhood to be detected.
The preset first size is a preset size of the neighborhood to be measured, alternatively, the preset first size may specifically be, for example, a size of 9×9, which is not limited.
In the embodiment of the invention, the neighborhood to be detected around the pixel to be detected can be determined according to the preset first size, and when the preset first size is 9×9, the pixel to be detected and the pixel in the neighborhood with the size of 9×9 around the pixel to be detected form the neighborhood to be detected.
Further, in the embodiment of the present invention, determining the bias coefficient of the neighborhood to be detected according to the feature vector average value of all the pixel points in the neighborhood to be detected includes: calculating standard deviation of the feature vector mean value of all pixel points in the adjacent area to be measured as standard deviation to be measured; and calculating the bias coefficient of the neighborhood to be detected based on a bias coefficient formula according to the standard deviation of the characteristic vector and the average value of the characteristic vector of all the pixel points in the neighborhood to be detected.
In the embodiment of the invention, the standard deviation of the feature vector mean of all pixel points in the neighborhood to be measured can be calculated as the standard deviation to be measured, and then the bias coefficient of the neighborhood to be measured is calculated by using a bias coefficient formula, wherein the bias coefficient formula is a technology well known in the art, the meaning of a specific formula is not repeated, and the corresponding calculation formula is as follows:
Figure SMS_24
in the method, in the process of the invention,
Figure SMS_26
indicate->
Figure SMS_28
The deviation coefficient of the neighborhood to be measured where each pixel point is located, < ->
Figure SMS_31
Index representing pixel point in outer hole area, < >>
Figure SMS_27
Representing the total number of all pixels in the neighborhood to be measured, < >>
Figure SMS_29
Index representing pixel point in field to be measured, < ->
Figure SMS_32
Representing the%>
Figure SMS_34
Feature vector mean value of each pixel point, +.>
Figure SMS_25
Indicate->
Figure SMS_30
Total average value of eigenvector mean values of all pixel points in neighborhood to be detected where each pixel point is located,/>
Figure SMS_33
Indicate->
Figure SMS_35
The pixel points are positioned in the standard deviation to be measured of the neighborhood to be measured.
The characteristic vector average value of the pixel points to be detected can be determined to be in a left bias state or a right bias state through the bias coefficient, the similarity with the arc-shaped edge of the inner hole of the charger can be known through the magnitude of the bias coefficient, and the larger the bias coefficient of the pixel points to be detected is, the more similar the arc-shaped pixel points to be detected are, and the more likely the pixel points to be detected are the edge of the inner hole of the charger.
Further, in the embodiment of the present invention, determining the target edge probability of the pixel point to be detected according to the bias coefficient and the initial edge probability of the neighborhood to be detected includes: calculating the product of the initial edge probability of the pixel to be detected and the bias coefficient of the neighborhood to be detected where the pixel to be detected is located, and obtaining the target edge probability of the pixel to be detected, wherein the corresponding calculation formula is as follows:
Figure SMS_36
in the method, in the process of the invention,
Figure SMS_37
indicate->
Figure SMS_38
The deviation coefficient of the neighborhood to be measured where each pixel point is located, < ->
Figure SMS_39
Index representing pixel point in outer hole area, < >>
Figure SMS_40
Indicating +.>
Figure SMS_41
Initial edge probability of individual pixels, +.>
Figure SMS_42
Indicate->
Figure SMS_43
Target edge probability for a pixel point.
The problem that the inner hole area and the outer hole area of the charger are blurred and difficult to define due to the fact that some edge parts are possibly caused under the irradiation of light rays. For some edge portions that cannot be defined directly according to the gray value, the run-length matrix may be used to distinguish the edges of the inner hole of the charger according to the target edge probability of the pixel point as an index, which is specifically referred to in the following embodiments.
S104: determining a clustering adjustment value of the pixel points to be detected according to the target edge probabilities of all the pixel points in the neighborhood to be detected; and carrying out clustering treatment on all pixel points in the outer hole area according to the clustering adjustment value to obtain an inner hole edge, and carrying out defect detection on the inner hole edge to obtain a detection result.
Further, in the embodiment of the present invention, determining a cluster adjustment value of a pixel to be detected according to target edge probabilities of all pixels in a neighborhood to be detected includes: extracting features of the target edge probability based on the run matrix to obtain a long run Cheng Jiang adjustment value of the pixel point to be detected; and taking the long-run emphasized value as a clustering adjustment value of the pixel points to be detected.
The long run emphasis calculation mode is a calculation mode commonly used by a run matrix, and in the embodiment of the invention, the target edge probability of the pixel point is used as an element in the run matrix, so that the long run Cheng Jiang adjustment value of the pixel point to be measured is determined, and the calculation of the long run emphasis is a technical means well known to those skilled in the art and will not be repeated.
The characteristic of the run-length matrix is combined, that is, the larger the length You Chengjiang adjustment value is, the more times that the similarity of the pixel points to be detected continuously appears can be indicated, the pixel points around the pixel points to be detected are all pixel points with high similarity with the inner hole edge of the charging hole, and the large probability of the pixel points to be detected is indicated to be the inner hole edge of the charger. In the embodiment of the invention, the long run emphasis value is used as the clustering adjustment value of the pixel points to be detected, and all the pixel points in the outer hole area are clustered.
Further, in the embodiment of the present invention, clustering is performed on all pixel points in the outer hole area according to the clustering adjustment value to obtain an inner hole edge, including: and taking the clustering adjustment value as an adaptive weighting coefficient, and carrying out adaptive weighted fuzzy clustering treatment on all pixel points in the outer hole area based on a weighted FCM fuzzy clustering algorithm according to the adaptive weighting coefficient to obtain the inner hole edge.
The clustering process used in the embodiment of the invention can be specifically a weighted fuzzy c-Means (Weighting Fuzzy C-Means, WFCM) clustering mode, and clustering is performed on all the pixel points in the outer hole area according to a preset fuzzy rule by taking two conditions that the pixel points belong to the edge of the inner hole and the pixel points belong to the inner hole as fuzzy clustering centers. The preset fuzzy rule may specifically include a preset fuzzy coefficient, alternatively, the preset fuzzy coefficient in the embodiment of the present invention may specifically be, for example, 2, which is not limited thereto.
After the preset fuzzy coefficient and the number of fuzzy clustering centers are determined, the clustering processing of the pixel points can be realized based on a WFCM algorithm, wherein the membership value of the pixel point belonging to different clustering centers can be calculated according to membership functions determined by priori experience, that is, the method supports the pre-construction of the membership functions, and then the membership value of the pixel point belonging to different clustering centers is determined according to the membership functions, so that the method is not limited.
The WFCM algorithm is an algorithm well known in the art, and the corresponding calculation formula includes:
Figure SMS_44
in the method, in the process of the invention,
Figure SMS_46
indicate->
Figure SMS_51
Evaluation parameters of individual pixels, +.>
Figure SMS_55
Represents the total number of fuzzy clustering centers, +.>
Figure SMS_48
Index representing fuzzy cluster center, +.>
Figure SMS_52
Represents the total number of all pixels in the outer aperture area, +.>
Figure SMS_56
An index representing the pixel point in the outer hole region,
Figure SMS_58
indicate->
Figure SMS_45
Clustering adjustment value of each pixel point, +.>
Figure SMS_49
Indicate->
Figure SMS_53
Membership value of a-th fuzzy clustering center to which each pixel point belongs, < +.>
Figure SMS_57
Representing a preset blurring factor, optionally, < >>
Figure SMS_47
,/>
Figure SMS_50
Indicate->
Figure SMS_54
Euclidean distance between each pixel point and the center point of the a-th fuzzy clustering center.
Therefore, based on the WFCM algorithm, the clustering adjustment value is used as the self-adaptive weight, the evaluation parameter of the inner hole edge of each pixel point is calculated, and based on the evaluation parameter, the comparison is carried out with a preset evaluation parameter threshold, alternatively, the preset evaluation parameter threshold can be specifically, for example, 0.8, the pixel point with the evaluation parameter larger than 0.8 is used as the inner hole edge pixel point, so that the pixel point of the inner hole edge is obtained, and the inner hole edge pixel point is combined to be used as the inner hole edge.
In the embodiment of the invention, the defect detection is carried out on the edge of the inner hole to obtain a detection result, which comprises the following steps: comparing the inner hole edge with a preset standard inner hole edge to obtain the defect degree of the inner hole edge, and taking the defect degree as a detection result.
After the pixel points of the inner hole edge are determined, the inner hole edge and the preset standard inner hole edge can be compared by using an image feature point matching algorithm to obtain the corresponding similarity degree as the defect degree, wherein the image feature point matching algorithm is a technology well known in the art, and is not repeated, and of course, the inner hole edge and the preset standard inner hole edge can be compared by using various other arbitrary possible implementation manners, and the defect is not limited.
It is to be understood that the defect level may specifically be, for example, a normalized numerical value, or may be a coefficient indicating the corresponding defect level, or the like, which is not limited.
In the embodiment of the invention, the defect degree can be directly used as a detection result of defect detection, and the larger the defect degree is, the larger the difference between the corresponding inner hole edge and the preset standard inner hole edge is.
According to the method, the center point distance between the pixel point to be detected and the outer hole center point is determined, so that the inner hole probability that the pixel point to be detected belongs to the inner hole area can be effectively determined based on the center point distance, the inner hole probability is determined through the center point distance, the problem of error calculation of the inner hole probability caused by the difference of the size specification of the charger can be effectively avoided, and the accuracy of the inner hole probability is improved; the initial edge probability of the pixel to be detected is determined through the characteristic vector average value and the inner hole probability of the pixel to be detected, and the characteristic vector value and the inner hole probability of the pixel to be detected are combined, so that the distribution condition of the characteristic vector value of the pixel to be detected and the position information of the pixel to be detected can be effectively combined, and the reliability of the initial edge probability is improved; the method comprises the steps of determining the target edge probability of the pixel to be detected through the bias coefficient and the initial edge probability of the neighborhood to be detected, further determining the deviation condition of the characteristic vector mean value of the pixel to be detected through the bias analysis, further accurately determining the texture information corresponding to the pixel to be detected and the surrounding pixels, further accurately determining the target edge probability according to the bias coefficient and the initial edge probability, and simultaneously, in order to eliminate the influence of difficult definition of the inner hole edge, performing clustering on all the pixels in the outer hole area through determining the clustering adjustment value, so that the pixels in the outer hole area can be subjected to self-adaptive fuzzy clustering, the inner hole edge difficult to be defined in fuzzy is effectively determined, the self-adaptive extraction of the inner hole edge is realized, and further the extraction effect of the inner hole edge is improved, and the accuracy and the reliability of defect detection are improved.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (6)

1. A visual defect detection method for an intelligent charger for a lead-acid storage battery, the method comprising:
acquiring a gray level image of a charging port, wherein the gray level image comprises at least one outer hole area, the central point of each outer hole area is respectively determined to be an outer hole central point, a certain pixel point is selected in all the outer hole areas to serve as a pixel point to be detected, and the central point distance between the pixel point to be detected and the outer hole central point is determined;
determining the inner hole probability that the pixel point to be detected is the pixel point of the inner hole area according to the center point distance, and determining the characteristic vector average value of each pixel point in the outer hole area, wherein the characteristic vector average value is used for representing the gray gradient distribution of the pixel point, and determining the initial edge probability that the pixel point to be detected is the pixel point of the inner hole area edge according to the characteristic vector average value and the inner hole probability of the pixel point to be detected;
taking the pixel point to be detected as a center, taking a neighborhood in a preset first size range as a neighborhood to be detected, determining a bias coefficient of the neighborhood to be detected according to a feature vector mean value of all the pixel points in the neighborhood to be detected, and determining a target edge probability of the pixel point to be detected according to the bias coefficient of the neighborhood to be detected and the initial edge probability;
determining a clustering adjustment value of the pixel points to be detected according to the target edge probability of all the pixel points in the adjacent area to be detected; clustering all pixel points in the outer hole area according to the clustering adjustment value to obtain an inner hole edge, and performing defect detection on the inner hole edge to obtain a detection result;
the determining the initial edge probability that the pixel to be detected is the edge pixel of the inner hole area according to the feature vector average value and the inner hole probability of the pixel to be detected comprises the following steps:
determining a neighborhood of a preset third size taking the pixel point to be detected as a central point as a characteristic neighborhood, and calculating standard deviation of characteristic vector means of all pixel points in the characteristic neighborhood as characteristic standard deviation of the pixel point to be detected;
calculating the product of the inner hole probability and a preset first weight as a first probability coefficient, and calculating the product of the characteristic standard deviation and a preset second weight as a second probability coefficient;
taking the first probability coefficient as a numerator, taking the sum of the second probability coefficient and a preset constant coefficient as a denominator, and calculating to obtain the initial edge probability;
determining the bias coefficient of the neighborhood to be detected according to the feature vector average value of all the pixel points in the neighborhood to be detected, including:
calculating standard deviation of the feature vector mean values of all pixel points in the neighborhood to be detected as standard deviation to be detected;
calculating a bias coefficient of the neighborhood to be detected based on a bias coefficient formula according to the standard deviation of the characteristic vectors and the average value of the characteristic vectors of all pixel points in the neighborhood to be detected;
the determining the target edge probability of the pixel point to be detected according to the bias coefficient and the initial edge probability of the neighborhood to be detected comprises the following steps:
calculating the product of the initial edge probability of the pixel to be detected and the bias coefficient of the neighborhood to be detected where the pixel to be detected is located, and obtaining the target edge probability of the pixel to be detected;
the determining the inner hole probability that the pixel point to be detected is the pixel point of the inner hole area according to the center point distance comprises the following steps:
and carrying out inverse proportion normalization processing on the center point distance to obtain the inner hole probability that the pixel point to be detected is the pixel point of the inner hole area.
2. The visual defect detection method for a lead-acid battery intelligent charger according to claim 1, wherein the determining the feature vector average value of each pixel point in the outer hole area comprises:
dividing all the outer hole areas into at least two units according to a preset second size;
constructing a direction gradient histogram of the unit according to a preset feature vector dimension and the gradient direction of the pixel points in the unit, wherein the abscissa of the direction gradient histogram is the preset feature vector dimension, and the ordinate of the direction gradient histogram is a feature vector value corresponding to the preset feature vector dimension, wherein the feature vector value is the number of the pixel points, the gradient direction of the pixel points in the unit meets the preset feature vector dimension;
and calculating the mean value of the characteristic vector values of each dimension in the direction gradient histogram as the characteristic vector mean value of each pixel point in the unit.
3. The visual defect detection method for an intelligent charger for lead-acid storage batteries according to claim 1, wherein the determining the cluster adjustment value of the pixel to be detected according to the target edge probabilities of all the pixel points in the adjacent area to be detected comprises:
performing feature extraction on the target edge probability based on a run matrix to obtain a long run Cheng Jiang adjustment value of the pixel point to be detected;
and taking the long-run emphasized value as a clustering adjustment value of the pixel points to be detected.
4. The visual defect detection method for the intelligent charger of the lead-acid storage battery according to claim 1, wherein the clustering processing is performed on all pixel points in the outer hole area according to the clustering adjustment value to obtain an inner hole edge, and the method comprises the following steps:
and taking the clustering adjustment value as an adaptive weighting coefficient, and carrying out adaptive weighted fuzzy clustering on all pixel points in the outer hole area based on a weighted FCM fuzzy clustering algorithm according to the adaptive weighting coefficient to obtain an inner hole edge.
5. The visual defect detection method for intelligent charger of lead-acid storage battery as claimed in claim 1, wherein the defect detection of the edge of the inner hole is carried out to obtain a detection result, comprising:
comparing the inner hole edge with a preset standard inner hole edge to obtain the defect degree of the inner hole edge, and taking the defect degree as the detection result.
6. The visual defect detection method for an intelligent charger for a lead-acid storage battery according to claim 1, wherein the determining the center point distance between the pixel point to be detected and the center point of the outer hole comprises:
and determining the minimum distance value between the pixel point to be detected and the center points of all the outer holes as the center point distance.
CN202310362462.7A 2023-04-07 2023-04-07 Visual defect detection method for intelligent charger of lead-acid storage battery Active CN116091498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310362462.7A CN116091498B (en) 2023-04-07 2023-04-07 Visual defect detection method for intelligent charger of lead-acid storage battery

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310362462.7A CN116091498B (en) 2023-04-07 2023-04-07 Visual defect detection method for intelligent charger of lead-acid storage battery

Publications (2)

Publication Number Publication Date
CN116091498A CN116091498A (en) 2023-05-09
CN116091498B true CN116091498B (en) 2023-06-23

Family

ID=86199458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310362462.7A Active CN116091498B (en) 2023-04-07 2023-04-07 Visual defect detection method for intelligent charger of lead-acid storage battery

Country Status (1)

Country Link
CN (1) CN116091498B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116385976B (en) * 2023-05-29 2023-08-11 杭州芯业电子科技有限公司 Fire control security protection integrated monitoring system based on computer vision
CN116758061B (en) * 2023-08-11 2023-10-31 山东优奭趸泵业科技有限公司 Casting surface defect detection method based on computer vision
CN117152447B (en) * 2023-11-01 2024-02-02 东莞市京品精密模具有限公司 Intelligent management method and system for punching die

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805870A (en) * 2018-06-14 2018-11-13 安徽海思达机器人有限公司 A kind of detection method of the connector with needle stand
CN113313701A (en) * 2021-06-10 2021-08-27 兰州智悦信息科技有限公司 Electric vehicle charging port two-stage visual detection positioning method based on shape prior
CN115880204A (en) * 2021-09-26 2023-03-31 Tcl科技集团股份有限公司 Image detection method and device, terminal equipment and readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10685455B2 (en) * 2018-05-02 2020-06-16 Stable Auto Corporation Method and system for automated vehicle charging
CN109685142A (en) * 2018-12-25 2019-04-26 国信优易数据有限公司 A kind of image matching method and device
CN109977954B (en) * 2019-04-01 2023-05-30 上海电气集团股份有限公司 Identification and positioning method and system for electric automobile charging interface
CN112686858A (en) * 2020-12-29 2021-04-20 熵智科技(深圳)有限公司 Visual defect detection method, device, medium and equipment for mobile phone charger
CN113096102A (en) * 2021-04-15 2021-07-09 深圳市玻尔智造科技有限公司 Charger surface defect detection method based on multi-scale transfer
CN113689428B (en) * 2021-10-25 2022-06-07 江苏南通元辰钢结构制造有限公司 Mechanical part stress corrosion detection method and system based on image processing
CN115457130A (en) * 2022-09-14 2022-12-09 兰州智悦信息科技有限公司 Electric vehicle charging port detection and positioning method based on depth key point regression

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805870A (en) * 2018-06-14 2018-11-13 安徽海思达机器人有限公司 A kind of detection method of the connector with needle stand
CN113313701A (en) * 2021-06-10 2021-08-27 兰州智悦信息科技有限公司 Electric vehicle charging port two-stage visual detection positioning method based on shape prior
CN115880204A (en) * 2021-09-26 2023-03-31 Tcl科技集团股份有限公司 Image detection method and device, terminal equipment and readable storage medium

Also Published As

Publication number Publication date
CN116091498A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN116091498B (en) Visual defect detection method for intelligent charger of lead-acid storage battery
CN111428748B (en) HOG feature and SVM-based infrared image insulator identification detection method
CN116168026B (en) Water quality detection method and system based on computer vision
CN108830876B (en) Water area contour extraction and area detection method
CN115619793B (en) Power adapter appearance quality detection method based on computer vision
CN115018844B (en) Plastic film quality evaluation method based on artificial intelligence
CN116091504B (en) Connecting pipe connector quality detection method based on image processing
CN114749342B (en) Lithium battery pole piece coating defect identification method, device and medium
CN116309537A (en) Defect detection method for oil stain on surface of tab die
CN112434562B (en) Mask wearing state detection method, mask wearing state detection equipment, electronic device and storage medium
CN114581446B (en) Battery core abnormity detection method and system of laminated battery
CN115937216A (en) Magnetic rotor appearance quality detection method for new energy automobile
CN117372436A (en) Wind power blade fault detection method based on image data
CN114594114B (en) Full-automatic online nondestructive testing method for lithium battery cell
CN110874825B (en) Method for extracting binary image of water trace on surface of composite insulator
CN116612306B (en) Computer vision-based intelligent flange plate alignment method and system
CN116664565A (en) Hidden crack detection method and system for photovoltaic solar cell
CN116128880A (en) Identification method for surface cracking of tab mold
CN116152242A (en) Visual detection system of natural leather defect for basketball
CN115029704A (en) Intelligent control method and device for stainless steel pickling process
CN117291911B (en) Defect detection method and system for power equipment
CN116503633B (en) Intelligent detection control method for switch cabinet state based on image recognition
CN115855961B (en) Distribution box fault detection method used in operation
CN117218115A (en) Auto part paint surface abnormality detection method
CN112419243A (en) Power distribution room equipment fault identification method based on infrared image analysis

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