CN118552522B - Image-based power generation equipment part production detection method - Google Patents
Image-based power generation equipment part production detection method Download PDFInfo
- Publication number
- CN118552522B CN118552522B CN202410995541.6A CN202410995541A CN118552522B CN 118552522 B CN118552522 B CN 118552522B CN 202410995541 A CN202410995541 A CN 202410995541A CN 118552522 B CN118552522 B CN 118552522B
- Authority
- CN
- China
- Prior art keywords
- blocks
- target block
- block
- noise
- pixel point
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 29
- 238000010248 power generation Methods 0.000 title claims abstract description 29
- 238000004519 manufacturing process Methods 0.000 title claims abstract description 22
- 238000000034 method Methods 0.000 claims abstract description 63
- 230000002159 abnormal effect Effects 0.000 claims abstract description 39
- 238000012216 screening Methods 0.000 claims abstract description 8
- 238000005192 partition Methods 0.000 claims description 10
- 239000007787 solid Substances 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 5
- 230000000875 corresponding effect Effects 0.000 claims description 4
- 230000002596 correlated effect Effects 0.000 claims description 3
- 238000000638 solvent extraction Methods 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 abstract description 19
- 230000007547 defect Effects 0.000 description 15
- 238000004458 analytical method Methods 0.000 description 10
- 230000000903 blocking effect Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 238000009826 distribution Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000011156 evaluation Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000033764 rhythmic process Effects 0.000 description 3
- 230000001629 suppression Effects 0.000 description 3
- 229910000831 Steel Inorganic materials 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000010191 image analysis Methods 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 230000035772 mutation Effects 0.000 description 2
- 239000010959 steel Substances 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 238000007637 random forest analysis Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
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)
Abstract
The invention relates to the technical field of image processing, in particular to an image-based power generation equipment part production detection method, which comprises the following steps: the method comprises the steps of dividing a part image into blocks, calculating the impure chromaticity of a target block, calculating the possibility of noise according to the impure chromaticity and the gray level difference between a pixel point in the target block and a pixel point adjacent to the pixel point in the gradient direction, taking a central pixel point passing through the target block as a parallel line of the gradient change direction, taking the adjacent blocks of the target block on the parallel line as neighborhood blocks of the target block, taking the product of the possibility of noise, the similarity between the neighborhood blocks and the gray level deviation between the target block and the neighborhood block as the noise level of the target block, screening out a normal block and an abnormal block according to the size of the noise level, and updating the gray level of the abnormal block according to the gray level value of the normal block to obtain the updated part image, thereby overcoming the limitation of the traditional bilinear interpolation method and improving the detection precision and efficiency.
Description
Technical Field
The invention relates to the technical field of image processing. In particular to a method for detecting the production of parts of power generation equipment based on images.
Background
In the field of power generation equipment manufacturing, defect detection of parts in the production process is of great significance for ensuring product quality, and a traditional method is to observe whether manufacturing defects such as cracks, deformation and flaws exist on the surfaces of the parts manually, but the efficiency is low and the subjectivity is high. With the development of technology, the detection technology based on image processing analysis is widely applied to the production and detection process of parts of power generation equipment, and the technology timely identifies potential manufacturing defects such as cracks, deformations and flaws by analyzing and processing part images in the production process in real time, ensures that finished parts reach strict quality standards, can effectively monitor manufacturing quality, and provides a micro-motor friction plate defect detection system and method based on machine vision, wherein the detection system comprises the following steps: placing a part to be detected on an objective table, and collecting an image of a friction plate to be detected through a camera; and the industrial personal computer performs a series of image processing and image analysis on the collected friction plate images to be detected so as to judge whether the friction plate to be detected is incomplete.
In the process of detecting the parts of the power generation equipment by using a detection technology based on image processing analysis, in order to detect fine defects more accurately, the shot images are usually required to be amplified, and image scaling is usually performed by using a bilinear interpolation method, for example, a method for identifying and classifying surface area type defects of strip steel is disclosed in a patent application document with publication number of CN104866862A, mainly, strip steel surface pictures are extracted, bilinear difference algorithm scaling is performed, then image feature extraction is performed, and defect identification detection is completed by inputting the extracted feature data into an improved random forest classifier.
However, because the surface of the part of the power generation equipment often contains a complex curved surface structure, fine color gradual change is formed, meanwhile, sharp detail edges and potential micro defects exist, when the image is processed by using a bilinear interpolation method, the detail definition is difficult to perfectly keep, the detail of the image is often blurred, sawtooth noise is easy to generate, the visual effect of the zoomed image is seriously influenced, and the detection precision is reduced.
Disclosure of Invention
In order to solve the problems that when a part is scaled by a bilinear interpolation method, the detail of an image is unclear, sawtooth noise is easy to generate and the detection precision is low, the invention provides a method for detecting the production of the part of a power generation device based on the image, which specifically adopts the following scheme:
an image-based power generation equipment part production detection method, comprising:
preprocessing part images of power generation equipment, and partitioning, wherein the gradient direction corresponding to the pixel point with the maximum gradient value in the partition is used as the gradient change direction of the partition;
Optionally selecting a block as a target block, taking the product of gray variance, gradient mean and gradient variance of pixel points in the target block as the impure chromaticity of the target block, and calculating the noise possibility of the target block according to the impure chromaticity and the gray difference of the pixel points in the target block and the adjacent pixel points in the gradient direction of the pixel points, wherein the noise possibility is positively correlated with the impure chromaticity and the gray difference;
The central pixel point of the target block is used as a parallel line of the gradient change direction, the adjacent blocks of the target block on the parallel line are used as neighborhood blocks of the target block, the noise possibility of the target block, the similarity between the neighborhood blocks and the gray level deviation of the target block and the neighborhood blocks are used as the noise degree of the target block;
And screening out normal blocks and abnormal blocks according to the noise degree, and updating the gray values of the abnormal blocks according to the gray values of the normal blocks to obtain updated part images.
According to the technical scheme, a series of innovative image analysis and processing strategies are introduced, so that the limitation of the traditional bilinear interpolation method in processing complex part images is effectively solved, the detection precision and reliability are remarkably improved, and the method is specifically embodied in: the method comprises the steps of dividing a part image into a plurality of blocks, taking the gradient direction corresponding to the pixel point with the maximum gradient value in the blocks as a reference, and calculating the gray variance, gradient mean value and gradient variance of the pixel point in the target block to form a comprehensive index, namely, impure chromaticity, wherein the index can effectively reflect the complexity of the color and texture in the blocks, the higher the impure chromaticity is, the greater the pixel value change in the blocks is indicated, more details or noise can exist, the noise possibility of the target blocks, the similarity between the neighborhood blocks and the gray deviation of the target blocks and the neighborhood blocks are combined to evaluate the noise degree of the target blocks, the noise possibility reflects the inconsistency inside the target blocks, and the similarity and the gray deviation are inspected from the neighborhood angle.
Preferably, the noise probability of the target block satisfies the following relation:
In the method, in the process of the invention, Is the firstThe noise probability of the individual target blocks,Is the firstThe non-solid color level of each target tile,Is the firstThe first target blockThe gray value of each pixel point,Is the firstGradient direction of each pixel pointThe gray values of the adjacent pixel points,For the sequence numbers of the adjacent pixel points,For the total number of the neighboring pixel points,Is the firstTotal number of pixels of each block.
According to the technical scheme, the gradient direction and gray value difference of the pixel points are considered, the formula can adapt to different image features such as curved surfaces, gradient colors or sharp edges, and even under the condition of different illumination changes or image quality, the high noise identification precision can be maintained, the self-adaption is critical to processing diversified part images of the power generation equipment, and the robustness and the application range of the algorithm are improved.
Preferably, the pixel points adjacent to the pixel points in the gradient direction in the target block are adjacent pixel points in the gradient direction of the pixel points, wherein any pixel point in the target block is taken as a center, and the adjacent pixel points located at two sides of the pixel point along the gradient direction of the pixel point are taken as the adjacent pixel points in the gradient direction of the pixel point.
Preferably, the number of the neighborhood blocks is 2, and the neighborhood blocks are respectively located at two sides of the target block.
Preferably, the method for obtaining the gray scale deviation of the target block and the neighborhood block comprises the following steps:
Taking the pixel point positioned on the parallel line in the neighborhood block as a neighborhood pixel point of the central pixel point of the target block;
and calculating the gray scale deviation of the target block and the neighborhood block according to the following formula:
In the method, in the process of the invention, Is the firstGray scale deviations of individual target segments from neighboring segments,Is the firstThe sequence numbers of the pixels in the target blocks,Is the firstThe total number of pixels of the target block,Is the firstIntra-target partition of the targetGray scale difference between each pixel point and the next adjacent pixel point in the gradient change direction, wherein the gray scale difference is the absolute value of the gray scale difference,Is the mean value of the first order difference of the gray values of the neighborhood pixel points,Is an absolute value sign.
The technical proposal calculates the absolute value of the gray difference value between each pixel point in the target block and the adjacent pixel point in the gradient directionAnd the first-order difference average value of the gray values of the neighborhood pixel points is obtainedBy comparing, the formula can accurately quantify the gray scale deviation between the target block and the neighborhood block. The quantization method fully considers the gray distribution characteristics of the local area of the image, and is helpful for more finely evaluating the uniformity and consistency of the image.
Preferably, the method for obtaining the similarity between the neighborhood blocks comprises the following steps:
the distances from the pixel point of the maximum gradient value of the two neighborhood blocks to the pixel point of the maximum gradient value of the target block are D1 and D2 respectively;
the similarity between two said neighborhood blocks is calculated according to the following formula:
In the method, in the process of the invention, Is the firstSimilarity between two neighborhood blocks of the target blocks,、Noise probabilities for two of the neighborhood blocks, respectively.
According to the technical scheme, the spatial position factors are introduced by calculating the distance from the pixel point of the maximum gradient value of the two neighborhood blocks to the pixel point of the maximum gradient value of the target block, so that the evaluation of similarity is not limited to gray level or color information, but the relative positions of the blocks in the image are comprehensively considered, the spatial positioning is helpful for identifying specific geometric features or defects, and the region with similar noise features is helpful for screening by comparing the consistency of the noise possibility of the two neighborhood blocks, so that the abnormal region in the image is more accurately positioned and processed, and the erroneous judgment of normal texture change as noise is avoided.
Preferably, the method for screening the normal blocks and the abnormal blocks comprises the following steps: and taking the target block with the noise degree larger than the preset noise degree threshold value as an abnormal block, and taking the target block with the noise degree smaller than or equal to the preset noise degree threshold value as a normal block.
Preferably, the method for updating the gray value of the abnormal block according to the gray value of the normal block comprises the following steps:
Obtaining normalized values of noise degrees of all the blocks through normalization operation;
Taking the pixel points in the normal blocks as normal pixel points, and taking the pixel points in the abnormal blocks as abnormal pixel points;
and selecting a normal pixel point with the nearest distance from each abnormal pixel point, and taking the product of the gray value of the normal pixel point and the noise degree of the block where the abnormal pixel point is located as the updated gray value of the abnormal pixel point.
According to the technical scheme, the noise degree of the partition where the abnormal pixel point is located is multiplied by the gray value of the normal pixel point to update the gray value of the abnormal pixel point, so that the influence of noise on the overall quality of the image is reduced, the gray value of the abnormal pixel point in the image is dynamically updated, the contrast of different areas in the image can be enhanced by updating the gray value, important features (such as cracks, dents, scratches and the like) are more obvious, detection and identification are easy, and the detection precision is improved.
Preferably, the size of the block isThe size of the pixel point of each pixel,Is a preset value.
Preferably, the preprocessing includes magnifying the part image using bilinear interpolation and graying.
The invention has the following effects:
According to the invention, through innovative image blocking and feature analysis, noise is accurately identified by utilizing the non-pure-color index, and noise evaluation is optimized by combining neighborhood analysis, so that image noise is effectively distinguished and reduced, image definition and detail retention are greatly improved, the method is suitable for processing power generation equipment parts with complex structures, the limitation of the traditional bilinear interpolation method is overcome, and the detection precision and efficiency are improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a schematic flow diagram of the method of the present invention;
fig. 2 is a schematic flow chart of the method of step S2 in the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, the image-based power generation equipment part production detection method includes steps S1 to S3, specifically as follows:
S1: and preprocessing part images of the power generation equipment and performing blocking.
In order to detect the parts of the power generation equipment, an image needs to be acquired, a high-resolution industrial camera is selected in the step, the definition and detail of the captured image are ensured to be rich enough for subsequent amplifying operation and analysis, in the shooting process, lighting conditions need to be strictly controlled, uniform light is ensured, shadows and high-light areas are avoided, difficulty in image processing is reduced, and especially for the parts of the power generation equipment with complex curved surfaces and gradual changes in color, the produced parts of the power generation equipment are shot at multiple angles by using the configured high-definition industrial camera so as to cover all important areas of the parts, and comprehensive image data is ensured to be acquired.
The acquired part image is then preprocessed, including: the acquired part image of the power generation equipment is amplified by using a bilinear interpolation algorithm, the method can smoothly increase pixels, keep the continuity of the image, and then convert the amplified image into a gray image so as to simplify the image processing flow and reduce the calculation complexity.
Finally, in order to perform fine analysis on the image, the gray image is segmented according to the size of n×n pixels, the size of the segments should be adjusted according to the actual part size and the complexity of the feature details, so as to ensure that each segment can reflect the local feature of the part, and meanwhile, a sufficient resolution is maintained for performing detail analysis, and in this embodiment, the segments with the size of 9×9 pixels are considered to be more suitable for performing image detail analysis, so n=9 is set.
Through the operation, the blocking operation of the part image is completed, and the image detail can be blurred due to the bilinear interpolation method, so that measures are taken in the subsequent steps to optimize the image quality.
In image processing, the gradient direction reflects the direction of pixel brightness change, namely the direction of edges or textures in an image, and the pixel point with the largest gradient value in a block usually represents the most remarkable brightness change in the area, namely the most obvious characteristic direction, so that the direction is selected as the gradient change direction of the block, the most prominent image characteristic in the block can be effectively captured and represented, in an image area with noise or complicated details, the gradient direction can be disordered due to local disturbance, the pixel point with the largest gradient value serves as a dominant direction and can serve as an anchor point to help filter out inconsistent gradient directions caused by noise, and therefore the effect of noise suppression is achieved to a certain extent.
S2: and evaluating the noise degree of the target block.
Referring to fig. 2, specifically, S21 to S23 are included:
s21: the impure chromaticity of the target block is calculated.
The image is subjected to blocking processing, so that noise in the image, particularly edge sawtooth noise, is accurately identified and quantized by calculating characteristic parameters of each blocking, thereby improving the accuracy and efficiency of part detection, and an index for comprehensively reflecting the complexity of the blocking, which is called as impure chromaticity, is introduced, and the calculating method comprises the following steps:
Optionally, selecting a block as a target block, and taking the product of the gray variance and the gradient mean value of the pixel points in the target block and the gradient variance as the non-pure color degree of the target block.
The larger gray variance represents that the pixel values are widely distributed in the target block, which may be caused by rich image details or noise, so that the size of the gray variance can be used as an important basis for evaluating the influence of edge sawtooth noise on the target block; the gradient mean value reflects the average level of pixel gradient values in the target block, namely the average performance of edge intensity, and the high gradient mean value generally means that obvious edges or details exist in the target block, and particularly in the image scaling process, the content of the target block is easily influenced by sawtooth noise; the gradient variance further quantifies the fluctuation of the gradient values of the pixel points in the target block, and a larger gradient variance implies that the edge intensity in the target block has large variation, which may be caused by complex textures or noise in the image, especially edge sawtooth noise.
Therefore, the three are combined to obtain the impure degree of the target block, the noise distribution in the image can be primarily evaluated, the size of the impure degree directly reflects the influence degree of the edge sawtooth noise on the block, a higher impure degree means that the pixel value in the block is changed greatly, more details or potential noise exist, the block is suggested to be possibly influenced obviously by the edge sawtooth noise, the pure color area and the gradual change area can be primarily distinguished according to the influence size of the edge sawtooth noise on the block, the pure color area is usually lower in noise, and the gradual change area possibly contains more noise.
Based on the analysis, a noise processing algorithm can be designed pertinently, and stricter filtering or correction measures are adopted for target blocks which are greatly affected by noise, so that the overall image quality is optimized, and the detection accuracy and reliability are improved.
S22: and analyzing the noise possibility of the target block.
The gradation caused by noise generally changes slowly near the solid color region and changes sharply near the strong edge, whereas the gradation caused by the characteristics of the image itself shows a strong regularity and uniform trend of change, so it is necessary to further distinguish whether the gradation region in the image is caused by the characteristics of the image itself or by noise.
Analyzing the pixel points in each target block, focusing on the association of the gradient direction and the non-pure chromaticity so as to acquire clues of noise possibility, selecting the pixel point with the largest gradient value in the target block as a leading point, extracting the gradient direction of the point, indicating the main direction of the brightness change of the pixel, surrounding the leading point, calculating the gray level difference value of the pixel point adjacent to the pixel point in the gradient direction, continuously selecting the pixel point with the largest gradient value from the rest pixel points, repeating the operation, and sequentially obtaining the gray level difference value of each pixel point in the block and the adjacent pixel point in the gradient direction according to the sequence of the gradient value from large to small so as to reflect the speed of the gray level change of the pixel point in the block.
And then, comprehensively evaluating the possibility that the block is influenced by edge sawtooth noise by combining the non-pure chroma of the block and the gray change difference, wherein the non-pure chroma reflects the complexity of the block, and the gray change difference reveals the change rhythm and regularity of the pixel points in the block.
Therefore, this step calculates the noise probability of the target block according to the impure chromaticity and the gray level difference between the pixel point in the target block and the adjacent pixel point in the gradient direction, taking the i-th block as an example, the j-th pixel point in the i-th block is the pixel point with the largest gradient value in the block, and the gray level difference between each pixel point and the adjacent pixel point in the gradient direction is calculated according to the order of the gradient values from large to small, wherein the adjacent pixel point in the gradient direction is the gray level difference between the adjacent pixel point in the gradient direction and the adjacent pixel point in the gradient direction, which is 2 adjacent pixel points in the gradient direction of the pixel point, with any pixel point in the target block as the center, along the gradient direction of the pixel point, and the adjacent pixel points on both sides of the pixel point in the gradient direction are used as the adjacent pixel points in the gradient direction of the pixel point, so that the gray level difference between the gray level value of each pixel point in the target block and the adjacent pixel point in the gradient direction is calculated, and the gray level difference between the adjacent pixel points in the gradient direction is 2, and the gray level difference between the adjacent pixel points in the gradient direction can be captured in the gradient block, and the characteristic of the pixel block can be fully reflected.
The calculation formula is as follows:
In the method, in the process of the invention, Is the firstThe noise probability of the individual target blocks,Is the firstThe non-solid degree of each target tile, reflecting the complexity of the tile,Is the firstThe first target blockThe gray value of each pixel point,Is the firstGradient direction of each pixel pointThe gray values of the adjacent pixel points,For the sequence numbers of the adjacent pixel points,For the total number of the neighboring pixel points,Is the firstThe total number of pixels of a block,The value of (2) is taken as 2,By accumulating the gray level differences, the gray level change rhythm of the pixel points in the target block is quantized, and the possibility that the block is affected by edge sawtooth noise is further evaluated.
Therefore, the noise possibility is positively correlated with the impure chromaticity and the gray level difference, and the formula can effectively distinguish irregular changes caused by noise and gradual changes of inherent features of the image by analyzing the relation between the rhythm of pixel point changes and the impure chromaticity, so that the area affected by the noise is accurately positioned.
S23: determining the noise level of the target block.
The gradient regions in the image generally exhibit a uniform gradient correlation throughout the region, i.e. the gray level variation of the pixel points exhibits a regular trend, in contrast to the lack of uniformity of the blocks affected by edge aliasing noise, the gray level variation is irregular, especially when approaching a solid color region, and varies more slightly near the color edge.
Firstly, identifying all blocks in an image, and then taking the blocks as centers to acquire neighborhood blocks, wherein the neighborhood blocks are aimed at analyzing gradient correlation of the blocks and the neighborhood, and the gradient trend of the blocks in the related neighborhood is reflected through adjacent blocks in the gradient change direction of the center blocks and pixel points in the adjacent blocks.
The central pixel point of the target block is used as a parallel line of the gradient change direction, the adjacent blocks of the target block on the parallel line are used as neighborhood blocks of the target block, and the pixel point in the neighborhood block, which is positioned on the parallel line, is used as a neighborhood pixel point of the central pixel point of the target block;
calculating the gray scale deviation of the target block and the neighborhood block:
In the method, in the process of the invention, Is the firstGray scale deviations of individual target segments from neighboring segments,Is the firstThe sequence numbers of the pixels in the target blocks,Is the firstThe total number of pixels of the target block,Is the firstIntra-target partition of the targetGray scale difference between each pixel point and the next adjacent pixel point in the gradient change direction, wherein the gray scale difference is the absolute value of the gray scale difference,Is the mean value of the first order difference of the gray values of the neighborhood pixel points,Is an absolute value sign.
In the formula (i),The method is obtained by accumulating absolute values of gray differences between each pixel point in the target block and adjacent pixel points in the gradient direction, subtracting first-order differential average values of gray values of adjacent pixel points, and finally summing, wherein the calculation process aims at quantifying the gray consistency of the target block relative to the adjacent pixel points,The larger the difference between the gray level distribution of the target block and the neighbor block, which may be caused by noise, defect or abrupt structural change, the first-order differential mean value of the gray level values of the neighbor pixels reflects the average level of the gray level change of the pixels in the neighbor block.
In the formula, the average value of the first order differences of the gray values of the neighborhood pixels is calculated first, for example, the first order differences of the gray values 25, 30, 35 are calculated as、The mean of the first order differences, e.g. 25, 30, 35, is then calculated to be equal to 5.
In the image detection of power generation equipment parts, the quantized gray level deviation is helpful for more accurately identifying and locating abnormal areas in the image, providing more accurate data for subsequent image processing and analysis, and being high in heightThe target block of values may contain potential defects such as cracks, pits or foreign objects that require further inspection by identifying high valuesThe region of values, a noise suppression algorithm can be applied targeted.
In summary, by quantifying the gray level deviation between the target block and the neighborhood block, key information is provided for the production and detection of the parts of the image-based power generation equipment, and the method is helpful for defect identification, noise suppression and optimization of the image processing flow, and is an important tool for improving the performance of the detection system.
Calculating the similarity between the neighborhood blocks:
Set the first Two neighborhood blocks of each target block areAnd,Pixel point to the first pixel point of the maximum gradient valueThe distance between the pixel points of the maximum gradient value in each target block is,Pixel point to the first pixel point of the maximum gradient valueThe distance between the pixel points of the maximum gradient value in each target block is;
Neighborhood partitioningAndThe similarity between the two is calculated according to the following formula:
In the method, in the process of the invention, Is the firstSimilarity between two neighborhood blocks of the target blocks,、Noise probabilities for two of the neighborhood blocks, respectively.
The formula is obtained by comparisonAndThe spatial proximity of a neighborhood block relative to a target block can be evaluated, which is important information for understanding the local features and structural layout of an image,AndRepresenting neighborhood blocks, respectivelyAndBy comparing these two values, the similarity of the neighborhood blocks in noise characteristics can be quantified, and blocks with a high noise likelihood may contain more saw tooth noise or other types of image noise.
The formula integrates the spatial position relation and the noise characteristics, and reflects the neighborhood blockingAndThe degree of similarity with respect to the target block in spatial location and noise characteristics, whenWhen the value of (1) is close to that of the target block, the two neighborhood blocks have higher similarity with the target block in terms of spatial position and noise characteristics, the noise region possibly existing in the image can be assisted to be identified by calculating the similarity between the neighborhood blocks, the neighborhood blocks with low similarity possibly contain abnormal noise or defects, further examination and processing are needed, the similarity between the neighborhood blocks can be used for analyzing the continuity and consistency of the image characteristics, and the similarity between the neighborhood blocks can be used for helping to identify texture, pattern or structural mutation in the image, which is particularly important for detecting fine defects or changes on the power generation equipment parts.
In summary, by calculating the similarity between the neighborhood blocks, not only can the noise and the potential defects in the image be identified, but also the image processing flow can be optimized, the detection efficiency and the accuracy can be improved, and the method has important significance for the production detection of the parts of the power generation equipment based on the image.
Finally, taking the product of the noise probability of the target block, the similarity between the neighborhood blocks and the gray level deviation of the target block and the neighborhood blocks as the noise degree of the target block, such as the firstThe noise degree of each target block is、、Product of the three, noise probabilityReflecting the complexity and the possibility of being affected by noise inside the block, is a basic index of noise evaluation, and is similarConsidering the similarity of the neighborhood blocks with the target blocks in the spatial position and noise characteristics, the method is helpful for identifying the consistency or abnormality of local structures and gray level deviationThe difference of gray level distribution between the target block and the neighborhood block is quantized, and potential noise or structural mutation is revealed.
Through comprehensive evaluation of the three dimensions, the noise characteristics of a specific area in the image can be more comprehensively understood, and the one-sided performance possibly brought by a single index is avoided.
S3: the part image is updated based on the noise level.
The method comprises the steps of screening out normal blocks and abnormal blocks according to the noise degree, and updating the gray values of the abnormal blocks according to the gray values of the normal blocks to obtain updated part images.
The method for screening the normal blocks and the abnormal blocks comprises the following steps: the preset noise degree threshold value is 0.3, the target block with the noise degree larger than the preset noise degree threshold value is taken as an abnormal block, the target block with the noise degree smaller than or equal to the preset noise degree threshold value is taken as a normal block, the pixel points in the abnormal block are taken as abnormal pixel points, and the pixel points in the normal block are taken as normal pixel points.
The method for updating the gray value of the abnormal block according to the gray value of the normal block comprises the following steps: normalizing the noise degree of all the blocks, selecting a normal pixel point with the nearest distance from each abnormal pixel point, and taking the product of the gray value of the normal pixel point and the noise degree of the block where the abnormal pixel point is located as the updated gray value of the abnormal pixel point. For example, the firstIntra-block number of each blockThe pixel points are abnormal pixel points, the firstThe blocks are normal blocks and are distant from the firstThe most recent of the partitions, the firstFind and the first in the individual partitionsA nearest normal pixel point of each pixel point, and combining the gray value of the normal pixel point with the first gray value of the normal pixel pointThe product of the noise levels of the individual blocks as the firstIntra-block number of each blockAccording to the gray value updated by each pixel, the gray values of all abnormal pixels in the part image are updated in the mode, so that the part image with clearer details and higher quality is obtained, and the detection can be accurately carried out based on the image.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.
Claims (6)
1. An image-based power generation equipment part production detection method is characterized by comprising the following steps:
preprocessing part images of power generation equipment, and partitioning, wherein the gradient direction corresponding to the pixel point with the maximum gradient value in the partition is used as the gradient change direction of the partition; wherein the gradient direction is used for reflecting the direction of brightness change of the pixels;
Optionally selecting a block as a target block, taking the product of gray variance, gradient mean and gradient variance of pixel points in the target block as the impure chromaticity of the target block, and calculating the noise possibility of the target block according to the impure chromaticity and the gray difference of the pixel points in the target block and the adjacent pixel points in the gradient direction of the pixel points, wherein the noise possibility is positively correlated with the impure chromaticity and the gray difference; the non-solid color degree is used for reflecting the influence degree of the edge sawtooth noise on the block;
The noise probability of the target block satisfies the following relation:
In the method, in the process of the invention, Is the firstThe noise probability of the individual target blocks,Is the firstThe non-solid color level of each target tile,Is the firstThe first target blockThe gray value of each pixel point,Is the firstGradient direction of each pixel pointThe gray values of the adjacent pixel points,For the sequence numbers of the adjacent pixel points,For the total number of the neighboring pixel points,Is the firstThe sequence numbers of the pixels in the target blocks,Is the firstThe total number of pixel points of each target block;
The central pixel point of the target block is used as a parallel line of the gradient change direction, the adjacent blocks of the target block on the parallel line are used as neighborhood blocks of the target block, the noise possibility of the target block, the similarity between the neighborhood blocks and the gray level deviation of the target block and the neighborhood blocks are used as the noise degree of the target block;
The method for obtaining the similarity between the neighborhood blocks comprises the following steps:
the distances from the pixel point of the maximum gradient value of the two neighborhood blocks to the pixel point of the maximum gradient value of the target block are respectively And; The similarity between two said neighborhood blocks is calculated according to the following formula:
In the method, in the process of the invention, Is the firstSimilarity between two neighborhood blocks of the target blocks,、Noise likelihood of two of the neighborhood blocks, respectively;
The method for acquiring the gray scale deviation of the target block and the neighborhood block comprises the following steps:
Taking the pixel point positioned on the parallel line in the neighborhood block as a neighborhood pixel point of the central pixel point of the target block;
and calculating the gray scale deviation of the target block and the neighborhood block according to the following formula:
In the method, in the process of the invention, Is the firstGray scale deviations of individual target segments from neighboring segments,Is the firstThe sequence numbers of the pixels in the target blocks,Is the firstThe total number of pixels of the target block,Is the firstIntra-target partition of the targetGray scale difference between each pixel point and the next adjacent pixel point in the gradient change direction, wherein the gray scale difference is the absolute value of the gray scale difference,Is the mean value of the first order difference of the gray values of the neighborhood pixel points,Is an absolute value symbol;
Screening out normal blocks and abnormal blocks according to the noise degree, and updating the gray values of the abnormal blocks according to the gray values of the normal blocks to obtain updated part images;
The updating method comprises the following steps:
Obtaining normalized values of noise degrees of all the blocks through normalization operation; taking the pixel points in the normal blocks as normal pixel points, and taking the pixel points in the abnormal blocks as abnormal pixel points; and selecting a normal pixel point with the nearest distance from each abnormal pixel point, and taking the product of the gray value of the normal pixel point and the noise degree of the block where the abnormal pixel point is located as the updated gray value of the abnormal pixel point.
2. The image-based power generation equipment part production detection method according to claim 1, wherein the pixel points in the target block adjacent to the pixel points in the gradient direction are adjacent pixel points in the gradient direction of the pixel points, wherein adjacent pixel points located on both sides of the pixel points in the gradient direction of the pixel points are taken as the center of any pixel point in the target block.
3. The method for detecting the production of parts of power generation equipment based on images according to claim 1, wherein the number of the neighborhood blocks is 2, and the neighborhood blocks are respectively located at two sides of the target block.
4. The method for detecting the production of parts of image-based power generation equipment according to claim 1, wherein the method for screening out normal blocks and abnormal blocks is as follows: and taking the target block with the noise degree larger than the preset noise degree threshold value as an abnormal block, and taking the target block with the noise degree smaller than or equal to the preset noise degree threshold value as a normal block.
5. The method for detecting the production of parts of an image-based power generation apparatus according to claim 4, wherein the size of the block isThe size of the pixel point of each pixel,Is a preset value.
6. The method for detecting the production of parts of an image-based power generating apparatus according to claim 4, wherein, the preprocessing includes amplifying the part image using bilinear interpolation and graying.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410995541.6A CN118552522B (en) | 2024-07-24 | 2024-07-24 | Image-based power generation equipment part production detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410995541.6A CN118552522B (en) | 2024-07-24 | 2024-07-24 | Image-based power generation equipment part production detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118552522A CN118552522A (en) | 2024-08-27 |
CN118552522B true CN118552522B (en) | 2024-09-27 |
Family
ID=92450146
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410995541.6A Active CN118552522B (en) | 2024-07-24 | 2024-07-24 | Image-based power generation equipment part production detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118552522B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115222741A (en) * | 2022-09-20 | 2022-10-21 | 江苏昱恒电气有限公司 | Cable surface defect detection method |
CN116612112A (en) * | 2023-07-17 | 2023-08-18 | 鑫脉(山东)工贸有限公司 | Visual inspection method for surface defects of bucket |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8605970B2 (en) * | 2008-12-25 | 2013-12-10 | Medic Vision-Imaging Solutions Ltd. | Denoising medical images |
CN117197140B (en) * | 2023-11-07 | 2024-02-20 | 东莞市恒兴隆实业有限公司 | Irregular metal buckle forming detection method based on machine vision |
CN117437226A (en) * | 2023-12-20 | 2024-01-23 | 深圳市同悦鑫科技有限公司 | Automatic on-line vision detection system for semiconductor processing quality |
-
2024
- 2024-07-24 CN CN202410995541.6A patent/CN118552522B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115222741A (en) * | 2022-09-20 | 2022-10-21 | 江苏昱恒电气有限公司 | Cable surface defect detection method |
CN116612112A (en) * | 2023-07-17 | 2023-08-18 | 鑫脉(山东)工贸有限公司 | Visual inspection method for surface defects of bucket |
Also Published As
Publication number | Publication date |
---|---|
CN118552522A (en) | 2024-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116758061B (en) | Casting surface defect detection method based on computer vision | |
CN116309537B (en) | Defect detection method for oil stain on surface of tab die | |
CN115345885A (en) | Method for detecting appearance quality of metal fitness equipment | |
Xu et al. | Application of Shearlet transform to classification of surface defects for metals | |
CN110161035B (en) | Structural surface crack detection method based on image feature and Bayesian data fusion | |
CN115082418A (en) | Precise identification method for automobile parts | |
CN116645367B (en) | Steel plate cutting quality detection method for high-end manufacturing | |
CN117315289B (en) | Aeroengine blade contour edge detection method based on image processing | |
CN116402810B (en) | Image processing-based lubricating oil anti-abrasive particle quality detection method | |
CN113628189A (en) | Rapid strip steel scratch defect detection method based on image recognition | |
CN116071363B (en) | Automatic change shaped steel intelligent production monitoring system | |
CN115690387A (en) | Alloy surface detection system based on image recognition | |
CN118037722B (en) | Copper pipe production defect detection method and system | |
CN115526889B (en) | Nondestructive testing method of boiler pressure pipeline based on image processing | |
CN113155839A (en) | Steel plate outer surface defect online detection method based on machine vision | |
CN117036259A (en) | Metal plate surface defect detection method based on deep learning | |
CN118552522B (en) | Image-based power generation equipment part production detection method | |
CN116740053B (en) | Management system of intelligent forging processing production line | |
CN117392043A (en) | Steel plate surface defect video detection method and system based on deep learning | |
CN116309493A (en) | Method and system for detecting defects of textile products | |
JP2004125629A (en) | Defect detection apparatus | |
CN116777921B (en) | Glass quality detection method for instrument dial | |
CN118470015B (en) | Visual detection method and system for production quality of titanium alloy rod | |
CN118379282B (en) | Titanium plate polished surface smoothness detection method based on image processing | |
CN118657778B (en) | Method and system for monitoring fault data of automatic production of metal panel |
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 |