An Image Enhancement Method for the Quality Detection of Self-priming Pump Impellers
Through image chunking and CLAHE optimization methods, the degree of cavitation is evaluated and the grayscale value mapping is optimized, which solves the accuracy of cavitation defect detection on the surface of the self-priming pump impeller, and achieves more efficient impeller quality detection.
Patent Information
- Application Number
- CN202510336451.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The prior art is difficult to accurately detect cavitation defects on the surface of the impeller of the self-priming pump, which affects the performance and service life of the pump.
Through image enhancement methods, including image blocking, cavitation degree evaluation, CLAHE equalization process optimization and grayscale value mapping optimization, highlighting the characteristics of cavitation defects, eliminating the influence of metal reflection, and improving detection accuracy.
It effectively enhances the cavitation defect characteristics in the surface image of the self-priming pump impeller, and improves the accuracy and reliability of impeller quality detection.
Smart Images

Figure CN119863372B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quality inspection of self-priming pump impellers, and particularly to an image enhancement method for quality inspection of self-priming pump impellers. Background Art
[0002] As the core component of a self-priming pump, the self-priming pump impeller is responsible for sucking in and pushing the liquid to flow. The quality of the impeller directly affects the efficiency, stability, and service life of the pump. The surface of the impeller may be damaged due to long-term use, overload, liquid impact, or cavitation. Among them, cavitation defects are particularly serious, which may cause tiny holes or corrosion on the impeller surface, thus affecting the performance of the pump. Therefore, accurately detecting the defects on the impeller surface (especially cavitation defects) is crucial for ensuring the safe operation of the pump. Summary of the Invention
[0003] The purpose of the present invention is to solve the above problems and design an image enhancement method for quality inspection of self-priming pump impellers.
[0004] The technical solution of the present invention to achieve the above purpose is an image enhancement method for quality inspection of self-priming pump impellers, including:
[0005] Step S1: Collect the surface detection image of the self-priming pump impeller and perform image segmentation on the surface detection image of the self-priming pump impeller;
[0006] Step S2: Optimize the CLAHE equalization process through the cavitation degree of the pixel points in the image to obtain the gray value mapping result of the CLAHE process;
[0007] Obtain the cavitation degree of the pixel points through the local texture information of the pixel points;
[0008] Evaluate the cavitation intensity corresponding to each gray value according to the cavitation degree of the pixel points;
[0009] After obtaining the cavitation intensity of the gray histogram in the sub-block, further optimize the gray value cumulative distribution function of the sub-block according to the cavitation intensity corresponding to the gray value, so as to optimize the gray value mapping and obtain the gray value mapping result of the CLAHE process;
[0010] Step S3: Perform gray value change on the surface detection image of the self-priming pump impeller through the gray value mapping result of the CLAHE process to complete image enhancement.
[0011] Further, in the step S1: A high-definition industrial camera collects the surface image of the self-priming pump impeller, converts the collected image into a gray image, and crops the surface image of the self-priming pump impeller into the same size. After collecting the surface detection image of the self-priming pump impeller, it is necessary to perform image segmentation on the surface detection image of the self-priming pump impeller.
[0012] Further, in step S2: By evaluating the cavitation degree of the pixel points in the detection image (grayscale image) of the self-priming pump impeller surface, and evaluating the cavitation degree of the pixel points in the image according to the local texture information of the pixel points in the image. After obtaining the cavitation degree of the pixel points in the image, the evaluation process of the grayscale histogram of each image sub-block can be optimized through the cavitation degree of the pixel points;
[0013] In the process of counting the grayscale histogram, evaluate the cavitation intensity corresponding to each grayscale value according to the cavitation degree of the pixel points. This cavitation intensity is the degree of cavitation defect pixel points existing in the pixel points corresponding to this grayscale value. The higher the cavitation intensity, the more necessary it is to evaluate the mapping result of the grayscale value according to the cavitation intensity of each grayscale value in the evaluation of the grayscale value mapping, so as to ensure that the local pixel value difference relationship of the defect pixel points in the image will not be eliminated during the histogram equalization process of limiting the contrast. After obtaining the cavitation intensity of the grayscale histogram in the sub-block, further optimize the cumulative distribution function of the grayscale value of the sub-block according to the cavitation intensity corresponding to the grayscale value, so as to optimize the grayscale value mapping and obtain the grayscale value mapping result of the CLAHE process.
[0014] Further, obtain the cavitation degree of the pixel points through the local texture information of the pixel points; after obtaining the image sub-block of the detection image of the self-priming pump impeller surface, first evaluate the cavitation degree of each pixel point in the image. Because when cavitation defects appear on the surface of the self-priming pump impeller, they will appear as irregular small pits in the image, so the cavitation degree of the central pixel point is evaluated through the 24-neighborhood of the set pixel points (that is, the local 5*5 window of each pixel point) in the image. For the cavitation degree of the th pixel point in the image:
[0015]
[0016] Explanation of formula symbols:
[0017] : Represents the grayscale value of the th pixel point in the local window of the th pixel point in the image.
[0018] : Represents the grayscale value of the adjacent pixel point on the right side of the th pixel point in the local window of the th pixel point in the image in the axis direction.
[0019] : Represents the th pixel point in the local window of the The grayscale value of the adjacent pixel point of a pixel point in the upper side direction of the axis.
[0020] : Represents the th pixel point in the image, indicating the number of pixel points in the local window of the
[0021] : Represents the th pixel point in the image, and the th pixel point in its local window indicates the gradient direction.
[0022] : Represents the th pixel point in the image, and the th pixel point in its local window indicates the frequency of occurrence of the gradient direction of this pixel point among all the gradient directions of the pixel points in the window.
[0023] : Represents the linear normalization function.
[0024] Furthermore, the cavitation intensity corresponding to each grayscale value in the sub-block is obtained through the cavitation degree of all pixel points in the sub-block;
[0025] After obtaining the cavitation degree of each pixel point in the image, the overall cavitation intensity of all pixel points corresponding to each grayscale value can be evaluated according to the cavitation degree of the pixel points in the image sub-block. In the image sub-block, when the overall cavitation degree of the pixel points corresponding to a grayscale value is higher, the cavitation intensity of this grayscale value is also higher. Thus, in the subsequent grayscale value mapping process, the grayscale value mapping process can be optimized through the cavitation intensity of the grayscale value, and the difference relationship between the grayscale values with higher cavitation intensity can be retained. Regarding the cavitation intensity of the th grayscale value in the image
[0026]
[0027] Explanation of formula symbols:
[0028] : Represents the number of pixel points corresponding to the th grayscale value in the image sub-block.
[0029] Furthermore, the cumulative distribution function of grayscale values is optimized through the cavitation intensity of pixel values in the sub-block, and the optimized grayscale value mapping result is obtained according to the optimized cumulative distribution function;
[0030] After obtaining the cavitation intensity of each gray value in the image sub-block, the mapping optimization factor corresponding to the gray value can be obtained through the cavitation intensity relationship between the gray values, so that the original gray value is optimized in the gray value mapping evaluation process through the cumulative distribution function through the gray value mapping optimization factor. In the mapping evaluation process, the difference between gray values with higher cavitation intensity is retained, that is, it is avoided to map several gray values with higher cavitation intensity to gray values with smaller differences. Gray value mapping optimization factor :
[0031]
[0032] In the above formula, the cavitation intensity of the gray value is of Normalization is used to evaluate the mapping optimization factor. In the process of grayscale value mapping, because the relative relationship between pixels needs to be retained, the mapping optimization factor needs to be evaluated through the difference information of all grayscale values, so as to ensure that the difference between grayscale values with large differences is retained in the subsequent grayscale value mapping process. And because the pixel value difference between grayscale values with higher cavitation intensity needs to be retained in the process of regulating the cumulative distribution function by the mapping optimization factor, the mapping optimization factor between grayscale values with higher cavitation intensity and grayscale values with lower cavitation intensity needs to be enhanced to highlight the difference between grayscale values with higher cavitation intensity and the surrounding pixels. The above formula is obtained by Normalization is used to enhance the difference between the mapping optimization factors between the grayscale values with higher cavitation intensity and the grayscale values with lower cavitation intensity, thereby ensuring that the optimized grayscale value mapping can accurately reflect the local grayscale value difference information of the cavitation defect pixels in the image.
[0033] After obtaining the mapping optimization factor of the gray value, the mapping optimization factor can be used to evaluate in the mapping evaluation process to obtain the first The gray value is mapped to the target gray value :
[0034]
[0035] Formula explanation:
[0036] :Indicates the first The mapping optimization factor of gray values;
[0037] : No. The cumulative distribution function value corresponding to the gray value;
[0038] : Represents the minimum value of the number of pixel points corresponding to the gray values in the image sub-block, that is, the minimum value of the cumulative distribution function.
[0039] : Respectively represent the length and width of the image sub-block, with the unit being the number of pixel points for each of the length and width. In the present invention, it is set that ;
[0040] : Represents the number of gray values in the image sub-block;
[0041] In the above formula, through the mapping optimization factor of the th gray value, the gray value mapping evaluation process of CLAHE is optimized. The higher the mapping optimization factor, the closer the mapping target gray value of the th gray value is to the difference from other gray values with higher cavitation intensity;
[0042] In the above formula, through as the weight of the cumulative distribution function of the th gray value, so that when the value of is higher, the mapping effect corresponding to the th gray value changes more significantly, thereby retaining the differences between pixel points during the mapping process.
[0043] Furthermore, after obtaining the gray value mapping result of the CLAHE process, the pixel values of each pixel point in each image sub-block can be adjusted according to the gray value mapping result, thereby completing the image sub-block equalization process. After obtaining the mapping of the pixel values of the pixel points in each sub-block of the self-priming pump impeller surface detection image, the entire image sub-blocks can be integrated through bilinear interpolation to obtain the final image enhancement processing result.
[0044] An image enhancement method for self-priming pump impeller quality detection made by using the technical solution of the present invention enhances the image of the self-priming pump impeller surface to eliminate the influence of metal reflection and highlight the image features of cavitation defects, thereby improving the accuracy of impeller quality detection. This method mainly optimizes the traditional CLAHE image enhancement technology through the following steps:
[0045] Cavitation degree evaluation: By calculating the local gradient and texture features of each pixel point in the image, the cavitation defect degree of the pixel point is evaluated. The cavitation area usually shows subtle changes in texture. Therefore, this method accurately evaluates the cavitation degree of each pixel point through local texture analysis and gradient information of the image.
[0046] Optimizing the Cumulative Distribution Function (CDF): The traditional CLAHE method equalizes the image through the grayscale histogram. In this technical solution, the cumulative distribution function (CDF) is weighted and adjusted based on the evaluation result of the cavitation degree, so that during the grayscale mapping process in the cavitation defect area, the cavitation characteristics can be better retained, and the cavitation pixel points can be prevented from being over-smoothed or eliminated.
[0047] Enhancing image contrast and highlighting cavitation defects: By mapping the grayscale values of the image through the optimized CDF, the change in grayscale values in the cavitation defect area becomes more significant in the enhanced image, thereby improving the visibility of the defects. At the same time, by controlling the mapping intensity of the cavitation defect area, the influence of metal surface reflection can be avoided to a certain extent, ensuring the effect of image enhancement. Description of the Drawings
[0048] Figure 1 It is a schematic diagram of an image enhancement method for the quality inspection of a self-priming pump impeller according to the present invention. Detailed Embodiment
[0049] The present invention will be specifically described below with reference to the drawings. As Figure 1 shown, an image enhancement method for the quality inspection of a self-priming pump impeller, step S1: Collect the surface inspection image of the self-priming pump impeller and perform image segmentation on the surface inspection image of the self-priming pump impeller.
[0050] The surface image of the self-priming pump impeller is collected by a high-definition industrial camera, and the collected image is converted into a grayscale image and the surface image of the self-priming pump impeller is cropped to the same size. In this application, the image size is cropped to 1024*1024, and the fixed size of the image can be adjusted according to the actual scenario without specific requirements. After collecting the surface inspection image of the self-priming pump impeller, it is necessary to perform image segmentation on the surface inspection image of the self-priming pump impeller, so as to enhance the image of the surface inspection image of the self-priming pump impeller through the CLAHE histogram equalization process. Regarding the image segmentation process, in the present invention, the image sub-block size is set to 32*32, and the size of the image sub-block can be adjusted according to the actual scenario, also without specific requirements.
[0051] So far, the image collection is completed and the collected image is segmented.
[0052] Step S2: Optimize the CLAHE equalization process according to the cavitation degree of the pixel points in the image to obtain the grayscale value mapping result of the CLAHE process.
[0053] General logic of the major steps:
[0054] After obtaining the sub-block division result of the self-priming pump impeller surface detection image, the gray histogram of each obtained image sub-block can be obtained, and the gray value mapping evaluation can be carried out according to the cumulative distribution function corresponding to the gray histogram, and the gray value mapping result can be obtained to complete the gray value mapping result of histogram equalization based on limited contrast, so as to map the gray value of each sub-block and integrate all sub-blocks into a complete image through bilinear interpolation, and use the obtained complete image as the enhanced image obtained by the CLAHE algorithm.
[0055] In the process of enhancing the image by the CLAHE algorithm as described above, it can eliminate the influence of the metal surface reflection in the self-priming pump impeller surface detection image. However, in the above process, when enhancing the image, all pixel points corresponding to each gray value in the original image are transformed into other gray values through gray value mapping. For the pixel points that may represent the defects on the surface of the self-priming pump impeller in the image, some difference information between pixel points will be eliminated during the gray value mapping process.
[0056] In view of the above situation, the present invention evaluates the cavitation degree of the pixel points in the self-priming pump impeller surface detection image (gray image), and evaluates the cavitation degree of the pixel points in the image according to the local texture information of the pixel points in the image. After obtaining the cavitation degree of the pixel points in the image, the gray histogram evaluation process of each image sub-block can be optimized through the cavitation degree of the pixel points. Specifically, in the statistical process of the gray histogram, the cavitation intensity corresponding to each gray value is evaluated according to the cavitation degree of the pixel points.
[0057] This cavitation intensity is the degree of the existence of cavitation defect pixel points among the pixel points corresponding to this gray value. The higher the cavitation intensity, the more necessary it is to evaluate the mapping result of the gray value according to the cavitation intensity of each gray value in the evaluation of the gray value mapping, so as to ensure that the local pixel value difference relationship of the defect pixel points in the image will not be eliminated during the histogram equalization process based on limited contrast. After obtaining the cavitation intensity of the gray histogram in the sub-block, the cumulative distribution function of the gray value of the sub-block is optimized according to the cavitation intensity corresponding to the gray value, so as to optimize the gray value mapping and obtain the gray value mapping result of the CLAHE process.
[0058] Obtain the cavitation degree of the pixel points through the local texture information of the pixel points.
[0059] Detailed logic:
[0060] After obtaining the image sub-blocks of the self-priming pump impeller surface detection image, first evaluate the cavitation degree of each pixel point in the image. Because when there are cavitation defects on the self-priming pump impeller surface, they will appear as irregular small pits in the image. Therefore, evaluate the cavitation degree of the central pixel point by setting the 24-neighborhood of the pixel point (i.e., the local window) in the image. For the cavitation degree of the th pixel point in the image:
[0061]
[0062] Explanation of formula symbols:
[0063] : Represents the gray value of the th pixel point in the local window of the th pixel point in the image.
[0064] : Represents the gray value of the adjacent pixel point in the right direction of the th pixel point in the local window of the th pixel point in the image on the axis.
[0065] : Represents the gray value of the adjacent pixel point in the upper direction of the th pixel point in the local window of the th pixel point in the image on the axis.
[0066] : Represents the number of pixel points in the local window of the th pixel point in the image.
[0067] : Represents the gradient direction of the th pixel point in the local window of the th pixel point in the image.
[0068] : Represents the frequency of the gradient direction of the th pixel point in the local window of the th pixel point in the image among all the gradient directions of the pixel points in the window.
[0069] : Represents the linear normalization function.
[0070] Formula logic:
[0071] In the above formula, the cavitation degree of a pixel in the image is evaluated through the local window of the pixel. For a pixel in the image, the higher the overall gradient intensity in its local window (the above-mentioned 24-neighborhood), the more likely it is that there is detailed information in the window. This part of the detailed information may be the cavitation defect on the surface of the self-priming pump impeller. Since the gradient intensity cannot fully characterize the possibility of a pixel being a cavitation defect, further, the cavitation degree of the pixel is further characterized by the gradient direction information of the pixels in the local window. That is, for a pixel in the image, if the gradient intensity in its local window is high and the gradient direction in the local window is more irregular, the higher the cavitation degree of the pixel. The principle here is that the cavitation defect on the surface of the self-priming pump impeller will appear as irregular small pits. Then, the gradient intensity of the edge pixels of the pits will show a relatively high level. And because of the irregularity of the pits, the gradient direction of the pixels in the local window of the cavitation defect pixels will show an irregular situation. Therefore, the cavitation degree of the pixel is characterized by the numerical information of the entropy value of the gradient direction. In the above formula The part is to evaluate the gradient intensity of the pixels in the local window The part is to evaluate the irregularity of the gradient direction of the pixels in the local window. The normalized result of the calculated value of the two multiplied is used as the cavitation degree of the pixel in the image
[0072] Obtain the cavitation intensity corresponding to each gray value in the sub-block through the cavitation degree of all pixels in the sub-block
[0073] Detailed logic:
[0074] After obtaining the cavitation degree of each pixel in the image, the overall cavitation intensity of all pixels corresponding to each gray value can be evaluated according to the cavitation degree of the pixels in the image sub-block. In the image sub-block, when the overall cavitation degree of the pixels corresponding to a gray value is higher, the cavitation intensity of that gray value is also higher. Thus, in the subsequent gray value mapping process, the gray value mapping process can be optimized through the cavitation intensity of the gray value, and the difference relationship between the gray values with higher cavitation intensity can be retained. For the cavitation intensity of the th gray value in the image :
[0075]
[0076] Explanation of formula symbols:
[0077] : Represents the number of pixels corresponding to the th gray value in the image sub-block
[0078] Formula logic:
[0079] In the above formula, the average cavitation degree of all pixel points corresponding to each gray value is used as the cavitation intensity corresponding to the gray value. For a gray value, the higher the average cavitation degree of the pixel points among the pixel points of the gray value, the higher the cavitation intensity corresponding to this gray value.
[0080] Optimize the cumulative distribution function of gray values through the cavitation intensity of pixel values in the sub-block, and obtain the optimized gray value mapping result according to the optimized cumulative distribution function.
[0081] Detailed logic:
[0082] After obtaining the cavitation intensity of each gray value in the image sub-block, the mapping optimization factor corresponding to the gray value can be obtained through the relationship of cavitation intensity between gray values, so as to optimize the gray value mapping evaluation process of the original gray value through the cumulative distribution function by the mapping optimization factor of the gray value, and retain the difference between gray values with higher cavitation intensity during the mapping evaluation process, that is, avoid mapping several gray values with higher cavitation intensity into gray values with smaller differences. For the mapping optimization factor of the th
[0083]
[0084] In the above formula, the mapping optimization factor is evaluated through the normalization of the cavitation intensity of the gray value of the gray value. During the gray value mapping process, because the relative relationship between pixel points needs to be retained, the mapping optimization factor needs to be evaluated through the difference information of all gray values, so as to ensure that the difference between gray values with larger differences is retained in the subsequent gray value mapping process. And because during the process of the mapping optimization factor regulating the cumulative distribution function, the pixel value difference between gray values with higher cavitation intensity needs to be retained, so the difference between the mapping optimization factors of gray values with higher cavitation intensity and gray values with lower cavitation intensity needs to be enhanced, so as to highlight the difference between gray values with higher cavitation intensity and their surrounding pixel points. In the above formula, it is through normalization to enhance the difference between the mapping optimization factors of gray values with higher cavitation intensity and gray values with lower cavitation intensity, so as to ensure that the optimized gray value mapping can accurately reflect the local gray value difference information of cavitation defect pixel points in the image.
[0085] After obtaining the mapping optimization factor of the gray value, it can be evaluated during the mapping evaluation process through the mapping optimization factor to obtain the mapping target gray value of the th
[0086]
[0087] Explanation of the formula:
[0088] : represents the mapping optimization factor of the th gray value in the sub-block.
[0089] : the th value of the cumulative distribution function corresponding to the gray value.
[0090] : represents the minimum value of the number of pixel points corresponding to the gray value in the image sub-block, that is, the minimum value of the cumulative distribution function.
[0091] : respectively represent the length and width of the image sub-block, with the unit being the number of pixel points for each of the length and width. In the present invention, it is set that .
[0092] : represents the number of gray values in the image sub-block.
[0093] In the above formula, through the mapping optimization factor of the th gray value, the gray value mapping evaluation process of CLAHE is optimized. The higher the mapping optimization factor, the closer the mapping target gray value of the th gray value is to the difference of other gray values with higher cavitation intensity.
[0094] Specifically, in the above formula, by being used as the weight of the cumulative distribution function of the th gray value, when the value of is higher, the mapping effect corresponding to the th gray value changes more significantly, so as to retain the difference between pixel points during the mapping process.
[0095] Summary of major steps:
[0096] So far, the CLAHE equalization process is optimized according to the cavitation degree of pixel points in the image, and the gray value mapping result of the CLAHE process is obtained.
[0097] Step S3: Perform gray value change on the surface detection image of the self-priming pump impeller through the gray value mapping result of the CLAHE process to complete image enhancement.
[0098] After obtaining the grayscale value mapping result of the CLAHE process, the pixel values of each pixel point in the image sub-block can be adjusted according to the grayscale value mapping result, thereby completing the image sub-block equalization process. After obtaining the mapping of the pixel values of each pixel point in each sub-block of the surface detection image of the self-priming pump impeller, the entire image sub-blocks can be integrated by bilinear interpolation to obtain the final image enhancement processing result.
[0099] After obtaining the image enhancement processing result, the subsequent quality inspection process of the self-priming pump impeller can be carried out through the enhanced image. This process can be detection by neural network, detection by some defect features, or manual detection. Since the title of the case is an image enhancement method, finally, only the enhanced image needs to be obtained.
[0100] The above technical solutions only reflect the preferred technical solutions of the technical solutions of the present invention. Some changes that may be made to some parts by those skilled in the art of the present technology all reflect the principles of the present invention and are within the protection scope of the present invention.
Claims
1. An image enhancement method for self-priming pump impeller quality detection, characterized in that: The following steps are involved: Step S1: collecting a surface detection image of a self-priming pump impeller, and dividing the surface detection image of the self-priming pump impeller into image blocks; Step S2: Optimizing the CLAHE equalization process by the cavitation degree of the pixel points in the image to obtain the gray value mapping result of the CLAHE process; The cavitation degree of the pixel point is obtained through the local texture information of the pixel point; The cavitation intensity corresponding to each gray value is evaluated according to the cavitation degree of the pixel point; After obtaining the cavitation intensity of the grayscale histogram in the sub-block, the grayscale value cumulative distribution function of the sub-block is optimized according to the cavitation intensity corresponding to the grayscale value, thereby optimizing the grayscale value mapping and obtaining the grayscale value mapping result of the CLAHE process; Step S3: The gray value of the self-priming pump impeller surface detection image is changed by using the gray value mapping result of the CLAHE process to complete image enhancement; The step S2 of obtaining the cavitation degree of the pixel point through the local texture information of the pixel point is as follows: after obtaining the image sub-block of the self-priming pump impeller surface detection image, firstly, the cavitation degree of each pixel point in the image is evaluated. Because when the cavitation defect occurs on the surface of the self-priming pump impeller, it will appear as irregular tiny pits in the image, so the cavitation degree of the central pixel point is evaluated by setting the 24 neighborhoods of the pixel point in the image. Cavitation degree of each pixel: ; Explanation of formula symbols: :Indicates the first The local window of the pixel The gray value of each pixel; :Indicates the first The local window of the pixel Pixels in Grayscale values of adjacent pixels on the right side of the axis; :Indicates the first The local window of the pixel Pixels in Grayscale values of adjacent pixels on the upper side of the axis; :Indicates the first The number of pixels in a local window of pixels; :Indicates the first The local window of the pixel The gradient direction of each pixel; :Indicates the first The local window of the pixel The frequency with which the gradient direction of a pixel appears in the gradient directions of all pixels in the window; : represents the linear normalization function.
2. The image enhancement method for self-priming pump impeller quality detection according to claim 1 is characterized in that: In the step S2: the cavitation degree of the pixel points in the self-priming pump impeller surface detection image is evaluated, and the cavitation degree of the pixel points in the image is evaluated according to the local texture information of the pixel points in the image. After the cavitation degree of the pixel points in the image is obtained, the grayscale histogram evaluation process of each image sub-block can be optimized according to the cavitation degree of the pixel points; In the statistical process of the grayscale histogram, the cavitation intensity corresponding to each grayscale value is evaluated according to the cavitation degree of the pixel points. This cavitation intensity is the degree of cavitation defect pixels in the pixel points corresponding to the grayscale value. The higher the cavitation intensity, the more it is necessary to evaluate the grayscale value mapping result according to the cavitation intensity of each grayscale value in the evaluation of the grayscale value mapping, so as to ensure that the local pixel value difference relationship of the defective pixels in the image will not be eliminated in the process of histogram equalization by limiting the contrast. After obtaining the cavitation intensity of the grayscale histogram in the sub-block, the grayscale value cumulative distribution function of the sub-block is optimized according to the cavitation intensity corresponding to the grayscale value, so as to optimize the grayscale value mapping and obtain the grayscale value mapping result of the CLAHE process.
3. The image enhancement method for self-priming pump impeller quality detection according to claim 1 is characterized in that: The cavitation intensity corresponding to each gray value is evaluated according to the cavitation degree of the pixel point as follows: After obtaining the cavitation degree of each pixel in the image, the overall cavitation intensity of all pixels corresponding to each gray value can be evaluated according to the cavitation degree of the pixel in the image sub-block. In the image sub-block, when the overall cavitation degree of the pixel corresponding to a gray value is higher, the cavitation intensity of the gray value is also higher. Therefore, in the subsequent gray value mapping process, the gray value mapping process is optimized by the cavitation intensity of the gray value, and the difference relationship between the gray values with higher cavitation intensity is retained. Gray value of cavitation intensity : ; Explanation of formula symbols: : represents the first The number of pixels corresponding to a gray value.
4. The image enhancement method for self-priming pump impeller quality detection according to claim 1, characterized in that: The step S2 optimizes the gray value cumulative distribution function by the cavitation intensity of the pixel value in the sub-block, and obtains the optimized gray value mapping result according to the optimized cumulative distribution function, specifically: After obtaining the cavitation intensity of each gray value in the image sub-block, the mapping optimization factor corresponding to the gray value can be obtained through the cavitation intensity relationship between the gray values, so that the original gray value is optimized in the gray value mapping evaluation process through the cumulative distribution function through the gray value mapping optimization factor. In the mapping evaluation process, the difference between the gray values with higher cavitation intensity is retained, that is, it is avoided to map several gray values with higher cavitation intensity to gray values with smaller differences. For the first gray value in the image, the gray value mapping optimization factor is used to optimize the original gray value through the cumulative distribution function. Gray value mapping optimization factor : ; In the above formula, the cavitation intensity of the gray value is of Normalization is used to evaluate the mapping optimization factor. In the process of gray value mapping, because the relative relationship between pixels needs to be retained, the mapping optimization factor needs to be evaluated through the difference information of all gray values, so as to ensure that the difference between gray values with large differences is retained in the subsequent gray value mapping process. In addition, because the difference in pixel values between gray values with higher cavitation intensity needs to be retained in the process of regulating the cumulative distribution function by the mapping optimization factor, the difference in pixel values between gray values with higher cavitation intensity needs to be enhanced. Therefore, the difference between the gray values with higher cavitation intensity and the gray values with lower cavitation intensity needs to be enhanced, so as to highlight the difference between the gray values with higher cavitation intensity and the surrounding pixels. In the above formula, Normalization is used to enhance the difference between the mapping optimization factors between the grayscale values with higher cavitation intensity and the grayscale values with lower cavitation intensity, so as to ensure that the optimized grayscale value mapping can accurately reflect the local grayscale value difference information of the cavitation defect pixel points in the image; After obtaining the mapping optimization factor of the gray value, the mapping optimization factor can be used to evaluate in the mapping evaluation process to obtain the first The mapping target gray value of gray value : ; Formula explanation: :Indicates the first The mapping optimization factor of gray values; : No. The cumulative distribution function value corresponding to the gray value; : Indicates the minimum value of the number of pixels corresponding to the gray value in the image sub-block, that is, the minimum value of the cumulative distribution function; : Respectively represent the length and width of the image sub-block, the unit is the number of pixels of the length and width respectively, set ; : Indicates the number of gray values in the image sub-block; In the above formula, through The gray value mapping optimization factor optimizes the gray value mapping evaluation process of CLAHE. The higher the mapping optimization factor, the better the gray value mapping evaluation process. The closer the mapping target gray value of a gray value is to other gray values with higher cavitation intensity; In the above formula, through As the The weight of the cumulative distribution function of the gray value, so when The higher the value of The mapping effect corresponding to each gray value changes more significantly, thereby preserving the differences between pixels during the mapping process.
5. The image enhancement method for self-priming pump impeller quality detection according to claim 1, characterized in that: After obtaining the grayscale value mapping result of the CLAHE process, the pixel value of each image sub-block can be adjusted according to the grayscale value mapping result, thereby completing the image sub-block equalization process. After obtaining the mapping of the pixel value of each sub-block of the self-priming pump impeller surface detection image, all image sub-blocks can be integrated through bilinear interpolation to obtain the final image enhancement processing result.
Citation Information
Patent Citations
Infrared image dynamic detail enhancement method
CN101980282A
Intelligent detection method for quality of welding spots on surface of integrated circuit board
CN118071748A