A visual inspection method for warpage deformation of flange forgings

By analyzing the edge features of the grayscale image of the flange forging surface, calculating the difference in brightness and texture features, and combining the evaluation value and the discrimination coefficient, the problem of low accuracy in warping deformation detection is solved, and high-precision warping deformation detection is achieved.

CN122115460BActive Publication Date: 2026-07-17LINYI KUNZHONG INFORMATION TECHNOLOGY SERVICE CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LINYI KUNZHONG INFORMATION TECHNOLOGY SERVICE CO LTD
Filing Date
2026-04-30
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Flange forgings are prone to warping deformation during the forging process. Existing visual inspection technology has difficulty in effectively distinguishing the defect edges caused by warping deformation from the normal edges caused by the structure itself, resulting in low inspection accuracy.

Method used

By analyzing the grayscale image of the flange forging surface, the edges within the target area are extracted, and the differences in brightness, morphological distortion, and texture features of the edges are calculated. Combined with the evaluation value and the discrimination coefficient, warping deformation is evaluated and detected.

Benefits of technology

This significantly improves the accuracy of warpage detection for flange forgings, reduces the risk of misjudgment, and ensures product quality compliance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115460B_ABST
    Figure CN122115460B_ABST
Patent Text Reader

Abstract

This application relates to the field of visual inspection technology, specifically to a visual inspection method for warpage deformation of flange forgings. The method includes: extracting the target region of the flange forging from a grayscale image of its surface, and extracting each edge within the target region; analyzing the grayscale difference between pixels distributed on both sides of each edge within its local region, and calculating the brightness difference of each edge; obtaining the morphological distortion degree of each edge by assessing the regularity difference in geometric shapes between different edges within the target region; determining a first evaluation value for each edge; evaluating the differences in texture features between different edges and their positional distribution within the target region, and calculating a second evaluation value for each edge; obtaining the discrimination coefficient for each edge, and evaluating and detecting the warpage deformation of the flange forging. This application improves the accuracy of detecting warpage deformation of flange forgings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visual inspection technology, specifically to a visual inspection method for warping deformation of flange forgings. Background Technology

[0002] Flange forgings are key components commonly used in industrial manufacturing. During the forging process, factors such as uneven cooling rates inside and outside the forging and uneven material flow can cause structural stress, making the surface prone to warping deformation. This deformation can lead to substandard product quality and seriously affect assembly accuracy and service life.

[0003] When using visual inspection technology to inspect the surface of flange forgings, the flange surface is prone to shadows or reflections due to differences in lighting conditions, resulting in strong shadows and bright stripes. At the same time, the inherent structural features of the flange forgings themselves will form inherent stripes. These structural stripes are similar to the stripes produced by warping deformation, making it impossible to effectively distinguish between defect edges caused by warping deformation and normal edges produced by the inherent structure. This can easily lead to misjudgment and result in low accuracy in detecting warping deformation of flange forgings. Summary of the Invention

[0004] To address the aforementioned technical problems, a visual inspection method for warpage deformation of flange forgings is provided to solve the existing issues.

[0005] The solution to the technical problem of this application is to provide a visual inspection method for warpage deformation of flange forgings, including the following steps: Extract the target region containing the flange forging from the grayscale image of the flange forging surface, and extract each edge within the target region; Analyze the grayscale differences between pixels on both sides of each edge within the local area where each edge is located, and calculate the brightness difference of each edge; obtain the morphological distortion of each edge by the regularity difference of the geometric shape between different edges in the target area, and determine the first evaluation value of each edge by combining the brightness difference. Evaluate the differences in texture features among different edges and the distribution of different edges within the target area, and calculate a second evaluation value for each edge; Based on the first and second evaluation values, the discrimination coefficient of each edge is obtained to evaluate and detect the warping deformation of the flange forging.

[0006] Preferably, the process of obtaining the target region is as follows: find all contours in the grayscale image and select the contour with the largest area as the target region.

[0007] Preferably, the local region is defined as follows: obtaining the center point of each edge within the target region, calculating the average distance between the two endpoints of each edge and the center point; and taking the circular region with the center point of each edge as the center and the average distance as the radius as the local region of each edge.

[0008] Preferably, the calculation of the brightness difference of each edge includes: The local region is divided into two sub-regions by connecting the two endpoints of each edge; the mean gray value of all pixels in each sub-region is calculated as the average gray value. The brightness difference is the difference in average gray level between the two sub-regions corresponding to each edge.

[0009] Preferably, obtaining the morphological heterogeneity of each edge includes: Curve fitting is performed on all edge pixels on each edge within the target region, and the goodness of fit is calculated. The morphological heterogeneity is the result of fusing the differences in fit between each edge in the target region and all other edges.

[0010] Preferably, the first evaluation value is the product of the difference in brightness and the degree of morphological distortion.

[0011] Preferably, the texture features are measured by calculating texture feature values. The specific process is as follows: obtain the minimum circumcircle of each edge, calculate the LBP value at the center of the minimum circumcircle, and use it as the texture feature value of each edge.

[0012] Preferably, the calculation of the second evaluation value for each edge includes: The difference in texture feature values ​​between each edge within the target area and the other edges is denoted as the first difference; The distance between the center point of each edge and the center point of the target area is recorded as the relative distance; The difference in the relative distance between each edge within the target area and the other edges is used as the second difference; Calculate the product of the first difference and the second difference, fuse the product of each edge in the target area with all other edges, and perform a negative mapping on the fusion result as the second evaluation value for each edge.

[0013] Preferably, the discrimination coefficient is the ratio of the first evaluation value to the second evaluation value.

[0014] Preferably, the evaluation and detection of the warpage deformation of the flange forging includes: if there is an edge in the target area with a discrimination coefficient greater than or equal to a preset segmentation threshold, the flange forging is of unqualified quality; otherwise, the flange forging is of qualified quality.

[0015] This application has at least the following beneficial effects: This application calculates the brightness difference of each edge by analyzing the grayscale difference of pixels in the regions on both sides of each edge. Its advantage lies in quantifying the brightness contrast on both sides of the edge, capturing typical optical features or microscopic irregularities of surface illumination changes caused by warping, and initially assessing the possibility that the edge belongs to a warped deformation edge. It obtains the morphological anomaly of each edge, which is beneficial because it considers the geometric inconsistency of the edge. It utilizes the characteristic that edges caused by warping deformation are irregular and unique, while the edges of the flange forging itself are regular and smooth, to identify abnormally curved or twisted edges, further assessing the possibility that the edge is caused by warping deformation. It determines the first evaluation value of each edge, which is beneficial because it comprehensively assesses the possibility that the edge is a defective edge caused by flange warping deformation through two dimensions: geometric morphology and optical features. It calculates the first evaluation value of each edge. The second evaluation value has the advantage of considering the differences in texture features and distribution positions between different edges, thereby finding edges in the image that are highly similar in texture and position to other edges. By introducing group similarity, it identifies normal edges of the flange forging itself and evaluates the random changes in texture and position distribution of edges caused by warping deformation, further indicating that the edge may be a random and irregular edge caused by warping deformation. The discrimination coefficient of each edge is obtained to evaluate and detect the warping deformation of the flange forging. Its advantage is that by comprehensively evaluating the degree of anomaly of the edge itself and the degree of correlation in the edge structure, it comprehensively evaluates the credibility of each edge belonging to the warping defect, so as to effectively distinguish the defect edges caused by warping deformation from the normal edges caused by its own inherent structure, significantly reducing the risk of misjudgment and improving the detection accuracy of warping deformation of flange forging. Attached Figure Description

[0016] The following is a detailed description of a visual inspection method for warpage deformation of flange forgings according to this application, with reference to the accompanying drawings.

[0017] Figure 1 A flowchart illustrating the steps of a visual inspection method for warpage deformation of flange forgings provided in this application embodiment; Figure 2 A flowchart illustrating the steps of a method for obtaining a second evaluation value for each edge, as provided in an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description, in conjunction with the accompanying drawings and embodiments, provides a visual inspection method for warpage deformation of flange forgings proposed in this application. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0020] Please see Figure 1 The diagram illustrates a flowchart of a visual inspection method for warpage deformation of a flange forging according to an embodiment of this application. The method includes the following steps: Step 1: Extract the target area where the flange forging is located from the grayscale image of the flange forging surface, and extract each edge within the target area.

[0021] A flange is a disc-shaped metal connector whose core function is to enable detachable connections of pipes, valves, equipment, and other components through the engagement of peripheral bolt holes and gaskets, providing structural stability and sealing performance. Die forging is the mainstream method for producing high-performance flanges; it achieves dense metal flow lines through plastic deformation, thereby endowing the parts with excellent mechanical properties.

[0022] However, during the cooling stage after die forging, due to the large difference in cross-sectional dimensions between the web and the high boss of the flange structure, it is very easy to generate huge temperature stress due to uneven cooling rate, which will cause warping deformation. Warping will cause the flange mating surface to be non-parallel, the gasket cannot be evenly compressed, resulting in poor sealing performance. Under pressure conditions, it is very easy to cause serious accidents such as medium leakage or even connection structure failure.

[0023] Based on the above analysis, the flange forging formed by the die forging process is placed on a conveyor belt for transportation, and a light source is deployed on each side of the conveyor belt. The two light sources are symmetrically distributed in space. The height of the light source is slightly higher than the surface of the forging, and its light shines on the surface of the forging from both sides at a low incident angle. A CMOS high-definition camera is installed above the conveyor belt to capture surface images of the flange forging, and the images are then processed into grayscale to obtain grayscale images. In this embodiment, the grayscale value averaging method is used for grayscale processing. The grayscale value averaging method is a well-known technique and will not be described in detail here.

[0024] Secondly, a contour finding algorithm is used to extract all contours in the grayscale image, and the contour with the largest area is selected as the target region; then, edge detection is performed on the target region to extract all edges; It should be noted that the contour finding algorithm is a well-known technology and will not be elaborated here; secondly, the contour with the largest area is the contour at the boundary of the flange forging, and the target area represents the area where the flange forging is located in the image.

[0025] In this embodiment, the Canny edge detection algorithm is used for edge detection. The Canny edge detection algorithm is a well-known technology and will not be described in detail here. As other implementation methods, implementers may use other methods of existing technology, such as the Sobel operator, etc. This embodiment does not impose any special restrictions on this.

[0026] At this point, all edges within the target area in the grayscale image of the flange forging surface are obtained.

[0027] Step 2: Analyze the grayscale differences between pixels distributed on both sides of the edge within the local area where each edge is located, and calculate the brightness difference of each edge; obtain the morphological distortion of each edge by the regularity difference of the geometric shape between different edges in the target area, and determine the first evaluation value of each edge by combining the brightness difference.

[0028] After the flange forging is produced, its surface is smooth and flat. Light forms regular, continuous bright stripes on the smooth surface. Holes are drilled at different locations on the flange forging surface as needed to meet various requirements. During the flange forging process, the cross-sectional dimensions of its web and high boss differ significantly. Uneven cooling rates can easily cause temperature stress, leading to warping of the forging during cooling or processing. This results in raised deformation on the surface of the flange forging, causing twisted and deformed stripes on its smooth surface, and the degree of warping deformation is inconsistent.

[0029] Secondly, under constant light source conditions, the surface of the flange forging will reflect light, forming multiple bright edge stripes. The surface of the flange forging will reflect light most strongly on the side closest to the light source, resulting in a bright area. When the flange warps, protrusions will appear in local areas of the surface, causing some light interference. These protrusions will block light to some extent, forming small shadows. Furthermore, the regularity of the protrusions caused by warping is low, and the stripe pattern formed by warping differs from the regular stripe pattern produced by the flange's own structure.

[0030] Based on the above analysis, the brightness difference is calculated by analyzing the grayscale difference between the two sides of each edge, specifically as follows: Obtain the center point of each edge within the target area, and calculate the average distance between the two endpoints of each edge and the center point; take the circular area with the center point as the center and the average distance as the radius as the local area of ​​each edge; In this embodiment, the distance is measured by calculating the Euclidean distance between the two endpoints of each edge and the center point. The calculation of Euclidean distance is a well-known technique and will not be described in detail here. As other implementation methods, implementers may use other methods of the prior art, such as Manhattan distance, etc. This embodiment does not impose any special restrictions on this.

[0031] It should be noted that if a certain edge is a closed edge, the center point of the closed edge is taken as the center, and the distance between the pixel with the largest y-coordinate on the closed edge and the center point is calculated, and the distance between the pixel with the smallest y-coordinate and the center point is calculated. The average of the two distances is used as the radius to construct a circular region, and then the circular region is divided by the line connecting the pixel with the largest y-coordinate and the pixel with the smallest y-coordinate.

[0032] By using the lines connecting the two endpoints of each edge, the local region is divided into two sub-regions; Calculate the mean gray value of all pixels in each sub-region, and use it as the average gray value; It should be noted that under low-angle lighting, due to the occlusion or reflection of the edge, different areas of light and dark will be formed on both sides of this edge.

[0033] Calculate the difference in average gray level between the two sub-regions corresponding to each edge, and use it as the brightness difference of each edge; In this embodiment, the absolute value of the difference in average gray level between the two sub-regions corresponding to each edge is calculated as the brightness difference of each edge.

[0034] It should be noted that the greater the difference in brightness, the stronger the contrast between the two sides of the edge. The more it matches the characteristic of warping, where one side of the protrusion is extremely bright and the other side is extremely dark, the higher the probability that the edge is a warped edge.

[0035] Secondly, analyze the morphological differences between different edges within the target area and calculate the degree of morphological heterogeneity, specifically: Curve fitting is performed on all edge pixels on each edge within the target region, and the goodness of fit is calculated. In this embodiment, the least squares method is used for curve fitting. The least squares method and the calculation of the goodness of fit are well-known techniques and will not be described in detail here.

[0036] The difference in goodness of fit between each edge in the target region and all other edges is fused to obtain the morphological heterogeneity of each edge; In this embodiment, the specific process of fusion is as follows: the sum of the absolute values ​​of the differences in goodness of fit between each edge in the target region and all other edges is calculated as the morphological degree of each edge; as another implementation, the implementer can calculate the mean of the absolute values ​​of the differences in goodness of fit between each edge in the target region and all other edges as the morphological degree of each edge.

[0037] It should be noted that the smaller the goodness of fit, the more irregular, distorted, and rough the edge is; conversely, the larger the goodness of fit, the more regular and smooth the edge is, and the more it conforms to the standard geometric shape. The greater the morphological heterogeneity, the greater the difference in geometric shape between the edge and other edges, reflecting that the edge is very likely to be an edge caused by warping deformation.

[0038] Furthermore, based on the difference in brightness and darkness and the degree of morphological distortion, the first evaluation value is determined as follows: The product of the difference in brightness and the degree of morphological distortion is used as the first evaluation value for each edge; It should be noted that the larger the first evaluation value, the higher the probability that the edge is a defect edge caused by flange warping deformation.

[0039] At this point, the first evaluation value for each edge within the target area is obtained.

[0040] Step 3: Evaluate the differences in texture features of different edges and the distribution of different edges within the target area, and calculate the second evaluation value for each edge.

[0041] Furthermore, flange forgings are produced according to the actual requirements of the flange. The flange forging mainly consists of a web and a high boss. The shape and height of the high boss vary depending on the requirements. When the high boss is relatively flat, it appears as a regular, closed circular edge in the image, minimizing interference with warping detection. However, when the high boss is high, the connection between the web and the high boss will form different concave surfaces depending on the inclination of the high boss. Under illumination, this can easily produce distorted edges and shadows, which can be misjudged as warping. Secondly, because flange forgings contain many porous areas, the amount of light received in these areas is limited. This can result in bright reflections on one side, creating a bright pattern, while the other side is relatively dark. This contrast in light and dark can create edges resembling warping, interfering with warping detection. Therefore, further analysis is needed.

[0042] The structures such as voids and high bosses in flange forgings have certain regularities. For example, different holes are usually of similar size and depth. Therefore, under the same lighting, the shadows or highlights produced by these structures have similar texture features and are evenly distributed. However, for the edges caused by warping deformation, since the actual warping deformation is formed randomly by manufacturing defects, the position is not fixed and the degree of deformation is different, resulting in a discrete edge distribution and a lack of similar features around it.

[0043] Based on the above analysis, by analyzing the differences in texture features within the local areas of different edges within the target region, and calculating a second evaluation value, the flowchart of the method for obtaining the second evaluation value for each edge provided in this application embodiment is as follows: Figure 2 As shown, it specifically includes: Obtain the minimum bounding circle of each edge, calculate the LBP value at the center of the minimum bounding circle, and use it as the texture feature value of each edge; In this embodiment, the LBP value is calculated using the circular LBP (Local Binary Pattern) operator, which is a well-known technique and will not be described in detail here.

[0044] The difference in texture feature values ​​between each edge within the target area and the other edges is denoted as the first difference; In this embodiment, the absolute value of the difference between the texture feature values ​​of each edge within the target area and the other edges is denoted as the first difference.

[0045] The distance between the center point of each edge and the center point of the target area is recorded as the relative distance; In this embodiment, the distance is measured by calculating the Euclidean distance between the center point of each edge and the center point of the target region.

[0046] The difference in the relative distance between each edge within the target area and the other edges is used as the second difference; In this embodiment, the absolute value of the difference between the relative distances between each edge and the other edges within the target area is used as the second difference.

[0047] Calculate the product of the first difference and the second difference, fuse the product of each edge in the target area with all other edges, and perform a negative mapping on the fusion result as the second evaluation value for each edge; In this embodiment, the specific process of fusion is as follows: The sum of the products between each edge in the target area and all other edges is used. Alternatively, in another implementation, the implementer can calculate the mean of the products between each edge in the target area and all other edges. Secondly, the specific process of negative mapping is as follows: The reciprocal of the fusion result is used as the second evaluation value for each edge. Alternatively, the implementer can use an exponential function for negative mapping. Assuming the fusion result is denoted as... ,but The result is used as the second evaluation value for each edge, where, It is an exponential function with the natural constant as the base.

[0048] It should be noted that, in order to avoid the denominator being 0 when using the reciprocal for negative mapping, a preset value greater than 0 is added to the denominator. In this embodiment, the preset value greater than 0 is 0.01. As for other implementation methods, the implementer can set it according to the actual situation.

[0049] It should be noted that the larger the first difference, the greater the difference in texture features between the two edges within their local range, meaning their texture patterns are less similar. Conversely, the smaller the difference, the more similar the surface textures within the local range of the two edges. The larger the second difference, the greater the difference in distance from the center point of the two edges to the center point of the target area, reflecting the irregular distribution of the two edges. The larger the fusion result, the smaller the obtained second evaluation value, indicating that the edge has high specificity in the image, and no other edges similar to it in texture and spatial distribution can be found. This suggests that the edge is very likely a random and irregular edge caused by warping deformation. Conversely, the larger the obtained second evaluation value, the more similar the edge is to the other edges in texture and spatial distribution in the image. This suggests that the edge is very likely a regular, periodically occurring structural edge, such as bolt holes in flange forgings or regular boss edges.

[0050] At this point, the second evaluation value for each edge is obtained.

[0051] Step 4: Based on the first evaluation value and the second evaluation value, obtain the discrimination coefficient of each edge, and evaluate and detect the warpage deformation of the flange forging.

[0052] Furthermore, based on the first evaluation value and the second evaluation value, a discriminant coefficient is obtained, specifically: The ratio of the first evaluation value to the second evaluation value is used as the discrimination coefficient for each edge; It should be noted that the larger the discrimination coefficient, the more obvious the warping deformation of the edge is, and the more significant the difference from the structural characteristics of the flange forging itself, reflecting that the edge is more likely to be caused by warping deformation on the flange forging.

[0053] Furthermore, based on the discrimination coefficient, the warpage deformation of the flange forging is evaluated, specifically as follows: Collect labeled surface images of flange forgings from historical periods to form an image set. Following the above discriminant coefficient calculation process, calculate the discriminant coefficient of each edge in each surface image within the image set. Based on the labels after surface image annotation, use cross-validation to obtain the segmentation threshold of the discriminant coefficients of all edges in all surface images within the image set, which is then used as the preset segmentation threshold. It should be noted that, by manually annotating each edge in the surface image of the flange forging, warped edges and normal edges are marked; secondly, the cross-validation method is a well-known technique and will not be elaborated here, but is used as another implementation method.

[0054] If there are edges in the target area with a discrimination coefficient greater than or equal to the preset segmentation threshold, the flange forging is of unqualified quality; otherwise, the flange forging is of qualified quality.

[0055] Subsequent quality inspections are conducted on qualified flange forgings, including material testing, metallographic analysis, and corrosion testing.

[0056] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0057] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0058] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application. Therefore, any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this application, without departing from the content of the technical solution of this application, shall fall within the protection scope of the technical solution of this application.

Claims

1. A visual inspection method for warpage deformation of flange forgings, characterized in that, The method includes the following steps: Extract the target region containing the flange forging from the grayscale image of the flange forging surface, and extract each edge within the target region; Analyze the grayscale differences between pixels on both sides of each edge within the local area where each edge is located, and calculate the brightness difference of each edge; obtain the morphological distortion of each edge by the regularity difference of the geometric shape between different edges in the target area, and determine the first evaluation value of each edge by combining the brightness difference. Evaluate the differences in texture features among different edges and the distribution of different edges within the target area, and calculate a second evaluation value for each edge; Based on the first and second evaluation values, the discrimination coefficient of each edge is obtained, and the warpage deformation of the flange forging is evaluated and detected. The local region is defined as follows: the center point of each edge within the target region is obtained, and the average distance between the two endpoints of each edge and the center point is calculated; the circular region with the center point as the center and the average distance as the radius is defined as the local region of each edge. The first evaluation value is the product of the difference in brightness and the degree of morphological distortion; The texture features are measured by calculating texture feature values. The specific process is as follows: obtain the minimum circumcircle of each edge, calculate the LBP value at the center of the minimum circumcircle, and use it as the texture feature value of each edge. The calculation of the second evaluation value for each edge includes: The difference in texture feature values ​​between each edge within the target area and the other edges is denoted as the first difference; The distance between the center point of each edge and the center point of the target area is recorded as the relative distance; The difference in the relative distance between each edge within the target area and the other edges is used as the second difference; Calculate the product of the first difference and the second difference, fuse the product of each edge in the target area with all other edges, and perform a negative mapping on the fusion result as the second evaluation value for each edge; The discrimination coefficient is the ratio of the first evaluation value to the second evaluation value.

2. The visual inspection method for warpage deformation of flange forgings as described in claim 1, characterized in that, The process of obtaining the target region is as follows: find all contours in the grayscale image and select the contour with the largest area as the target region.

3. The visual inspection method for warpage deformation of flange forgings as described in claim 1, characterized in that, The calculation of the brightness difference of each edge includes: The local region is divided into two sub-regions by connecting the two endpoints of each edge; the mean gray value of all pixels in each sub-region is calculated as the average gray value. The brightness difference is the difference in average gray level between the two sub-regions corresponding to each edge.

4. The visual inspection method for warpage deformation of flange forgings as described in claim 1, characterized in that, The morphological heterogeneity of each edge is obtained, including: Curve fitting is performed on all edge pixels on each edge within the target region, and the goodness of fit is calculated. The morphological heterogeneity is the result of fusing the differences in fit between each edge in the target region and all other edges.

5. The visual inspection method for warpage deformation of flange forgings as described in claim 1, characterized in that, The evaluation and detection of warpage deformation of the flange forging includes: if there is an edge in the target area with a discrimination coefficient greater than or equal to a preset segmentation threshold, the flange forging is unqualified; otherwise, the flange forging is qualified.