Automobile die production quality control method based on image enhancement

By using the adaptive enhancement weight method to distinguish between burrs and noise, the problem that traditional unsharp mask algorithms cannot be adjusted specifically in image enhancement is solved, and efficient and accurate control of automobile mold production quality is achieved.

CN120807352AActive Publication Date: 2025-10-17XIAN WEIER PRECISION TECH CO LTD

Patent Information

Application Number
CN202511284583.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-10-17
Estimated Expiration
2045-09-10

AI Technical Summary

Technical Problem

Traditional unsharp masking algorithms are unable to make targeted adjustments based on feature differences in different regions during the image enhancement process, making it difficult to distinguish between burrs and noise, affecting the accuracy and efficiency of quality control in automotive mold production.

Method used

An adaptive enhancement weight method is used to dynamically adjust the image enhancement strength by calculating the directional consistency index and neighborhood grayscale disturbance index of each pixel to distinguish burrs from noise.

Benefits of technology

It achieves precise enhancement of burrs and effective suppression of noise, improving the accuracy and reliability of automobile mold production quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807352A_ABST
    Figure CN120807352A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an automobile die production quality control method based on image enhancement. The method comprises the following steps: constructing a two-dimensional evaluation system for each target pixel point in a mold grey-scale map: determining a direction consistency index based on the gradient direction difference between the target pixel point and each pixel point in a neighborhood of the target pixel point so as to distinguish burrs with linear characteristics and noise with random directions; and calculating and removing the influence of the pixel point on the neighborhood gray scale sorting order, and determining a neighborhood gray scale disturbance index so as to accurately identify isolated salt and pepper noise points. And combining the two indexes to calculate a self-adaptive enhancement weight, and correcting the non-sharpening mask algorithm by using the self-adaptive enhancement weight. According to the method, by calculating the self-adaptive enhancement weight, the selectivity of real defects such as mold burrs is remarkably enhanced, meanwhile, noise is effectively restrained, and the accuracy and efficiency of automatic quality control are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a vehicle mold production quality control method based on image enhancement. BACKGROUND

[0002] As the core process equipment for vehicle manufacturing, vehicle molds determine the forming precision and surface quality of vehicle parts, and their own processing quality and surface state have a crucial influence on the assembly performance, safety performance and service life of the vehicle. In the production process of vehicle molds, the existence of surface burrs, scratches, depressions and other defects not only leads to an increase in part processing errors, but also may cause jamming, wear and other problems in the subsequent assembly process, and in severe cases, may even affect the running safety of the vehicle. Therefore, efficient and accurate quality control of vehicle molds, timely identification and elimination of surface defects, are key links to ensure the quality of vehicle manufacturing.

[0003] Traditional vehicle mold production quality control mainly relies on manual visual inspection, which has obvious limitations in modern mass production. Manual visual inspection requires high experience and concentration of the inspector, and long-time work can easily cause visual fatigue, resulting in missed detection or misjudgment.

[0004] In recent years, image processing-based vehicle mold production quality control methods have gradually attracted attention. In related technologies, a non-sharpening mask algorithm is often used to enhance the image of the vehicle mold. However, this algorithm has significant limitations. It uses a uniform enhancement weight to process the entire image, and cannot adjust according to the feature differences of different regions in the image. This leads to the simultaneous enhancement of burrs and noise while enhancing effective features such as normal contours and textures, making it difficult to distinguish between noise and burrs, seriously interfering with the effective identification of defects such as burrs, and thus affecting the accuracy and efficiency of vehicle mold production quality control. SUMMARY

[0005] To solve the above-mentioned technical problems of the non-sharpening mask algorithm using a uniform enhancement weight, which cannot adjust according to the characteristics of different regions, leading to the simultaneous enhancement of burrs and noise while enhancing effective features, making it difficult to distinguish between the two, and thus interfering with defect identification and affecting the accuracy of quality control, the present application provides a vehicle mold production quality control method based on image enhancement, which comprises the following steps: An image of a car mold is collected, and a gray-scale image of the car mold is obtained by preprocessing the image; for each target pixel point in the gray-scale image, a direction consistency index of the target pixel point is determined based on a gradient direction difference between the target pixel point and each pixel point in a neighborhood of the target pixel point; a neighborhood gray-scale disturbance index of the target pixel point is determined by comparing a number of rank position changes of remaining pixel points in the neighborhood before and after the target pixel point is removed based on gray-scale values of the target pixel point and each pixel point in the neighborhood of the target pixel point; an adaptive enhancement weight of the target pixel point is calculated based on the direction consistency index and the neighborhood gray-scale disturbance index; the adaptive enhancement weight is positively correlated with the direction consistency index and negatively correlated with the neighborhood gray-scale disturbance index; the non-sharpening mask algorithm is modified by using the adaptive enhancement weight, and a modified non-sharpening mask algorithm is obtained; and the target pixel point is processed by using the modified non-sharpening mask algorithm, and an enhanced target pixel point is obtained; all enhanced target pixel points in the gray-scale image are obtained one by one, and an enhanced car mold image is obtained, so that production quality control of the car mold is realized.

[0006] By constructing and calculating an adaptive enhancement weight for each target pixel point, the adaptive enhancement weight is generated based on two core dimensions: one is to distinguish burrs with linear features from noise with random directions by using local consistency of pixel gradient directions; and the other is to identify isolated salt and pepper noise points by using a disturbance degree of pixel gray-scale values to a neighborhood rank structure. The present application can selectively and significantly enhance real defect details such as burrs in the mold image, while effectively suppressing the enhancement of artifacts such as salt and pepper noise, and fundamentally improves the image quality, and lays a solid data foundation for subsequent accurate and automatic quality control.

[0007] Preferably, the direction consistency index of the target pixel point is determined based on a gradient direction difference between the target pixel point and each pixel point in the neighborhood of the target pixel point, comprising: calculating an angle difference value of a gradient direction angle of the target pixel point and each pixel point in the neighborhood of the target pixel point; and quantifying the direction consistency index of the target pixel point by using a normalized difference between a sum of squares of cosines and a sum of squares of sines of all angle difference values.

[0008] By using a normalized difference between a sum of squares of cosines and a sum of squares of sines of all gradient direction angle differences, the present application accurately maps the consistency index of the gradient direction of each pixel in the neighborhood into a standardized numerical interval. This method is very sensitive to small changes in direction, and the calculation result is stable, which can provide a more reliable and more distinguishable judgment basis for the generation of subsequent adaptive weights.

[0009] Preferably, the direction consistency index of the target pixel point satisfies a relationship: ; wherein, is the total number of pixels in the neighborhood of the target pixel point; is the angle difference of the gradient direction angle of the target pixel point and the pixel point in the neighborhood of the target pixel point; is a sine function; is a cosine function.

[0010] Preferably, the angle difference is the minimum included angle between the gradient direction of the target pixel point and the gradient direction of each pixel point in the neighborhood, and the value range is 0 degrees to 90 degrees.

[0011] Preferably, the gradient direction angle is calculated by a Sobel operator.

[0012] Preferably, the comparison of the number of changes in the ranking positions of the remaining pixel points in the neighborhood before and after the target pixel point is removed comprises: arranging the gray values of the pixel points in the neighborhood of the target pixel point in spatial order to form a first sequence; removing the gray value of the target pixel point from the first sequence to form a second sequence; sorting the first sequence in ascending order to obtain a first ascending order position sequence; sorting the second sequence in ascending order to obtain a second ascending order position sequence; obtaining the number of elements in the first ascending order position sequence and the second ascending order position sequence that have changed; sorting the first sequence in descending order to obtain a first descending order position sequence; sorting the second sequence in descending order to obtain a second descending order position sequence; and obtaining the number of elements in the first descending order position sequence and the second descending order position sequence that have changed.

[0013] The method reveals the influence of the target pixel point on the stability of the gray scale structure of its neighborhood by comparing the changes in the ranking positions of the pixel points in the neighborhood when the target pixel point is included and when the target pixel point is not included. This judgment method based on the ranking order is particularly effective for identifying extremely isolated salt and pepper noise points, because it can amplify the destructive effect of a single abnormal value on the overall ranking, thereby achieving more accurate quantitative identification of such noise.

[0014] Preferably, the neighborhood gray scale disturbance index of the target pixel point satisfies the relationship: ; wherein, is the number of elements in the first ascending order position sequence and the second ascending order position sequence of the target pixel point that have changed; is the number of elements in the first descending order position sequence and the second descending order position sequence of the target pixel point that have changed; is the total number of pixels in the neighborhood of the target pixel point; is a maximum function.

[0015] The application ensures that the damage of the neighborhood gray scale order by the extremely bright noise point or the extremely dark noise point can be effectively captured and quantified by simultaneously calculating the bit change quantity under the ascending order and descending order sorting, and taking the maximum value. The mechanism of bidirectional detection and taking the maximum value improves the sensitivity and robustness of the detection of various salt and pepper noises.

[0016] Preferably, the adaptive enhancement weight of the target pixel point satisfies the relationship: ; wherein, is a preset sensitivity adjustment coefficient; is a direction consistency index of the target pixel point; is a neighborhood gray scale disturbance index of the target pixel point; is a preset small value; is a hyperbolic tangent function.

[0017] The scheme adopts the hyperbolic tangent function to process the ratio of the direction consistency and the gray scale disturbance. The hyperbolic tangent function can not only smoothly constrain the weight value in a preset stable interval to prevent the enhancement from being out of control and image artifacts due to the too large ratio, but also can maintain the sensitive response to the key feature change, thereby greatly improving the stability and robustness of the entire algorithm while ensuring the enhancement effect.

[0018] Preferably, the gray scale image of the automobile mold obtained by preprocessing the automobile mold image comprises: performing gray scale processing and denoising processing on the automobile mold image to obtain a gray scale image; performing edge extraction on the gray scale image, and recording all pixel points in the region extracted by the edge extraction as target pixel points.

[0019] Preferably, the edge extraction on the gray scale image comprises: performing edge extraction on the gray scale image by using a Canny edge detection algorithm.

[0020] The application proposes an adaptive image enhancement method based on double-dimensional evaluation to solve the technical problem that defects and noises in an automobile mold image are difficult to distinguish. It discards the fixed enhancement weight of the traditional non-sharpening mask algorithm, and constructs a double evaluation system for each pixel point: the direction consistency index is used to distinguish the burr with linear features from the noise with random direction, and the neighborhood gray scale disturbance index is used to identify the isolated salt and pepper noise point. Based on this, the adaptive enhancement weight is calculated, thereby realizing the accurate enhancement of the real defects and the intelligent suppression of various noises, and improving the accuracy and reliability of the automatic quality control. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1A flow chart of a quality control method for automobile mold production based on image enhancement is provided for the embodiments of the present application. DETAILED DESCRIPTION

[0022] The embodiments of the present application provide a quality control method for automobile mold production based on image enhancement, as shown in the figure, the method comprises steps S100-S600: Figure 1 Step S100, collect the image of the automobile mold, and pre-process the image to obtain a gray image of the automobile mold.

[0023] It should be noted that this step is the data acquisition and preparation stage of the entire quality control process. In order to ensure the accuracy of the subsequent defect analysis, high-quality original images must be obtained first, and a series of preprocessing operations must be performed.

[0024] Specifically, first, a high-definition industrial camera deployed on the production line is used to collect the original image of the surface of the automobile mold. Then, the automobile mold image is subjected to grayscale processing and denoising processing to obtain a gray image. For example, a Gaussian smoothing filter can be used to denoise the gray image to suppress Gaussian noise. Gaussian smoothing filter denoising is a prior art and will not be described in detail here.

[0025] As a preferred embodiment, in order to focus computing resources on the mold itself and avoid interference from the background area, this step further extracts edges from the gray image.

[0026] Illustratively, the Canny edge detection algorithm is used to extract edges from the gray image. The Canny edge detection algorithm is selected because of its good noise suppression ability and ability to produce single-pixel width edges. After edge extraction, the edge profile and all pixel points inside the edge region can be recorded as target pixel points, thereby improving the operation efficiency. Canny edge detection is a prior art and will not be described in detail here.

[0027] At this point, the gray image of the automobile mold and a number of target pixel points have been obtained.

[0028] Step S200, for each target pixel point in the gray image, based on the gradient direction difference between the target pixel point and each pixel point in its neighborhood, determine the direction consistency index of the target pixel point.

[0029] ​It should be noted that this step is the first calculation basis for distinguishing burrs from salt and pepper noise in the present invention. Burrs, as microscopic extensions of the mold surface, appear in the image as elongated structures with continuous grayscale changes. Therefore, the gradient directions of the pixels within them should be highly consistent within the local neighborhood. Salt and pepper noise, on the other hand, appears as isolated pixels with sudden grayscale changes, and their gradient directions are generally random and unrelated to the gradient directions of the pixels in their neighborhood. This step aims to construct a formula to quantify the directional consistency feature.

[0030] Specifically, for each target pixel in the grayscale image, perform the following operations: First, use The operator calculates the target pixel point at and The gradient in the direction is calculated based on this to calculate the gradient direction angle of the target pixel.

[0031] Secondly, for the target pixel, define a pixel with a size of The neighborhood window contains Pixels. The rectangular neighborhood window has 1 target pixel and Neighborhood pixels.

[0032] As a preferred solution, the size of the neighborhood window The value range of .size The choice of needs to balance the ability to capture details and the robustness to noise. When the mold image resolution is high and the burr features are fine, a smaller ,like or , to more accurately reflect local features. When the image noise is large or the burr features are coarse, a larger ,like or , to obtain more stable statistical characteristics and enhance the ability to suppress noise. In this embodiment, select A better balance can be achieved.

[0033] Then, in order to quantify the consistency of the direction of the target pixel and each pixel in its neighborhood, the minimum angle between the gradient directions of the two pixels needs to be calculated. Considering that the gradient directions of the edges on both sides of the burr may be opposite, they should still be considered consistent. The calculation should not distinguish between the same direction and the opposite direction. According to this logic, the angle difference Satisfies the relationship: ; in, is the target pixel and its neighborhood The angle difference of the gradient direction angle of each pixel; is the first pixel in the neighborhood of the target pixel. The gradient direction angle of each pixel; is the gradient direction angle of the target pixel; is the absolute value symbol; is the remainder operator, Minimum function.

[0034] This formula ensures that the calculated angle difference The value range is from 0 to 90 degrees. When the two gradient directions are parallel or antiparallel, ; when they are perpendicular, From this formula, we can see that The smaller the value, the more consistent the directions of the two pixels are.

[0035] Finally, in order to comprehensively evaluate the overall directional consistency of all pixels in the entire neighborhood with the target pixel, the normalized difference between the cosine square sum and the sine square sum of all angle differences between the gradient direction angles of the target pixel and each pixel in its neighborhood is used to quantify the directional consistency index of the target pixel. Satisfies the relationship: ; in, is the total number of pixels in the neighborhood of the target pixel; is the target pixel and its neighborhood The angle difference of the gradient direction angle of each pixel; is a sine function; is the cosine function.

[0036] In this formula, when the gradient direction of all pixels in the neighborhood is exactly the same as that of the target pixel, that is, all hour, , , at this time the direction consistency index of the target pixel point , indicating that the neighborhood is most likely to be a burr or a smooth mold surface. On the contrary, when the gradient direction in the neighborhood is completely randomly distributed, exist The mathematical expectation of the uniform distribution is , at this time the direction consistency index of the target pixel point , indicating that the neighborhood is very likely to be a salt and pepper noise area. Therefore, the directional consistency index of the target pixel point The value range is , the closer its value is to 1, the stronger the directional consistency is.

[0037] At this point, the directional consistency index of the target pixel is obtained.

[0038] Step S300, based on the gray value of the target pixel point and each pixel point in its neighborhood, comparing the number of ordering bit changes of the remaining pixel points in the neighborhood before and after removing the target pixel point, determining the neighborhood gray disturbance index of the target pixel point.

[0039] It should be noted that relying only on the direction consistency index may misjudge a noise point that is consistent with the neighborhood direction in some cases. Therefore, the present application introduces a second calculation basis, that is, a supplementary judgment from the spatial structure of the gray value. The gray value of the mold surface and burr has spatial continuity, and the gray value ordering mode of the pixel points in its neighborhood is stable and regular; while the salt and pepper noise as an isolated extremely bright or extremely dark point, will seriously destroy the original gray ordering structure in its neighborhood.

[0040] Specifically, this step can be refined as follows: First, arrange the gray values of each pixel point in the neighborhood of the target pixel point in spatial order, for example, from left to right, from top to bottom, to form a first sequence. Secondly, sort the first sequence in ascending order to obtain a first ascending bit sequence, and sort the first sequence in descending order to obtain a first descending bit sequence.

[0041] Secondly, remove the gray value of the target pixel point from the first sequence to form a second sequence. Then, sort the second sequence in ascending order to obtain a second ascending bit sequence, and sort the second sequence in descending order to obtain a second descending bit sequence.

[0042] Then, calculate the number of elements whose bit changes in the first ascending bit sequence and the second ascending bit sequence , and the number of elements whose bit changes in the first descending bit sequence and the second descending bit sequence .

[0043] Finally, according to and , the neighborhood gray disturbance index of the target pixel point is determined. The neighborhood gray disturbance index of the target pixel point satisfies the relationship: ; Wherein, is the number of elements whose bit changes in the first ascending bit sequence and the second ascending bit sequence of the target pixel point; is the number of elements whose bit changes in the first descending bit sequence and the second descending bit sequence of the target pixel point; is the total number of pixel points in the neighborhood of the target pixel point; is the maximum function.

[0044] In the formula, if the target pixel point is a salt and pepper noise point, its gray value is extreme, removing it will cause the gray order of the neighborhood to rearrange dramatically, resulting in a very large value, and tending to 1. Conversely, if the target pixel point is located on the surface of the mold or burr, its gray value is continuous with the neighborhood, removing it has little effect on the gray order of the neighborhood, tending to 0.

[0045] It should be noted that the maximum change value is obtained by simultaneously using the ascending and descending sorting methods to ensure that all types of salt and pepper noise can be captured. For example, a bright noise point with a gray value of 255 is always at the end in ascending order, and removing it has little effect on the relative order of the previous elements. But in descending order, it is at the beginning, and removing it will cause all subsequent elements to move forward, resulting in a huge change. By taking the maximum value in , it can be ensured that whether the noise is extremely bright or extremely dark, its destructive effect can be effectively measured.

[0046] In order to more clearly illustrate the specific effect of the above operation, we will illustrate it with two examples, one in which the target pixel point is a noise point and the other in which the target pixel point is not a noise point.

[0047] Example 1, assume that the gray value of any target pixel point is 255, which is a noise point, and the gray values of the pixels in its neighborhood are as follows: ; The corresponding first sequence , the sequence ranked in ascending order is , and at this time, the corresponding first ascending order sequence is .

[0048] After removing the gray value 255 of the target pixel point from the first sequence, the corresponding second sequence , the sequence ranked in ascending order is , and at this time, the corresponding second ascending order sequence is .

[0049] Now, get the ascending order change quantity of all non-target pixel points . Compare the bit positions of the corresponding elements in the first ascending order sequence without the target pixel point and the second ascending order sequence without the target pixel point: the first ascending order sequence is , and the sequence without the target pixel point is . Now compare and the number of elements whose order changes in and is exactly the same, that is .

[0050] Next, using the first sequence obtained above, the sequence ranked in descending order of the first sequence is , at this time, the corresponding first descending order sequence is .

[0051] Using the second sequence obtained above, the sequence ranked in descending order of the second sequence is , at this time, the corresponding second descending order sequence is .

[0052] Now, get the number of descending order changes of the non-target pixel points . Compare the order of the corresponding elements in the first descending order sequence and the second descending order sequence without the order of the target pixel points. The first descending order sequence , the sequence without the order of the target pixel point 1 is . Now compare and , the number of elements whose order changes in and is not the same, that is .

[0053] Then the neighborhood gray disturbance index of the target pixel point =1; it can be seen that when the target pixel point is a salt and pepper noise, it greatly destroys the order of the neighborhood gray value, and the calculation result of D is 1.

[0054] Example 2, the target pixel point is a non-noise point, assuming that the gray value of the target pixel point is 52, the gray value distribution of its neighborhood is flat, simulating a continuous mold surface, assuming that the gray value of each pixel point in its neighborhood is as follows: ; Then the corresponding first sequence , the sequence ranked in ascending order of the first sequence is , at this time, the corresponding first ascending order sequence is .

[0055] After removing the gray value 52 of the target pixel point from the first sequence, the corresponding second sequence , the sequence ranked in ascending order of the second sequence is , at this time, The corresponding second ascending order sequence is .

[0056] Now, get the number of ascending position changes of all non-target pixels Compare the first ascending sequence excluding the target pixel with the corresponding element in the second ascending sequence: the first ascending sequence is , the sequence that does not contain the target pixel at position 5 is Now compare and The number of elements whose positions have changed in , we find and There are 4 elements that are inconsistent, that is, .

[0057] Next, calculate the number of elements that change between the first descending sequence and the second descending sequence. , the sequence after the first sequence is ranked in descending order is ,at this time, The corresponding first descending order sequence is .

[0058] Using the second sequence obtained above , the sequence after the second sequence is ranked in descending order is ,at this time, The corresponding second descending order sequence is .

[0059] Now, get the descending order change count of all non-target pixels Compare the first descending sequence that does not contain the target pixel's position with the position of the corresponding element in the second descending sequence. , the sequence that does not contain the target pixel at position 5 is Now compare and The number of elements whose positions have changed in , we find and The four elements in are inconsistent, that is, .

[0060] Then the neighborhood grayscale disturbance index of the target pixel is =0.5; It can be seen that when the target pixel is an ordinary pixel on a smooth surface, it does not seriously damage the grayscale order of the neighborhood. The calculated result is 0.5.

[0061] It can be clearly seen from the two examples that the operation can effectively distinguish noise and effective features: the noise points will generate a neighborhood gray disturbance index close to 1, and the pixel points on the mold surface will generate a neighborhood gray disturbance index obviously smaller, thereby realizing the quantitative distinction between the two.

[0062] At this point, the neighborhood gray disturbance index of the target pixel point is obtained.

[0063] Step S400, based on the direction consistency index and the neighborhood gray disturbance index, the adaptive enhancement weight of the target pixel point is calculated.

[0064] It should be noted that this step is the decision and execution link of the method of the present application. The non-sharpening mask algorithm is a classical image enhancement technology, which constructs the difference value between the original image and the blurred image, and superimposes the difference value on the original image according to a certain weight, so as to highlight the edge and detail features in the image. Based on this, the present application selects this algorithm to enhance the automobile mold image.

[0065] However, the traditional non-sharpening mask algorithm uses a fixed weight to control the enhancement intensity, and cannot dynamically adjust according to the feature differences of different regions in the image, such as the effective area of the mold, the burr defect area, and the noise area, resulting in that while enhancing the effective features of the mold, the burrs and noises are also enhanced synchronously, causing the defects and noises to be difficult to distinguish.

[0066] Therefore, this step fuses the direction consistency index and the neighborhood gray disturbance index to construct an adaptive weight, so that the burrs and the effective area of the mold surface obtain high-weight enhancement, and the noise area obtains low-weight suppression, thereby overcoming the limitations of the traditional algorithm.

[0067] Specifically, the adaptive enhancement weight is positively correlated with the direction consistency index and negatively correlated with the neighborhood gray disturbance index. In an optional implementation, the adaptive enhancement weight of the target pixel point is satisfies the relationship: ; wherein, is a preset sensitive adjustment coefficient; is the direction consistency index of the target pixel point; is the neighborhood gray disturbance index of the target pixel point; is a preset small value for preventing the denominator from being 0, which can be set to 0.01, or can be set according to requirements; is a hyperbolic tangent function.

[0068] In the formula, for the burrs or the mold surface, the direction consistency index tends to 1, and the neighborhood gray disturbance index tends to 0, at this time For salt and pepper noise, its directional consistency index approaches 0, and the neighborhood grayscale disturbance index approaches 1. Approaching 0. The burrs or molds are successfully and significantly distinguished from the noise numerically. Will Map to It acts as a suppressor here to prevent the core ratio from being too large and causing the weight to get out of control. At the same time, it is insensitive to small ratio changes, which enhances the stability of the algorithm. Since the direction consistency index and the neighborhood grayscale disturbance index are both positive, the weight value range is .

[0069] It should be noted that the preset sensitivity adjustment coefficient The value range of . Controls the weight function The steepness of the ratio response. When the value is small, such as 0.1 or 0.2, the weight change curve is relatively gentle, and the enhancement effect is softer, which is suitable for scenes that require high retention of original image details. When the value is larger, such as 0.5 or 0.8, the weight change curve is steeper, which can more significantly distinguish burrs from noise and achieve stronger contrast enhancement. It is suitable for scenes where burr features are not obvious and need to be highlighted. A balanced enhancement effect and noise suppression capability can be achieved. Implementation personnel can choose according to their needs.

[0070] At this point, the adaptive enhancement weight of the target pixel is obtained.

[0071] Step S500: Use the adaptive enhancement weight to modify the unsharp mask algorithm to obtain a modified unsharp mask algorithm, and use it to process the target pixel to obtain an enhanced target pixel.

[0072] It should be noted that this step is the core execution and effect realization of the method of the present invention.

[0073] Specifically, adaptive enhancement weights are used to modify the traditional unsharp masking algorithm. Unsharp masking is a state-of-the-art technology in image processing. Its basic principle is to blur the original image and then overlay the difference between the original and blurred images, also known as a mask, onto the original image with a certain weight to achieve an enhancement effect. The present invention applies adaptive weights to the mask overlay process to obtain the final enhanced target pixel.

[0074] Since the unsharp mask algorithm is an existing technology, the present invention only modifies its weight parameters and other steps are not modified, so they are not described in detail here.

[0075] Through this method, the burr and the details of the mold surface are adaptively enlarged, and the adaptive enhancement weight value of the noise area is small, and the corresponding mask is almost not added to the original image, and even weakened, so as to output the high-quality enhanced target pixel point.

[0076] Step S600, all enhanced target pixel points in the gray image are obtained one by one, and the enhanced automobile mold image is obtained, and the production quality control of the automobile mold is realized.

[0077] It should be noted that this step is the final output and application of the method of the present application.

[0078] Specifically, since a plurality of target pixel points are obtained in step S100, it is necessary to calculate the adaptive enhancement weight of all target pixel points through steps S200-S400, and then process all target pixel points by using the corrected non-sharpening mask algorithm of step S500 to obtain all enhanced target pixel points.

[0079] Recombining these enhanced target pixel points can obtain the final automobile mold image in which the burr feature is significantly enhanced and the noise is effectively suppressed. The enhanced image provides a high-quality data basis for subsequent more accurate and reliable automatic production quality control, thereby effectively improving the production quality control level of the automobile mold.

[0080] The above are preferred embodiments of the present application, and are not intended to limit the protection scope of the present application, therefore: any equivalent changes made on the structure, shape, principle of the present application should be covered within the protection scope of the present application.

Claims

1. A method for automobile mold production quality control based on image enhancement, characterized in that: Including steps: Collect automobile mold images and preprocess them to obtain grayscale images of the automobile mold; For each target pixel in the grayscale image, determining a directional consistency index of the target pixel based on the gradient direction difference between the target pixel and each pixel in its neighborhood; Based on the grayscale values ​​of the target pixel and each pixel in its neighborhood, comparing the number of changes in the ranking of the remaining pixels in the neighborhood before and after removing the target pixel, and determining the neighborhood grayscale disturbance index of the target pixel; Calculating the adaptive enhancement weight of the target pixel based on the directional consistency index and the neighborhood grayscale disturbance index; The adaptive enhancement weight is positively correlated with the direction consistency index and negatively correlated with the neighborhood grayscale disturbance index; Using the adaptive enhancement weight to modify the unsharp mask algorithm to obtain a modified unsharp mask algorithm, and using the modified unsharp mask algorithm to process the target pixel to obtain an enhanced target pixel; All enhanced target pixels in the grayscale image are acquired one by one to obtain an enhanced automobile mold image, thereby achieving production quality control of the automobile mold.

2. The automobile mold production quality control method based on image enhancement according to claim 1 is characterized in that: Determining the directional consistency index of the target pixel point based on the gradient direction difference between the target pixel point and each pixel point in its neighborhood includes: Calculate the angle difference between the target pixel and the gradient direction angle of each pixel in its neighborhood; The normalized difference between the cosine square sum and the sine square sum of all angle differences is used to quantify the directional consistency index of the target pixel point.

3. The automobile mold production quality control method based on image enhancement according to claim 1 or 2, characterized in that: The direction consistency index of the target pixel point Satisfies the relationship: ; in, is the total number of pixels in the neighborhood of the target pixel; is the target pixel and its neighborhood The angle difference of the gradient direction angle of each pixel; is a sine function; is the cosine function.

4. The automobile mold production quality control method based on image enhancement according to claim 2 is characterized in that: The angle difference is the minimum angle between the gradient direction of the target pixel and the gradient direction of each pixel in the neighborhood, and its value range is 0 degrees to 90 degrees.

5. The automobile mold production quality control method based on image enhancement according to claim 2 is characterized in that: The gradient direction angle is calculated using the Sobel operator.

6. The automobile mold production quality control method based on image enhancement according to claim 1 is characterized in that: The comparing the number of changes in the ranking of the remaining pixels in the neighborhood before and after removing the target pixel includes: Arranging the grayscale values ​​of each pixel in the neighborhood of the target pixel in spatial order to form a first sequence; removing the grayscale value of the target pixel from the first sequence to form a second sequence; The first sequence is sorted in ascending order to obtain a first ascending position sequence; the second sequence is sorted in ascending order to obtain a second ascending position sequence; the number of elements that change between the first ascending position sequence and the second ascending position sequence is obtained; the first sequence is sorted in descending order to obtain a first descending position sequence; the second sequence is sorted in descending order to obtain a second descending position sequence; the number of elements that change between the first descending position sequence and the second descending position sequence is obtained.

7. The automobile mold production quality control method based on image enhancement according to claim 6 is characterized in that: The neighborhood grayscale disturbance index of the target pixel Satisfies the relationship: ; in, is the number of elements that change between the first ascending order sequence and the second ascending order sequence of the target pixel; is the number of elements that change between the first descending order sequence and the second descending order sequence of the target pixel; is the total number of pixels in the neighborhood of the target pixel; is the maximum function.

8. The automobile mold production quality control method based on image enhancement according to claim 1 is characterized in that: The adaptive enhancement weight of the target pixel Satisfies the relationship: ; in, is the preset sensitivity adjustment coefficient; It is the directional consistency index of the target pixel; is the neighborhood grayscale disturbance index of the target pixel; Preset tiny value; is the hyperbolic tangent function.

9. The automobile mold production quality control method based on image enhancement according to claim 1 is characterized in that: The pre-processing to obtain a grayscale image of the automobile mold includes: Performing grayscale processing and denoising on the automobile mold image to obtain a grayscale image; Edge extraction is performed on the grayscale image, and all pixel points in the area obtained by edge extraction are recorded as target pixel points.

10. The automobile mold production quality control method based on image enhancement according to claim 9 is characterized in that: The performing edge extraction on the grayscale image includes: The Canny edge detection algorithm is used to extract the edges of the grayscale image.

Citation Information

Patent Citations

  • Visual inspection method and device for main instrument panel of new energy automobile

    CN119006448A

  • Self-adaptive image enhancement method and system based on magnetic resonance image

    CN119919328A

  • Method, system and device for enhancing image details in real time

    CN120070239A

  • Knee joint MR image enhancement method and system

    CN120451002A

  • Injection molding panel production quality detection method and system based on image enhancement

    CN120495304A

Cited By

  • Mutual inductor operation state evaluation method and system

    CN121010968A