Visual detection method and system for parts for powder metallurgy processing
Through the adaptive visual inspection method based on center importance, the problems of poor adaptability and insufficient robustness in powder metallurgy parts inspection are solved, high-precision inspection of complex surfaces is achieved, and the accuracy and efficiency of inspection are improved.
Patent Information
- Application Number
- CN202511133916.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Existing visual inspection methods for powder metallurgy parts have poor adaptability, insufficient feature fusion, low robustness, difficulty in effectively identifying complex backgrounds and multiple defects, high false detection and missed detection rates, and lack of adaptive capabilities.
An adaptive visual inspection method based on center importance is adopted to achieve high-precision inspection of the surface of powder metallurgy parts by obtaining the window scale coefficient, global grayscale center point and center point offset coefficient of the grayscale image, combining multidimensional feature vectors and global-local dual correction mechanism.
It improves the adaptability and sensitivity of detection, realizes the effective fusion of multiple features, enhances the accuracy and robustness of detection, meets the real-time detection needs on the production line, and significantly improves the quality control level and production efficiency of powder metallurgy parts.
Smart Images

Figure CN120672747A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of powder metallurgy manufacturing, and in particular to a method and system for visual inspection of parts used in powder metallurgy processing, in particular to an adaptive visual inspection technology based on center importance. Background Art
[0002] Powder metallurgy is a process for manufacturing metal parts by compacting and sintering metal powders. It is widely used in the automotive, home appliance, aerospace, and other fields. Due to its specialized manufacturing process, powder metallurgy parts are prone to surface defects such as cracks, pores, scratches, and burrs, which can seriously affect product quality and service life.
[0003] Traditional quality inspection of powder metallurgy parts mostly relies on manual inspection, which has problems such as low efficiency, strong subjectivity, and easy fatigue. With the development of machine vision technology, visual inspection systems are gradually being used to detect defects in powder metallurgy parts. However, existing visual inspection methods still have some limitations: On the one hand, traditional visual inspection methods mostly use fixed thresholds and fixed window sizes for processing, which makes it difficult to adapt to surface defects of different scales and shapes. Especially for products with complex and changeable surfaces such as powder metallurgy parts, the inspection results are often unsatisfactory.
[0004] On the other hand, existing methods usually only consider one of the local features or global features, and lack an effective feature fusion mechanism, resulting in insufficient detection accuracy and robustness, especially in the case of complex backgrounds and the coexistence of multiple defects, with high false detection and missed detection rates.
[0005] In addition, existing detection algorithms are mostly optimized for specific types of defects, lack versatility and adaptability, and are unable to meet the diverse detection needs of different types of powder metallurgy parts.
[0006] Therefore, there is an urgent need to develop a visual inspection method with adaptive capabilities and high robustness that can effectively identify various defects on the surface of powder metallurgy parts and improve the accuracy and efficiency of detection. Summary of the Invention
[0007] The purpose of the present invention is to provide a method and system for visual inspection of parts used in powder metallurgy processing, aiming to solve the problems existing in the prior art such as poor detection adaptability, insufficient feature fusion and low robustness.
[0008] The present invention proposes a method and system for visual inspection of parts used in powder metallurgy processing, comprising: Obtain a grayscale image of the part surface; Obtaining a window scale coefficient for each pixel in the grayscale image according to grayscale changes of other pixels in a neighborhood of each pixel in the grayscale image; Obtaining a global grayscale center point according to the grayscale distribution of the grayscale image; For each pixel in the grayscale image, a center point offset coefficient of the pixel is obtained according to the window scale coefficient of the pixel, the grayscale difference between the pixel and other pixels in its neighborhood, the grayscale mean value between the pixel and the pixels in its neighborhood, and the grayscale difference between the pixel and the global grayscale center point; Obtaining the central importance of the pixel point to the grayscale image according to the center point offset coefficient of the pixel point; Divide the pixel points into regions of interest or regions of non-interest according to their center point offset coefficients, and perform scale transformation on the regions of interest and regions of non-interest in the grayscale image based on the importance of the centers of the pixels to complete visual inspection of parts; The obtaining of the central importance of the pixel point to the grayscale image includes: Obtaining the overall importance of each pixel in the grayscale image to the grayscale image; Obtaining a correction coefficient of the overall importance of the local information of each pixel in the grayscale image; The central importance of the pixel point to the grayscale image is obtained according to the central point offset coefficient, the overall importance and the correction coefficient of the pixel point.
[0009] Preferably, obtaining a grayscale image of the part surface includes: Acquire images of the part surface through industrial cameras; Grayscale processing is performed on the acquired image of the part surface to obtain the grayscale image.
[0010] Preferably, obtaining the window scale coefficient of each pixel in the grayscale image according to the grayscale change of other pixels in the neighborhood of each pixel in the grayscale image includes: For each pixel in the grayscale image, the grayscale of each pixel in a window centered on the pixel is taken as the window grayscale, and the window grayscale mean of all pixels in each window is taken as the window average of the window; The window coefficient of the window average value of all pixels in the grayscale image with respect to the window in which the pixels are located is used as the window scale coefficient of each pixel in the grayscale image.
[0011] Preferably, obtaining the global grayscale center point according to the grayscale distribution of the grayscale image includes: Taking the grayscale mean of all pixels in the grayscale image as the first grayscale mean of the grayscale image; Obtaining each suspected grayscale mean whose grayscale mean is greater than the first grayscale mean in the grayscale image, and taking the grayscale mean of each pixel point in the grayscale image whose grayscale mean is greater than the first grayscale mean as each suspected grayscale mean; Performing histogram statistics on the grayscale of all pixels in the grayscale image to obtain a grayscale distribution histogram of the grayscale image, and determining a grayscale distribution value corresponding to a highest peak in the grayscale distribution histogram as a second grayscale mean; Determining whether the second grayscale mean is the same as the first grayscale mean; If the second grayscale mean is the same as the first grayscale mean, taking the first grayscale mean as the global grayscale center point; If the second grayscale mean is different from the first grayscale mean, the second grayscale mean is used as the new first grayscale mean, and the operation of performing histogram statistics on the grayscales of all pixels in the grayscale image to obtain a grayscale distribution histogram of the grayscale image is returned.
[0012] Preferably, obtaining the central importance of the pixel point to the grayscale image includes: Obtaining an initial eigenvalue of the pixel point according to a center point offset coefficient of the pixel point; Obtaining an overall transformation scale corresponding to the grayscale image according to initial eigenvalues obtained from pixel points in a neighborhood after window downsampling of the pixel point at the window scale coefficient and the corresponding window scale coefficient; Obtaining an overall importance of the pixel to the grayscale image based on an initial eigenvalue of the pixel, an overall transformation scale, a difference between a global grayscale center point and the pixel, a transformation scale under a window corresponding to a window scale coefficient of the pixel, and the global grayscale center point; Obtaining a correction coefficient for the overall importance of the local information of the pixel point based on a correction coefficient for the overall importance of the pixel point in the neighborhood of the pixel point and a transformation scale under a window corresponding to a window scale coefficient of the pixel point; The central importance of the pixel point with respect to the grayscale image is obtained according to the initial eigenvalue of the pixel point and the correction coefficient.
[0013] Preferably, obtaining the overall importance of the pixel to the grayscale image based on the initial eigenvalue of the pixel, the overall transformation scale, the difference between the global grayscale center and the pixel, the transformation scale under the window corresponding to the window scale coefficient of the pixel, and the global grayscale center includes: Obtaining an average transformation scale of all pixels in the pixel window based on a window scale coefficient of the window where the pixel is located; Based on the window scale coefficient, obtaining an average transformation scale of other pixels in the pixel window except the pixel; The overall importance of the pixel point to the grayscale image is obtained based on the average transformation scale of all pixels in the pixel window, the average transformation scale of other pixels in the pixel window except the pixel point, the grayscale difference between the pixel point and the global grayscale center point, and preset parameters.
[0014] Preferably, the correction coefficient brought by the pixel point's local information to the overall importance degree based on the correction coefficient brought by the pixel point's neighborhood to the overall importance degree and the transformation scale under the window corresponding to the window scale coefficient where the pixel point is located, comprises: Calculating the average transformation scale of the pixels in the neighborhood window of the window where the pixel point is located; According to the overall importance of the pixel point to the grayscale image, the initial eigenvalue of the window where the pixel point is located, and the average transformation scale of the pixels in the neighborhood window of the window where the pixel point is located, a correction coefficient brought by the local information of the pixel point to the overall importance is obtained.
[0015] Preferably, dividing the pixel points into regions of interest or regions of no interest according to their center point offset coefficients includes: Set the center point offset coefficient threshold; Divide the pixel points whose center point offset coefficient is greater than the center point offset coefficient threshold into a region of interest; Divide the pixel points whose center point offset coefficient is less than or equal to the center point offset coefficient threshold into non-interest areas; Morphological processing is performed on the division results to eliminate isolated points and small areas and ensure the smoothness and continuity of the area boundaries.
[0016] Preferably, the scaling of the region of interest and the region of non-interest in the grayscale image based on the central importance of each pixel includes: Designing a transformation function for enhancing contrast and details for the region of interest; Designing a transformation function for suppressing noise and non-critical information for the non-interested region; Adjust the parameters of the corresponding transformation function according to the central importance of each pixel; Perform smooth transition processing at the region boundary to avoid discontinuous transformation; Extract features from the transformed image to identify and classify surface defects of parts.
[0017] Visual inspection system for parts used in powder metallurgy processing, the system includes: Image acquisition module, used to obtain grayscale images of the part surface; A center point offset coefficient acquisition module is used to obtain a window scale coefficient for each pixel in the grayscale image based on the grayscale changes of other pixels in the neighborhood of each pixel in the grayscale image; obtain a global grayscale center point based on the grayscale distribution of the grayscale image; and obtain a center point offset coefficient for the pixel based on the window scale coefficient of the pixel, the grayscale difference between the pixel and other pixels in its neighborhood, the grayscale mean of the pixel and the pixels in its neighborhood, and the grayscale difference between the global grayscale center point of the grayscale distribution; An overall importance acquisition module, configured to acquire the overall importance of each pixel in the grayscale image to the grayscale image; A correction coefficient acquisition module is used to obtain a correction coefficient of the local information of the pixel point in the grayscale image to the overall importance; A center importance acquisition module is configured to obtain the overall importance of the pixel point in the grayscale image to the grayscale image based on the initial eigenvalue of the window where the pixel point is located, the overall transformation scale, the difference between the global grayscale center point and the pixel point, the average transformation scale of the window downsampling of the pixel point according to the scale coefficient of the window where the pixel point is located, and the global grayscale center point; obtain a correction coefficient brought by the local information of the pixel point in the grayscale image to the overall importance based on the initial eigenvalue of the window where the pixel point is located, the overall transformation scale, and the average transformation scale of the window downsampling of the pixel point according to the scale coefficient of the window where the pixel point is located; and obtain the center importance of the pixel point in the grayscale image to the grayscale image based on the initial eigenvalue of the pixel point and the correction coefficient; The scale transformation module is used to divide the pixel points into regions of interest or regions of non-interest according to the center point offset coefficient of the pixel points, and scale the regions of interest and regions of non-interest in the grayscale image based on the central importance of each pixel point to complete the visual inspection of parts.
[0018] The adaptive visual inspection method based on center importance proposed in this paper achieves high-precision detection of surface defects in powder metallurgy parts by constructing a multidimensional feature space and a global-local dual correction mechanism. This method has the following beneficial effects: 1. The present invention establishes a mapping relationship from pixel space to feature space through adaptive window analysis and iterative positioning of the global grayscale center point, which can automatically adapt to surface defects of different scales and shapes, thereby improving the adaptability and sensitivity of detection.
[0019] 2. The present invention introduces the concepts of multidimensional feature vectors and center point offset coefficients, comprehensively considers the local structure, gradient information, contrast characteristics and global reference relationship of pixel points, realizes the effective fusion of multiple features, and can capture defect characteristics more comprehensively.
[0020] 3. This invention innovatively proposes a global-local dual-correction central importance calculation method. By combining the global importance and the local correction coefficient, it achieves a balance between global consistency and local sensitivity, thereby improving the robustness and accuracy of detection.
[0021] 4. The region division and scale transformation method based on the center importance of the present invention can effectively highlight the region of interest, suppress background interference, and further improve the accuracy and reliability of defect detection.
[0022] 5. The method of the present invention has high computational efficiency, is suitable for real-time processing, meets the online detection requirements on the production line, and can significantly improve the quality control level and production efficiency of powder metallurgy parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flow chart of the method for visual inspection of parts for powder metallurgy processing provided by the present invention; Figure 2 This is a structural block diagram of the visual inspection system for powder metallurgy processing parts provided by the present invention. DETAILED DESCRIPTION
[0024] Please refer to Figure 1 - Figure 2 The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0025] refer to Figure 1 The present invention provides a method for visual inspection of powder metallurgy parts, comprising the following steps: Step S1: Acquire a grayscale image of the part surface; Step S2: obtaining a window scale coefficient of each pixel in the grayscale image according to the grayscale changes of other pixels in the neighborhood of each pixel in the grayscale image; Step S3: obtaining the global grayscale center point according to the grayscale distribution of the grayscale image; Step S4: For each pixel in the grayscale image, the center point offset coefficient of the pixel is obtained according to the window scale coefficient of the pixel, the grayscale difference between the pixel and other pixels in its neighborhood, the grayscale mean value of the pixel and the pixels in its neighborhood, and the grayscale difference between the pixel and the global grayscale center point; Step S5: Obtaining the central importance of the pixel point to the grayscale image according to the center point offset coefficient of the pixel point; Step S6: Divide the pixel points into regions of interest or regions of no interest according to their center point offset coefficients, and perform scale transformation on the regions of interest and regions of no interest in the grayscale image based on the importance of the center of each pixel point to complete the visual inspection of the part.
[0026] Among them, step S5 obtains the central importance of the pixel point to the grayscale image, including: obtaining the overall importance of each pixel point in the grayscale image to the grayscale image; obtaining the correction coefficient brought by the local information of each pixel point in the grayscale image to the overall importance; and obtaining the central importance of the pixel point to the grayscale image based on the central point offset coefficient, overall importance and correction coefficient of the pixel point.
[0027] The following is a detailed description of each step: Step S1: Acquire a grayscale image of the part surface.
[0028] In a preferred embodiment of the present invention, acquiring a grayscale image of the part surface includes: acquiring an image of the part surface by an industrial camera; and performing grayscale processing on the acquired image of the part surface to obtain a grayscale image.
[0029] Specifically, the present invention uses an industrial-grade camera to capture images of the surface of powder metallurgy parts. Preferably, a CMOS or CCD camera with a resolution of at least 5MP is used to ensure image clarity. For example, powder metallurgy brake linings on an automotive parts production line require high surface flatness, requiring detection of microcracks and pores. To improve image quality, a ring-shaped LED light source with a 45° angle provides uniform illumination while preventing surface reflections from interfering with detection.
[0030] The original image collected is usually a color image (RGB format). To simplify subsequent processing, it needs to be converted into a grayscale image. The grayscale conversion uses the weighted average method, and the calculation formula is: , in, is the grayscale value after conversion, the value range is [0,255]; is the red channel value of the pixel, ranging from [0,255]; is the green channel value of the pixel, ranging from [0,255]; is the blue channel value of the pixel, ranging from [0, 255]. This weighting method takes into account the differences in the human eye's sensitivity to different colors and can retain the main information in the image, especially for retaining subtle surface defects of powder metallurgy parts.
[0031] Step S2: Obtain a window scale coefficient for each pixel in the grayscale image according to the grayscale changes of other pixels in the neighborhood of each pixel in the grayscale image.
[0032] In this step, the calculation process of the window scale coefficient is as follows: For each pixel in the grayscale image, the grayscale of each pixel in the window centered on the pixel is taken as the window grayscale, and the window grayscale mean of all pixels in each window is taken as the window average of the window; the window coefficient of the window average of all pixels in the grayscale image for the window in which they are located is taken as the window scale coefficient of each pixel in the grayscale image.
[0033] In practical implementation, an appropriate window size is first selected. In a preferred embodiment of the present invention, the window size can be 3×3, 5×5, or 7×7, depending on the surface characteristics of powder metallurgy parts. The specific selection is determined by the complexity of the part's surface texture and the nature of the defects. For example, for parts with relatively smooth surfaces, such as iron-based powder metallurgy bearing rings, a smaller window size (such as 3×3) is selected to increase local sensitivity. For parts with more complex surface textures, such as copper-based powder metallurgy gears, a larger window size (such as 7×7) is selected to obtain more contextual information.
[0034] For pixel p(i,j), the mean grayscale value in the window The calculation is as follows: , in: Pixel The grayscale mean of the window; The coordinates are The grayscale value of the pixel is in the range of [0,255]; is the window radius, with values of 1, 2, 3, etc., corresponding to window sizes of 3×3, 5×5, 7×7, etc.; is the total number of pixels in the window. The sum symbol indicates that the grayscale values of all pixels in the window are summed up and divided by the number of pixels to obtain the average value.
[0035] Then, calculate the window scale coefficient of the pixel point : , in: Pixel The window scale coefficient of ; is the grayscale standard deviation within the window; is the mean grayscale value in the window; is the proportional coefficient, which is 0.5; is a small positive number with a value of 0.0001 to avoid the denominator being zero. This formula directly uses the standard deviation as the main measurement indicator and introduces the grayscale mean as an adjustment factor, which not only retains the original information of the grayscale change amplitude but also takes into account the influence of the grayscale baseline level. When the grayscale mean in the window is low, the multiplication adjustment factor The window scale coefficient will be appropriately increased, which helps to enhance the detection sensitivity of subtle defects in low grayscale areas; when the grayscale mean value in the window is high, the adjustment factor is close to 1, and the standard deviation is mainly used to reflect the degree of grayscale change. This allows the window scale coefficient to more accurately reflect the degree of change in the grayscale distribution within the neighborhood of the pixel point. The larger the value, the more drastic the grayscale change in the local area, and there may be edges or textures; the smaller the value, the gentler the grayscale change in the local area, and it may be a uniform area. For the surface of powder metallurgy parts, defective areas usually show drastic local grayscale changes and therefore have a higher window scale coefficient. For example, when detecting iron-based powder metallurgy connecting rods, the window scale coefficient of the crack area is usually above 25, while the window scale coefficient of the normal surface area is generally less than 10.
[0036] Grayscale standard deviation within the window The calculation formula is: , The square root symbol indicates that the standard deviation is obtained by taking the square root of the average sum of the squares of the differences between all pixels in the window and the mean.
[0037] Window scale factor This value reflects the degree of variation in the grayscale distribution within a pixel's neighborhood. Larger values indicate more dramatic grayscale variations in a local area, suggesting the presence of edges or textures. Smaller values indicate gentle grayscale variations in a local area, suggesting a uniform region. On the surface of powder metallurgy parts, defective areas often exhibit dramatic local grayscale variations and therefore have a higher window scale factor. For example, when inspecting iron-based powder metallurgy connecting rods, the window scale factor of cracked areas is typically above 0.5, while that of normal surface areas is generally less than 0.2.
[0038] Step S3: Obtain the global grayscale center point according to the grayscale distribution of the grayscale image.
[0039] In this step, the process of determining the global grayscale center point is as follows: The grayscale mean of all pixels in the grayscale image is used as the first grayscale mean of the grayscale image; the suspected grayscale means whose grayscale mean is greater than the first grayscale mean are obtained in the grayscale image, and the grayscale mean of each pixel in the grayscale image whose grayscale mean is greater than the first grayscale mean is used as each suspected grayscale mean; the grayscale of all pixels in the grayscale image is statistically analyzed by histogram to obtain the grayscale distribution histogram of the grayscale image, and the grayscale distribution value corresponding to the highest peak in the grayscale distribution histogram is determined as the second grayscale mean; it is determined whether the second grayscale mean is the same as the first grayscale mean; if the second grayscale mean is the same as the first grayscale mean, the first grayscale mean is used as the global grayscale center point; if the second grayscale mean is different from the first grayscale mean, the second grayscale mean is used as the new first grayscale mean, and the operation of performing histogram statistics on the grayscale of all pixels in the grayscale image to obtain the grayscale distribution histogram of the grayscale image is returned.
[0040] In the specific implementation, first calculate the grayscale mean of the entire grayscale image : , in: is the first grayscale mean; and are the height and width of the image, in pixels; For coordinates The grayscale value of the pixel at , ranges from [0,255]. This formula means calculating the average grayscale value of all pixels in the image.
[0041] Then, the statistical gray value is greater than , calculate the grayscale mean of these pixels as the suspected grayscale mean: , in: is the suspected grayscale mean; is an indicative function that takes the value 1 when the condition is met, otherwise takes the value 0. This formula represents the calculation of the average grayscale value of all pixels whose grayscale values are greater than the first grayscale mean.
[0042] Next, construct the grayscale histogram of the grayscale image , and find the grayscale value corresponding to the highest peak in the histogram as the second grayscale mean The grayscale histogram represents the frequency distribution of each grayscale value in the image. The grayscale value corresponding to the highest peak is the grayscale value that appears most frequently in the image.
[0043] Compare and , if the difference between the two is less than the preset threshold (For example, in the inspection of powder metallurgy parts, , considering that the grayscale value range is [0,255], this threshold is small enough to ensure the convergence accuracy), it is considered to have converged, and As the global grayscale center point Otherwise, As a new , re-analyze the histogram statistics. This iterative optimization method mainly solves the multi-peak characteristic problem of the grayscale distribution on the surface of powder metallurgy parts. Taking the image of an iron-based powder metallurgy connecting rod as an example, the initial grayscale mean The calculated result is 128, but this value is affected by the grayscale of the background area and the edge area, and fails to accurately reflect the grayscale characteristics of the surface of the part. The second grayscale mean is obtained through histogram analysis. is 143, and 143 is used as the new Re-analysis can focus more on the grayscale distribution of the main area of the part and obtain a more accurate global grayscale center point. In practical applications, most powder metallurgy part images can obtain a stable global grayscale center point after 2-3 iterations, and rarely require multiple iterations. The maximum number of iterations is set to ensure the stability of the algorithm under special circumstances, and this limit is usually not reached in practical applications. The global grayscale center point determined by this method This method can more accurately represent the primary grayscale characteristics of a part's surface, providing a reliable global reference for subsequent center point offset coefficient calculations. This significantly improves the accuracy and robustness of defect detection. This approach is particularly advantageous for powder metallurgy parts with complex surface textures or areas containing multiple materials.
[0044] Global grayscale center This serves as a reference point for the grayscale distribution of the entire image, providing a benchmark for subsequent center point offset calculations. In powder metallurgy part inspection, the global grayscale center point typically reflects the primary grayscale characteristics of the part surface. For example, for iron-based powder metallurgy parts, the surface grayscale center point is typically between 120 and 150; whereas for copper-based parts, the grayscale center point may be between 170 and 200 due to varying material colors. Accurately determining the global grayscale center point facilitates distinguishing between normal surfaces and defective areas in subsequent steps.
[0045] Step S4: For each pixel in the grayscale image, the center point offset coefficient of the pixel is obtained according to the window scale coefficient of the pixel, the grayscale difference between the pixel and other pixels in its neighborhood, the grayscale mean value between the pixel and the pixels in the neighborhood, and the grayscale difference between the global grayscale center point.
[0046] This step is the key to calculating the pixel center offset coefficient. The center offset coefficient reflects the importance and significance of the pixel in the entire image and is the basis for subsequent region division and importance calculation.
[0047] In specific implementation, for pixel points , the center point offset coefficient The calculation considers the following four factors: Window scale factor : reflects the structural complexity of the local area; Grayscale difference between a pixel and its neighboring pixels : reflects local gradient information; The difference between the grayscale mean of the pixel and the neighborhood : reflects local contrast; The difference between the pixel and the global grayscale center : Establish a connection with the global reference.
[0048] Among them, the local grayscale difference The calculation is as follows: , in: Pixel The average grayscale difference with the neighboring pixels; Represents pixel points With pixels The absolute value of the grayscale difference; is the Kronecker function, when When it is set to 1, otherwise it is set to 0; is the number of pixels in the window excluding the center pixel. This formula calculates the average grayscale difference between the center pixel and all other pixels in the window.
[0049] Local mean difference The calculation is as follows: , in: Pixel The difference between the grayscale mean value in the window; Pixel The grayscale mean of the window is calculated using the method given in step S2. This formula represents the difference between the grayscale value of the center pixel and the average grayscale value within the window.
[0050] Global differences The calculation is as follows: , in: Pixel The difference from the global grayscale center point; is the global grayscale center point, and the calculation method is given in step S3. This formula represents the degree of deviation of the pixel grayscale value from the overall grayscale center of the image.
[0051] Finally, the center point offset coefficient Calculated by the following formula: , in: Pixel The center point offset coefficient; and is the weight coefficient, corresponding to the importance of the four factors, satisfying ; and It is to normalize the grayscale difference to the range of [0,1] to facilitate the weighted combination of different factors.
[0052] In a preferred embodiment of the present invention, according to the surface characteristics of the powder metallurgy parts, For different types of defects, the weights can be adjusted: for example, for crack defect detection, the weights can be increased. (local gradient information weight) to 0.4, reducing (global difference weight) to 0.1; for pore defect detection, it can be increased (local contrast weight) to 0.3, reducing (Structural Complexity Weight) to 0.2.
[0053] To ensure the consistency and comparability of the center point offset coefficients, the calculation results are normalized: , in: is the normalized center point offset coefficient, the value range is and They are the minimum and maximum values of the center point offset coefficients of all pixels respectively.
[0054] Normalized center point offset coefficient Larger values indicate a more significant pixel and are more likely to be part of a defective area. In the practical inspection of powder metallurgy parts, the center point offset coefficient of defective areas is typically significantly higher than that of normal areas. For example, the center point offset coefficient of surface cracks is typically above 0.7; that of porosity defects is typically between 0.6 and 0.8; and the center point offset coefficient of normal surface areas is generally less than 0.4.
[0055] Step S5: Obtain the central importance of the pixel point to the grayscale image according to the center point offset coefficient of the pixel point.
[0056] This step is one of the core innovations of the present invention. Through the global-local dual correction mechanism, the central importance of the pixel point is calculated, achieving a balance between global consistency and local sensitivity.
[0057] Specifically, this step includes the following sub-steps: (1) Obtain the initial eigenvalue of the pixel point based on the center point offset coefficient of the pixel point; (2) According to the initial eigenvalues and corresponding window scale coefficients of the pixels in the neighborhood after the pixel points are window-downsampled by the window scale coefficient, the overall transformation scale corresponding to the grayscale image is obtained; (3) The overall importance of the pixel to the grayscale image is obtained based on the initial eigenvalue of the pixel, the overall transformation scale, the difference between the global grayscale center and the pixel, the transformation scale of the window scale coefficient corresponding to the pixel, and the global grayscale center. (4) According to the correction coefficient of the pixel point's overall importance in the neighborhood of the pixel point and the transformation scale of the window scale coefficient corresponding to the window where the pixel point is located, the correction coefficient of the pixel point's local information on the overall importance is obtained; (5) According to the initial eigenvalue and correction coefficient of the pixel point, the central importance of the pixel point to the grayscale image is obtained.
[0058] First, the initial eigenvalue of the pixel is calculated based on the center point offset coefficient : , in: Pixel The initial eigenvalue of , ranging from [0,1]; is the normalized center point offset coefficient; is the balance coefficient, ranging from [0,1]; For the detection of powder metallurgy parts, for the surface of general powder metallurgy parts, the preferred ,This not only retains the main information of the original offset coefficient but also enhances the ,effect of high offset coefficient through nonlinear transformation, while ,suppressing the influence of low offset coefficient, which is beneficial to highlight the ,defective area.
[0059] The specific selection method of this parameter needs to comprehensively consider many factors such as part material, surface characteristics, expected defect type and detection requirements. For parts with relatively smooth surfaces (such as bearing rings, sleeves, etc.), The value can be appropriately increased to the range of 0.75-0.8, which can retain more original offset coefficient information and reduce the false detection rate; for parts with rough surfaces or complex textures (such as gears, connecting rods, etc.), The value can be appropriately reduced to the range of 0.6-0.65, increasing the weight of nonlinear transformation and improving the detection sensitivity of subtle defects. Considering the defect type, when detecting crack defects, it is advisable to use a higher When detecting pore defects, since they usually appear as grayscale gradient areas, it is advisable to use a lower Value (0.65-0.7) to enhance contrast, for surface scratch defects, The value can be taken as the middle value of 0.7. Material properties will also affect The choice of iron-based powder metallurgy parts is usually The value is 0.65-0.7; for copper-based powder metallurgy parts, it can be 0.7-0.75. In practical applications, comparative experiments can be conducted on typical samples to analyze different For example, when testing a certain type of iron-based powder metallurgy brake pad, when λ=0.65, the detection rate of fine cracks is 92%, and the false detection rate is 8%; when λ=0.7, the detection rate is 95%, and the false detection rate is 5%; when =0.75, the detection rate is 93% and the false detection rate is 3%. Considering the detection rate and false detection rate, the final choice is =0.7 is the optimal value for this type of parts. By scientifically and rationally selecting the balance coefficient λ, the expressive power of the initial eigenvalue can be significantly improved, providing a more accurate basis for subsequent center importance calculations.
[0060] Then, calculate the overall transformation scale : , in: is the overall transformation scale, which represents the distribution of features within the entire image; Pixel The initial eigenvalue of ; Pixel The formula calculates the weighted average of the initial eigenvalue of each pixel and its window scale coefficient within the entire image, reflecting the global feature distribution of the entire image.
[0061] Next, calculate the pixel points The average transformation scale of the window : , in: Pixel The average transformation scale of the window; is the pixel in the window The initial eigenvalue of ; is the total number of pixels in the window. This formula calculates the average of the initial eigenvalues of all pixels in the window.
[0062] And the average transformation scale of the window except pixel (i, j) : , in: is the average transformation scale of the window excluding pixel (i, j); is the Kronecker function, which takes the value 1 when (i, j) = (m, n), otherwise it takes the value 0; is the number of pixels in the window except the center pixel; this formula calculates the average of the initial eigenvalues of all pixels in the window except the center pixel.
[0063] Based on the above calculations, the overall importance of the pixel is obtained : , in: is the overall importance of pixel (i, j); is the initial eigenvalue of the pixel; is the average transformation scale of the window where the pixel is located; is the average transformation scale of the window excluding the pixel points; is the difference between the pixel point and the global grayscale center point; is the regularization parameter; It is a small positive number to avoid the denominator being zero.
[0064] For powder metallurgy parts testing, it is preferred to take , . The selection of the value takes into account the typical range of grayscale differences, and the smaller A value of 0 will make the overall importance more sensitive to grayscale differences, which is beneficial for detecting defects with small grayscale changes (such as shallow cracks); a larger value A larger value will reduce the sensitivity and is suitable for detecting defects with obvious grayscale contrast, such as deep holes.
[0065] Then, calculate the local correction coefficient : , in: Pixel The local correction factor of is the overall importance of the pixel; is the initial eigenvalue of the pixel; is the average transformation scale within the pixel neighborhood window; Be a small positive number to avoid the denominator being zero.
[0066] The calculation formula is: , in: Pixel The average transformation scale within the neighborhood window; is the pixel point in the neighborhood The average transformation scale of the window; is the weight function; is the neighborhood window radius, usually ; is the total number of pixels in the neighborhood window.
[0067] Weight function The calculation formula is: , in: is the weight function, with a value range of ; Control the scope of influence of spatial distance; Control the influence range of grayscale similarity; is a natural exponential function. The weight function comprehensively considers the two factors of spatial distance and grayscale similarity. The closer the distance and the more similar the grayscale, the greater the weight of the pixel.
[0068] In the inspection of powder metallurgy parts, it is advisable to , . The choice of is related to the neighborhood window size, ensuring that the weights of the pixels at the edge of the window are not too small; Taking into account the grayscale value range [0,255] and the grayscale variation characteristics of the powder metallurgy parts surface, this value is moderate, which can distinguish different areas without being overly sensitive to small grayscale changes.
[0069] Finally, calculate the central importance of the pixel : , in: Pixel the central importance of is the overall importance of the pixel; is the local correction coefficient of the pixel. This formula multiplies the overall importance and the local correction coefficient to achieve a balance between global consistency and local sensitivity.
[0070] To ensure the consistency and comparability of the center importance, the calculation results are normalized: , in: is the normalized central importance, with a value range of ; and are the minimum and maximum values of the importance of the centers of all pixels, respectively.
[0071] Normalized central importance Larger values indicate more important pixels in the image and are more likely to be key components of the defect area. In the practical inspection of powder metallurgy parts, the central importance of different defect types varies significantly: for example, for crack defects, the central importance is typically above 0.8; for porosity defects, the central importance is typically between 0.7 and 0.9; for surface scratches, the central importance is typically between 0.6 and 0.8; and for normal surface areas, the central importance is generally less than 0.5.
[0072] Step S6: Divide the pixel points into regions of interest or regions of no interest according to their center point offset coefficients, and perform scale transformation on the regions of interest and regions of no interest in the grayscale image based on the importance of the center of each pixel point to complete the visual inspection of the part.
[0073] This step will divide the image into regions and perform scale transformation based on the center point offset coefficient and center importance calculated previously, highlighting the defective areas and achieving final visual inspection.
[0074] First, perform region division. In a preferred embodiment of the present invention, region division includes the following sub-steps: Set the center point offset coefficient threshold ; Set the center point offset coefficient to be greater than The pixel points are divided into regions of interest; the center point offset coefficient is less than or equal to The pixels of the image are divided into non-interest regions; the division results are morphologically processed to eliminate isolated points and small areas to ensure the smoothness and continuity of the region boundaries.
[0075] Threshold The choice of is crucial and affects the accuracy of region division. In this embodiment, an adaptive threshold method is used to determine the threshold based on the global statistical characteristics of the image: , in: is the center point offset coefficient threshold; and are the mean and standard deviation of the center point offset coefficients of all pixels respectively; To adjust the coefficient, control the sensitivity of the division.
[0076] For different types of powder metallurgy parts, The value can be adjusted: For parts with smoother surfaces (such as bearing rings, bushings, etc.), , at this time the threshold is set low, which can detect more subtle defects; for parts with more complex surface textures (such as gears, connecting rods, etc.), it is recommended to , improve the classification threshold and reduce false detection. In actual application, it can also be fine-tuned according to the specific part characteristics and detection requirements. For example, for high-precision brake pads, the The value was increased to 0.8 to improve the detection sensitivity.
[0077] To ensure the stability and continuity of the region segmentation results, morphological processing is performed on the initial segmentation results. This includes opening operations (erosion followed by dilation) to eliminate small noise points and closing operations (dilation followed by erosion) to fill small holes. For this operation, a 3×3 or 5×5 structuring element can be used, and one to two iterations are used. This effectively eliminates noise without over-smoothing the boundaries. Furthermore, regions with an area smaller than a preset threshold (e.g., 50 pixels for a 5MP image) are merged or deleted to avoid excessive fragmentation.
[0078] Then, scale transformation is performed. In a preferred embodiment of the present invention, scale transformation includes the following sub-steps: Design transformation functions to enhance contrast and details for regions of interest; design transformation functions to suppress noise and non-critical information for regions of non-interest; adjust the parameters of the corresponding transformation functions according to the central importance of each pixel; perform smooth transition processing at the region boundary to avoid discontinuous transformation; extract features from the transformed image to identify and classify surface defects of parts.
[0079] For the region of interest, the contrast enhancement transformation function T_{ROI} is used: , in: Pixels in the region of interest Gray value after transformation; is the original grayscale value; is the normalized central importance; is the grayscale mean of the local neighborhood of the pixel; is the enhancement coefficient, which controls the intensity of the enhancement.
[0080] Gray mean of the neighborhood of pixel (i, j) The calculation process is as follows: , in: is the grayscale mean of the neighborhood of pixel point (i, j); Represents the grayscale value of the pixel with coordinates (m,n), with a value range of [0,255]; is the neighborhood window radius, usually 3 or 5, corresponding to the neighborhood window size of 7×7 or 11×11; is the total number of pixels in the neighborhood window. This formula means calculating the average grayscale value of all pixels in the neighborhood window centered on pixel (i, j). Neighborhood window radius The choice of depends on the typical size of the defect and the image resolution. For small defects or high-resolution images, a smaller value to preserve local details; for large defects or low-resolution images, choose a larger value to get more context information.
[0081] For different types of defects in powder metallurgy parts, The value can be adjusted: For crack defects, it is advisable to , enhance the contrast of slender gaps; for pore defects, it is advisable to , moderately enhance the visibility of circular holes; for surface scratches, it is advisable to , to avoid over-enhancement that causes normal textures to be misjudged as defects.
[0082] For areas not of interest, a smooth transformation function is used .
[0083] , in: Pixels not in the area of interest Gray value after transformation; is the grayscale mean of the local neighborhood of the pixel; is the original grayscale value; is the normalized central importance; is the smoothing coefficient, which controls the intensity of smoothing.
[0084] In the inspection of powder metallurgy parts, it is advisable to , this value can effectively suppress the interference information of non-defective areas while retaining sufficient background reference information. For parts with different surface complexity, it can also be adjusted appropriately: for parts with relatively uniform surfaces, , further smooth the background; for parts with obvious surface texture, it is advisable to , retaining appropriate texture information as a reference.
[0085] To ensure smooth transition at the region boundary, weighted averaging is used for the boundary region: , in: Pixels in the boundary area Gray value after transformation; is the region of interest transformation function; is the transformation function of the non-interest region; is the distance from the pixel to the nearest region boundary; is the weight function.
[0086] Weight function The calculation formula is: in: is the weight function, with a value range of ; is the distance from the pixel to the nearest region boundary, in pixels; is the boundary transition threshold, in pixels; This weight function ensures a smooth transition in the boundary area and avoids obvious boundary lines in the transformed image.
[0087] In the inspection of powder metallurgy parts, it is advisable to Pixels, a moderate value that ensures smooth transitions without excessively blurring boundaries. For high-resolution images or larger parts, this value can be increased to 8-10 pixels; for small parts or when precise positioning of defect boundaries is required, it can be reduced to 3-4 pixels.
[0088] Finally, defect detection and classification are performed on the transformed image. Common defect types found in powder metallurgy parts can be categorized into several main types: surface cracks, porosity, scratches, dimensional deviation, burrs, and deformation. For each defect type, corresponding feature parameters are extracted, such as area, perimeter, aspect ratio, circularity, average grayscale, and grayscale standard deviation. Defect identification and classification are then performed using feature matching or classification algorithms.
[0089] For example, crack defects are characterized by being elongated (aspect ratio > 5) and having a low grayscale (20 to 50 units lower than the surrounding area); pore defects are characterized by being circular or elliptical (roundness > 0.8) and having a low grayscale; and surface burrs are characterized by having a high local grayscale (15 to 40 units higher than the surrounding area) and sharp edges (gradient value > 30). Feature template matching can accurately identify these different types of defects.
[0090] In addition, the severity of defects can be assessed by calculating parameters such as defect area, depth (estimated based on grayscale differences), and location, categorizing defect severity into four levels: minor, moderate, severe, and fatal. For example, for a 2mm diameter bearing bushing, a pore area less than 0.01mm² is considered minor, 0.01-0.05mm² is moderate, 0.05-0.1mm² is severe, and greater than 0.1mm² is fatal. Defect location also influences severity assessment; for example, a defect located in a critical stress-bearing area is considered more severe than a defect of the same size located near the edge. These assessment results provide a basis for subsequent quality control and defect treatment.
[0091] refer to Figure 2 The present invention also provides a visual inspection system for parts used in powder metallurgy processing, comprising: Image acquisition module 1, used to acquire a grayscale image of the part surface; center point offset coefficient acquisition module 2, used to obtain the window scale coefficient of each pixel in the grayscale image according to the grayscale changes of other pixels in the neighborhood of each pixel in the grayscale image; obtain the global grayscale center point according to the grayscale distribution of the grayscale image; obtain the center point offset coefficient of the pixel according to the window scale coefficient of the pixel, the grayscale difference between the pixel and other pixels in its neighborhood, the grayscale mean of the pixel and the pixels in the neighborhood, and the grayscale difference between the global grayscale center point of the grayscale distribution; overall importance acquisition module 3, used to obtain the overall importance of each pixel in the grayscale image to the grayscale image; correction coefficient acquisition module 4, used to obtain the correction coefficient brought by the local information of the pixel in the grayscale image to the overall importance; The center importance acquisition module 5 is used to obtain the overall importance of the pixel point in the grayscale image to the grayscale image based on the initial eigenvalue of the window where the pixel point is located, the overall transformation scale, the difference between the global grayscale center point and the pixel point, the average transformation scale of the window downsampling of the pixel point according to the scale coefficient of the window where the pixel point is located, and the global grayscale center point; obtain the correction coefficient brought by the local information of the pixel point in the grayscale image to the overall importance based on the initial eigenvalue of the window where the pixel point is located, the overall transformation scale, and the average transformation scale of the window downsampling of the pixel point according to the scale coefficient of the window where the pixel point is located; and obtain the center importance of the pixel point in the grayscale image to the grayscale image based on the initial eigenvalue of the pixel point and the correction coefficient; The scale transformation module 6 is used to divide the pixel points into the region of interest or the region of no interest according to the center point offset coefficient, and perform scale transformation on the region of interest and the region of no interest in the grayscale image based on the center importance of each pixel point to complete the visual inspection of the parts.
[0092] In a preferred embodiment of the present invention, the system also includes: a result output module 7 for displaying the detection results, including information such as defect location, type, severity, etc.; a parameter setting module 8 for setting and adjusting the parameters of each module, such as window size, weight coefficient, threshold, etc.; a data storage module 9 for storing detection results and historical data to support quality trend analysis and traceability; and a communication interface module 10 for exchanging data with a host computer, an industrial computer, or other equipment.
[0093] Modules exchange data via standardized interfaces, forming a closed-loop processing flow. The system's modular design facilitates maintenance and upgrades. Each module can be optimized based on actual needs, enhancing the system's adaptability and flexibility.
[0094] In terms of hardware implementation, the system can be built on an industrial computer or embedded platform, equipped with sufficient computing resources (such as an Intel i7 / i9 processor, 16GB or higher of RAM, and an NVIDIA GTX1660 or higher GPU) to meet real-time processing requirements. The system can process standard powder metallurgy parts at a speed of 10-15 pieces per second, meeting the real-time inspection requirements of production lines. The image acquisition device uses an industrial-grade camera with a resolution of at least 5MP and a ring-shaped LED light source system to ensure image quality. The system supports multiple communication protocols (such as Profinet, EtherCAT, and Modbus TCP), facilitating integration with production lines.
[0095] This system can be flexibly deployed at various stages of a powder metallurgy production line, such as post-molding inspection (detecting molding defects such as uneven density and cracks), pre-sintering inspection (detecting surface contamination and microcracks), and final quality inspection (comprehensive inspection for all defects). Parameter configuration can be adjusted based on the inspection requirements of each stage. The system also supports integration with enterprise information systems such as MES and ERP, enabling closed-loop management of quality data.
[0096] The visual inspection method and system for powder metallurgy parts provided by the present invention can effectively identify various defects on the surface of powder metallurgy parts, greatly improve the accuracy and efficiency of inspection, significantly improve the level of product quality control, and bring significant economic benefits to powder metallurgy manufacturing enterprises.
[0097] Although the embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
Claims
1. A method for visual inspection of parts used in powder metallurgy processing, characterized in that: The method includes: Obtain a grayscale image of the part surface; Obtaining a window scale coefficient for each pixel in the grayscale image according to grayscale changes of other pixels in a neighborhood of each pixel in the grayscale image; Obtaining a global grayscale center point according to the grayscale distribution of the grayscale image; For each pixel in the grayscale image, a center point offset coefficient of the pixel is obtained according to the window scale coefficient of the pixel, the grayscale difference between the pixel and other pixels in its neighborhood, the grayscale mean value between the pixel and the pixels in its neighborhood, and the grayscale difference between the pixel and the global grayscale center point; Obtaining the central importance of the pixel point to the grayscale image according to the center point offset coefficient of the pixel point; Divide the pixel points into regions of interest or regions of non-interest according to their center point offset coefficients, and perform scale transformation on the regions of interest and regions of non-interest in the grayscale image based on the importance of the centers of the pixels to complete visual inspection of parts; The obtaining of the central importance of the pixel point to the grayscale image includes: Obtaining the overall importance of each pixel in the grayscale image to the grayscale image; Obtaining a correction coefficient of the overall importance of the local information of each pixel in the grayscale image; The central importance of the pixel point to the grayscale image is obtained according to the central point offset coefficient, the overall importance and the correction coefficient of the pixel point.
2. The method for visual inspection of parts for powder metallurgy processing according to claim 1, characterized in that: The step of obtaining a grayscale image of a part surface comprises: Acquire images of the part surface through industrial cameras; Grayscale processing is performed on the acquired image of the part surface to obtain the grayscale image.
3. The method for visual inspection of parts for powder metallurgy processing according to claim 1, characterized in that: The step of obtaining the window scale coefficient of each pixel in the grayscale image according to the grayscale changes of other pixels in the neighborhood of each pixel in the grayscale image includes: For each pixel in the grayscale image, the grayscale of each pixel in a window centered on the pixel is taken as the window grayscale, and the window grayscale mean of all pixels in each window is taken as the window average of the window; The window coefficient of the window average value of all pixels in the grayscale image with respect to the window in which the pixels are located is used as the window scale coefficient of each pixel in the grayscale image.
4. The method for visual inspection of parts for powder metallurgy processing according to claim 1, characterized in that: Obtaining the global grayscale center point according to the grayscale distribution of the grayscale image includes: Taking the grayscale mean of all pixels in the grayscale image as the first grayscale mean of the grayscale image; Obtaining each suspected grayscale mean whose grayscale mean is greater than the first grayscale mean in the grayscale image, and taking the grayscale mean of each pixel point in the grayscale image whose grayscale mean is greater than the first grayscale mean as each suspected grayscale mean; Performing histogram statistics on the grayscale of all pixels in the grayscale image to obtain a grayscale distribution histogram of the grayscale image, and determining a grayscale distribution value corresponding to a highest peak in the grayscale distribution histogram as a second grayscale mean; Determining whether the second grayscale mean is the same as the first grayscale mean; If the second grayscale mean is the same as the first grayscale mean, taking the first grayscale mean as the global grayscale center point; If the second grayscale mean is different from the first grayscale mean, the second grayscale mean is used as the new first grayscale mean, and the operation of performing histogram statistics on the grayscales of all pixels in the grayscale image to obtain a grayscale distribution histogram of the grayscale image is returned.
5. The method for visual inspection of parts for powder metallurgy processing according to claim 1, characterized in that: Obtaining the central importance of the pixel point to the grayscale image includes: Obtaining an initial eigenvalue of the pixel point according to a center point offset coefficient of the pixel point; Obtaining an overall transformation scale corresponding to the grayscale image according to initial eigenvalues obtained from pixel points in a neighborhood after window downsampling of the pixel point at the window scale coefficient and the corresponding window scale coefficient; Obtaining an overall importance of the pixel to the grayscale image based on an initial eigenvalue of the pixel, an overall transformation scale, a difference between a global grayscale center point and the pixel, a transformation scale under a window corresponding to a window scale coefficient of the pixel, and the global grayscale center point; Obtaining a correction coefficient for the overall importance of the local information of the pixel point based on a correction coefficient for the overall importance of the pixel point in the neighborhood of the pixel point and a transformation scale under a window corresponding to a window scale coefficient of the pixel point; The central importance of the pixel point with respect to the grayscale image is obtained according to the initial eigenvalue of the pixel point and the correction coefficient.
6. The method for visual inspection of parts for powder metallurgy processing according to claim 5, characterized in that: Obtaining the overall importance of the pixel to the grayscale image based on the initial eigenvalue of the pixel, the overall transformation scale, the difference between the global grayscale center and the pixel, the transformation scale under the window corresponding to the window scale coefficient of the pixel, and the global grayscale center, includes: Obtaining an average transformation scale of all pixels in the pixel window based on a window scale coefficient of the window where the pixel is located; Based on the window scale coefficient, obtaining an average transformation scale of other pixels in the pixel window except the pixel; The overall importance of the pixel point to the grayscale image is obtained based on the average transformation scale of all pixels in the pixel window, the average transformation scale of other pixels in the pixel window except the pixel point, the grayscale difference between the pixel point and the global grayscale center point, and preset parameters.
7. The method for visual inspection of parts for powder metallurgy processing according to claim 5, characterized in that: The correction coefficient of the pixel point's local information on the overall importance is obtained based on the correction coefficient of the pixel point's neighborhood on the overall importance and the transformation scale of the window scale coefficient corresponding to the window where the pixel point is located, including: Calculating the average transformation scale of the pixels in the neighborhood window of the window where the pixel point is located; According to the overall importance of the pixel point to the grayscale image, the initial eigenvalue of the window where the pixel point is located, and the average transformation scale of the pixels in the neighborhood window of the window where the pixel point is located, a correction coefficient brought by the local information of the pixel point to the overall importance is obtained.
8. The method for visual inspection of parts for powder metallurgy processing according to claim 1, characterized in that: The dividing of pixels into regions of interest or regions of no interest according to their center point offset coefficients includes: Set the center point offset coefficient threshold; Divide the pixel points whose center point offset coefficient is greater than the center point offset coefficient threshold into a region of interest; Divide the pixel points whose center point offset coefficient is less than or equal to the center point offset coefficient threshold into non-interest areas; Morphological processing is performed on the division results to eliminate isolated points and small areas and ensure the smoothness and continuity of the area boundaries.
9. The method for visual inspection of parts for powder metallurgy processing according to claim 1, characterized in that: The scaling of the region of interest and the region of non-interest in the grayscale image is performed based on the central importance of each pixel, including: Designing a transformation function for enhancing contrast and details for the region of interest; Designing a transformation function for suppressing noise and non-critical information for the non-interested region; Adjust the parameters of the corresponding transformation function according to the central importance of each pixel; Perform smooth transition processing at the region boundary to avoid discontinuous transformation; Extract features from the transformed image to identify and classify surface defects of parts.
10. Visual inspection system for parts used in powder metallurgy processing, characterized in that: The system includes: Image acquisition module, used to obtain grayscale images of the part surface; A center point offset coefficient acquisition module is used to obtain a window scale coefficient for each pixel in the grayscale image based on the grayscale changes of other pixels in the neighborhood of each pixel in the grayscale image; obtain a global grayscale center point based on the grayscale distribution of the grayscale image; and obtain a center point offset coefficient for the pixel based on the window scale coefficient of the pixel, the grayscale difference between the pixel and other pixels in its neighborhood, the grayscale mean of the pixel and the pixels in its neighborhood, and the grayscale difference between the global grayscale center point of the grayscale distribution; An overall importance acquisition module, configured to acquire the overall importance of each pixel in the grayscale image to the grayscale image; A correction coefficient acquisition module is used to obtain a correction coefficient of the local information of the pixel point in the grayscale image to the overall importance; A center importance acquisition module is configured to obtain the overall importance of the pixel point in the grayscale image to the grayscale image based on the initial eigenvalue of the window where the pixel point is located, the overall transformation scale, the difference between the global grayscale center point and the pixel point, the average transformation scale of the window downsampling of the pixel point according to the scale coefficient of the window where the pixel point is located, and the global grayscale center point; obtain a correction coefficient brought by the local information of the pixel point in the grayscale image to the overall importance based on the initial eigenvalue of the window where the pixel point is located, the overall transformation scale, and the average transformation scale of the window downsampling of the pixel point according to the scale coefficient of the window where the pixel point is located; and obtain the center importance of the pixel point in the grayscale image to the grayscale image based on the initial eigenvalue of the pixel point and the correction coefficient; The scale transformation module is used to divide the pixel points into regions of interest or regions of non-interest according to the center point offset coefficient of the pixel points, and scale the regions of interest and regions of non-interest in the grayscale image based on the central importance of each pixel point to complete the visual inspection of parts.
Citation Information
Patent Citations
PCB drilling offset detection method based on computer vision
CN114565610A
Profile defect visual inspection method based on image processing
CN116721106A
Photovoltaic panel image adaptive enhancement method based on image processing
CN117078567A
Optical cable surface defect detection method
CN117173166A
Defect detection method and system for automotive upholstery
CN120355720A
Cited By
Image enhancement method and system for aerospace part inspection
CN120746849A
Intelligent control system and method for sintering temperature of powder metallurgy green body
CN120848643A
Intelligent control system and method for sintering temperature of powder metallurgy blank
CN120848643B
Casting surface defect detection method and system
CN120976216A
A method and system for detecting casting surface defects
CN120976216B