CN116385439B - Motor rubber shock pad quality detection method based on image processing - Google Patents

Motor rubber shock pad quality detection method based on image processing Download PDF

Info

Publication number
CN116385439B
CN116385439B CN202310652801.5A CN202310652801A CN116385439B CN 116385439 B CN116385439 B CN 116385439B CN 202310652801 A CN202310652801 A CN 202310652801A CN 116385439 B CN116385439 B CN 116385439B
Authority
CN
China
Prior art keywords
gray
image
abnormal
frequency
entropy
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
CN202310652801.5A
Other languages
Chinese (zh)
Other versions
CN116385439A (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.)
Shandong Lantong Electromechanical Co ltd
Original Assignee
Shandong Lantong Electromechanical 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 Shandong Lantong Electromechanical Co ltd filed Critical Shandong Lantong Electromechanical Co ltd
Priority to CN202310652801.5A priority Critical patent/CN116385439B/en
Publication of CN116385439A publication Critical patent/CN116385439A/en
Application granted granted Critical
Publication of CN116385439B publication Critical patent/CN116385439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a motor rubber shock pad quality detection method based on image processing. The method comprises the following steps: acquiring a gasket gray level image, constructing a neighborhood window, and determining a gray level binary sequence according to gray level values of pixel points in the neighborhood window; determining the gray entropy of the central pixel point; taking the pixel point with the same distance as the circle center of the gasket gray image as the pixel point with the same distance, and determining an abnormal pixel point; determining abnormal gray scale frequency of the gasket gray scale image; according to the abnormal gray frequency, the frequencies of the pixel points corresponding to different abnormal gray values in the gasket gray image are adjusted to obtain a target frequency; performing histogram equalization processing on the gasket gray level image according to the target frequency to obtain an enhanced image; and performing image segmentation on the enhanced image to obtain a defect area, and determining the quality of the shock pad according to the defect area. The invention can enhance the detection effect of the shock pad quality detection and effectively improve the detection precision.

Description

Motor rubber shock pad quality detection method based on image processing
Technical Field
The invention relates to the technical field of image processing, in particular to a motor rubber shock pad quality detection method based on image processing.
Background
The motor rubber shock pad is one of indispensable parts in the motor, and has the main effects of absorbing vibration and impact through elastic deformation, and reducing vibration and noise of machine equipment or structures, so that the service life of the motor is prolonged, the environmental noise is reduced, and the quality of the motor rubber shock pad directly influences the normal operation and the service life of the equipment.
In the related art, the defect area is determined by using an edge detection mode after the image is enhanced, and in the mode, the gray value of the shock pad is single and most of the shock pad is black, so that the defect area still cannot be effectively identified after the image is enhanced, the image enhancement effect is insufficient, the shock pad quality detection effect is insufficient, and the detection precision is low.
Disclosure of Invention
In order to solve the technical problems of insufficient quality detection effect and low detection precision of the shock pad, the invention provides a motor rubber shock pad quality detection method based on image processing, which adopts the following technical scheme:
the invention provides a motor rubber shock pad quality detection method based on image processing, which comprises the following steps:
acquiring a gasket gray level image, constructing a neighborhood window with a preset size by taking each pixel point in the gasket gray level image as a center, and determining a gray level binary sequence of a central pixel point of the neighborhood window according to gray level values of all pixel points in the neighborhood window; determining the gray entropy of the central pixel point according to the arrangement of the numerical values in the gray binary sequence;
determining the circle center of the gray level image of the gasket, taking the pixel points with the same distance as the circle center as the pixel points with the same distance, and determining abnormal pixel points according to the gray level entropy change of the pixel points with the same distance; determining the abnormal gray frequency of the gasket gray image according to the number of the abnormal pixel points and the number of the pixel points at the same distance;
according to the abnormal gray level frequency, the frequencies of the pixel points corresponding to different abnormal gray levels in the gasket gray level image are adjusted, and the target frequency corresponding to the abnormal gray level is obtained; performing histogram equalization processing on the gasket gray scale image according to the target frequency and frequencies of other gray scale values except the abnormal gray scale value in the gasket gray scale image to obtain an enhanced image;
and carrying out image segmentation on the enhanced image to obtain a defect area, and determining the quality of the shock pad according to the defect area.
Further, the determining the gray level binary sequence of the pixel point at the center of the neighborhood window according to the gray level values of all the pixel points in the neighborhood window includes:
marking the pixel points with the gray value larger than or equal to the gray value of the central pixel point in the neighborhood window as a first numerical value, and marking the pixel points with the gray value smaller than the gray value of the central pixel point as a second numerical value, so as to obtain a gray binary matrix;
and sequencing the numerical values in the gray scale binary matrix from top to bottom and from left to right to obtain a gray scale binary sequence.
Further, the determining the gray entropy of the center pixel according to the arrangement of the values in the gray binary sequence includes:
dividing the gray level binary sequence into at least two subsequences according to a preset length, and determining sequence frequencies of different subsequences in the gray level binary sequence according to the arrangement of values in the different subsequences;
and carrying out information entropy calculation on the sequence frequency based on an information entropy formula to obtain the gray entropy of the center pixel point corresponding to the gray binary sequence.
Further, the determining the abnormal pixel point according to the gray entropy change of the pixel points at the same distance includes:
ordering the gray entropy of the same-distance pixel points in a preset direction according to a preset time sequence by taking the same-distance pixel points in the preset direction as a starting point to obtain a gray entropy sequence;
constructing a two-dimensional coordinate system by taking a sequence order as an abscissa and gray entropy as an ordinate, determining coordinate points of gray entropy in the two-dimensional coordinate system in the gray entropy sequence, and connecting adjacent coordinate points to obtain a gray entropy curve;
and deriving the gray entropy curve, dividing the gray entropy curve into at least one section of sub-curve according to the positive and negative conditions of derivative symbols, calculating the curvature absolute value of each section of sub-curve, and taking the same-distance pixel point corresponding to the sub-curve with the largest curvature absolute value as an abnormal pixel point.
Further, the determining the abnormal gray frequency of the pad gray image according to the number of the abnormal pixels and the number of the pixels at the same distance includes:
calculating the ratio of the number of the abnormal pixel points to the number of the corresponding pixel points at the same distance as the same distance frequency;
and calculating the average value of the same distance frequency corresponding to all the same distance pixel points as the abnormal gray scale frequency of the gasket gray scale image.
Further, the adjusting the frequencies of the pixel points corresponding to different abnormal gray values in the pad gray image according to the abnormal gray frequency to obtain the target frequency corresponding to the abnormal gray value includes:
calculating the sum of the normalized value of the abnormal gray frequency and 1 as a frequency influence factor;
and respectively calculating the product of the frequency influence factor and the frequency of all the pixel points corresponding to the abnormal gray value in the gasket gray image as the target frequency of the abnormal gray value.
Further, the histogram equalization processing is performed on the pad gray level image according to the target frequency and frequencies of other gray levels except for the abnormal gray level in the pad gray level image, so as to obtain an enhanced image, including:
calculating the sum value of all the frequencies of the target frequency and other gray values as a frequency sum value;
calculating the ratio of the target frequency to the frequency sum value as an adjusted target frequency, and calculating the ratio of the frequency of the other gray values to the frequency sum value as other adjusted frequencies;
and carrying out histogram equalization processing on the adjusted target frequency and other adjusted frequencies based on a histogram equalization algorithm, and taking the gray value after the histogram equalization as the gray value of the corresponding pixel point to obtain an enhanced image.
Further, the image segmentation of the enhanced image to obtain a defect area includes:
and carrying out edge detection processing on the enhanced image to obtain an abnormal edge, and taking an area surrounded by the abnormal edge as a defect area.
Further, the determining the mass of the shock pad according to the defect area includes:
when the area of the defect area is smaller than a preset area threshold value, determining that the quality of the shock pad is qualified;
and when the area of the defect area is larger than or equal to a preset area threshold value, determining that the quality of the shock pad is unqualified.
The invention has the following beneficial effects:
according to the invention, the gray entropy of the central pixel point is determined by constructing the gray binary sequence, the surrounding texture of the pixel point can be numerically represented and analyzed, so that the complexity degree of the surrounding texture of the central pixel point can be effectively represented by using the gray entropy, the abnormal pixel point can be determined by changing the gray entropy of the pixel point at the same distance, the abnormal pixel point with abnormal change can be accurately obtained according to the change of the gray entropy, the abnormal gray frequency of the gasket gray image can be effectively determined, the abnormal gray frequency can be ensured to accurately represent the frequency of gray abnormality in the gasket gray image, the frequency of the pixel point corresponding to the abnormal gray value in the gasket gray image can be adjusted according to the abnormal gray frequency, and the target frequency corresponding to the abnormal gray value can be obtained.
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 the quality of a motor rubber shock pad based on image processing according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a gray scale image of a gasket according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of gray entropy sequence acquisition according to an embodiment of the present invention;
fig. 4 is a schematic diagram of gray entropy curves 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 is a detailed description of specific implementation, structure, characteristics and effects of the motor rubber shock pad quality detection method based on image processing according to the invention with reference to 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 invention provides a specific scheme of a motor rubber shock pad quality detection method based on image processing, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for detecting quality of a motor rubber shock pad based on image processing according to an embodiment of the present invention is shown, where the method includes:
s101: acquiring a gasket gray level image, constructing a neighborhood window with a preset size by taking each pixel point in the gasket gray level image as a center, and determining a gray level binary sequence of a central pixel point of the neighborhood window according to gray level values of all pixel points in the neighborhood window; and determining the gray entropy of the central pixel point according to the arrangement of the numerical values in the gray binary sequence.
In the embodiment of the invention, a light-emitting diode (light emitting diode, LED) lamp with stable and uniform illumination can be selected as a light source, the light source and a high-resolution industrial camera are fixed at proper positions (such as a warehouse-in stage after the rubber shaping is finished) in the production process, a high-definition micro-distance image of a motor rubber shock pad is shot, the high-definition micro-distance image is subjected to image preprocessing to obtain a preprocessed image, then the preprocessed image is subjected to Hough transformation to obtain an interested region, and the interested region is extracted to obtain a gasket gray image.
It is understood that the image preprocessing may specifically include image graying and image denoising, and the image preprocessing is a technology well known in the art, and will not be described herein. Since most of motor rubber shock pads are round or annular black rubber pads, the round area or annular area in the image can be extracted through Hough transformation to serve as a pad gray image corresponding to the pad, as shown in FIG. 2, and FIG. 2 is a schematic diagram of the pad gray image provided by one embodiment of the invention.
Since the rubber gasket can generate various defects such as cracks, bubbles, burrs and the like due to scraping, collision and the like in the production process, the existence of the defect part greatly influences the damping effect of the rubber gasket, and therefore quality detection is required according to the defect area.
The preset size is a preset size of a neighbor window, and the preset size may specifically be, for example, a size of 5×5, that is, a size of 5×5 is set, and of course, in other embodiments of the present invention, the preset size may be adjusted according to actual needs, for example, a size of 7×7, a size of 11×11, and the like, which is not limited.
Optionally, in some embodiments of the present invention, determining the gray-scale binary sequence of the pixel point in the center of the neighborhood window according to the gray-scale values of all the pixel points in the neighborhood window includes: marking the pixel points with gray values larger than or equal to the gray value of the central pixel point in the neighborhood window as a first numerical value, and marking the pixel points with gray values smaller than the gray value of the central pixel point as a second numerical value, so as to obtain a gray binary matrix; and sequencing the numerical values in the gray scale binary matrix from top to bottom and from left to right to obtain a gray scale binary sequence.
In some implementations of the present invention, the first value may be recorded as 1, the second value may be recorded as 0, that is, in the neighborhood window, the pixel point with the gray value greater than or equal to the center pixel point is recorded as 1, and the pixel point with the gray value less than the gray value of the center pixel point is recorded as 0, thereby performing binarization processing on the neighborhood window to obtain a gray scale binary matrix, and sorting the values in the gray scale binary matrix in order from top to bottom and from left to right to obtain a gray scale binary sequence, where the gray scale binary sequence can be used to characterize the gray scale distribution condition in the neighborhood window.
Optionally, in some embodiments of the present invention, determining the gray entropy of the center pixel according to the arrangement of the values in the gray binary sequence includes: dividing the gray level binary sequence into at least two subsequences according to a preset length, and determining sequence frequencies of different subsequences in the gray level binary sequence according to the arrangement of values in the different subsequences; and carrying out information entropy calculation on the sequence frequency based on an information entropy formula to obtain the gray entropy of the center pixel point corresponding to the gray binary sequence.
The preset length is a length corresponding to the data analysis of the gray level binary sequence, alternatively, the preset length may be 3, and then 25-3+1 subsequences may be generated when the gray level binary sequence is 25 data lengths, so that the frequency of different numerical value arrangements is determined according to the arrangement of the data values in the subsequences, and it is understood that when the first numerical value may be recorded as 1 and the second numerical value may be recorded as 0, the arrangement of the data values may be specifically, for example, "0,1,0", "1,0,1", "0, 0", "1, 1", and the like.
The frequency of the corresponding numerical arrangement may be specifically, for example, a ratio of the number of occurrences of the subsequence corresponding to the numerical arrangement to the total number of the subsequences, and since the number of occurrences of the subsequence corresponding to one or two numerical arrangements is greater in a neighborhood window with a relatively uniform texture distribution, the number of occurrences of the remaining subsequence is smaller, and the corresponding texture distribution is relatively complex in the neighborhood window including the defect region, the gray entropy of the center pixel corresponding to the gray binary sequence is obtained by calculating the information entropy.
The information entropy formula is a technology well known in the art, and the corresponding calculation formula is as follows:
in the method, in the process of the invention,represents the gray entropy of the center pixel point,represent the firstThe frequency of the arrangement of class values,a logarithmic operation is represented and the result is represented,representing all the possible types of numerical permutations,index representing the type of numerical permutation.
From the above formula, the gray entropy of the center pixel point is the information entropy at the position of the center pixel point, the larger the gray entropy is, the more complex the corresponding texture distribution is, the greater the possibility that the neighborhood window is the window corresponding to the defect region is, and the smaller the gray entropy is, the more simple the corresponding texture distribution is, the less the possibility that the neighborhood window is the window corresponding to the defect region is. And the subsequent texture analysis of the pixel points is further carried out according to the gray entropy.
S102: determining the circle center of the gray level image of the gasket, taking the pixel points with the same distance as the circle center as the pixel points with the same distance, and determining abnormal pixel points according to the gray level entropy change of the pixel points with the same distance; and determining the abnormal gray frequency of the gasket gray image according to the number of the abnormal pixel points and the number of the pixel points at the same distance.
It will be appreciated that, the rubber gasket is generally a circular gasket, and the corresponding gasket has a center position, and the center position of the gray image of the gasket may be used as the center position, or the center position may be obtained according to the shape of the gasket in the gray image of the gasket, which is not limited.
It can be understood that, at the center position, a circle is drawn with any length as a radius, and the pixel points passed by the edge of the circle are the same distance as the center, i.e. the same distance pixel points.
Further, in some embodiments of the present invention, determining the abnormal pixel according to the gray entropy change of the same-distance pixel includes: ordering the gray entropy of the same-distance pixel points in a preset direction according to a preset time sequence by taking the same-distance pixel points in the preset direction as a starting point to obtain a gray entropy sequence; constructing a two-dimensional coordinate system by taking a sequence order as an abscissa and gray entropy as an ordinate, determining coordinate points of gray entropy in the two-dimensional coordinate system in a gray entropy sequence, and connecting adjacent coordinate points to obtain a gray entropy curve; and deriving the gray entropy curve, dividing the gray entropy curve into at least one section of sub-curve according to the positive and negative conditions of derivative symbols, calculating the curvature absolute value of each section of sub-curve, and taking the same-distance pixel point corresponding to the sub-curve with the largest curvature absolute value as an abnormal pixel point.
Taking fig. 3 as a specific example, fig. 3 is a schematic diagram of gray entropy sequence acquisition provided by an embodiment of the present invention, O is used as a center, a counterclockwise sequence is used as a preset clockwise sequence, a straight line direction corresponding to a1 and a2 is used as a preset direction, b1 which is the same distance pixel point as a1 is obtained correspondingly, the same distance pixel point through which the circle formed by a1 and b1 passes is traversed according to the counterclockwise sequence, gray entropy corresponding to the same distance pixel point is ordered, a gray entropy sequence corresponding to a1 and b1 is obtained, and similarly, gray entropy sequences corresponding to a2 and b2 are obtained by ordering the gray entropy corresponding to the same distance pixel point through which the circle formed by a2 and b2 passes, that is, when the distances are different, the obtained gray entropy sequences are different, thereby obtaining a plurality of gray entropy sequences.
As shown in fig. 4, fig. 4 is a schematic diagram of a gray entropy curve provided by an embodiment of the present invention, the abscissa in fig. 4 is a sequence order k, the ordinate is a gray entropy s, the gray entropy curves are obtained by connecting according to the sequence order, the derivative of each point in the gray entropy curves can represent the corresponding gray entropy variation trend, the gray entropy curves are divided into at least one section of sub-curves according to the positive and negative conditions of the derivative symbols, that is, the curve part with the continuous derivative being positive is taken as a sub-curve, the curve part with the continuous derivative being negative is taken as a sub-curve, thus obtaining a plurality of corresponding sub-curves, the curvature of the curve is calculated as a technology known in the art, and the same-distance pixel point corresponding to the sub-curve with the largest curvature absolute value is taken as an abnormal pixel point, that is the same-distance pixel point corresponding to the part of the sub-curve with the largest curvature absolute value is taken as an abnormal pixel point.
It can be understood that the abnormal pixel points are the pixel points corresponding to the maximum change of gray entropy in the image, that is, the abnormal pixel points are the pixel points with complex gray distribution in the neighborhood, that is, the pixel points corresponding to the cracks, bubbles and burrs in the image, so that the gasket gray image can be adaptively adjusted according to the number characteristics of the abnormal pixel points.
In the embodiment of the invention, as the number of the gray entropy sequences corresponding to the pixel points at the same distance is a plurality of, and different gray entropy sequences respectively have corresponding abnormal pixel points, the embodiment of the invention respectively counts the abnormal pixel points corresponding to all the gray entropy sequences, and calculates the abnormal gray frequency according to the number of the abnormal pixel points corresponding to the different gray entropy sequences.
Further, in the embodiment of the present invention, determining the abnormal gray frequency of the pad gray image according to the number of abnormal pixels and the number of pixels at the same distance includes: calculating the ratio of the number of abnormal pixel points to the number of corresponding pixel points at the same distance as the same distance frequency; and calculating the average value of the same distance frequency corresponding to all the same distance pixel points as the abnormal gray scale frequency of the gasket gray scale image.
That is, the ratio of the number of abnormal pixels to the number of corresponding pixels at the same distance is counted as the same distance frequency, for example, in the same distance pixels, two abnormal gray values are provided, the number of pixels corresponding to the first abnormal gray value is x, the number of pixels corresponding to the second abnormal gray value is y, the total number of pixels at the same distance is z, the same distance frequency of the corresponding first abnormal gray value is x/z, the same distance frequency of the first abnormal gray value is y/z, and thus the abnormal gray frequency is
It can be understood that the abnormal gray frequency is the average frequency of occurrence probability of the abnormal gray value in the gasket gray image, and the larger the abnormal gray frequency is, the larger the number of the corresponding abnormal pixel points is, the larger the abnormal region is, and the corresponding abnormal region is required to be displayed more clearly and completely when the image enhancement is carried out subsequently, so that the gasket gray image is subjected to self-adaptive image enhancement processing according to the abnormal gray frequency, and particularly, the subsequent embodiment is referred to.
S103: according to the abnormal gray level frequency, the frequencies of the pixel points corresponding to different abnormal gray levels in the gasket gray level image are adjusted, and the target frequency corresponding to the abnormal gray level is obtained; and carrying out histogram equalization processing on the gasket gray image according to the target frequency and frequencies of other gray values except for the abnormal gray value in the gasket gray image to obtain an enhanced image.
In the embodiment of the invention, the pad gray level image is required to be enhanced in order to make the defect part clearer because the overall color difference of the pad gray level image is smaller, and the image enhancement can be performed on the pad gray level image in a histogram equalization-based mode.
Further, in some embodiments of the present invention, adjusting frequencies of pixels corresponding to different abnormal gray values in a pad gray image according to the abnormal gray frequency to obtain a target frequency corresponding to the abnormal gray value includes: calculating the sum of the normalized value of the abnormal gray frequency and 1 as a frequency influence factor; and respectively calculating the product of the frequency influence factor and the frequency of the pixel point corresponding to the abnormal gray value in the gasket gray image as the target frequency of the abnormal gray value.
It can be understood that, because the larger the abnormal gray frequency is, the larger the number of the corresponding abnormal pixels is, the larger the abnormal region is, and the invention uses a histogram equalization mode to make the gray value corresponding to the abnormal pixels have a larger mapping range in the gray mapping process, so that the abnormal region is more obvious, the sum value of the normalized value and 1 of the abnormal gray frequency can be calculated as a frequency influence factor, and because the sum value of the normalized value and 1 is necessarily larger than 1, namely the value range of the frequency influence factor is [1,2], the frequencies of all pixels in the gasket gray image of the pixels corresponding to the abnormal gray value can be adjusted by the frequency influence factor, so as to obtain the target frequency.
In the embodiment of the invention, the calculation mode corresponding to the target frequency is that the product of the frequency influence factor and the frequency of all the pixel points corresponding to the abnormal gray value in the gasket gray image is calculated as the target frequency of the abnormal gray value, the target frequency is larger than the frequency of the pixel point corresponding to the abnormal gray value, and the corresponding frequency of the pixel point corresponding to the abnormal gray value can be adaptively enhanced, so that the frequency of an abnormal region is enhanced, and the enhancement of the abnormal region is more prominent in the histogram equalization process.
Thus, according to the target frequency and the frequencies of other gray values except for the abnormal gray value in the gasket gray image, histogram equalization processing is performed on the gasket gray image to obtain an enhanced image, which comprises: calculating the sum value of all the frequencies of the target frequency and other gray values as the frequency sum value; calculating the ratio of the target frequency to the frequency sum value as the adjusted target frequency, and calculating the ratio of the frequency of other gray values to the frequency sum value as the adjusted other frequencies; and carrying out histogram equalization processing on the adjusted target frequency and other adjusted frequencies based on a histogram equalization algorithm, and taking the gray value after the histogram equalization as the gray value of the corresponding pixel point to obtain an enhanced image.
In the embodiment of the invention, the frequency sum value is calculated, the ratio of the target frequency to the frequency sum value is calculated as the adjusted target frequency, and the ratio of the frequency of other gray values to the frequency sum value is calculated as the adjusted other frequencies, so that the frequency of the target frequency and the frequency of other gray values can be mapped, namely the target frequency and the frequency of other gray values are subjected to equal-proportion adjustment, the sum value of the adjusted target frequency and the adjusted other frequencies can be 1, and the value range of the cumulative distribution function is kept in a specified interval.
After the adjusted target frequency and other adjusted frequencies are determined, mapping is carried out on the gray values corresponding to the histogram equalization mode based on the cumulative distribution function according to the adjusted target frequency and the other adjusted frequencies, so that mapped gray values corresponding to different gray values are obtained, and an enhanced image is obtained according to the mapped gray values. The histogram equalization method based on the cumulative distribution function is an image enhancement method well known in the art, and the embodiments of the present invention will not be described in detail.
S104: and performing image segmentation on the enhanced image to obtain a defect area, and determining the quality of the shock pad according to the defect area.
Optionally, in an embodiment of the present invention, performing image segmentation on the enhanced image to obtain a defect area includes: and carrying out edge detection processing on the enhanced image to obtain an abnormal edge, and taking an area surrounded by the abnormal edge as a defect area.
After the enhanced image is acquired, the enhanced image can be subjected to image edge detection based on the edge detection operator to obtain an abnormal edge, wherein the edge detection operator can be specifically, for example, a Sobel edge detection operator or a Canny edge detection operator, the edge detection operator is a technology well known in the art, the description is omitted, the abnormal edge is obtained after the edge detection is carried out through the edge detection operator, and the image enhancement condition is adaptively adjusted according to the abnormal gray frequency, so that the segmentation of a defect area can be ensured to be more accurate and visual, the segmentation effect is better, and the obtained defect area is more accurate.
Further, in an embodiment of the present invention, determining a mass of a shock pad according to a defective area includes: when the area of the defect area is smaller than a preset area threshold value, determining that the quality of the shock pad is qualified; and when the area of the defect area is larger than or equal to a preset area threshold value, determining that the quality of the shock pad is unqualified.
The preset area threshold is preferably a threshold of the area of the defect area, and the preset area threshold may specifically be, for example, 100, and of course, may be adjusted according to practical situations, when the area of the defect area is greater than or equal to the preset area threshold, the larger the area of the area where the situation such as burrs, cracks, bubbles occur is indicated to be larger, the quality of the shock pad is disqualified, when the area of the defect area is smaller than the preset area threshold, the smaller the area of the area where the situation such as burrs, cracks, bubbles occur is indicated to be smaller, the quality of the shock pad is qualified, and therefore the quality of the shock pad is determined more effectively and intuitively.
According to the invention, the gray entropy of the central pixel point is determined by constructing the gray binary sequence, the surrounding texture of the pixel point can be numerically represented and analyzed, so that the complexity degree of the surrounding texture of the central pixel point can be effectively represented by using the gray entropy, the abnormal pixel point can be determined by changing the gray entropy of the pixel point at the same distance, the abnormal pixel point with abnormal change can be accurately obtained according to the change of the gray entropy, the abnormal gray frequency of the gasket gray image can be effectively determined, the abnormal gray frequency can be ensured to accurately represent the frequency of gray abnormality in the gasket gray image, the frequency of the pixel point corresponding to the abnormal gray value in the gasket gray image can be adjusted according to the abnormal gray frequency, and the target frequency corresponding to the abnormal gray value can be obtained.
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 (8)

1. The method for detecting the quality of the motor rubber shock pad based on image processing is characterized by comprising the following steps of:
acquiring a gasket gray level image, constructing a neighborhood window with a preset size by taking each pixel point in the gasket gray level image as a center, and determining a gray level binary sequence of a central pixel point of the neighborhood window according to gray level values of all pixel points in the neighborhood window; determining the gray entropy of the central pixel point according to the arrangement of the numerical values in the gray binary sequence;
determining the circle center of the gray level image of the gasket, taking the pixel points with the same distance as the circle center as the pixel points with the same distance, and determining abnormal pixel points according to the gray level entropy change of the pixel points with the same distance; determining the abnormal gray frequency of the gasket gray image according to the number of the abnormal pixel points and the number of the pixel points at the same distance;
according to the abnormal gray level frequency, the frequencies of the pixel points corresponding to different abnormal gray levels in the gasket gray level image are adjusted, and the target frequency corresponding to the abnormal gray level is obtained; performing histogram equalization processing on the gasket gray scale image according to the target frequency and frequencies of other gray scale values except the abnormal gray scale value in the gasket gray scale image to obtain an enhanced image;
image segmentation is carried out on the enhanced image to obtain a defect area, and the quality of the shock pad is determined according to the defect area;
and performing histogram equalization processing on the pad gray level image according to the target frequency and frequencies of other gray levels except the abnormal gray level in the pad gray level image to obtain an enhanced image, wherein the method comprises the following steps:
calculating the sum value of all the frequencies of the target frequency and other gray values as a frequency sum value;
calculating the ratio of the target frequency to the frequency sum value as an adjusted target frequency, and calculating the ratio of the frequency of the other gray values to the frequency sum value as other adjusted frequencies;
and carrying out histogram equalization processing on the adjusted target frequency and other adjusted frequencies based on a histogram equalization algorithm, and taking the gray value after the histogram equalization as the gray value of the corresponding pixel point to obtain an enhanced image.
2. The method for detecting the quality of the motor rubber shock pad based on image processing as claimed in claim 1, wherein the determining the gray level binary sequence of the center pixel point of the neighborhood window according to the gray level values of all the pixel points in the neighborhood window comprises the following steps:
marking the pixel points with the gray value larger than or equal to the gray value of the central pixel point in the neighborhood window as a first numerical value, and marking the pixel points with the gray value smaller than the gray value of the central pixel point as a second numerical value, so as to obtain a gray binary matrix;
and sequencing the numerical values in the gray scale binary matrix from top to bottom and from left to right to obtain a gray scale binary sequence.
3. The method for detecting the quality of the motor rubber shock pad based on image processing according to claim 1, wherein the step of determining the gray entropy of the center pixel point according to the arrangement of the values in the gray binary sequence comprises the following steps:
dividing the gray level binary sequence into at least two subsequences according to a preset length, and determining sequence frequencies of different subsequences in the gray level binary sequence according to the arrangement of values in the different subsequences;
and carrying out information entropy calculation on the sequence frequency based on an information entropy formula to obtain the gray entropy of the center pixel point corresponding to the gray binary sequence.
4. The method for detecting the quality of the motor rubber shock pad based on image processing according to claim 1, wherein the determining the abnormal pixel according to the gray entropy change of the same-distance pixel comprises the following steps:
ordering the gray entropy of the same-distance pixel points in a preset direction according to a preset time sequence by taking the same-distance pixel points in the preset direction as a starting point to obtain a gray entropy sequence;
constructing a two-dimensional coordinate system by taking a sequence order as an abscissa and gray entropy as an ordinate, determining coordinate points of gray entropy in the two-dimensional coordinate system in the gray entropy sequence, and connecting adjacent coordinate points to obtain a gray entropy curve;
and deriving the gray entropy curve, dividing the gray entropy curve into at least one section of sub-curve according to the positive and negative conditions of derivative symbols, calculating the curvature absolute value of each section of sub-curve, and taking the same-distance pixel point corresponding to the sub-curve with the largest curvature absolute value as an abnormal pixel point.
5. The method for detecting the quality of the motor rubber shock pad based on image processing according to claim 1, wherein the determining the abnormal gray frequency of the gasket gray image according to the number of the abnormal pixels and the number of the pixels at the same distance comprises the following steps:
calculating the ratio of the number of the abnormal pixel points to the number of the corresponding pixel points at the same distance as the same distance frequency;
and calculating the average value of the same distance frequency corresponding to all the same distance pixel points as the abnormal gray scale frequency of the gasket gray scale image.
6. The method for detecting the quality of the motor rubber shock pad based on image processing as claimed in claim 1, wherein the step of adjusting the frequencies of the pixel points corresponding to different abnormal gray values in the pad gray image according to the abnormal gray frequencies to obtain the target frequencies corresponding to the abnormal gray values comprises the steps of:
calculating the sum of the normalized value of the abnormal gray frequency and 1 as a frequency influence factor;
and respectively calculating the product of the frequency influence factor and the frequency of all the pixel points corresponding to the abnormal gray value in the gasket gray image as the target frequency of the abnormal gray value.
7. The method for detecting the quality of the motor rubber shock pad based on image processing as claimed in claim 1, wherein the image segmentation of the enhanced image to obtain a defective area comprises:
and carrying out edge detection processing on the enhanced image to obtain an abnormal edge, and taking an area surrounded by the abnormal edge as a defect area.
8. The image processing-based motor rubber cushion quality detection method according to claim 1, wherein the determining cushion quality according to the defective area comprises:
when the area of the defect area is smaller than a preset area threshold value, determining that the quality of the shock pad is qualified;
and when the area of the defect area is larger than or equal to a preset area threshold value, determining that the quality of the shock pad is unqualified.
CN202310652801.5A 2023-06-05 2023-06-05 Motor rubber shock pad quality detection method based on image processing Active CN116385439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310652801.5A CN116385439B (en) 2023-06-05 2023-06-05 Motor rubber shock pad quality detection method based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310652801.5A CN116385439B (en) 2023-06-05 2023-06-05 Motor rubber shock pad quality detection method based on image processing

Publications (2)

Publication Number Publication Date
CN116385439A CN116385439A (en) 2023-07-04
CN116385439B true CN116385439B (en) 2023-08-15

Family

ID=86961882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310652801.5A Active CN116385439B (en) 2023-06-05 2023-06-05 Motor rubber shock pad quality detection method based on image processing

Country Status (1)

Country Link
CN (1) CN116385439B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116612111B (en) * 2023-07-14 2023-09-22 城资泰诺(山东)新材料科技有限公司 High-strength composite material processing quality detection method
CN116630308B8 (en) * 2023-07-20 2023-10-27 山东华太新能源电池有限公司 Data enhancement system for battery welding anomaly detection
CN116703888B (en) * 2023-07-28 2023-10-20 菏泽城建新型工程材料有限公司 Auxiliary abnormality detection method and system for bored pile construction
CN116664584B (en) * 2023-08-02 2023-11-28 东莞市旺佳五金制品有限公司 Intelligent feedback regulating system for production of thin-wall zinc alloy die casting die
CN116740056B (en) * 2023-08-10 2023-11-07 梁山水泊胶带股份有限公司 Defect detection method for coating layer of whole-core high-pattern conveyer belt
CN116721107B (en) * 2023-08-11 2023-11-03 青岛胶州电缆有限公司 Intelligent monitoring system for cable production quality
CN116740061B (en) * 2023-08-14 2023-11-21 山东淼珠生物科技有限公司 Visual detection method for production quality of explosive beads
CN116977230B (en) * 2023-09-22 2024-01-02 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) Scanning electron microscope image optimization enhancement method

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3410390A1 (en) * 2017-05-31 2018-12-05 Guangdong OPPO Mobile Telecommunications Corp., Ltd. Image processing method and device, computer readable storage medium and electronic device
WO2021000524A1 (en) * 2019-07-03 2021-01-07 研祥智能科技股份有限公司 Hole protection cap detection method and apparatus, computer device and storage medium
CN114862862A (en) * 2022-07-11 2022-08-05 江苏大田阀门制造有限公司 Pump body cold shut defect identification method and system based on image processing
CN114943736A (en) * 2022-07-21 2022-08-26 山东嘉翔汽车散热器有限公司 Production quality detection method and system for automobile radiating fins
CN115018844A (en) * 2022-08-09 2022-09-06 南通三信塑胶装备科技股份有限公司 Plastic film quality evaluation method based on artificial intelligence
CN115082467A (en) * 2022-08-22 2022-09-20 山东亿昌装配式建筑科技有限公司 Building material welding surface defect detection method based on computer vision
CN115082464A (en) * 2022-08-22 2022-09-20 南通翡利达液压科技有限公司 Method and system for identifying welding seam data in welding process of dust remover
CN115457035A (en) * 2022-11-10 2022-12-09 山东鲁旺机械设备有限公司 Machine vision-based construction hanging basket welding quality detection method
CN115829883A (en) * 2023-02-16 2023-03-21 汶上县恒安钢结构有限公司 Surface image denoising method for dissimilar metal structural member
CN116012357A (en) * 2023-02-09 2023-04-25 河南职业技术学院 Automobile circular trailer hole air line defect detection method based on machine vision
CN116152133A (en) * 2023-04-20 2023-05-23 山东超越纺织有限公司 Blending defect detection method based on artificial intelligence

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7668358B2 (en) * 2003-07-18 2010-02-23 Hologic, Inc. Model-based grayscale registration of medical images

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3410390A1 (en) * 2017-05-31 2018-12-05 Guangdong OPPO Mobile Telecommunications Corp., Ltd. Image processing method and device, computer readable storage medium and electronic device
WO2021000524A1 (en) * 2019-07-03 2021-01-07 研祥智能科技股份有限公司 Hole protection cap detection method and apparatus, computer device and storage medium
CN114862862A (en) * 2022-07-11 2022-08-05 江苏大田阀门制造有限公司 Pump body cold shut defect identification method and system based on image processing
CN114943736A (en) * 2022-07-21 2022-08-26 山东嘉翔汽车散热器有限公司 Production quality detection method and system for automobile radiating fins
CN115018844A (en) * 2022-08-09 2022-09-06 南通三信塑胶装备科技股份有限公司 Plastic film quality evaluation method based on artificial intelligence
CN115082467A (en) * 2022-08-22 2022-09-20 山东亿昌装配式建筑科技有限公司 Building material welding surface defect detection method based on computer vision
CN115082464A (en) * 2022-08-22 2022-09-20 南通翡利达液压科技有限公司 Method and system for identifying welding seam data in welding process of dust remover
CN115457035A (en) * 2022-11-10 2022-12-09 山东鲁旺机械设备有限公司 Machine vision-based construction hanging basket welding quality detection method
CN116012357A (en) * 2023-02-09 2023-04-25 河南职业技术学院 Automobile circular trailer hole air line defect detection method based on machine vision
CN115829883A (en) * 2023-02-16 2023-03-21 汶上县恒安钢结构有限公司 Surface image denoising method for dissimilar metal structural member
CN116152133A (en) * 2023-04-20 2023-05-23 山东超越纺织有限公司 Blending defect detection method based on artificial intelligence

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
海天背景下舰船可见光图像目标区域定位方法;季超等;《火力与指挥控制》;第42卷(第07期);第66-71页 *

Also Published As

Publication number Publication date
CN116385439A (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN116385439B (en) Motor rubber shock pad quality detection method based on image processing
CN116758061B (en) Casting surface defect detection method based on computer vision
CN115829883B (en) Surface image denoising method for special-shaped metal structural member
CN115861291B (en) Chip circuit board production defect detection method based on machine vision
CN114219805B (en) Intelligent detection method for glass defects
CN116934740B (en) Plastic mold surface defect analysis and detection method based on image processing
CN116030060B (en) Plastic particle quality detection method
CN116740070A (en) Plastic pipeline appearance defect detection method based on machine vision
CN116523923B (en) Battery case defect identification method
CN116071363B (en) Automatic change shaped steel intelligent production monitoring system
CN116309577B (en) Intelligent detection method and system for high-strength conveyor belt materials
CN110942444B (en) Object detection method and device
CN115049671A (en) Cloth surface defect detection method and system based on computer vision
CN116883408A (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116993718A (en) TFT array substrate defect detection method based on machine vision
CN117078676B (en) Breaking hammer shell visual detection method based on image processing
CN117274405B (en) LED lamp working color detection method based on machine vision
CN116523922B (en) Bearing surface defect identification method
CN116310424B (en) Equipment quality assessment method, device, terminal and medium based on image recognition
CN107967690B (en) Self-adaptive ferrographic abrasive particle image binarization processing method
CN114882387B (en) Bearing raceway bruise identification and automatic polishing positioning method in grinding process
CN115272737A (en) Rubber ring flow mark identification method
CN118071753B (en) Visual inspection method for surface defects of injection mold
CN117152447B (en) Intelligent management method and system for punching die
CN109859162B (en) Automatic testing method for periodic stripes of industrial camera

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