Water pump impeller quality detection method based on image processing
Through image processing technology, the fluctuation trend and connected domain difference matrix are constructed to evaluate the uniformity of the anti-corrosion coating on the surface of the water pump impeller, which solves the problem of inaccurate detection in the existing technology and improves the accuracy of quality assessment.
Patent Information
- Application Number
- CN202410719794.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-06-05
AI Technical Summary
It is difficult to accurately detect the uniformity of the anti-corrosion coating on the surface of the water pump impeller with existing technology, which leads to uneven wear and affects the service life and quality evaluation of the impeller.
Using an image processing-based method, by acquiring impeller grayscale images under different illumination angles, a fluctuation trend difference matrix and a connected domain difference matrix are constructed, the uniformity coefficient and dispersion index are calculated, and the uniformity and quality of the coating are evaluated.
It improves the accuracy of detecting the uniformity of anti-corrosion coating on the surface of water pump impeller, reduces errors caused by changes in illumination angle, and ensures the accuracy of quality assessment.
Smart Images

Figure CN118297948B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing, and in particular to a method for detecting the quality of a water pump impeller based on image processing. Background Art
[0002] The water pump impeller is usually composed of front and rear cover plates and one or more blades. In order to reduce the wear of the water pump impeller, enhance corrosion resistance and extend the service life, an anti-corrosion coating is usually sprayed evenly on the impeller surface. The uniformity of the anti-corrosion coating spraying directly affects the quality of the water pump impeller in the blades or cover plate areas at different positions. At the same time, the uneven spraying of the anti-corrosion coating will lead to different degrees of wear at different positions under the same working time, affecting the normal use of the impeller. Therefore, it is particularly important to use an effective image processing technology to detect the uniformity of the coating on the surface of the water pump impeller.
[0003] Since the number and shape of blades on the water pump impeller are not fixed, the anti-corrosion coating presents different colors and visual effects at different angles. The influence of changes in lighting angle will lead to poor results in uniformity testing of the surface coating of the water pump impeller, affecting the normal judgment of the uniformity of the anti-corrosion coating, thereby causing inaccurate quality assessment of the water pump impeller. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a water pump impeller quality detection method based on image processing to solve the existing problems.
[0005] The water pump impeller quality detection method based on image processing of this application adopts the following technical solutions:
[0006] An embodiment of the present application provides a water pump impeller quality detection method based on image processing, the method comprising the following steps:
[0007] Get the grayscale image of the impeller under different lighting angles;
[0008] Based on the local grayscale value differences in the impeller grayscale image under different illumination angles and the overall grayscale value changes under all illumination angles, the fluctuation trend difference between any two pixels is determined, and the fluctuation trend difference matrix of any pixel is constructed by taking the fluctuation trend differences between all any two pixels in the local window of any pixel;
[0009] Based on the run length of each gray level in the gray run matrix of any two pixels at different illumination angles, determine the difference of connected domains between any two pixels at different illumination angles, and construct a connected domain difference matrix of any pixel based on the mean of the difference of connected domains at all illumination angles;
[0010] The window difference matrix of any pixel point is constructed by combining the fluctuation trend difference matrix and the connected domain difference matrix. The uniformity coefficient of any pixel point is determined based on the correlation between the row and column elements in the window difference matrix. The dispersion index of the impeller grayscale image is determined based on the uniformity coefficient.
[0011] The test results of the uniformity of the anti-corrosion coating spraying on the surface of the water pump impeller are determined based on the dispersion index to evaluate the quality of the water pump impeller.
[0012] Preferably, the process of constructing the fluctuation trend difference matrix includes:
[0013] Set a local window of preset size with any pixel as the center;
[0014] For any two pixels within the local window of any pixel, the trend sequence difference between the two pixels is determined based on the difference between the grayscale values of the two pixels under different illumination angles;
[0015] Based on the gray value difference between any two pixels at different illumination angles, determine the gray value difference between any two pixels;
[0016] Combining the trend sequence difference and grayscale change difference, determine the fluctuation trend difference between any two pixels;
[0017] The fluctuation trend differences between all two pixels in the local window of any pixel are formed into a matrix, which is recorded as the fluctuation trend difference matrix in the local window of any pixel.
[0018] Preferably, the method for determining the difference of the trend sequence includes:
[0019] The grayscale values of any pixel at different illumination angles are used to form a grayscale sequence of any pixel, and the first-order difference of the grayscale sequence is used as the difference sequence of any pixel;
[0020] Get the trend sequence of the difference sequence of any pixel point;
[0021] The distance between the trend sequences of the arbitrary two pixel points is calculated as the trend sequence difference between the arbitrary two pixel points.
[0022] Preferably, the method for determining the grayscale variation difference includes:
[0023] Calculate the absolute value and average value of the difference between the grayscale values of the two arbitrary pixels at different illumination angles; record the ratio of the absolute value of the difference to the average value as the grayscale difference between the two arbitrary pixels at different illumination angles;
[0024] The average value of the grayscale difference between the two arbitrary pixels at all illumination angles is taken as the grayscale change difference between the two arbitrary pixels.
[0025] Preferably, the method for determining the fluctuation trend difference includes: calculating the product of the trend sequence difference and the grayscale change difference, and the fluctuation trend difference is positively correlated with the product.
[0026] Preferably, the process of constructing the connected domain difference matrix includes:
[0027] Determine the difference in the connected domains of each gray level of any pixel between adjacent illumination angles based on the gray run matrix of the local window of any pixel;
[0028] Under different illumination angles, the absolute value of the difference in the connected domain between each gray level of any two pixels is calculated, recorded as the difference between pixel points; the maximum value of the connected domain difference between each gray level of any two pixels is calculated;
[0029] Calculate the ratio of the difference between the pixels and the maximum value, and record it as a first ratio; take the average of the first ratios of all gray levels of any two pixels as the difference of the connected domain between the any two pixels at different illumination angles;
[0030] Taking the average of the connected domain difference between the two arbitrary pixels at all illumination angles as the connected domain difference coefficient between the two arbitrary pixels;
[0031] The connected domain difference coefficients between all two pixels in the local window of any pixel are combined into a matrix, which is recorded as the connected domain difference matrix in the local window of any pixel.
[0032] Preferably, the method for determining the difference in connected domains includes:
[0033] Under different illumination angles, obtain the grayscale run-length matrix of the local window of any pixel point;
[0034] Add up all the run lengths of each gray level in the gray run matrix of any pixel point to obtain the size of the connected domain of each gray level in the gray run matrix of any pixel point;
[0035] The absolute value of the difference in the size of the connected domain of each gray level of any pixel between adjacent illumination angles is calculated and recorded as the connected domain difference.
[0036] Preferably, the method for determining the dispersion index includes:
[0037] Multiply the fluctuation trend difference matrix of any pixel point with the connected domain difference matrix to obtain the window difference matrix;
[0038] Determine the uniformity coefficient of any pixel based on the correlation between row and column elements in the window difference matrix;
[0039] The variance of the uniformity coefficient of all pixels in the impeller grayscale image is used as the dispersion index of the impeller grayscale image.
[0040] Preferably, the method for determining the uniformity coefficient includes:
[0041] Calculate the sum of the correlation coefficients between all adjacent rows in the window difference matrix, which is recorded as the first correlation sum; calculate the sum of the correlation coefficients between all adjacent columns in the window difference matrix, which is recorded as the second correlation sum;
[0042] The uniformity coefficient of any pixel point is positively correlated with the first correlation sum value and the second correlation sum value, and is negatively correlated with the number of rows or columns of the window difference matrix.
[0043] Preferably, the method for evaluating the quality of the water pump impeller includes: when the discreteness index of the impeller grayscale image is less than the uniformity threshold, the uniformity of the anti-corrosion coating sprayed on the surface of the water pump impeller is good, and the quality of the water pump impeller is good; otherwise, the uniformity of the anti-corrosion coating sprayed on the surface of the water pump impeller is poor, and the quality of the water pump impeller is poor.
[0044] This application has at least the following beneficial effects:
[0045] This application determines the difference in fluctuation trends between any two pixels based on the difference in local grayscale values in the impeller grayscale image at different illumination angles and the change in overall grayscale values at all illumination angles, and constructs a fluctuation trend difference matrix of any pixel based on the fluctuation trend differences between all any two pixels in the local window of any pixel. The beneficial effect is that it takes into account the influence of illumination angle on the image, and can reflect the change trend of grayscale values between pixels as illumination angle changes, thereby capturing the change trend of grayscale values and eliminating the grayscale difference error caused by illumination. This application determines the difference in connected domains between any two pixels at different illumination angles based on the run length of each grayscale level in the grayscale run matrix of any two pixels at different illumination angles, and constructs a connected domain difference matrix of any pixel based on the mean of the connected domain difference at all illumination angles. The beneficial effect is that it better reflects the difference in the influence of illumination changes on local pixels, so that the uniformity of the anti-corrosion coating on the impeller surface can be analyzed more accurately in the future. The present application combines the fluctuation trend difference matrix and the connected domain difference matrix to construct a window difference matrix for any pixel point, determines the uniformity coefficient of any pixel point based on the correlation between the row and column elements in the window difference matrix, and determines the discreteness index of the impeller grayscale image based on the uniformity coefficient; determines the detection result of the uniformity of the spraying of the anti-corrosion coating on the surface of the water pump impeller based on the discreteness index, and evaluates the quality of the water pump impeller. The beneficial effect is that it can reflect the spraying uniformity of the anti-corrosion coating on the impeller surface, improve the accuracy of the uniformity detection, and thus accurately evaluate the quality of the water pump impeller. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 A flow chart of a water pump impeller quality detection method based on image processing provided in this application;
[0048] Figure 2 Construct a flow chart for the indicator of dispersion index. DETAILED DESCRIPTION
[0049] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the water pump impeller quality detection method based on image processing proposed in the present application, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0050] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0051] The specific scheme of the water pump impeller quality detection method based on image processing provided by the present application is described in detail below with reference to the accompanying drawings.
[0052] An embodiment of the present application provides a water pump impeller quality detection method based on image processing.
[0053] Specifically, the following water pump impeller quality detection method based on image processing is provided, please refer to Figure 1 , the method comprises the following steps:
[0054] The first step is to obtain the grayscale image of the impeller under different lighting angles.
[0055] In one embodiment of the present application, a water pump impeller is placed on a horizontal plane, and a light source with a rotation angle is placed above it, wherein the projection of the motion trajectory of the light source on the horizontal plane is the minimum circumscribed rectangle of the water pump impeller in the numerical direction, and the inclination angle of the light source toward the water pump impeller is 45 degrees.
[0056] Preferably, in one embodiment of the present application, the angle of each illumination angle is set to 10 degrees each time it rotates, so that 36 illumination angles can be obtained. In other embodiments of the present application, the illumination angle can be set according to actual conditions.
[0057] A CCD camera is used to capture the impeller surface images under different lighting angles directly above the pump impeller. The acquired impeller surface images are preprocessed to eliminate the influence of noise and some external interference, and enhance the accuracy of subsequent analysis.
[0058] In order to remove noise while retaining boundary information, in one embodiment of the present application, a median filter technique is used to process the impeller surface image, and the implementer may also adopt other denoising methods. The denoised image is converted into a grayscale image, which is recorded as an impeller grayscale image.
[0059] At this point, the grayscale images of the impeller under different lighting angles can be obtained.
[0060] In the second step, based on the local grayscale value differences in the impeller grayscale image under different illumination angles and the overall grayscale value changes under all illumination angles, the fluctuation trend difference between any two pixels is determined, and the fluctuation trend difference matrix of any pixel is constructed by combining the fluctuation trend differences between all any two pixels in the local window of any pixel.
[0061] Because the anti-corrosion coating will reflect light to varying degrees under the influence of different light angles, causing color changes, the effect of uniformity detection of the impeller grayscale image is poor, affecting the normal judgment of uniformity. When the light direction is gradually changed, the grayscale value of the pixel will show a certain trend change. Therefore, by judging the similarity of the grayscale value changes of adjacent pixels under different light sources, the degree of influence of the adjacent pixels on the light changes can be judged, and the uniformity of the anti-corrosion coating on the surface of the pump impeller can be evaluated to a certain extent;
[0062] Secondly, when the light source rotates at the same angle, the influence of the light on two adjacent pixels in the local window should be similar, that is, the increase and decrease of the grayscale values of the two adjacent pixels should be consistent. Therefore, the difference in the area size change corresponding to each gray level in the grayscale run matrix of each pixel point can be used to judge the difference in the influence of adjacent pixels on the local pixel points when the light source rotates at the same angle, thereby reflecting the uniformity of the grayscale distribution of the pixel points.
[0063] Finally, if the coating in the impeller grayscale image is uniform, the grayscale difference between different pixels is small and the discreteness index is low. Therefore, the uniformity of the anti-corrosion coating spraying on the impeller surface can be evaluated by the discreteness index between the pixels, thereby evaluating the quality of the water pump impeller.
[0064] Preferably, when the lighting direction changes, the grayscale values of each pixel at all lighting angles are combined into a grayscale sequence, and the response degree of adjacent pixels to the lighting change is judged by the similarity of the fluctuation changes of the grayscale sequence between adjacent pixels, so the smoothness of different areas of the image can be evaluated to a certain extent.
[0065] The grayscale sequence of each pixel is first-order differentiated to obtain the differential sequence of each pixel, which is used to extract the changes in the grayscale value fluctuation of the pixel when each illumination angle changes.
[0066] Furthermore, in terms of pixels A local window of preset size is set as the center, and the difference in fluctuation trend between any two pixels in the local window is determined by analyzing the similarity of grayscale values of neighboring pixels in the local window as the illumination angle changes.
[0067] In one embodiment of the present application, the size of the local window is set to 5×5, and the implementer can set it according to actual conditions.
[0068] Here, taking pixel i as an example, for any two pixels in the local window of pixel i, the trend sequence difference between any two pixels is determined based on the distance between the trend sequences after the differential sequence of any two pixels is decomposed; specifically:
[0069] First, the grayscale values of any pixel at different illumination angles are combined into a grayscale sequence of any pixel, and the first-order difference of the grayscale sequence is used as the differential sequence of any pixel; the trend sequence of the differential sequence of any pixel is obtained;
[0070] Then, the distance between the trend sequences of the arbitrary two pixel points is calculated as the trend sequence difference between the arbitrary two pixel points.
[0071] In one embodiment of the present application, the sequence decomposition algorithm for obtaining the trend sequence adopts the STL sequence decomposition algorithm, and the distance is calculated as the DTW distance. In other embodiments of the present application, other calculation methods such as the EMD decomposition algorithm and the Euclidean distance may also be used. The STL sequence decomposition algorithm and the calculation of the DTW distance are well-known technologies and will not be described in detail.
[0072] It should be noted that, the smaller the distance is, the more similar the trend sequences of any two pixel points are, which means that the any two pixel points are more similar.
[0073] Furthermore, the synchronization or difference of the grayscale value changes of adjacent pixels can be reflected by the difference in the corresponding order of the differential sequences of adjacent pixels under all illumination angles.
[0074] Here, based on the gray value difference between any two pixels at different illumination angles, the gray value difference between any two pixels is determined; specifically:
[0075] First, the absolute value and average value of the difference between the grayscale values of the two arbitrary pixels at different illumination angles are calculated; the ratio of the absolute value of the difference to the average value is recorded as the grayscale difference between the two arbitrary pixels at different illumination angles;
[0076] Then, the average of the grayscale difference between the arbitrary two pixels at all illumination angles is taken as the grayscale change difference between the arbitrary two pixels.
[0077] It should be noted that when calculating the ratio of the absolute value of the difference to the average value, a number greater than 0 is added to the denominator to prevent the denominator from being 0. In this embodiment, the value is 0.01. If the values of the corresponding elements of the differential sequence of adjacent pixels are similar, the smaller the absolute value of the difference between the corresponding elements, the greater the degree of change relative to the mean value of the corresponding elements, and the greater the difference in grayscale changes, that is, the more obvious the difference in grayscale values between two adjacent pixels at different illumination angles.
[0078] Furthermore, the difference in the trend sequence and the grayscale change are combined to determine the difference in the fluctuation trend between any two pixels, specifically:
[0079] First, the product of the trend sequence difference and the grayscale change difference is calculated;
[0080] Then, the fluctuation trend difference is positively correlated with the product.
[0081] It should be noted that, the larger the product is, the larger the difference in the fluctuation trend is, indicating that the difference in the grayscale value between any two pixels as the illumination angle changes is larger.
[0082] In one embodiment of the present application, the product is used as the exponent of an exponential function with a natural constant as the base, and the calculation result of the exponential function is used as the fluctuation trend difference.
[0083] In other embodiments of the present application, other positive correlations may also be used to obtain the fluctuation trend difference.
[0084] It can be understood that a negative correlation relationship indicates that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtraction relationship, a division relationship, etc., which is determined by actual application.
[0085] Finally, the fluctuation trend differences between all two pixels in the local window of any pixel are combined into a matrix, which is recorded as the fluctuation trend difference matrix in the local window of any pixel.
[0086] The third step is to determine the difference in connected domains between any two pixels at different illumination angles based on the run length of each gray level in the grayscale run matrix of any two pixels at different illumination angles, and to construct a connected domain difference matrix of any pixel based on the mean of the connected domain differences at all illumination angles.
[0087] When the light source rotates at the same angle, if the impeller surface coating is sprayed evenly, the effect of light on adjacent pixels in the local window should be relatively similar, that is, the increase and decrease of the grayscale values of adjacent pixels should be consistent.
[0088] Accordingly, in one embodiment of the present application, under the condition of a fixed illumination angle, the grayscale run matrix of the local window of any pixel is obtained. The calculation process of the grayscale run matrix is a known technology and will not be repeated here. All run lengths of each gray level in the grayscale run matrix of any pixel are added together to obtain the size of the connected domain of each gray level in the grayscale run matrix of any pixel, which is used to determine the difference in the influence of neighboring pixels on the local pixel when the light source rotates at the same angle, thereby reflecting the uniformity of the grayscale distribution of the pixel.
[0089] Furthermore, when the surface of the water pump impeller is uniform, the degree of change between the same pixel point and its adjacent pixel points under adjacent illumination angles is relatively consistent. If they are inconsistent, it means that the surface is relatively uneven.
[0090] Therefore, based on the grayscale run-length matrix of the local window of any pixel point, the connected domain difference of each grayscale level of any pixel point between adjacent illumination angles is determined; specifically, the absolute value of the difference in the size of the connected domain of each grayscale level of any pixel point between adjacent illumination angles is calculated, which is recorded as the connected domain difference.
[0091] Here, the method for determining the difference between any two pixels at different illumination angles in the connected domain is:
[0092] First, under different illumination angles, the absolute value of the difference of the connected domain difference between each gray level of the arbitrary two pixels is calculated, recorded as the difference between the pixels; the maximum value of the connected domain difference between each gray level of the arbitrary two pixels is calculated; the ratio of the difference between the pixels and the maximum value is calculated, recorded as the first ratio;
[0093] Then, the average of the first ratios of all gray levels of the arbitrary two pixels is taken as the difference of the connected domain between the arbitrary two pixels at different illumination angles.
[0094] In order to avoid the situation where the denominator is 0 when calculating the first ratio, a number greater than 0 is added to the denominator. In this embodiment, the value is 0.01, and the implementer can set it according to the actual situation.
[0095] It should be noted that the closer the difference in the connected domains corresponding to each gray level of any two pixels at any lighting angle is, the more evenly the anti-corrosion coating on the surface of the water pump impeller is sprayed when the lighting changes. Conversely, it means that the impact of the lighting changes on the local pixels is greatly different, and the anti-corrosion coating on the surface of the water pump impeller is sprayed more unevenly.
[0096] Furthermore, the average of the connected domain differences between any two pixels at all illumination angles is taken as the connected domain difference coefficient between the any two pixels; the connected domain difference coefficients between all any two pixels in the local window of any pixel are formed into a matrix, which is recorded as the connected domain difference matrix in the local window of any pixel.
[0097] The fourth step is to construct a window difference matrix for any pixel point by combining the fluctuation trend difference matrix and the connected domain difference matrix, determine the uniformity coefficient of any pixel point based on the correlation between the row and column elements in the window difference matrix, and determine the discreteness index of the impeller grayscale image based on the uniformity coefficient.
[0098] The fluctuation trend difference matrix of any pixel point is multiplied with the connected domain difference matrix, and the resulting matrix is recorded as the window difference matrix.
[0099] Furthermore, in order to evaluate the uniformity of the color spraying of each pixel, the uniformity coefficient of any pixel is determined based on the correlation between the row and column elements in the window difference matrix, specifically:
[0100] First, the sum of the correlation coefficients between all adjacent rows in the window difference matrix is calculated, which is recorded as the first correlation sum; the sum of the correlation coefficients between all adjacent columns in the window difference matrix is calculated, which is recorded as the second correlation sum;
[0101] Then, the uniformity coefficient of any pixel point is positively correlated with the first correlation sum value and the second correlation sum value, and is negatively correlated with the number of rows or columns.
[0102] In one embodiment of the present application, the sum of the first correlation sum value and the second correlation sum value is divided by the number of rows or columns to obtain the uniformity coefficient of any pixel point.
[0103] In other embodiments of the present application, other positive or negative correlation relationships may be used to determine the uniformity coefficient of any pixel point.
[0104] It can be understood that a positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. The specific relationship can be a multiplication relationship, an addition relationship, or the power of an exponential function, which is determined by actual application and this application does not impose any special restrictions. A negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtraction relationship, a division relationship, etc., which is determined by actual application.
[0105] Furthermore, in order to evaluate the color spraying uniformity of the impeller grayscale image, the variance of the uniformity coefficient of all pixels in the impeller grayscale image is used as the dispersion index of the impeller grayscale image.
[0106] It should be noted that if the dispersion index of the impeller grayscale image is smaller, it means that the coating distribution on the impeller grayscale image is more uniform. Conversely, if the dispersion index of the impeller grayscale image is larger, the coating distribution on the impeller grayscale image is uneven.
[0107] In one embodiment of the present application, the indicator construction flow chart of the dispersion index is as follows: Figure 2 shown.
[0108] The fifth step is to determine the test results of the uniformity of the anti-corrosion coating spraying on the surface of the water pump impeller based on the dispersion index and evaluate the quality of the water pump impeller.
[0109] The dispersion index is used to reflect the distribution of pixel points to judge the uniformity of the coating on the image.
[0110] Furthermore, a uniform threshold is set. In this embodiment, the uniform threshold is set to 0.5, and implementers can set it according to actual conditions.
[0111] When the dispersion index of the impeller grayscale image is less than the uniformity threshold, it is considered that the uniformity of the anti-corrosion coating spraying on the impeller surface is good, which means that the quality of the water pump impeller is good; when the dispersion index of the impeller grayscale image is greater than or equal to the uniformity threshold, it is considered that the uniformity of the anti-corrosion coating spraying on the impeller surface is poor, which means that the quality of the water pump impeller is poor.
[0112] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0113] It should be noted that, unless otherwise specified and limited, terms such as "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such article or device. In the absence of further restrictions, an element defined by the sentence "including one..." does not exclude the existence of other identical elements in the article or device including the element. In addition, the term "and\or" used herein includes any and all combinations of one or more related listed items.
[0114] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not invented by the present application.
[0115] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A water pump impeller quality detection method based on image processing, characterized in that: The method comprises the following steps: Get the grayscale image of the impeller under different lighting angles; Based on the local grayscale value differences in the impeller grayscale image under different illumination angles and the overall grayscale value changes under all illumination angles, the fluctuation trend difference between any two pixels is determined, and the fluctuation trend difference matrix of any pixel is constructed by taking the fluctuation trend differences between all any two pixels in the local window of any pixel; Based on the run length of each gray level in the gray run matrix of any two pixels at different illumination angles, determine the difference of connected domains between any two pixels at different illumination angles, and construct a connected domain difference matrix of any pixel based on the mean of the difference of connected domains at all illumination angles; The window difference matrix of any pixel point is constructed by combining the fluctuation trend difference matrix and the connected domain difference matrix. The uniformity coefficient of any pixel point is determined based on the correlation between the row and column elements in the window difference matrix. The dispersion index of the impeller grayscale image is determined based on the uniformity coefficient. Determine the test results of the uniformity of the anti-corrosion coating spraying on the surface of the water pump impeller based on the dispersion index and evaluate the quality of the water pump impeller; The method for determining the dispersion index includes: Multiply the fluctuation trend difference matrix of any pixel point with the connected domain difference matrix to obtain the window difference matrix; Determine the uniformity coefficient of any pixel based on the correlation between row and column elements in the window difference matrix; The variance of the uniformity coefficients of all pixels in the impeller grayscale image is used as the dispersion index of the impeller grayscale image; The method for determining the uniformity coefficient includes: Calculate the sum of the correlation coefficients between all adjacent rows in the window difference matrix, which is recorded as the first correlation sum; calculate the sum of the correlation coefficients between all adjacent columns in the window difference matrix, which is recorded as the second correlation sum; The uniformity coefficient of any pixel point is positively correlated with the first correlation sum value and the second correlation sum value, and is negatively correlated with the number of rows or columns of the window difference matrix.
2. The water pump impeller quality detection method based on image processing according to claim 1, characterized in that: The construction process of the fluctuation trend difference matrix includes: Set a local window of preset size with any pixel as the center; For any two pixels within the local window of any pixel, the trend sequence difference between the two pixels is determined based on the difference between the grayscale values of the two pixels under different illumination angles; Based on the gray value difference between any two pixels at different illumination angles, determine the gray value difference between any two pixels; Combining the trend sequence difference and grayscale change difference, determine the fluctuation trend difference between any two pixels; The fluctuation trend differences between all two pixels in the local window of any pixel are formed into a matrix, which is recorded as the fluctuation trend difference matrix in the local window of any pixel.
3. The water pump impeller quality detection method based on image processing according to claim 2, characterized in that: The method for determining the difference of the trend sequence includes: The grayscale values of any pixel at different illumination angles are used to form a grayscale sequence of any pixel, and the first-order difference of the grayscale sequence is used as the difference sequence of any pixel; Get the trend sequence of the difference sequence of any pixel point; The distance between the trend sequences of the arbitrary two pixel points is calculated as the trend sequence difference between the arbitrary two pixel points.
4. The water pump impeller quality detection method based on image processing according to claim 2, characterized in that: The method for determining the grayscale variation difference includes: Calculate the absolute value and average value of the difference between the grayscale values of the two arbitrary pixels at different illumination angles; record the ratio of the absolute value of the difference to the average value as the grayscale difference between the two arbitrary pixels at different illumination angles; The average value of the grayscale difference between the two arbitrary pixels at all illumination angles is taken as the grayscale change difference between the two arbitrary pixels.
5. The water pump impeller quality detection method based on image processing according to claim 2, characterized in that: The method for determining the fluctuation trend difference includes: calculating the product of the trend sequence difference and the grayscale change difference, and the fluctuation trend difference is positively correlated with the product.
6. The water pump impeller quality detection method based on image processing according to claim 1, characterized in that: The construction process of the connected domain difference matrix includes: Determine the difference in the connected domains of each gray level of any pixel between adjacent illumination angles based on the gray run matrix of the local window of any pixel; Under different illumination angles, the absolute value of the difference in the connected domain between each gray level of any two pixels is calculated, recorded as the difference between pixel points; the maximum value of the connected domain difference between each gray level of any two pixels is calculated; Calculate the ratio of the difference between the pixels and the maximum value, and record it as a first ratio; take the average of the first ratios of all gray levels of any two pixels as the difference of the connected domain between the any two pixels at different illumination angles; Taking the average of the connected domain difference between the two arbitrary pixels at all illumination angles as the connected domain difference coefficient between the two arbitrary pixels; The connected domain difference coefficients between all two pixels in the local window of any pixel are combined into a matrix, which is recorded as the connected domain difference matrix in the local window of any pixel.
7. The water pump impeller quality detection method based on image processing according to claim 6, characterized in that: The method for determining the difference in connected domains includes: Under different illumination angles, obtain the grayscale run-length matrix of the local window of any pixel point; Add up all the run lengths of each gray level in the gray run matrix of any pixel point to obtain the size of the connected domain of each gray level in the gray run matrix of any pixel point; The absolute value of the difference in the size of the connected domain of each gray level of any pixel between adjacent illumination angles is calculated and recorded as the connected domain difference.
8. The water pump impeller quality detection method based on image processing according to claim 1, characterized in that: The water pump impeller quality evaluation method includes: when the dispersion index of the impeller grayscale image is less than the uniformity threshold, the uniformity of the anti-corrosion coating sprayed on the surface of the water pump impeller is good, and the water pump impeller quality is good; otherwise, the uniformity of the anti-corrosion coating sprayed on the surface of the water pump impeller is poor, and the water pump impeller quality is poor.
