CN117437232B - Water pump impeller appearance defect detection method and system based on image processing - Google Patents

Water pump impeller appearance defect detection method and system based on image processing Download PDF

Info

Publication number
CN117437232B
CN117437232B CN202311765177.6A CN202311765177A CN117437232B CN 117437232 B CN117437232 B CN 117437232B CN 202311765177 A CN202311765177 A CN 202311765177A CN 117437232 B CN117437232 B CN 117437232B
Authority
CN
China
Prior art keywords
image
pixel point
water pump
degree
pump impeller
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
CN202311765177.6A
Other languages
Chinese (zh)
Other versions
CN117437232A (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.)
Fengyuan Mining Equipment Shanghai Co ltd
Shandong Xinchuan Mining Electromechanical Equipment Co ltd
Original Assignee
Fengyuan Mining Equipment Shanghai Co ltd
Shandong Xinchuan Mining Electromechanical Equipment Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fengyuan Mining Equipment Shanghai Co ltd, Shandong Xinchuan Mining Electromechanical Equipment Co ltd filed Critical Fengyuan Mining Equipment Shanghai Co ltd
Priority to CN202311765177.6A priority Critical patent/CN117437232B/en
Publication of CN117437232A publication Critical patent/CN117437232A/en
Application granted granted Critical
Publication of CN117437232B publication Critical patent/CN117437232B/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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • 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
    • G06T2207/30164Workpiece; Machine component
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E10/00Energy generation through renewable energy sources
    • Y02E10/20Hydro energy

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a water pump impeller appearance defect detection method and system based on image processing, comprising the following steps: the method comprises the steps of collecting a water pump impeller image, preprocessing the water pump impeller image, obtaining a water pump impeller connected domain and a gray level image, dividing the gray level image into a plurality of image blocks, obtaining the dirt possibility of the image blocks according to gray level distribution in the image blocks, obtaining the abnormal degree of each pixel point according to the dirt possibility of the image blocks and the neighborhood image blocks which are symmetrical, obtaining the gradient direction of the pixel point and the abnormal degree of the pixel point, obtaining the abnormal change degree of the pixel point according to the abnormal change degree of all the pixel points on a change path of the pixel point, obtaining the dirt degree image according to the dirt degree of each pixel point, and obtaining the dirt area according to the dirt degree image. The dirt area on the surface of the water pump impeller identified by the invention is more accurate.

Description

Water pump impeller appearance defect detection method and system based on image processing
Technical Field
The invention relates to the technical field of image processing, in particular to a water pump impeller appearance defect detection method and system based on image processing.
Background
Defects in the appearance of the water pump impeller, particularly dirt defects, may deteriorate the corrosion of the water pump impeller surface, cause flaking or damage of the material of the water pump impeller surface, cause changes in the geometry of the water pump blades, cause disturbance of the flow of water in the water pump impeller, instability of the water flow in the water pump impeller, may cause turbulence or vortex phenomena of the liquid, negatively affect the performance of the water pump and the fluid delivery system. The apparent defect of the impeller of the water pump may cause vibration and noise to be generated when the water pump is operated, which may damage not only the water pump itself but also vibration and noise problems of nearby devices.
With the development of image processing technology, the appearance defect of the water pump impeller is usually identified by shooting an image of the water pump impeller. However, because the blades of the water pump impeller have a certain radian and the blades and the bottom plate are not on the same horizontal plane, certain gray level difference exists between the blades and the bottom plate, and certain interference is caused by the appearance defects of the water pump impeller, the appearance defects of the water pump impeller cannot be accurately detected by using image processing methods such as threshold segmentation, edge detection, clustering and the like.
Disclosure of Invention
In order to solve the problems, the invention provides a water pump impeller appearance defect detection method and system based on image processing.
The invention discloses a water pump impeller appearance defect detection method based on image processing, which comprises the following steps of:
acquiring a water pump impeller image, preprocessing the water pump impeller image, and acquiring a water pump impeller communication domain and a gray level image; dividing the gray image into a plurality of image blocks according to the mass center of the water pump impeller connected domain;
for each image block, acquiring the dirt possibility of the image block according to the gray level distribution in the image block; acquiring the abnormal degree of each pixel point according to the image blocks with symmetrical image blocks and the dirt possibility of the neighborhood image blocks;
acquiring the abnormal change degree of the pixel point according to the gradient direction and the abnormal degree of the pixel point; acquiring the dirt degree of the pixel points according to the abnormal change degree of all the pixel points on the change path of the pixel points; and acquiring a dirty degree image according to the dirty degree of each pixel point, and acquiring a dirty region according to the dirty degree image.
Preferably, the obtaining the dirt possibility of the image block according to the gray level distribution in the image block includes the following specific steps:
wherein,representing the first of all image blocksThe likelihood of smudging of individual image blocks,the method takes the step of (1),]is selected from the group consisting of a number of integers,representing the number of all image blocks;represent the firstGray variance of each image block;represent the firstGradient mean values of the individual image blocks;represent the firstThe gray average of each image block.
Preferably, the obtaining the degree of abnormality of each pixel according to the image blocks symmetrical to the image blocks and the contamination possibility of the neighboring image blocks includes the following specific steps:
taking the mass center of a communicating region of the water pump impeller as a symmetry center, and taking any two image blocks which are in central symmetry as corresponding image blocks;
wherein,representing the first of all image blocksThe degree of abnormality of the individual image blocks,the method takes the step of (1),]is selected from the group consisting of a number of integers,representing the number of all image blocks;represent the firstThe likelihood of smudging of individual image blocks;represent the firstThe dirt possibility of the image block corresponding to the image block;represent the firstThe dirt possibility of each image block and the firstIntra-neighborhood of image blockA ratio of the likelihood of smudging of the individual image blocks;represent the firstThe dirt possibility of the image block corresponding to the image block is as followsImage block neighborhood of each image blockA ratio of the likelihood of smudging of the individual image blocks;representing the neighborhood size;
the degree of abnormality of each image block is taken as the degree of abnormality of each pixel point in the image block.
Preferably, the step of obtaining the abnormal variation degree of the pixel point according to the gradient direction and the abnormal degree of the pixel point includes the following specific steps:
for each pixel point, acquiring the variance of the included angle between the pixel point and the gradient direction of all the pixel points in the neighborhood of the pixel point as the change weight of the pixel point; taking the product of the change weight and the abnormality degree of the pixel point as the abnormality change degree of the pixel point.
Preferably, the method for obtaining the change path of the pixel point includes:
for each pixel point, acquiring one pixel point which is farthest from the pixel point in the gradient direction of the pixel point in a neighborhood image block of the image block to which the pixel point belongs, taking the pixel point as a reference pixel point of the pixel point, and taking a connecting line from the pixel point to the reference pixel point as a change path of the pixel point.
Preferably, the obtaining the dirt degree of the pixel point according to the abnormal change degree of all the pixel points on the change path of the pixel point includes the following specific steps:
wherein,represent the firstIn the image blockThe dirt degree of each pixel point;represent the firstIn the image blockThe first pixel point on the variation pathAbnormal change degree of each pixel point;represent the firstIn the image blockThe first pixel point on the variation pathAbnormal change degree of each pixel point;represent the firstIn the image blockThe number of pixels included in the variation path of each pixel;represent the firstIn the image blockVariance of abnormal variation degree of all pixels on variation paths of the pixels.
Preferably, the step of acquiring the dirty region according to the dirty degree image of each pixel point includes the following specific steps:
mapping the dirt degree of each pixel point in the gray level image into the range of [0,255] to form a new image as a dirt degree image; clustering the dirt level images, gathering the dirt level images into two types, and taking the type with larger gray level average value in the dirt level images as a dirt area.
Preferably, the dividing the gray image into a plurality of image blocks according to the centroid of the water pump impeller connected domain includes the following specific steps:
construction by taking centroid of connected domain of water pump impeller in gray scale image as centerImage blocks with the size are respectively constructed in eight neighborhood directions of the central blocks by taking the image blocks as the central blocksThe image blocks with the size are continuously constructed in the eight neighborhood directions of each center block by taking each newly constructed image block as the center blockImage blocks of size, and so on, and stopping iteration until the gray scale image is completely divided into a plurality of image blocks which are not overlapped with each other, whereinIs a preset block size.
Preferably, the preprocessing of the image of the water pump impeller to obtain the connected domain of the water pump impeller and the gray level image comprises the following specific steps:
acquiring a water pump impeller connected domain in the water pump impeller image by utilizing a semantic segmentation network, and multiplying the water pump impeller connected domain by the water pump impeller image as a mask to obtain the water pump impeller image with the background removed; and graying the water pump impeller image after the background is removed by using a graying algorithm to obtain a gray image.
The invention also provides a water pump impeller appearance defect detection system based on image processing, which comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes any one of the steps of the water pump impeller appearance defect detection method based on image processing when executing the computer program.
The technical scheme of the invention has the beneficial effects that: according to the invention, the gray image is segmented according to the centroid of the water pump impeller connected domain, so that the image blocks which are centrosymmetric to each other in the segmented image blocks contain the same water pump impeller characteristics, the dirt defect is identified according to the difference between the image blocks containing the same water pump impeller characteristics, and the accuracy of the dirt defect identification is improved. According to the invention, the abnormal degree of each pixel point is obtained according to the image blocks symmetrical to the image blocks and the dirt possibility of the neighborhood image blocks, the interference of the impeller structures in different image blocks is eliminated, and the obtained abnormal degree is more accurate. According to the method, the abnormal change degree of the pixel points is obtained according to the gradient direction and the abnormal degree of the pixel points, the dirt degree of the pixel points is obtained according to the abnormal change degree of all the pixel points on the change path of the pixel points, the dirt defect is identified according to the dirt degree image, and the condition that dirt areas cannot be identified due to the fact that fewer dirt areas possibly exist in an image block is avoided. The invention can identify the dirty area in the image of the water pump impeller more accurately.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of the steps of a water pump impeller appearance defect detection method based on image processing;
fig. 2 is an image of a water pump impeller.
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 water pump impeller appearance defect 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 water pump impeller appearance defect 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 an appearance defect of a water pump impeller based on image processing according to an embodiment of the invention is shown, and the method includes the following steps:
s001, acquiring a water pump impeller image, preprocessing the water pump impeller image, and acquiring a water pump impeller connected domain and a gray level image.
The water pump impeller was placed horizontally and an image of the water pump impeller was taken with a high definition camera looking down, see fig. 2.
The embodiment of the invention utilizes a semantic segmentation network to identify the water pump impeller target in the water pump impeller image. The semantic segmentation network content is as follows: the data set used by the semantic segmentation network is an acquired image data set of the water pump impeller; the pixels to be segmented are divided into 2 classes, namely, the labeling process of the corresponding label of the training set is as follows: single-channel semantic tag, and the pixel at the corresponding position belongs to the water pump impeller and is marked asThe labels belonging to the background areThe method comprises the steps of carrying out a first treatment on the surface of the The loss function used by the semantic segmentation network is a cross entropy loss function.
The embodiment of the invention does not limit the used semantic segmentation network, and an implementer can select the semantic segmentation network according to specific practical conditions, such as U-net, segNet, deepLabV3 and the like.
Inputting the water pump impeller image into a trained semantic segmentation network to obtain a water pump impeller connected domain in the image, and multiplying the water pump impeller image by taking the output result of the semantic segmentation network as a mask to obtain the water pump impeller image with the background removed.
And graying the water pump impeller image after the background is removed by using a graying algorithm to obtain a gray image.
Thus, a gray image of the water pump impeller is obtained.
S002, dividing the gray image into a plurality of image blocks according to the mass center of the water pump impeller connected domain, and obtaining the dirt possibility of the image blocks according to the gray distribution in the image blocks.
It should be noted that, because the water pump impeller is rotationally put anyway, the gray level images obtained are all of a symmetry rule, and meanwhile, the middle of the water pump impeller is hollow, the gray level images can be positioned and divided, so that the image blocks which are mutually center-symmetrical among the divided image blocks are ensured to contain the same water pump impeller characteristics, the subsequent comparison of differences among the image blocks containing the same water pump impeller characteristics is facilitated, and the accuracy of identifying the dirt defects is improved.
In the embodiment of the invention, the block size is presetWithout limitation, the practitioner can set the block size according to the actual implementation, e.g. Step S001, obtaining a connected domain of the water pump impeller by utilizing a semantic segmentation network, obtaining the mass center of the connected domain of the water pump impeller in a gray level image, and constructing by taking the mass center as the centerImage blocks with the size are respectively constructed in eight neighborhood directions of the central blocks by taking the image blocks as the central blocksThe image blocks with the size are continuously constructed in the eight neighborhood directions of each center block by taking each newly constructed image block as the center blockIf the image blocks exist in a certain neighborhood direction of the center block, the construction is not needed to be repeated again, and the like until the gray level image is completely divided into a plurality of images which are not overlapped with each otherThe iteration is stopped at block time.
And taking the mass center of the communicating region of the water pump impeller as a symmetry center, and taking any two image blocks which are in central symmetry as corresponding image blocks.
When dirt exists on the water pump impeller, the gray value of the area affected by the dirt is reduced, and meanwhile, the gray characteristics of the dirt area are disordered due to the fact that the dirt shape is not fixed, so that the possibility of dirt exists in each image block is analyzed according to gray distribution in each image block.
In the embodiment of the invention, for each image block, a gradient algorithm is utilized to acquire the gradient amplitude of each pixel point in the image block. Acquiring the dirt possibility of the image block according to the gray value and the gradient amplitude of each pixel point in the image block:
wherein,representing the first of all image blocksThe likelihood of smudging of individual image blocks,the method takes the step of (1),]is selected from the group consisting of a number of integers,representing the number of all image blocks;represent the firstGray variance of individual image blocks, i.e. firstVariance of gray values of all pixel points in each image block;represent the firstGradient mean of individual image blocks, i.e. firstAverage value of gradient amplitude values of all pixel points in each image block;represent the firstThe gray-scale average of the image blocks, i.e. the firstThe average value of gray values of all pixel points in each image block; the gray value of the region affected by the dirt will be reduced, and the gray value of the pixel point of the region affected by the dirt is disordered due to the different internal characteristics of the dirt, so that the gray value of the pixel point of the region affected by the dirt is the following pointThe smaller the gray average value of each image block, the larger the gray variance and the gradient average value, the firstThe more likely an image block is a dirty region.
To this end, the contamination possibility of each image block is acquired.
S003, obtaining the abnormal degree of each pixel point according to the image blocks symmetrical to the image blocks and the dirt possibility of the neighborhood image blocks, obtaining the abnormal change degree of the pixel point according to the gradient direction and the abnormal degree of the pixel point, and obtaining the dirt degree of the pixel point according to the abnormal change degree of all the pixel points on the change path of the pixel point.
It should be noted that, when there is a protruding blade structure on the surface of the water pump impeller, when there is no dirt on the water pump impeller, the gray value of the blade of the water pump impeller is higher, the gray value of the bottom plate of the water pump impeller is lower, the gray values of the blade and the bottom plate are different, and the image features contained in each image block are different, for example, some image blocks only contain the bottom plate of the water pump impeller, some image blocks only contain the blade, and some image blocks contain the blade and the bottom plate at the same time. When dirt exists, the gray value of the area of the blade of the water pump impeller, which is possibly affected by the dirt, is approximate to or lower than that of the bottom plate area of the water pump impeller, so that the dirt possibility of the image block only containing the dirt blade is approximate to that of the image block containing the bottom plate without the dirt effect, and therefore, whether the image block contains the dirt area is inaccurate or not is measured by directly utilizing the dirt possibility of the image block. The water pump impellers contained in the image blocks with central symmetry are identical in structure, so that the difference of the dirt possibility among the image blocks with central symmetry is analyzed, interference of the water pump impellers in different image blocks is eliminated, the abnormal degree of the image blocks is obtained, and whether the image blocks contain dirt areas is further measured.
In the embodiment of the invention, the abnormality degree of each image block is obtained according to the contamination possibility of each image block and the contamination possibility of the corresponding image block and the neighborhood image block:
wherein,representing the first of all image blocksThe degree of abnormality of the individual image blocks,the method takes the step of (1),]is selected from the group consisting of a number of integers,representing all image blocksNumber of pieces;represent the firstThe likelihood of smudging of individual image blocks;represent the firstThe dirt possibility of the image block corresponding to the image block is that the center of mass of the communicating region of the water pump impeller is taken as the symmetry center, and is the same as that of the firstThe image blocks are the dirty possibility of the image blocks with central symmetry;represent the firstThe dirt possibility of each image block and the firstIntra-neighborhood of image blockA ratio of the likelihood of smudging of the individual image blocks;represent the firstThe dirt possibility of the image block corresponding to the image block is as followsImage block neighborhood of each image blockA ratio of the likelihood of smudging of the individual image blocks;representing neighborhood size, in an embodiment of the inventionIn other embodiments, the practitioner may set the neighborhood size according to the specific implementation; if no influence of dirt exists, the image features contained in the two image blocks which are presented as center symmetry by taking the center of mass of the communication domain of the water pump impeller as the symmetry center are consistent, and the corresponding dirt possibility is also consistent, so that when the water pump impeller is at the first positionThe greater the likelihood of fouling of an image block relative to its corresponding image block, theThe more likely an image block is affected by a dirty region, at which point the firstThe more abnormal the individual image blocks are;represent the firstThe relevance of each image block to its neighborhood, if no dirty effect exists, the firstThe relevance of an image block to its neighborhood should be the same asThe image blocks corresponding to the image blocks are consistent with the association of the neighborhood thereof, thus whenThe larger the firstThe more likely an image block is affected by a dirty region, at which point the firstThe more abnormal the individual image blocks are.
Thus, the degree of abnormality of each image block is obtained.
It should be noted that, since the degree of abnormality is performed on a per image block basis, there may be a case where one dirty region is divided into a plurality of image blocks in the process of dividing the image blocks, and some image blocks include very few dirty regions, so that the degree of abnormality of the image blocks is small, and the dirty regions included in the image blocks cannot be identified. Because continuous change rhythms exist among the pixel points in the gray level image, in an area which is not affected by dirt, the change rhythms of the pixel points are consistent, the area has strong uniformity, and in the area affected by dirt, the change rhythms of the pixel points and the change uniformity of the area are damaged due to the influence of dirt, so that the abnormal degree of the image block is converted into the abnormal degree of the pixel points, and the change regularity among the pixel points is analyzed, so that the dirt degree of each pixel point is obtained.
In the embodiment of the invention, the degree of abnormality of each image block is taken as the degree of abnormality of each pixel point in the image block.
For each pixel point, acquiring the variance of the included angle between the pixel point and the gradient direction of all the pixel points in the neighborhood of the pixel point, taking the variance as the change weight of the pixel point, and acquiring the abnormal change degree of the pixel point according to the change weight and the abnormal degree of the pixel point:
wherein,represent the firstIn the image blockThe degree of abnormal change of the individual pixel points,the method takes the step of (1),]is selected from the group consisting of a number of integers,the size of the partition is indicated and,representing the number of pixels contained in an image block;represent the firstIn the image blockDegree of abnormality of the individual pixel points;represent the firstIn the image blockThe changing weight of each pixel point; when the first isThe larger the variation weight of each pixel point is, the description is thatThe more disordered the gradient direction difference between each pixel point and the adjacent pixel points is, at this timeIndividual pixels are more likely to be affected by dirt and will thereforeAs the degree of abnormalityWeight of (2) for degree of abnormalityCorrecting to obtain the firstAbnormal change degree of each pixel point so as to embody the firstThe variation difference between each pixel and the neighborhood pixel.
For each pixel point, acquiring one pixel point which is farthest from the pixel point in the gradient direction of the pixel point in a neighborhood image block of the image block to which the pixel point belongs, taking the pixel point as a reference pixel point of the pixel point, and taking a connecting line from the pixel point to the reference pixel point as a change path of the pixel point.
According to the abnormal change degree of all the pixel points on the change path of the pixel points, the dirt degree of the pixel points is obtained:
wherein,represent the firstIn the image blockThe degree of fouling of the individual pixel points,the method takes the step of (1),]is selected from the group consisting of a number of integers,the size of the partition is indicated and,representing the number of pixels contained in an image block;represent the firstIn the image blockThe first pixel point on the variation pathAbnormal change degree of each pixel point;represent the firstIn the image blockThe first pixel point on the variation pathAbnormal change degree of each pixel point;represent the firstIn the image blockThe number of pixels included in the variation path of each pixel;represent the firstIn the image blockOn the change path of each pixel pointVariance of abnormal variation degree of all pixel points;reflect the firstIn the image blockThe difference in the changing conditions of adjacent pixels on the changing paths of the individual pixels,reflect the firstIn the image blockThe complexity of the change of all the pixel points on the change path of each pixel point is as followsIn the image blockWhen the abnormal change degree of the pixel points on the change paths of the pixel points is more consistent, the change of the pixel points caused by the texture on the water pump impeller is more likely to occur due to the distribution rule of the texture on the water pump impeller, and the first timeIn the image blockThe less the pixel points on the variation path of the pixel points are affected by dirt, whenIn the image blockWhen the difference of abnormal change degree of the pixel points on the change path of each pixel point is larger, the dirt shape is dividedThe irregular cloth is more likely to be the change of the pixel points caused by dirt, at the momentIn the image blockThe greater the likelihood that a pixel is affected by dirt on the path of change of the individual pixels.
Thus, the dirt degree of each pixel point is obtained.
S004, acquiring a dirty degree image according to the dirty degree of each pixel point, and acquiring a dirty region according to the dirty degree image.
And mapping the dirt degree of each pixel point in the gray level image into the range of [0,255] to form a new image serving as a dirt degree image.
And clustering the dirt degree images by using a K-means clustering algorithm, and classifying the dirt degree images into two categories, wherein the category with larger gray average value is the dirt region. The implementation personnel can also select other clustering algorithms according to the actual implementation situation.
Through the steps, the detection of the dirt on the surface of the water pump impeller is completed.
The embodiment of the invention also provides a water pump impeller appearance defect detection system based on image processing, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes any one step of the water pump impeller appearance defect detection method based on image processing when executing the computer program.
According to the embodiment of the invention, the gray level image is segmented according to the centroid of the water pump impeller connected domain, so that the image blocks which are centrosymmetric to each other in the segmented image blocks contain the same water pump impeller characteristics, the dirt defect is identified according to the difference between the image blocks containing the same water pump impeller characteristics, and the accuracy of the dirt defect identification is improved. According to the invention, the abnormal degree of each pixel point is obtained according to the image blocks symmetrical to the image blocks and the dirt possibility of the neighborhood image blocks, the interference of the impeller structures in different image blocks is eliminated, and the obtained abnormal degree is more accurate. According to the method, the abnormal change degree of the pixel points is obtained according to the gradient direction and the abnormal degree of the pixel points, the dirt degree of the pixel points is obtained according to the abnormal change degree of all the pixel points on the change path of the pixel points, the dirt defect is identified according to the dirt degree image, and the condition that dirt areas cannot be identified due to the fact that fewer dirt areas possibly exist in an image block is avoided. The invention can identify the dirty area in the image of the water pump impeller more accurately.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.

Claims (5)

1. The method for detecting the appearance defect of the water pump impeller based on the image processing is characterized by comprising the following steps of:
acquiring a water pump impeller image, preprocessing the water pump impeller image, and acquiring a water pump impeller communication domain and a gray level image; dividing the gray image into a plurality of image blocks according to the mass center of the water pump impeller connected domain;
for each image block, acquiring the dirt possibility of the image block according to the gray level distribution in the image block; acquiring the abnormal degree of each pixel point according to the image blocks with symmetrical image blocks and the dirt possibility of the neighborhood image blocks;
acquiring the abnormal change degree of the pixel point according to the gradient direction and the abnormal degree of the pixel point; acquiring the dirt degree of the pixel points according to the abnormal change degree of all the pixel points on the change path of the pixel points; acquiring a dirty degree image according to the dirty degree of each pixel point, and acquiring a dirty region according to the dirty degree image;
the method for acquiring the dirt possibility of the image block according to the gray level distribution in the image block comprises the following specific steps:
wherein,representing the +.>The contamination possibility of the individual image blocks, < >>Get pass [1, ]>]Is>Representing the number of all image blocks; />Indicate->Gray variance of each image block; />Indicate->Gradient mean values of the individual image blocks; />Indicate->Gray average value of each image block;
the method for acquiring the abnormal degree of each pixel point according to the image blocks symmetrical to the image blocks and the dirt possibility of the neighborhood image blocks comprises the following specific steps:
taking the mass center of a communicating region of the water pump impeller as a symmetry center, and taking any two image blocks which are in central symmetry as corresponding image blocks;
wherein,representing the +.>Degree of abnormality of individual image blocks, +.>Get pass [1, ]>]Is>Representing the number of all image blocks; />Indicate->The likelihood of smudging of individual image blocks; />Indicate->The dirt possibility of the image block corresponding to the image block; />Indicate->The contamination potential of the image block and +.>First->A ratio of the likelihood of smudging of the individual image blocks; />Indicate->The contamination potential of the image block corresponding to the image block is equal to +.>The +.>A ratio of the likelihood of smudging of the individual image blocks; />Representing the neighborhood size;
taking the abnormality degree of each image block as the abnormality degree of each pixel point in the image block;
the method for acquiring the abnormal change degree of the pixel point according to the gradient direction and the abnormal degree of the pixel point comprises the following specific steps:
for each pixel point, acquiring the variance of the included angle between the pixel point and the gradient direction of all the pixel points in the neighborhood of the pixel point as the change weight of the pixel point; taking the product of the change weight and the abnormality degree of the pixel points as the abnormality change degree of the pixel points;
the method for acquiring the change path of the pixel point comprises the following steps:
for each pixel point, acquiring one pixel point which is farthest from the pixel point in the gradient direction of the pixel point in a neighborhood image block of an image block to which the pixel point belongs, wherein the pixel point is used as a reference pixel point of the pixel point, and a connecting line from the pixel point to the reference pixel point is used as a change path of the pixel point;
the method for obtaining the dirt degree of the pixel points according to the abnormal change degree of all the pixel points on the change path of the pixel points comprises the following specific steps:
wherein,indicate->The>The dirt degree of each pixel point; />Indicate->The>The +.>Abnormal change degree of each pixel point; />Indicate->The>The +.>Abnormal change degree of each pixel point; />Indicate->The>The number of pixels included in the variation path of each pixel; />Indicate->The>Variance of abnormal variation degree of all pixels on variation paths of the pixels.
2. The method for detecting the appearance defect of the water pump impeller based on the image processing according to claim 1, wherein the steps of obtaining a dirty level image according to the dirty level of each pixel point and obtaining a dirty area according to the dirty level image comprise the following specific steps:
mapping the dirt degree of each pixel point in the gray level image into the range of [0,255] to form a new image as a dirt degree image; clustering the dirt level images, gathering the dirt level images into two types, and taking the type with larger gray level average value in the dirt level images as a dirt area.
3. The method for detecting the appearance defect of the water pump impeller based on the image processing according to claim 1, wherein the method for dividing the gray image into a plurality of image blocks according to the centroid of the water pump impeller connected domain comprises the following specific steps:
construction by taking centroid of connected domain of water pump impeller in gray scale image as centerImage blocks with the size are respectively constructed in eight neighborhood directions of the center blocks by taking the image blocks as the center blocks>Taking each newly constructed image block as a central block, and continuously constructing ++in eight neighborhood directions of each central block respectively>Image blocks of size, and so on, and stopping iteration until the gray image is completely divided into a plurality of image blocks which do not overlap each other, wherein +.>Is a preset block size.
4. The method for detecting the appearance defect of the water pump impeller based on the image processing according to claim 1, wherein the preprocessing of the water pump impeller image to obtain the water pump impeller connected domain and the gray level image comprises the following specific steps:
acquiring a water pump impeller connected domain in the water pump impeller image by utilizing a semantic segmentation network, and multiplying the water pump impeller connected domain by the water pump impeller image as a mask to obtain the water pump impeller image with the background removed; and graying the water pump impeller image after the background is removed by using a graying algorithm to obtain a gray image.
5. A water pump impeller appearance defect detection system based on image processing, comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1-4 when executing the computer program.
CN202311765177.6A 2023-12-21 2023-12-21 Water pump impeller appearance defect detection method and system based on image processing Active CN117437232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311765177.6A CN117437232B (en) 2023-12-21 2023-12-21 Water pump impeller appearance defect detection method and system based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311765177.6A CN117437232B (en) 2023-12-21 2023-12-21 Water pump impeller appearance defect detection method and system based on image processing

Publications (2)

Publication Number Publication Date
CN117437232A CN117437232A (en) 2024-01-23
CN117437232B true CN117437232B (en) 2024-03-26

Family

ID=89550174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311765177.6A Active CN117437232B (en) 2023-12-21 2023-12-21 Water pump impeller appearance defect detection method and system based on image processing

Country Status (1)

Country Link
CN (1) CN117437232B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114519714A (en) * 2022-04-20 2022-05-20 中导光电设备股份有限公司 Method and system for judging smudgy defect of display screen
CN115082744A (en) * 2022-08-22 2022-09-20 启东市罗源光伏设备有限公司 Solar energy heat collection efficiency analysis method and system based on artificial intelligence
CN115131354A (en) * 2022-08-31 2022-09-30 江苏森信达生物科技有限公司 Laboratory plastic film defect detection method based on optical means
CN116152231A (en) * 2023-04-17 2023-05-23 卡松科技股份有限公司 Method for detecting impurities in lubricating oil based on image processing
CN116664557A (en) * 2023-07-28 2023-08-29 无锡市明通动力工业有限公司 Visual detection method for surface defects of fan blade
CN116758071A (en) * 2023-08-17 2023-09-15 青岛冠宝林活性炭有限公司 Intelligent detection method for carbon electrode dirt under visual assistance

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8818099B2 (en) * 2012-09-08 2014-08-26 Konica Minolta Laboratory U.S.A., Inc. Document image binarization and segmentation using image phase congruency

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114519714A (en) * 2022-04-20 2022-05-20 中导光电设备股份有限公司 Method and system for judging smudgy defect of display screen
CN115082744A (en) * 2022-08-22 2022-09-20 启东市罗源光伏设备有限公司 Solar energy heat collection efficiency analysis method and system based on artificial intelligence
CN115131354A (en) * 2022-08-31 2022-09-30 江苏森信达生物科技有限公司 Laboratory plastic film defect detection method based on optical means
CN116152231A (en) * 2023-04-17 2023-05-23 卡松科技股份有限公司 Method for detecting impurities in lubricating oil based on image processing
CN116664557A (en) * 2023-07-28 2023-08-29 无锡市明通动力工业有限公司 Visual detection method for surface defects of fan blade
CN116758071A (en) * 2023-08-17 2023-09-15 青岛冠宝林活性炭有限公司 Intelligent detection method for carbon electrode dirt under visual assistance

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Duck egg surface defect detection based on improved GoogLeNet.;《Food & Machinery》;20220326(第6期);162-167 *
基于图像处理的受电弓结构异常检测算法研究;王贵东;《电气化铁道》;20201231;第31卷(第6期);84-88 *
基于机器视觉的禽蛋脏污及裂纹检测系统设计;辛永信;黄泳波;;机电信息;20200115(第02期);112-114 *

Also Published As

Publication number Publication date
CN117437232A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN110543837B (en) Visible light airport airplane detection method based on potential target point
CN113160192B (en) Visual sense-based snow pressing vehicle appearance defect detection method and device under complex background
CN113592845A (en) Defect detection method and device for battery coating and storage medium
CN109522908A (en) Image significance detection method based on area label fusion
Tan et al. Segmentation and counting algorithm for touching hybrid rice grains
US20060204953A1 (en) Method and apparatus for automated analysis of biological specimen
Huang et al. Nucleus segmentation of cervical cytology images based on multi-scale fuzzy clustering algorithm
CN113077392B (en) High-accuracy automatic reading method for fuzzy photo of pointer table
CN108052886A (en) A kind of puccinia striiformis uredospore programming count method of counting
CN107301649B (en) Regional merged SAR image coastline detection algorithm based on superpixels
Cheng et al. Urban road extraction via graph cuts based probability propagation
CN109359653B (en) Cotton leaf adhesion lesion image segmentation method and system
CN110458096A (en) A kind of extensive commodity recognition method based on deep learning
Xing et al. A novel digital analysis method for measuring and identifying of wool and cashmere fibers
CN112069985A (en) High-resolution field image rice ear detection and counting method based on deep learning
CN110751172A (en) Weakly supervised learning pathology full-image category inference method and system
CN113837037A (en) Plant species identification method and system, electronic equipment and storage medium
CN114972339A (en) Data enhancement system for bulldozer structural member production abnormity detection
CN115908774A (en) Quality detection method and device of deformed material based on machine vision
CN114565824A (en) Single-stage rotating ship detection method based on full convolution network
CN117437232B (en) Water pump impeller appearance defect detection method and system based on image processing
Zeng et al. Algorithm based on marker-controlled watershed transform for overlapping plant fruit segmentation
Bode et al. Bounded: Neural boundary and edge detection in 3d point clouds via local neighborhood statistics
Chu et al. Subimage cosegmentation in a single white blood cell image
CN109191452B (en) Peritoneal transfer automatic marking method for abdominal cavity CT image based on active learning

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