An image processing-based automatic extraction method and system for a forging profile

By using image processing technology to register and perform depth analysis on the forging contour, information on the shape and severity of forging deviations is obtained, solving the problem that existing technologies cannot distinguish the shape of deviations and enabling precise process adjustment and quality control.

CN121169932BActive Publication Date: 2026-02-17HANZHONG QUNFENG MACHINERY MFG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511718189.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-17
Estimated Expiration
2045-11-21

AI Technical Summary

Technical Problem

Existing technologies cannot effectively distinguish the morphological characteristics of forging contour deviations, resulting in insufficient diagnostic information and an inability to provide effective guidance for process adjustments.

Method used

Image processing technology is used to register the actual contour of the forging with the standard contour, calculate the normal deviation and curvature value, obtain the contour deviation sequence and curvature sequence, and combine local jitter, morphological feature value, local pattern scale and local energy value to calculate the comprehensive feature index, identify feature segments and evaluate the severity of the segments.

Benefits of technology

It enables precise analysis of forging contour deviations, clearly identifies the location and properties of the deviations, and provides targeted adjustments to forging energy and die repair, thereby improving the precision control and quality improvement of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121169932B_ABST
    Figure CN121169932B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image processing, and particularly relates to a forging profile automatic extraction method and system based on image processing, which comprises the following steps: obtaining a profile deviation sequence and a profile curvature sequence; obtaining a local jitter degree sequence; obtaining a morphological characteristic value of each profile point and generating a morphological characteristic value sequence; calculating a local mode scale according to the local gradient and energy distribution characteristics of the morphological characteristic value of an analysis window, and obtaining a local energy value; taking the product of the local energy value and the local mode scale after standardization and exponentialization processing as a comprehensive characteristic index; defining a characteristic section; and calculating a section severity. The present application solves the problem that the traditional forging profile extraction method cannot distinguish the deviation form and is difficult to extract the deep feature information of the forging profile.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method and system for automatically extracting the contour of forgings based on image processing. Background Technology

[0002] In the production and manufacturing process of forgings, the precise control of their contour geometry is a key link that directly determines their final assembly performance and service life. One of the core tasks of forging quality control is to diagnose the deviation of their contour. The main technical means is to obtain the actual contour of the forging through image processing or laser scanning and compare it with the standard CAD digital model to evaluate the deviation between the two.

[0003] Existing methods mostly focus on determining dimensional conformity, that is, checking whether the measurement deviation of each point on the contour exceeds a preset fixed value. The core limitation of these methods is that they only evaluate the magnitude of the deviation and cannot effectively analyze the shape of the deviation. For example, a smooth, large-scale contour deformation caused by die wear and a severe, localized contour defect caused by flash, folding, or other problems may have the same maximum deviation value. However, from the perspective of forging process, the former belongs to low-frequency macroscopic deformation, while the latter belongs to high-frequency microscopic morphological features. These two represent deviation patterns of completely different natures, and their root causes and risk levels are also completely different.

[0004] This inability to effectively distinguish the morphological characteristics of deviations directly leads to insufficient depth and guidance in diagnostic information. A simple deviation value is actually a composite of deviation pattern and amplitude information, while traditional analysis methods only focus on the amplitude and cannot effectively separate the two. This means that the analysis results can only indicate where the deviation is, but cannot answer what form the deviation is caused by. Consequently, process engineers cannot make targeted adjustments and optimizations to specific process aspects such as forging energy and die condition. Therefore, existing technologies cannot effectively extract deep feature information that can characterize the true attributes of deviations from contour deviations, thus hindering precise control and quality improvement in the production process. Summary of the Invention

[0005] To address the technical problem that traditional forging contour extraction methods cannot distinguish deviation morphology and thus struggle to extract deep feature information of forging contours, this invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides an automatic extraction method for forging contours based on image processing, comprising:

[0007] The actual contour of a single forging under test is registered and aligned with the standard contour extracted from the CAD model, and the normal deviation and curvature values ​​at corresponding positions are calculated to obtain a contour deviation sequence and a contour curvature sequence. A local jitter sequence is obtained, where the local jitter of each point is used to characterize the degree of deviation between the actual deviation value of that point and the linear interpolation determined by the two adjacent points. The local jitter sequence and the contour curvature sequence are nonlinearly weighted to obtain the morphological feature value of each contour point and generate a morphological feature value sequence. An analysis window is preset for any point in the morphological feature value sequence, and the local pattern scale is calculated based on the local gradient and energy distribution characteristics of the morphological feature values ​​in the analysis window. Local statistical analysis is performed on the contour deviation sequence to obtain the local energy value. The product of the local energy value and the local pattern scale after standardization and exponentiation is recorded as the comprehensive feature index. The comprehensive feature index sequence is obtained, and the feature segments are defined by identifying local peaks and expanding the region. The severity of the segment is calculated by logarithmically weighting and fusing the average comprehensive feature index and length of the feature segment, which serves as the deep feature information characterizing the contour of the forging.

[0008] Traditional methods, after extracting the forging contour, only analyze the magnitude of contour deviation, failing to distinguish different deviation morphologies from the extracted contour. This makes it difficult to accurately determine the cause of deviation based on the extracted contour data, and even more difficult to provide effective guidance for process adjustments based on the extraction results. This invention, however, starts from the entire forging contour extraction process. First, through image capture and model comparison, it accurately extracts and aligns the actual contour with the standard contour, obtaining high-quality basic contour data. Then, based on the extracted contour, it gradually extracts key information such as local jitter, morphological feature values, local pattern scaling, and local energy values. Finally, it combines this information to obtain a comprehensive feature index and segment severity. The entire process revolves around contour extraction and in-depth analysis, not only completing the basic contour extraction but also analyzing the deviation morphology, severity, and impact range from the extracted contour. This allows workers to clearly identify the location of the deviation and grasp its key attributes based on the extracted contour data, thereby enabling targeted adjustments to forging energy, mold repair, and other process steps. This provides strong support for precise control and quality improvement in the production process, solving the problems of insufficient information mining and poor guidance in traditional methods after contour extraction.

[0009] Preferably, obtaining the contour deviation sequence and the contour curvature sequence includes:

[0010] For a single forging to be tested within the current production cycle, a real-time image of it at a certain moment is captured. Simultaneously, the standard CAD model corresponding to the forging is retrieved from the database. The actual contour of the forging is extracted using image processing technology and registered and aligned with the standard contour extracted from the CAD model. After alignment, two one-dimensional sequences distributed along the contour arc length are calculated and generated, namely the contour deviation sequence and the contour curvature sequence. The contour deviation sequence is obtained by calculating the normal deviation of corresponding points on the actual contour point by point, using the standard contour as a reference. The contour curvature sequence is obtained by performing differential calculation on the curve region where the standard contour is located to obtain the curvature value corresponding to each point.

[0011] Preferably, obtaining the local jitter sequence includes:

[0012] Obtain the contour deviation sequence, calculate the linear interpolation of each contour point in the contour deviation sequence with its two adjacent points and the actual deviation value of that point, and use the absolute difference between the actual deviation value and the linear interpolation as the local jitter of each point to generate a local jitter sequence.

[0013] Preferably, the sequence of morphological feature values ​​satisfies the following expression:

[0014] ;

[0015] In the formula, Represents the morphological feature value sequence of the th The morphological feature value of each point is measured in units of length. For the first The local jitter at each point, with the dimension of length; For the first The contour curvature of a point, with the dimension being the reciprocal of the length; and These are the mean and standard deviation of the contour curvature sequence, respectively. It is a hyperbolic tangent function, and its output is also a dimensionless value; It represents a very small positive number, and guarantees that the denominator is not 0.

[0016] This invention combines local vibration degree with contour curvature and calculates morphological characteristic values ​​using a specific formula. This allows vibration of the same amplitude to exhibit different morphological characteristic values ​​at different geometric locations, such as high-curvature areas and flat areas, which better reflects the actual forging process and accurately reflects the actual impact of deviations at different locations. This provides a more precise basis for subsequently judging the process significance of deviations and improves the accuracy of deviation analysis.

[0017] Preferably, the local pattern scale satisfies the following expression:

[0018] ;

[0019] This represents the local pattern scale calculated within the analysis window corresponding to the j-th point in the morphological feature value sequence, whose dimensions are related to the local gradient. Same, in terms of length; This represents the analysis window corresponding to the j-th point; is the nth morphological feature value in the sequence of morphological feature values, with the dimension being length; , These represent the (n+1)th and (n-1)th morphological feature values ​​in the sequence of morphological feature values, and their dimension is also length. It represents a very small positive number, and guarantees that the denominator is not 0.

[0020] This invention calculates the local pattern scale by combining the local gradient and energy distribution of morphological feature values ​​through a preset analysis window. This effectively distinguishes different deviation morphologies. For example, gentle mold wear will produce a lower local pattern scale, while sharp flash will produce a higher local pattern scale. This allows staff to clearly understand the form in which the deviation occurs, providing an important reference for taking different treatment measures for different deviation morphologies.

[0021] Preferably, obtaining the local energy value includes:

[0022] Obtain an analysis window that is identical to the one used to calculate the local pattern scale, and use the root mean square of all deviation values ​​within the analysis window as the local energy value of the center point corresponding to that analysis window.

[0023] Preferably, the comprehensive characteristic index includes:

[0024] The local pattern scaling sequence and local energy value sequence are obtained. The local pattern scaling is standardized, and the result is used as the base. An exponential function is used to perform exponentialization to obtain a dimensionless risk scaling factor. The product of the local energy value and the risk scaling factor is used as the comprehensive characteristic index of the center point corresponding to the analysis window.

[0025] Preferably, defining the feature segment includes:

[0026] Obtain the comprehensive feature index and generate a comprehensive feature index sequence. Identify the local maxima in the comprehensive feature index sequence that are higher than the mean of the comprehensive feature index sequence as feature cores. Expand the region to both sides of the feature cores until the risk index falls back to the baseline level to determine the boundary. The continuous set of points within the boundary is recorded as the feature segment.

[0027] This invention first identifies local maxima points above the mean in the comprehensive feature index sequence as feature cores, and then expands and determines the boundary around the cores to obtain feature segments. This can transform a continuous comprehensive feature index sequence into discrete, independently analyzable feature segments, making it easier for the system to perform targeted analysis on the deviations of different segments. This avoids the problem of difficulty in focusing on key deviation areas when facing continuous data streams, and improves analysis efficiency.

[0028] Preferably, the severity of the segment satisfies the following expression:

[0029] ;

[0030] In the formula, Indicates the first The severity of each segment is measured in units of length. Indicates the first The average comprehensive characteristic index of each characteristic segment is measured in units of length. Indicates the first The length of each feature segment, with the dimension of length; It is a reference length constant that makes the entire logarithmic term dimensionless; Represent the natural logarithm function; It represents a very small positive number, and guarantees that the denominator is not 0.

[0031] This invention combines the average comprehensive characteristic index and length of characteristic segments, and calculates the severity of segments through logarithmic weighted fusion. It comprehensively considers the intensity and scope of the deviation, accurately assesses the degree of danger of different characteristic segments, and allows staff to prioritize deviations according to the severity of segments, treat the most dangerous segments first, avoid resource waste, and improve the effectiveness of forging quality control.

[0032] Secondly, the present invention provides an automatic forging contour extraction system based on image processing, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned automatic forging contour extraction method based on image processing is implemented.

[0033] By adopting the above technical solution, a computer program is generated from the above-mentioned method for automatically extracting the contour of forgings based on image processing, and stored in a memory so that it can be loaded and executed by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.

[0034] The beneficial effects of this invention are as follows: In forging production, contour extraction is a fundamental step in quality control. The quality of the extracted contour data directly affects subsequent judgments on product assembly performance and service life. This invention goes beyond traditional contour extraction methods, employing a standardized image capture and model registration alignment process to first ensure a precise correspondence between the extracted actual contour and the standard contour, laying a foundation for high-quality contour extraction. Then, using the extracted contour as the core, it further mines the deviation and correlation information, elevating contour extraction beyond the superficial stage of acquiring geometric lines to a deeper mode of extracting and analyzing the value of contours. This enhanced contour extraction helps enterprises manage quality based on more accurate and valuable contour data, reducing defective products caused by inaccurate contour extraction and insufficient information mining, thus lowering production costs. Simultaneously, it optimizes production processes based on the extracted high-quality contour data, improving production efficiency and stability. Attached Figure Description

[0035] Figure 1 This is a flowchart illustrating an automatic extraction method for forging contours based on image processing according to the present invention. Detailed Implementation

[0036] This invention discloses an automatic extraction method for forging contours based on image processing, referring to... Figure 1 This includes steps S1-S4:

[0037] S1: Register and align the actual contour of a single forging under test with the standard contour extracted from the CAD model, and calculate the normal deviation and curvature value at the corresponding positions to obtain the contour deviation sequence and contour curvature sequence; obtain the local jitter sequence, where the local jitter of each point is used to characterize the degree of deviation between the actual deviation value of the point and the linear interpolation determined by the two adjacent points; perform nonlinear weighting on the local jitter sequence and the contour curvature sequence to obtain the morphological feature value of each contour point and generate the morphological feature value sequence.

[0038] It should be noted that the automatic contour extraction of this invention is a multi-layered information acquisition process. While it includes extracting the surface-level basic geometric information of the forging's physical contour line from the original image, its main core innovation lies in further extracting deep feature information to characterize the deviation morphology and severity level by performing depth analysis on this basic contour. Therefore, the complete process of this invention is to extract contours from the image and finally extract and output structured feature segments and their corresponding severity from the contour data. These two layers of extraction together constitute the core technology of this invention.

[0039] It should be noted that, in order to initiate the deep feature information extraction process, this invention first needs to obtain basic data describing the physical deviations and standard geometric shape of the forging. Therefore, it is necessary to compare the real-time image of the forging under test with the standard CAD model to generate two key one-dimensional data sequences: the contour deviation sequence, which directly reflects the magnitude of the deviation; and the contour curvature sequence, which describes the geometric complexity of the forging itself.

[0040] Specifically, the actual contour of a single forging to be tested is registered and aligned with the standard contour extracted from the CAD model, and the normal deviation and curvature values ​​at corresponding positions are calculated to obtain the contour deviation sequence and contour curvature sequence, including:

[0041] For a single forging to be tested within the current production cycle, a real-time image of it at a certain moment is captured. Simultaneously, the standard CAD model corresponding to the forging is retrieved from the database. The actual contour of the forging is extracted using image processing technology and registered and aligned with the standard contour extracted from the CAD model. After alignment, two one-dimensional sequences distributed along the contour arc length are calculated and generated, namely the contour deviation sequence and the contour curvature sequence. The contour deviation sequence is obtained by calculating the normal deviation of corresponding points on the actual contour point by point, using the standard contour as a reference. The contour curvature sequence is obtained by performing differential calculation on the curve region where the standard contour is located to obtain the curvature value corresponding to each point.

[0042] It should be noted that since both the contour deviation sequence and the contour curvature sequence use points on the standard contour as a unified index reference, the data points in these two sequences are strictly one-to-one corresponding.

[0043] Thus, the contour deviation sequence and contour curvature sequence of the forging under test were obtained.

[0044] It should be noted that, in order to elevate contour extraction from simple geometric information extraction to the extraction of advanced feature information, it is necessary to extract the dynamic distribution characteristics of the static contour deviation. However, the original contour deviation sequence can only reflect the degree of deviation, but cannot directly reveal whether the deviation originates from smooth macroscopic deformation or from severe microscopic defects. In order to evaluate and extract such spatially distributed texture features, this invention needs to calculate an initial feature quantity that reflects the degree of local nonlinearity of the deviation curve.

[0045] Preferably, a local jitter sequence is obtained based on the linear interpolation of each contour point in the contour deviation sequence with its two adjacent points and the actual deviation value, including:

[0046] Obtain the contour deviation sequence, calculate the linear interpolation of each contour point in the contour deviation sequence with its two adjacent points and the actual deviation value of that point, and use the absolute difference between the actual deviation value and the linear interpolation as the local jitter of each point to generate a local jitter sequence.

[0047] It should be noted that, in order to make the advanced features extracted by this invention more closely reflect the actual production conditions of the forging process, the local jitter alone is insufficient to fully characterize the morphology of the contour deviation. That is, jitter of the same amplitude occurring at different geometric positions of the forging has different implied process meanings. In order to correlate the deviation jitter with the geometric features of its specific location on the forging, this invention needs to integrate the local jitter with the geometric complexity of the forging contour itself to extract more informative morphological feature values.

[0048] Preferably, the local jitter sequence and the contour curvature sequence are nonlinearly weighted to obtain the morphological feature value of each contour point and generate a morphological feature value sequence, including:

[0049] The sequence of morphological feature values ​​satisfies the following expression:

[0050] ;

[0051] In the formula, Represents the morphological feature value sequence of the th The morphological feature value of each point is measured in units of length. For the first The local jitter at each point, with the dimension of length; For the first The contour curvature of a point, with the dimension being the reciprocal of the length; and These are the mean and standard deviation of the contour curvature sequence, respectively. It is a hyperbolic tangent function, and its output is also a dimensionless value; It represents a very small positive number, and guarantees that the denominator is not 0.

[0052] In the formula, Represents the profile curvature of a single point Relative to the overall contour curvature distribution ( , The weights are standardized to obtain the relative deviation, which is then used for subsequent dynamic adjustment of the weights. This means that the standardized contour curvature is mapped to a uniform interval to achieve dynamic adjustment of subsequent weights. That is, when the input standardized contour curvature is large, the output is close to 1, and the weight is amplified; when the input standardized contour curvature is small, the output is close to -1, and the weight is reduced. This means that the weight range is adjusted to (0,2) by outputting 1 + hyperbolic tangent; This means that the local jitter is scaled using dynamic weights to obtain the morphological feature value of the i-th point, with the dimension being length. This combines the local jitter with the global contour curvature distribution, allowing the feature value to more accurately reflect the morphological differences of different areas of the part. The core logic lies in utilizing the first The curvature magnitude of each point is dynamically adjusted. The weight of the local jitter of each point.

[0053] For example, assume that the same degree of local vibration is obtained at a certain point in the forging. There exists a case where the point is located in a region of high profile curvature, specifically at a corner with a radius of 5mm, where the profile curvature... After standardization, it becomes Then the morphological eigenvalues There is a second scenario: the point lies in a flat region, meaning it lies on a flat profile with a certain curvature. Approaching 0, after standardization, we obtain Then calculate As can be seen, the same physical jitter is significantly amplified in the morphological characteristic value of the high contour curvature region, while it is suppressed in the flat region. All the above calculations were performed with four decimal places.

[0054] S2: Preset an analysis window for any point in the morphological feature value sequence, calculate the local pattern scale based on the local gradient and energy distribution characteristics of the morphological feature values ​​in the analysis window, and perform local statistical analysis on the contour deviation sequence to obtain the local energy value.

[0055] It should be noted that in actual forging production scenarios, a single profile deviation value contains insufficient and ambiguous information. For example, a quality report may indicate a certain profile deviation... While a positive deviation is observed, this numerical value alone cannot reveal the root cause of the deviation. This deviation could be a wide-ranging, gradually changing overall bulge caused by uniform wear of the die after long-term use; its form is low-frequency. Alternatively, it could be a narrow-ranging but sharp flash or burr caused by poor metal flow or localized die damage; its form is high-frequency. For the former, process adjustments might require replacing the entire die or adjusting the overall forging energy, while for the latter, only local die repair or cleaning may be necessary. Traditional methods focus only on a 0.5mm amplitude, failing to extract features that distinguish these two distinct deviation forms, thus leading to a lack of information for subsequent decision-making.

[0056] It should be noted that, in order to extract more explicit and unambiguous high-level features, this invention, based on the actual situation of the forging process, decomposes the single deviation information into two independent feature dimensions with clear process significance: local energy value and local mode scale. The local mode scale, through power-weighted frequency analysis of the morphological feature value sequence, describes the degree of change in the deviation morphology, that is, the form in which the deviation occurs. Smooth die wear will produce a lower local mode scale, while sharp flash will produce a higher local mode scale.

[0057] Preferably, a sequence of morphological feature values ​​is obtained, and for any point, an analysis window of length L is preset. Based on the local gradient and energy distribution characteristics of the morphological feature values ​​within the analysis window, a local pattern scale is calculated, including:

[0058] Local pattern scaling satisfies the following expression:

[0059] ;

[0060] This represents the local pattern scale calculated within the analysis window corresponding to the j-th point in the morphological feature value sequence, whose dimensions are related to the local gradient. Same, in terms of length; This represents the analysis window corresponding to the j-th point; is the nth morphological feature value in the sequence of morphological feature values, with the dimension being length; , These represent the (n+1)th and (n-1)th morphological feature values ​​in the sequence of morphological feature values, and their dimension is also length; It represents a very small positive number, and guarantees that the denominator is not 0.

[0061] In the formula, This represents the local gradient at point n in the sequence of morphological feature values, with the dimension of length, passing through two adjacent points. , The average difference is used to approximate the rate of change of morphological features at that point. , The larger the difference, the larger the local gradient, and the more drastic the morphological change. In This represents the nth morphological feature value in the sequence of morphological feature values. Physically, it is an amplitude representing the intensity of the deviation morphology at the contour point n, measured in mm. However, in physics and signal processing, the power of a wave or signal is typically proportional to the square of its amplitude. Defined as the instantaneous power of the signal at the nth morphological feature value in the sequence of morphological feature values, with units of . ; This represents the sum of instantaneous frequencies within the analysis window corresponding to the j-th point, and the instantaneous frequency of each morphological feature value. All of them have passed through their own power Weighted average; It is the total power within the analysis window corresponding to the j-th point; By dividing the two, the power-weighted average instantaneous frequency within the analysis window corresponding to the j-th point is calculated. For a smooth low-frequency deviation, its gradient is... Generally smaller, leading to The value is low; for drastic high-frequency deviations, its gradient is low. Larger, leading to The value is relatively high.

[0062] For example, the preset analysis window length That is, each calculation is based on three consecutive morphological feature values ​​to calculate the gradient. The values ​​of points outside the window are preset to be the same as those at the window edges. Point values ​​outside the window are copied as boundary values. There are two cases here. Case one involves a low-frequency deviation mode, where the morphological feature value sequence within the window is [0.20, 0.30, 0.20] mm, representing a smooth convexity. In this case, the calculated gradient... mm; In case two, where there is a high-frequency deviation mode, the morphological feature value sequence within the window is [0.20, -0.30, 0.20] mm, representing a severe depression or ripple. The calculated value in this case is... As can be seen, for the drastic change sequence representing the high-frequency deviation pattern, the calculated local pattern scale of 0.1176 mm is much larger than that of the smooth sequence representing the low-frequency deviation pattern of 0.0235 mm. This proves that the formula can effectively extract and analyze the characteristics of different types of deviation patterns. All the above calculation results are obtained by retaining four decimal places.

[0063] It should be noted that the local energy value represents the overall magnitude or severity of the contour deviation within a local area; it indicates how severe the deviation is, corresponding to the example above. This is on a macroscopic scale.

[0064] Preferably, local statistical analysis is performed on the contour deviation sequence to obtain local energy values, including:

[0065] Obtain an analysis window that is identical to the one used to calculate the local pattern scale, and use the root mean square of all deviation values ​​within the analysis window as the local energy value of the center point corresponding to that analysis window.

[0066] S3: The product of the local energy value and the local pattern scale after standardization and indexation is denoted as the comprehensive characteristic index.

[0067] It should be noted that on a forging production line, two phenomena coexist in a production batch: one is a large-scale, slow deformation caused by die wear, characterized by a high local energy value and a low local pattern scale; the other is a small but sharp defect formed by material folding, characterized by a low local energy value and a high local pattern scale. Without a unified standard for measurement, the automated system will face a decision-making dilemma, unable to determine which should trigger an emergency shutdown. From a metallurgical perspective, sharp deviations may indicate stress concentration points, with potential process impacts far exceeding those of gentle dimensional deviations. Therefore, it is necessary to use the local pattern scale as a weighting factor to dynamically modulate the local energy value, thereby extracting a comprehensive characteristic index that reflects both the magnitude and shape of the deviation, directly linking this index to the actual process impact.

[0068] Specifically, the product of the local energy value and the local model scale after standardization and indexation is denoted as the comprehensive characteristic index, which includes:

[0069] The local pattern scaling sequence and local energy value sequence are obtained. The local pattern scaling is standardized, and the result is used as the base. An exponential function is used to perform exponentialization to obtain a dimensionless risk scaling factor. The product of the local energy value and the risk scaling factor is used as the comprehensive characteristic index of the center point corresponding to the analysis window.

[0070] S4: Obtain the comprehensive feature index sequence, identify local peaks and expand the region to define the feature segment; calculate the segment severity by logarithmically weighting and fusing the average comprehensive feature index and length of the feature segment, so as to serve as deep feature information characterizing the profile of the forging.

[0071] It should be noted that although this invention has obtained a point-by-point comprehensive characteristic index distributed along the contour, the sequence itself is still a continuous, unstructured data stream. In actual production management and quality traceability, automated systems need to process discrete, independently identifiable, and analyzable high-characteristic-value segments, rather than a list of undifferentiated data. For example, the system needs to explicitly extract a segment with a high characteristic value between positions A and B, rather than simply presenting an undulating risk curve. Therefore, in order to elevate the analysis from the point level to the segment level, thereby outputting structured characteristic information and generating a structured diagnostic report, a mechanism must be introduced that can automatically segment a continuous comprehensive characteristic index sequence into several independent characteristic segments.

[0072] Specifically, a comprehensive characteristic index sequence is obtained, and characteristic segments are defined by identifying local peaks and expanding the region, including:

[0073] Obtain the comprehensive feature index and generate a comprehensive feature index sequence. Identify the local maxima in the comprehensive feature index sequence that are higher than the mean of the comprehensive feature index sequence as feature cores. Expand the region to both sides of the feature cores until the risk index falls back to the baseline level to determine the boundary. The continuous set of points within the boundary is recorded as the feature segment.

[0074] It should be noted that when multiple characteristic segments are detected simultaneously, the system should rank their severity to guide subsequent process interventions. The ultimate severity of a deviation is not solely determined by its average risk intensity, but is also closely related to the physical extent of its impact. For example, the danger level of a very long segment with a low average comprehensive characteristic index cannot be judged based on a single dimension compared to a very short segment with a very high average comprehensive characteristic index. Therefore, to achieve unified assessment and ranking of deviations of different types and sizes, this invention needs to construct a final severity index that nonlinearly fuses the average characteristic index intensity of a segment with its length.

[0075] Preferably, the severity of a segment is calculated by identifying high-index feature segments on the contour and performing a logarithmically weighted fusion of their average comprehensive feature index and length, including:

[0076] The severity of a segment satisfies the following expression:

[0077] ;

[0078] In the formula, Indicates the first The severity of each segment is measured in units of length. Indicates the first The average comprehensive characteristic index of each characteristic segment is measured in units of length. Indicates the first The length of each feature segment, with the dimension of length; It is a reference length constant that makes the entire logarithmic term dimensionless; Represent the natural logarithm function; It represents a very small positive number, and guarantees that the denominator is not 0.

[0079] In the formula, The severity of a feature segment depends on both the average composite feature index of the feature segment and the range of influence of the feature segment, and the weight of the range is non-linear; In this context, the average comprehensive characteristic index serves as the intensity benchmark for the severity of characteristic segments, and its dimension is length. As a dimensionless range weighting factor, its purpose is to modulate the intensity benchmark of the severity of the feature segment; The use of this method satisfies the law of diminishing marginal returns regarding the contribution of deviation length to severity. That is, the increase in severity from a deviation increasing from 10mm to 20mm is far greater than the increase from 100mm to 110mm. Ultimately, the length representing the intensity... Multiplying it by the dimensionless range weighting factor, the resulting segment severity still has the dimension of length, making it an intuitive evaluation index with clear physical meaning.

[0080] For example, consider two different feature segments and set a reference length. Scenario 1 exists: a local high-index characteristic segment, whose... It is relatively high, at 0.8mm, but its length is... It is relatively short, at 5mm, at which point its calculation is performed. ; There exists a second scenario: a large-scale low-index characteristic segment, whose It is relatively low, at 0.1mm, but its It's very long, 50mm, at this point we can calculate... It is evident that although the length of the second type of feature segment is 10 times that of the first, its lower feature index strength results in a lower final calculated value. The deviation is 0.393 mm, which is much smaller than the first type of deviation of 1.434 mm. This indicates that the invention can effectively assess the overall severity of different types of feature segments, allowing staff to prioritize the feature segments with the highest severity and avoid wasting resources; all the above calculation results are obtained by retaining three decimal places.

[0081] This completes the entire process of extracting basic geometric information and advanced morphological feature information layer by layer from the forging contour.

[0082] This invention also discloses an automatic forging contour extraction system based on image processing, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement an automatic forging contour extraction method based on image processing according to the present invention.

[0083] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0084] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. An image processing-based automatic extraction method of a forging profile, characterized in that, The method comprises the following steps: aligning the actual profile of a single to-be-tested forging with a standard profile extracted from a CAD model, and calculating the normal deviation and curvature value of the corresponding positions of the two profiles to obtain a profile deviation sequence and a profile curvature sequence; obtaining a local jitter degree sequence, wherein the local jitter degree of each point is used to represent the deviation between the actual deviation value of the point and the linear interpolation determined by the adjacent two points before and after the point; nonlinearly weighting the local jitter degree sequence and the profile curvature sequence to obtain the shape feature value of each profile point and generate a shape feature value sequence; ; In the formula, represents the morphological feature value of the i-th point in the morphological feature value sequence, and has a dimension of length; is the local jitter degree of the i-th point, and has a dimension of length; is the contour curvature of the i-th point, and has a dimension of the reciprocal of length; and are the mean value and the standard deviation of the contour curvature sequence, respectively; is a hyperbolic tangent function, and the output is also a dimensionless value; represents a very small positive number, which ensures that the denominator is not 0.​​​ calculating the local mode scale according to the local gradient and energy distribution characteristics of the analysis window shape feature value for any point in the shape feature value sequence; ; wherein, denotes the local pattern scale calculated in the analysis window corresponding to the jth point in the sequence of morphological feature values, which has the same dimension as the local gradient , which is length; denotes the analysis window corresponding to the jth point; is the nth morphological feature value in the sequence of morphological feature values, which has the dimension of length; , denotes the (n+1)th and (n-1)th morphological feature values in the sequence of morphological feature values, which also has the dimension of length; performing local statistical analysis on the profile deviation sequence to obtain a local energy value; the product of the local energy value and the local mode scale after standardization and exponentialization processing is referred to as a comprehensive feature index; obtaining a comprehensive feature index sequence, identifying the local peak value and performing region expansion to define a feature section; and calculating the section severity by logarithmically weighting and fusing the average comprehensive feature index and length of the feature section, so as to obtain the deep feature information of the forging profile, wherein the section severity satisfies the following expression: ; wherein denotes the severity of the th segment, dimensioned in length; denotes the average integrated feature index of the th feature segment, dimensioned in length; denotes the length of the th feature segment, dimensioned in length; is a reference length constant, making the entire logarithmic term dimensionless; denotes the natural logarithm function.

2. The automatic extraction method of a forging profile based on image processing according to claim 1, characterized in that, The method comprises the following steps: for a single to-be-tested forging in a current production cycle, capturing a real-time image of the forging at a certain time, simultaneously calling a standard CAD model corresponding to the forging from a database, extracting the actual profile of the forging through image processing technology, aligning the actual profile with the standard profile extracted from the CAD model, and after alignment, generating two one-dimensional sequences along the profile arc length, namely a profile deviation sequence and a profile curvature sequence; the profile deviation sequence is obtained by calculating the normal deviation of the corresponding point on the actual profile with respect to the standard profile; and the profile curvature sequence is obtained by differentiating the curve region where the standard profile is located to obtain the curvature value of each point.

3. The automatic extraction method of a forging profile based on image processing according to claim 1, characterized in that, The method comprises the following steps: obtaining the profile deviation sequence, calculating the linear interpolation of each profile point in the profile deviation sequence and the actual deviation value of the point, and taking the absolute difference between the actual deviation value and the linear interpolation as the local jitter degree of each point to generate a local jitter degree sequence.

4. The automatic extraction method of a forging profile based on image processing according to claim 1, characterized in that, The method comprises the following steps: obtaining the profile deviation sequence and the analysis window for calculating the local mode scale, and taking the root mean square of all deviation values in the analysis window as the local energy value of the center point corresponding to the analysis window.

5. The automatic extraction method of a forging profile based on image processing according to claim 1, characterized in that, The method comprises the following steps: obtaining the local mode scale sequence and the local energy value sequence, standardizing the local mode scale, taking the processing result as the base, using the exponential function for exponentialization processing to obtain a dimensionless risk scaling factor, and taking the product of the local energy value and the risk scaling factor as the comprehensive feature index of the center point corresponding to the analysis window.

6. The automatic extraction method of a forging profile based on image processing according to claim 1, characterized in that, The method comprises the following steps: The comprehensive feature index is acquired and a comprehensive feature index sequence is generated. A local maximum point higher than the average of the comprehensive feature index sequence is identified as a feature core in the comprehensive feature index sequence, and a region is expanded to both sides of the feature core as a center until a risk index falls to a baseline level to determine a boundary. A continuous point set in the boundary is recorded as a feature section.

7. An image processing-based automatic extraction system of a forging profile, characterized by, Comprise: A processor and a memory, the memory storing computer program instructions which, when executed by the processor, implement an image processing-based automatic extraction method of a forging profile according to any one of claims 1-6.

Citation Information

Patent Citations

  • Pin shaft forging forming quality detection method and system

    CN120339278A

  • Intelligent deviation rectifying method and system for strip steel cutting

    CN120950897A