An image enhancement-based automobile mold production quality management and control method

By using an adaptive weight enhancement method, the problem of distinguishing between burrs and noise in automotive mold images by traditional unsharpened masking algorithms is solved. This achieves precise enhancement of burrs and effective suppression of noise, thereby improving the accuracy and reliability of quality control.

CN120807352BActive Publication Date: 2025-11-28XIAN WEIER PRECISION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional unsharpened masking algorithms cannot make targeted adjustments based on the differences in features of different regions when enhancing automotive mold images, making it difficult to distinguish burrs and noise, thus affecting the accuracy and efficiency of quality control.

Method used

An adaptive enhancement weighting method is adopted to dynamically adjust the image enhancement intensity by calculating the orientation consistency index and neighborhood gray-level perturbation index of each pixel, thereby distinguishing between burrs and noise.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807352B_ABST
    Figure CN120807352B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and more particularly to a kind of automobile mould production quality control method based on image enhancement.The method comprises: for each target pixel in mould gray image, a two-dimensional evaluation system is constructed: based on the gradient direction difference of target pixel and each pixel in its neighborhood, determine the direction consistency index, to distinguish the burr with linear feature and the noise with random direction;By counting the influence of removing the pixel on the neighborhood gray sorting position, the neighborhood gray disturbance index is determined to accurately identify isolated salt and pepper noise points.Combining the two indexes, an adaptive enhancement weight is calculated, and a non-sharpening mask algorithm is corrected.The present application realizes the selective significant enhancement of real defects such as mould burr by calculating adaptive enhancement weight, effectively suppresses noise, and improves the accuracy and efficiency of automatic quality control.
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 vehicle manufacturing quality.

[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 inevitable simultaneous enhancement of burrs and noise while enhancing effective features such as normal contours and textures of the mold, 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 different regional features, 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:

[0006] 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.

[0007] 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.

[0008] 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.

[0009] 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.

[0010] Preferably, the direction consistency index of the target pixel point satisfies a relationship:

[0011] ;

[0012] 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 first pixel point in the neighborhood of the target pixel point; is a sine function; is a cosine function.

[0013] 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.

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

[0015] 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 position sequence; sorting the second sequence in ascending order to obtain a second ascending position sequence; obtaining the number of elements in the first ascending position sequence and the second ascending position sequence that have changed; sorting the first sequence in descending order to obtain a first descending position sequence; sorting the second sequence in descending order to obtain a second descending position sequence; and obtaining the number of elements in the first descending position sequence and the second descending position sequence that have changed.

[0016] 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.

[0017] Preferably, the neighborhood gray scale disturbance index of the target pixel point satisfies the relationship:

[0018] ;

[0019] wherein, is the number of elements in the first ascending position sequence and the second ascending position sequence of the target pixel point that have changed; is the number of elements in the first descending position sequence and the second descending 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 value function.

[0020] 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 in the ascending order and the descending order, and taking the maximum value. The mechanism of bidirectional detection and maximum value taking improves the sensitivity and robustness of the detection of various salt and pepper noises.

[0021] Preferably, the adaptive enhancement weight of the target pixel point is The relationship is satisfied:

[0022] ;

[0023] Wherein, is a preset sensitivity adjustment coefficient; is a directional 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.

[0024] 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 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.

[0025] 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.

[0026] 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.

[0027] The application proposes an adaptive image enhancement method based on double-dimensional evaluation to solve the technical problem that defects and noises in the 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 directional consistency index is used to distinguish the burr with linear features and 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, so as to realize the accurate enhancement of the real defects and the intelligent suppression of various noises, and improve the accuracy and reliability of the automatic quality control. BRIEF DESCRIPTION OF DRAWINGS

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

[0029] An embodiment of the present application provides 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

[0030] Step S100, collect the image of the automobile mold, and pre-process the image to obtain a gray image of the automobile mold.

[0031] 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 subsequent defect analysis, high-quality original images must be obtained first, and a series of preprocessing operations must be performed.

[0032] 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.

[0033] 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.

[0034] 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.

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

[0036] 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.

[0037] ​It should be noted that this step is the first calculation basis for distinguishing burrs from salt and pepper noise according to the present application. As a microscopic extension of the mold surface, burrs appear as elongated structures with continuous gray level changes in the image, so the gradient direction of the internal pixels should show a high degree of consistency in the local neighborhood. Salt and pepper noise, on the other hand, appears as isolated pixels with a sudden change in gray value, and their gradient direction is usually random and unrelated to the gradient direction of the pixels in their neighborhood. This step aims to construct a formula to quantify the directional consistency feature.

[0038] Specifically, for each target pixel in the gray-scale image, the following operations are performed:

[0039] First, the gradient of the target pixel in the x and y directions is calculated using the Sobel operator. The gradient direction angle of the target pixel is calculated based on the gradient in the x and y directions.

[0040] Second, a rectangular neighborhood window with a size of 2n+1 is defined around the target pixel. The neighborhood window contains a total of 2n+1 pixels. The rectangular neighborhood window contains 1 target pixel and 2n neighborhood pixels. As a preferred scheme, the size of the neighborhood window 2n+1 can be in the range of 3 to 7. The choice of size 2n+1 needs to balance the detail capture ability and noise robustness. When the mold image resolution is high and the burr feature is fine, a smaller 2n+1, such as 3 or 5, can be selected to more accurately reflect the local features. When the image noise is more or the burr feature is coarse, a larger 2n+1, such as 5 or 7, can be selected to obtain more stable statistical properties and enhance the noise suppression ability. In this embodiment, a good balance can be obtained by selecting 5.

[0041] Then, to quantify the directional consistency of the target pixel and the pixels in its neighborhood, the minimum included angle between the gradient direction angles of the two is calculated. Considering that the gradient directions of the edges on both sides of the burr may be opposite but should still be considered consistent, the calculation of 2n+1 should not distinguish between the same direction and the opposite direction. According to this logic, the angle difference 2n+1 satisfies the relationship:

[0042]

[0043]

[0044] wherein,​​​​​​​​​​​​​​​​​​ It is the target pixel and its neighborhood. The angle difference of the gradient direction angle of each pixel; It is the first in the neighborhood of the target pixel. Gradient direction angle of each pixel; It is the gradient direction angle of the target pixel; It is the absolute value symbol; It is the modulo operator. Minimum value function.

[0045] This formula ensures the calculated angle difference. The value ranges from 0 degrees 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 orientation of the two pixels.

[0046] Finally, to comprehensively evaluate the overall directional consistency between the target pixel and all pixels in the entire neighborhood, the directional consistency index of the target pixel is quantified by the normalized difference between the sum of the squares of the cosines and the sum of the squares of the sines of all angle differences of the gradient direction angles between the target pixel and each pixel in its neighborhood. Satisfying the relation:

[0047] ;

[0048] in, It is the total number of pixels in the neighborhood of the target pixel; It is the target pixel and its neighborhood. The angle difference of the gradient direction angle of each pixel; It is a sine function; It is a cosine function.

[0049] In this formula, when the gradient directions of all pixels in the neighborhood are completely consistent with those of the target pixel, that is, all... hour, , At this time, the orientation consistency index of the target pixel This indicates that the neighborhood is highly likely to be a burr-like or smooth mold surface. Conversely, when the gradient direction within the neighborhood is completely randomly distributed, exist The uniform distribution on the upper surface has a mathematical expectation that makes At this time, the orientation consistency index of the target pixel This indicates that the neighborhood is highly likely to be a salt-and-pepper noise region. Therefore, the orientation consistency index of the target pixel is... The range of values ​​is The closer the value is to 1, the stronger the direction consistency is.

[0050] At this point, the direction consistency index of the target pixel point is obtained.

[0051] Step S300, based on the gray values of the target pixel point and each pixel point in its neighborhood, comparing the number of ordering rank changes of the remaining pixel points in the neighborhood before and after the target pixel point is removed, determining the neighborhood gray disturbance index of the target pixel point.

[0052] It should be noted that relying only on the direction consistency index may misjudge a noise point that is exactly consistent with the direction of the neighborhood in a casual case. Therefore, the present application introduces a second calculation basis, that is, a supplementary judgment from the spatial structure of the gray value. The gray values of the mold surface and burrs have spatial continuity, and the gray value ordering mode of the pixel points in their 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.

[0053] Specifically, this step can be refined as follows:

[0054] 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 rank sequence, and sort the first sequence in descending order to obtain a first descending rank sequence.

[0055] 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 rank sequence, and sort the second sequence in descending order to obtain a second descending rank sequence.

[0056] Then, calculate the number of elements whose rank is changed in the first ascending rank sequence and the second ascending rank sequence , and calculate the number of elements whose rank is changed in the first descending rank sequence and the second descending rank sequence .

[0057] 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:

[0058] ;

[0059] wherein, is the number of elements whose rank is changed in the first ascending rank sequence and the second ascending rank sequence of the target pixel point; is the number of elements whose first descending order sequence and second descending order sequence are changed; is the total number of pixels in the neighborhood of the target pixel point; is the maximum function.

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

[0061] It should be noted that the maximum change value is taken 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 ordering of the preceding elements; but in descending order, it is at the beginning, and removing it will cause all subsequent elements to move forward in order, 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.

[0062] 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.

[0063] Example 1, assume that the gray value of any target pixel point is 255, which is a noise point, and assume that the gray values of the pixels in its neighborhood are as follows:

[0064] ;

[0065] Then the corresponding first sequence , the sequence after ascending ranking of the first sequence is , and at this time, the corresponding first ascending order sequence is .

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

[0067] Now, get the ascending order bit change number of all non-target pixel points . Compare the bit positions of the corresponding elements in the first ascending bit position sequence without the bit position of the target pixel point and the second ascending bit position sequence , the sequence without the bit position of the target pixel point is . Now compare the number of elements whose bit positions change in and , at this time we find that the elements in and are exactly the same, that is .

[0068] Next, using the first sequence obtained above, the sequence after descending ranking of the first sequence is , at this time, the corresponding first descending bit position sequence is .

[0069] Using the second sequence obtained above, the sequence after descending ranking of the second sequence is , at this time, the corresponding second descending bit position sequence is .

[0070] Now, get the number of descending bit position changes of all non-target pixel points . Compare the bit positions of the corresponding elements in the first descending bit position sequence without the bit position of the target pixel point and the second descending bit position sequence. The first descending bit position sequence , the sequence without the bit position of the target pixel point is . Now compare the number of elements whose bit positions change in and , at this time we find that the 8 elements in and are not consistent, that is .

[0071] 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 neighborhood gray order, and the calculation result of D is 1.

[0072] 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 values of the pixel points in its neighborhood are as follows:

[0073] ;

[0074] Then the corresponding first sequence , the first sequence ranked in ascending order is At this time, The corresponding first ascending order bit sequence is .

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

[0076] Now, get the number of ascending order bit changes of all non-target pixel points . Compare the bit of the corresponding element in the first ascending order bit sequence and the second ascending order bit sequence without the bit of the target pixel point: the first ascending order bit sequence is , the sequence without the bit of the target pixel point 5 is . Now compare the number of elements that have changed bits in and , we find that and are inconsistent in 4 elements, that is, .

[0077] Next, calculate the number of elements that have changed in the first descending order bit sequence and the second descending order bit sequence. Using the first sequence obtained above , the first sequence ranked in descending order is At this time, The corresponding first descending order bit sequence is .

[0078] Using the second sequence obtained above , the second sequence ranked in descending order is At this time, The corresponding second descending order bit sequence is .

[0079] Now, get the number of descending order bit changes of all non-target pixel points . Compare the bit of the corresponding element in the first descending order bit sequence and the second descending order bit sequence without the bit of the target pixel point. The first descending order bit sequence , the sequence without the bit of the target pixel point 5 is . Now compare the number of elements that have changed bits in and , we find that and are inconsistent in 4 elements, that is, .

[0080] the neighborhood gray scale disturbance index of the target pixel point =0.5; it can be seen that when the target pixel point is a normal pixel on a smooth surface, it does not seriously damage the neighborhood gray scale order, the calculation result of the target pixel point is 0.5.

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

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

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

[0084] It should be noted that this step is the decision and execution link of the method of the present application. The unsharp mask algorithm is a classic image enhancement technique, 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.

[0085] However, the traditional unsharp 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, burrs and noise are also enhanced synchronously, causing the defects and noise to be difficult to distinguish.

[0086] Therefore, this step fuses the direction consistency index and the neighborhood gray scale disturbance index, constructs an adaptive weight, so that the burr 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.

[0087] Specifically, the adaptive enhancement weight is positively correlated with the direction consistency index, and negatively correlated with the neighborhood gray scale disturbance index. In an optional implementation, the adaptive enhancement weight of the target pixel point is satisfies the relationship:

[0088] ;

[0089] wherein, is a preset sensitive adjustment coefficient; is the direction consistency index of the target pixel point; It is the neighborhood grayscale perturbation index of the target pixel; A preset microvalue is used to prevent the denominator from being 0. It can be set to 0.01 or as needed. It is the hyperbolic tangent function.

[0090] In this formula, for burrs or mold surfaces, the directional consistency index approaches 1, and the neighborhood grayscale perturbation index approaches 0. The values ​​are relatively large. For salt-and-pepper noise, its directional consistency index approaches 0, and its neighborhood gray-scale perturbation index approaches 1. Approaching 0. Successfully distinguished burrs or molds from noise in numerical terms. Will Mapped to The interval acts as a suppressor, preventing excessively large core ratios from causing weight imbalances, while remaining insensitive to small ratio changes, thus enhancing algorithm stability. Since both the directional consistency index and the neighborhood grayscale perturbation index are positive, the weight values ​​range from [value missing]. .

[0091] It should be noted that the preset sensitivity adjustment coefficient The range of values ​​for can be: . Controlling the weight function The steepness of the ratio's response. When When the values ​​are small, such as 0.1 or 0.2, the weight change curve is relatively flat, and the enhancement effect is gentler, making it suitable for scenarios where high detail preservation of the original image is required. When the value is larger, such as 0.5 or 0.8, the weight change curve is steeper, which can more significantly distinguish between burrs and noise, achieving stronger contrast enhancement. This is suitable for scenarios where burr features are not obvious and require strong emphasis. In this embodiment, it is preferred that... It can achieve a balanced enhancement effect and noise suppression capability. Implementers can choose according to their needs.

[0092] At this point, the adaptive enhancement weights for the target pixel have been obtained.

[0093] Step S500: Modify the unsharpened mask algorithm using adaptive enhancement weights to obtain the modified unsharpened mask algorithm, and use it to process the target pixels to obtain the enhanced target pixels.

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

[0095] Specifically, the traditional non-sharpening mask algorithm is modified by using adaptive enhancement weight. The non-sharpening mask algorithm is a prior art in the field of image processing, and its basic principle is to add the difference value between the original image and the blurred image, also known as the mask, to the original image according to a certain weight to achieve the enhancement effect after the original image is blurred. The adaptive weight is applied to the superposition process of the mask in the application to obtain the final enhanced target pixel point.

[0096] Since the non-sharpening mask algorithm is a prior art, the application only modifies the weight parameter thereof, and other steps are not modified, so they are not described in detail here.

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

[0098] Step S600: All the enhanced target pixel points in the gray image are obtained one by one to obtain the enhanced automobile mold image, and the production quality control of the automobile mold is realized.

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

[0100] Specifically, since a plurality of target pixel points are obtained in step S100, the adaptive enhancement weight of all the target pixel points needs to be calculated through steps S200-S400, and then all the target pixel points are processed by using the modified non-sharpening mask algorithm of step S500 to obtain all the enhanced target pixel points.

[0101] These enhanced target pixel points are recombined to obtain the final automobile mold image in which the burr features are significantly enhanced and the noise is effectively suppressed. The enhanced image provides a high-quality data basis for more accurate and reliable subsequent automated production quality control, thereby effectively improving the production quality control level of the automobile mold.

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

Claims

1. An image enhancement-based automobile mold production quality management method, characterized by, The method comprises the steps of: collecting an automobile mold image, and pre-processing the automobile mold image to obtain a gray-scale image of the automobile mold; For each target pixel point in the gray-scale image, based on the gradient direction difference of the target pixel point and each pixel point in the neighborhood of the target pixel point, a direction consistency index of the target pixel point is determined; the direction consistency index of the target pixel point satisfies the relationship: ; wherein, is the total number of pixel points in the neighborhood of the target pixel point; is an angle difference value of the gradient direction angle of the target pixel point and the first pixel point in the neighborhood of the target pixel point; is a sine function; is a cosine function; The neighborhood gray scale disturbance index of the target pixel point is determined by comparing 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 based on the gray scale values of the target pixel point and each pixel point in the neighborhood. satisfies the relationship: ; wherein, is the number of elements in which the first ascending sequence of positions and the second ascending sequence of positions of the target pixel point change; is the number of elements in which the first descending sequence of positions and the second descending sequence of positions of the target pixel point change; is a maximum function. 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 adaptive enhancement weight of the target pixel point The relationship is satisfied: ; wherein, is a preset sensitive adjustment coefficient; is a preset small value; is a hyperbolic tangent function; correcting a non-sharpening mask algorithm by using an adaptive enhancement weight to obtain a corrected non-sharpening mask algorithm, and processing a target pixel point by using the corrected non-sharpening mask algorithm to obtain an enhanced target pixel point; obtaining all the enhanced target pixel points in the gray-scale image one by one to obtain an enhanced automobile mold image, and realizing production quality control of the automobile mold.

2. The image enhancement-based automobile mold production quality management method according to claim 1, characterized by, 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, and the direction consistency index of the target pixel point comprises: calculating an angle difference of a gradient direction angle between the target pixel point and each pixel point in the neighborhood of the target pixel point; quantifying the direction consistency index of the target pixel point by using a normalized difference between a sum of squares of cosines of all the angle differences and a sum of squares of sines of all the angle differences.

3. The image enhancement-based automobile mold production quality management method according to claim 2, characterized in that, The angle difference is a minimum included angle between the gradient direction of the target pixel point and the gradient direction of each pixel point in the neighborhood of the target pixel point, and the angle difference ranges from 0 degrees to 90 degrees.

4. The image enhancement-based automobile mold production quality management method according to claim 2, characterized by, The gradient direction angle is calculated by using a Sobel operator.

5. The image enhancement-based automobile mold production quality management method according to claim 1, characterized in that, The comparison comprises: arranging the gray-scale values of the pixel points in the neighborhood of the target pixel point in a spatial order to form a first sequence, and removing the gray-scale 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 sequence, and sorting the second sequence in ascending order to obtain a second ascending order sequence; obtaining a number of elements that are changed in the first ascending order sequence and the second ascending order sequence; sorting the first sequence in descending order to obtain a first descending order sequence, and sorting the second sequence in descending order to obtain a second descending order sequence; and obtaining a number of elements that are changed in the first descending order sequence and the second descending order sequence.

6. The image enhancement-based automobile mold production quality management method according to claim 1, characterized by, The pre-processing of the automobile mold image to obtain a gray-scale 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 marking all the pixel points in a region obtained by the edge extraction as target pixel points.

7. The image enhancement-based automobile mold production quality management method according to claim 6, characterized by, The edge extraction on the gray-scale image comprises: performing edge extraction on the gray-scale image by using a Canny edge detection algorithm.

Citation Information

Patent Citations

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

    CN120070239A

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

    CN120495304A