Method and System for Optimizing Titanium Alloy Forging Process Based on Image Processing
By using high-temperature cameras and infrared imagers for image analysis and evaluation during titanium alloy forging, the forging parameters are optimized in real time, and the problem of low degree of automation of forging process in the prior art is solved and product quality is improved.
Patent Information
- Application Number
- CN202510280775.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-11
AI Technical Summary
The prior art lacks a comprehensive analysis and real-time optimization mechanism for high-temperature images and infrared images during the titanium alloy forging process, resulting in low automation of the forging process and difficult to guarantee product quality.
By acquiring the initial titanium ingot, high-temperature camera, high-temperature forging machine and infrared imager, high-temperature camera and infrared image of forged titanium alloy are used to obtain high-temperature grayscale images and infrared images of forged titanium alloy, grayscale edge analysis and temperature edge analysis, target image areas are constructed, forging evaluation operations are performed, and forging parameters are optimized in real time.
It improves the automation and accuracy of parameter optimization in the titanium alloy forging process, improves product quality, and realizes real-time monitoring and optimization of the forging process.
Smart Images

Figure CN119810091B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for optimizing the titanium alloy forging process based on image processing. Background Art
[0002] As a material with excellent mechanical properties and corrosion resistance, titanium alloy is widely used in the fields of aerospace, military, chemical industry, etc. The forging process of titanium alloy is one of the crucial links in its manufacturing process.
[0003] At present, with the rapid development of image processing technology and infrared imaging technology, process control based on image and temperature monitoring has gradually become an important technical means in the field of advanced manufacturing. The application of high-temperature cameras and infrared imagers enables real-time monitoring of the temperature distribution and deformation of metals during the forging process, providing a new direction for the precise control of the forging process.
[0004] However, in the existing technology during the titanium alloy forging process, there is a lack of comprehensive analysis and real-time optimization mechanism for high-temperature images and infrared images. The optimization of the forging process often relies on manual analysis of images. Therefore, there is an urgent need for a method for optimizing the titanium alloy forging process based on image processing to perform real-time optimization of the forging process through high-temperature images and infrared images, improve the automation degree of the titanium alloy forging process, and enhance the product quality. Summary of the Invention
[0005] The present invention provides a method for optimizing the titanium alloy forging process based on image processing and a computer-readable storage medium, and its main purpose is to improve the automation degree and accuracy of optimizing the parameters in the forging process and enhance the product quality.
[0006] To achieve the above object, a method for optimizing the titanium alloy forging process based on image processing provided by the present invention includes:
[0007] Obtain an initial titanium ingot, a high-temperature camera, a high-temperature forging machine, and an infrared imager, wherein the resolution of the high-temperature camera is the same as that of the infrared imager;
[0008] Start the high-temperature forging machine, record the time in real time starting from the time when the high-temperature forging machine is started to obtain the forging time, and use the started high-temperature forging machine to forge the initial titanium ingot to obtain forged titanium alloy, wherein the initial forging frequency and the initial forging temperature for forging the initial titanium ingot by the started high-temperature forging machine are preset;
[0009] Obtain the high-temperature grayscale image and the infrared image of the forged titanium alloy by using the high-temperature camera and the infrared imager;
[0010] Perform gray - scale edge analysis on the high - temperature gray - scale image to obtain a gray - scale edge coordinate set, and perform temperature edge analysis on the infrared image to obtain a temperature edge coordinate set;
[0011] Use the gray - scale edge coordinate set and the temperature edge coordinate set to construct a target image area on a pre - constructed standard plane coordinate system, and perform a forging evaluation operation on the high - temperature gray - scale image and the infrared image based on the target image area to obtain a forging completion index, forging uniformity, and forging defect degree;
[0012] Compare the forging completion index with a preset forging completion threshold. If the forging completion index is less than the forging completion threshold, perform a correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain an updated forging frequency and an updated forging temperature;
[0013] Use the updated forging frequency as the initial forging frequency, the updated forging temperature as the initial forging temperature, and the forged titanium alloy as the initial titanium ingot, and return to the step of forging the initial titanium ingot using the started high - temperature forging machine until the forging time reaches a preset cut - off time or the forging completion index is greater than or equal to the forging completion threshold. Then, turn off the high - temperature forging machine and use the forged titanium alloy as the target titanium alloy to complete the optimization of the forging process of the titanium alloy.
[0014] Optionally, the step of using the high - temperature camera and the infrared imager to obtain the high - temperature gray - scale image and the infrared image of the forged titanium alloy includes:
[0015] Use the high - temperature camera to photograph the forged titanium alloy to obtain a high - temperature image, and use the infrared imager to photograph the forged titanium alloy to obtain an infrared image. Among them, the position where the high - temperature camera photographs the forged titanium alloy is the same as the position where the infrared imager photographs the forged titanium alloy, and the photographing direction when the high - temperature camera photographs the forged titanium alloy is the same as the photographing direction when the infrared imager photographs the forged titanium alloy. Among them, the infrared image includes: a plurality of infrared pixel points;
[0016] Perform a gray - scale operation on the high - temperature image to obtain a high - temperature gray - scale image. Among them, the high - temperature gray - scale image includes: a plurality of high - temperature pixel points.
[0017] Optionally, the step of performing gray - scale edge analysis on the high - temperature gray - scale image to obtain a gray - scale edge coordinate set includes:
[0018] Identify the main point of the high - temperature image in the high - temperature gray - scale image. Among them, the main point of the high - temperature image is a high - temperature pixel point located at the geometric center of the high - temperature gray - scale image;
[0019] Taking the main point of the high-temperature image as the origin, a first plane coordinate system is constructed in the high-temperature grayscale image. Among them, the direction from the first high-temperature pixel point in the upper left corner of the high-temperature grayscale image to the first high-temperature pixel point in the upper right corner of the high-temperature grayscale image is used as the positive direction of the horizontal axis of the first plane coordinate system, and the direction from the first high-temperature pixel point in the upper left corner of the high-temperature grayscale image to the first high-temperature pixel point in the lower left corner of the high-temperature grayscale image is used as the positive direction of the vertical axis of the first plane coordinate system. The length of the high-temperature pixel point is used as the unit length of the first plane coordinate system;
[0020] The following operations are performed on each of the multiple high-temperature pixel points:
[0021] Confirm the high-temperature grayscale value of the high-temperature pixel point, and compare the high-temperature grayscale value with the preset background grayscale threshold;
[0022] If the high-temperature grayscale value is less than the background grayscale threshold, the high-temperature pixel point is recorded as a background pixel point;
[0023] The background pixel points are summarized to obtain multiple background pixel points. The following operations are performed on each of the multiple background pixel points:
[0024] Confirm the background coordinates of the background pixel point on the first plane coordinate system, and calculate the first reference coordinate and the second reference coordinate based on the background coordinates. The calculation formulas are as follows:
[0025] ,
[0026] Among them, and are the abscissa and ordinate of the background coordinates respectively, and are the abscissa and ordinate of the first reference coordinate respectively, and are the abscissa and ordinate of the second reference coordinate respectively;
[0027] Based on the first reference coordinate, the first plane coordinate system and the high-temperature grayscale image, the first reference pixel point is confirmed. Among them, the first reference pixel point is a high-temperature pixel point in the high-temperature grayscale image and the coordinate of the first reference pixel point in the first plane coordinate system is the first reference coordinate;
[0028] Based on the second reference coordinate, the first plane coordinate system and the high-temperature grayscale image, the second reference pixel point is confirmed;
[0029] Confirm the first reference grayscale value of the first reference pixel point and the second reference grayscale value of the second reference pixel point;
[0030] Calculate the reference grayscale difference according to the first reference grayscale value and the second reference grayscale value. Among them, the reference grayscale difference is the absolute difference between the first reference grayscale value and the second reference grayscale value;
[0031] Compare the reference grayscale difference value with a preset difference grayscale threshold value;
[0032] If the reference grayscale difference value is greater than or equal to the difference grayscale threshold value, record the background pixel points corresponding to the reference grayscale difference value as target pixel points;
[0033] Aggregate the target pixel points to obtain multiple target pixel points;
[0034] Use the multiple target pixel points and the first plane coordinate system to obtain a grayscale edge coordinate set.
[0035] Optionally, the using the multiple target pixel points and the first plane coordinate system to obtain a grayscale edge coordinate set includes:
[0036] Record the target pixel points located in the first quadrant, the second quadrant, the third quadrant, and the fourth quadrant of the first plane coordinate system among the multiple target pixel points as the first pixel points, the second pixel points, the third pixel points, and the fourth pixel points respectively, and aggregate the first pixel points, the second pixel points, the third pixel points, and the fourth pixel points respectively to obtain multiple first pixel points, multiple second pixel points, multiple third pixel points, and multiple fourth pixel points;
[0037] Perform the following operations on each of the multiple first pixel points:
[0038] Confirm the test pixel coordinates of the first pixel point on the first plane coordinate system, and calculate the Euclidean distance according to the test pixel coordinates. The calculation formula is as follows:
[0039] ,
[0040] where, is the Euclidean distance, is the abscissa of the test pixel coordinates, is the ordinate of the test pixel coordinates;
[0041] Aggregate the Euclidean distances to obtain multiple Euclidean distances, record the maximum Euclidean distance among the multiple Euclidean distances as the target distance, and record the first pixel point corresponding to the target distance as the first edge point;
[0042] Obtain a second edge point based on the multiple second pixel points and the first plane coordinate system, obtain a third edge point based on the multiple third pixel points and the first plane coordinate system, and obtain a fourth edge point based on the multiple fourth pixel points;
[0043] Respectively confirm the first pixel coordinates, the second pixel coordinates, the third pixel coordinates, and the fourth pixel coordinates of the first edge point, the second edge point, the third edge point, and the fourth edge point on the first plane coordinate system;
[0044] Summarize the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate to obtain a grayscale edge coordinate set.
[0045] Optionally, the performing temperature edge analysis on the infrared image to obtain a temperature edge coordinate set includes:
[0046] Based on the infrared image, obtain a second plane coordinate system, and perform the following operations on each infrared pixel point among a plurality of infrared pixel points:
[0047] Identify the infrared temperature of the infrared pixel point, and compare the infrared temperature with a preset forging temperature threshold;
[0048] If the infrared temperature is less than the forging temperature threshold, mark the infrared pixel point as a background infrared point;
[0049] Summarize the background infrared points to obtain a plurality of background infrared points, and perform the following operations on each background infrared point among the plurality of background infrared points:
[0050] Based on the background infrared point, the second plane coordinate system, and the infrared image, obtain a first reference infrared point and a second reference infrared point;
[0051] Identify the first reference temperature of the first reference infrared point, and identify the second reference temperature of the second reference infrared point;
[0052] Calculate a reference temperature difference according to the first reference temperature and the second reference temperature, where the reference temperature difference is the absolute difference between the first reference temperature and the second reference temperature;
[0053] Compare the reference temperature difference with a preset reference temperature difference threshold;
[0054] If the reference temperature difference is greater than or equal to the reference temperature difference threshold, use the background infrared point corresponding to the reference temperature difference as a target infrared point;
[0055] Summarize the target infrared points to obtain a plurality of target infrared points;
[0056] Based on the plurality of target infrared points and the second plane coordinate system, obtain a first infrared coordinate, a second infrared coordinate, a third infrared coordinate, and a fourth infrared coordinate;
[0057] Summarize the first infrared coordinate, the second infrared coordinate, the third infrared coordinate, and the fourth infrared coordinate to obtain a temperature edge coordinate set.
[0058] Optionally, the constructing a target image area on a pre-constructed standard plane coordinate system by using the grayscale edge coordinate set and the temperature edge coordinate set includes:
[0059] Based on the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate in the grayscale edge coordinate set, the first reference point, the second reference point, the third reference point, and the fourth reference point are confirmed in the standard plane coordinate system. Among them, the coordinates of the first reference point, the second reference point, the third reference point, and the fourth reference point in the standard plane coordinate system are the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate respectively;
[0060] In the standard plane coordinate system, connect the first reference point and the second reference point to obtain the first line segment. In the standard plane coordinate system, connect the second reference point and the third reference point to obtain the second line segment. In the standard plane coordinate system, connect the third reference point and the fourth reference point to obtain the third line segment. In the standard plane coordinate system, connect the fourth reference point and the first reference point to obtain the fourth line segment;
[0061] In the standard plane coordinate system, construct the first standard region based on the first line segment, the second line segment, the third line segment, and the fourth line segment. Among them, the first standard region is the region enclosed by the first line segment, the second line segment, the third line segment, and the fourth line segment in the standard plane coordinate system;
[0062] Obtain the second standard region based on the temperature edge coordinate set and the standard plane coordinate system;
[0063] Confirm the target image region based on the first standard region and the second standard region. Among them, the target image region is the intersection of the first standard region and the second standard region.
[0064] Optionally, the forging evaluation operation is performed on the high-temperature grayscale image and the infrared image based on the target image region to obtain the forging completion index, the forging uniformity, and the forging defect degree, including:
[0065] Perform the following operations on each high-temperature pixel point among the multiple high-temperature pixel points of the high-temperature grayscale image:
[0066] Confirm the high-temperature coordinate of the high-temperature pixel point in the first plane coordinate system, and confirm the high-temperature corresponding point in the standard plane coordinate system based on the high-temperature coordinate;
[0067] Judge whether the high-temperature corresponding point is located in the target image region. If the high-temperature corresponding point is located in the target image region, record the high-temperature pixel point corresponding to the high-temperature corresponding point as the in-region pixel point, and confirm the in-region gray value of the in-region pixel point;
[0068] Summarize the in-region pixel points to obtain multiple in-region pixel points, summarize the in-region gray values to obtain multiple in-region gray values, and calculate the in-region gray mean value according to the multiple in-region gray values. Among them, the in-region gray mean value is the average value of the multiple in-region gray values;
[0069] Obtain multiple in-domain infrared points based on the infrared image, the second plane coordinate system, the standard plane coordinate system, and the target image area;
[0070] Perform the following operations on each of the multiple in-domain infrared points:
[0071] Identify the in-domain temperature of the in-domain infrared point;
[0072] Summarize the in-domain temperatures to obtain multiple in-domain temperatures, and calculate the average in-domain temperature based on the multiple in-domain temperatures. Here, the average in-domain temperature is the average of the multiple in-domain temperatures;
[0073] Calculate the forging uniformity according to the average in-domain gray value, the average in-domain temperature, the multiple in-domain gray values, and the multiple in-domain temperatures. The calculation formula is as follows:
[0074] ,
[0075] where, is the forging uniformity, is the th in-domain gray value among the multiple in-domain gray values, is the average in-domain gray value, is the th in-domain temperature among the multiple in-domain temperatures, is the average in-domain temperature, is the number of in-domain gray values among the multiple in-domain gray values, is the number of in-domain temperatures among the multiple in-domain temperatures;
[0076] Perform the following operations on each of the multiple in-domain pixel points:
[0077] Calculate the single-point difference degree according to the in-domain gray value corresponding to the in-domain pixel point and the average in-domain gray value. The calculation formula is as follows:
[0078] ,
[0079] where, is the single-point difference degree, is the in-domain gray value corresponding to the in-domain pixel point;
[0080] Compare the single-point difference degree with the preset defect threshold. If the single-point difference degree is greater than the defect threshold, then regard the in-domain pixel point corresponding to the single-point difference degree as a primary defect pixel point;
[0081] Construct a primary defect window in the high-temperature gray image based on the primary defect pixel points. Here, the size corresponding to the primary defect window is 3 pixels × 3 pixels, and the primary defect pixel points are located at the geometric center of the primary defect window;
[0082] Eliminate primary defect pixels from the primary defect window, and summarize the high-temperature pixels in the primary defect window after eliminating the primary defect pixels to obtain a primary updated point set;
[0083] Confirm the gray values of each primary updated point in the primary updated point set to obtain multiple primary gray values;
[0084] Perform the following operations on each of the multiple primary gray values:
[0085] Calculate the approximate gray difference based on the primary gray value and the in-domain gray value, where the approximate gray difference is the absolute difference between the primary gray value and the in-domain gray value;
[0086] Summarize the approximate gray differences to obtain multiple approximate gray differences, and use the primary updated point with the smallest approximate gray difference among the multiple primary updated points as the intermediate defect pixel;
[0087] Calculate the intermediate difference degree based on the primary gray value corresponding to the intermediate defect pixel and the in-domain gray mean value;
[0088] Compare the intermediate difference degree with the defect threshold. If the intermediate difference degree is greater than the defect threshold, obtain an intermediate defect window based on the intermediate defect pixel;
[0089] Eliminate the intermediate defect pixels and the primary defect pixels from the intermediate defect window, and summarize the high-temperature pixels in the intermediate defect window after eliminating the intermediate defect pixels and the primary defect pixels to obtain an intermediate updated point set;
[0090] Obtain the high-level difference degree based on the intermediate updated point set;
[0091] Compare the high-level difference degree with the defect threshold. If the high-level difference degree is greater than the defect threshold, use the in-domain pixel points corresponding to the high-level difference degree as the target defect pixels;
[0092] Summarize the target defect pixels to obtain multiple target defect pixels, and calculate the forging defect degree according to the multiple target defect pixels. The calculation formula is as follows:
[0093] ,
[0094] where, is the forging defect degree, is the number of target defect pixels among the multiple target defect pixels;
[0095] Calculate the forging completion index according to the forging time, the target image area, the forging uniformity, and the forging defect degree.
[0096] Optionally, the calculating the forging completion index according to the forging time, the target image area, the forging uniformity, and the forging defect degree includes:
[0097] Confirm the area of the target image area;
[0098] Calculate the forging completion index according to the forging time, area, forging uniformity and forging defect degree. The calculation formula is as follows:
[0099] ,
[0100] wherein, is the forging completion index, is the forging time, is the area, is the natural logarithm, is the natural constant.
[0101] Optionally, perform a correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain an updated forging frequency and an updated forging temperature, including:
[0102] Calculate the updated forging frequency according to the forging uniformity and the initial forging frequency. The calculation formula is as follows:
[0103] ,
[0104] wherein, is the updated forging frequency, is the initial forging frequency, is the hyperbolic tangent function;
[0105] Calculate the updated forging temperature according to the forging defect degree and the initial forging temperature. The calculation formula is as follows:
[0106] ,
[0107] wherein, is the updated forging temperature, is the initial forging temperature, is the preset standard defect degree.
[0108] To achieve the above object, the present invention also provides an optimized system for titanium alloy forging process based on image processing, including:
[0109] An initial titanium ingot forging module, configured to obtain an initial titanium ingot, a high-temperature camera, a high-temperature forging machine and an infrared imager. Among them, the resolution of the high-temperature camera is the same as that of the infrared imager. Start the high-temperature forging machine, record the time in real time starting from the time when the high-temperature forging machine is started to obtain the forging time, and use the started high-temperature forging machine to forge the initial titanium ingot to obtain forged titanium alloy. Among them, the initial forging frequency and the initial forging temperature for forging the initial titanium ingot by the started high-temperature forging machine are preset;
[0110] A forging image analysis module, configured to obtain high-temperature grayscale images and infrared images of forged titanium alloy by using a high-temperature camera and an infrared imager, perform grayscale edge analysis on the high-temperature grayscale images to obtain a grayscale edge coordinate set, and perform temperature edge analysis on the infrared images to obtain a temperature edge coordinate set;
[0111] A forging defect evaluation module, configured to construct a target image area on a pre-constructed standard plane coordinate system by using the grayscale edge coordinate set and the temperature edge coordinate set, and perform a forging evaluation operation on the high-temperature grayscale images and the infrared images based on the target image area to obtain a forging completion index, a forging uniformity, and a forging defect degree;
[0112] A forging process optimization module, configured to compare the forging completion index with a preset forging completion threshold. If the forging completion index is less than the forging completion threshold, perform a correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain an updated forging frequency and an updated forging temperature. Take the updated forging frequency as the initial forging frequency, take the updated forging temperature as the initial forging temperature, take the forged titanium alloy as the initial ingot, and return to the step of forging the initial ingot by using the started high-temperature forging machine until the forging time reaches a preset cut-off time or the forging completion index is greater than or equal to the forging completion threshold. Then, shut down the high-temperature forging machine and take the forged titanium alloy as the target titanium alloy to complete the optimization of the forging process of the titanium alloy.
[0113] To solve the above problems, the present invention also provides an electronic device, which includes:
[0114] A memory, storing at least one instruction;
[0115] And a processor, configured to execute the instructions stored in the memory to implement the above-mentioned method for optimizing the forging process of titanium alloy based on image processing.
[0116] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned method for optimizing the forging process of titanium alloy based on image processing.
[0117] To solve the problems described in the background art, the present invention obtains an initial titanium ingot, a high-temperature camera, a hot forging machine, and an infrared imager. Among them, the resolution of the high-temperature camera is the same as that of the infrared imager. It can be seen that in the embodiment of the present invention, by obtaining the high-temperature camera and the infrared imager, it provides the basic equipment for subsequently obtaining the high-temperature grayscale image and infrared image of the forged titanium alloy. Then, the hot forging machine is started, and the time is recorded in real time starting from the time when the hot forging machine is started to obtain the forging time. The initial titanium ingot is forged by the started hot forging machine to obtain the forged titanium alloy. Among them, the initial forging frequency and initial forging temperature for forging the initial titanium ingot by the started hot forging machine are preset. It can be seen that in the embodiment of the present invention, by recording the forging time in real time, it is convenient to subsequently evaluate the completion degree of forging according to the forging time. The high-temperature grayscale image and infrared image of the forged titanium alloy are obtained by using the high-temperature camera and the infrared imager. The grayscale edge analysis is performed on the high-temperature grayscale image to obtain the grayscale edge coordinate set, and the temperature edge analysis is performed on the infrared image to obtain the temperature edge coordinate set. It can be seen that in the embodiment of the present invention, the position of the edge of the forged titanium alloy image in the high-temperature grayscale image is analyzed through the mutation of the grayscale value, and the position of the edge of the image of the forged titanium alloy in the infrared image is analyzed through the mutation of the temperature, which is convenient for subsequently confirming the area of the forged titanium alloy in the high-temperature grayscale image and infrared image according to the position of the edge of the forged titanium alloy image. The target image area is constructed on the pre-constructed standard plane coordinate system by using the grayscale edge coordinate set and the temperature edge coordinate set. The forging evaluation operation is performed on the high-temperature grayscale image and the infrared image based on the target image area to obtain the forging completion index, forging uniformity, and forging defect degree. It can be seen that in the embodiment of the present invention, by constructing the target image area, the area where the forged titanium alloy is located in the high-temperature grayscale image and infrared image is confirmed, so that the images of the forged titanium alloy in the high-temperature grayscale image and infrared image can be analyzed separately, and then the forging completion index, forging uniformity, and forging defect degree are calculated, which is convenient for subsequently optimizing the forging process according to the forging completion index, forging uniformity, and forging defect degree, and improving the accuracy of optimizing the parameters in the forging process. The forging completion index is compared with the preset forging completion threshold. If the forging completion index is less than the forging completion threshold, the correction operation is performed on the initial forging frequency and initial forging temperature based on the forging uniformity and forging defect degree to obtain the updated forging frequency and updated forging temperature. The updated forging frequency is used as the initial forging frequency, the updated forging temperature is used as the initial forging temperature, the forged titanium alloy is used as the initial titanium ingot, and the step of forging the initial titanium ingot by the started hot forging machine is returned until the forging time reaches the preset cut-off time or the forging completion index is greater than or equal to the forging completion threshold. The hot forging machine is shut down and the forged titanium alloy is used as the target titanium alloy to complete the optimization of the forging process of the titanium alloy. It can be seen that in the embodiment of the present invention, the initial forging frequency and initial forging temperature are corrected by the forging uniformity and forging defect degree.Thus, a more suitable forging environment is provided for forging titanium alloys, improving the quality of the final product. Then, the step of forging the initial titanium ingot using the high-temperature forging machine after startup is repeated after correction. Thus, the initial forging frequency and the initial forging temperature during the forging process are adjusted periodically and continuously cycled, increasing the automation level of optimizing the parameters in the forging process. Therefore, the present invention can increase the automation level and accuracy of optimizing the parameters in the forging process and improve the product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0118] Figure 1 FIG. is a schematic flowchart of a method for optimizing a titanium alloy forging process based on image processing provided by an embodiment of the present invention;
[0119] Figure 2 FIG. is a functional block diagram of a system for optimizing a titanium alloy forging process based on image processing provided by an embodiment of the present invention;
[0120] Figure 3 FIG. is a schematic structural diagram of an electronic device for implementing the method for optimizing a titanium alloy forging process based on image processing provided by an embodiment of the present invention.
[0121] DESCRIPTION OF THE REFERENCE NUMERALS:
[0122] 1. Electronic device; 10. Processor; 11. Memory; 12. Bus.
[0123] The implementation, functional features, and advantages of the objectives of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0124] It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not used to limit the present invention.
[0125] An embodiment of the present application provides a method for optimizing a titanium alloy forging process based on image processing. The execution subject of the method for optimizing a titanium alloy forging process based on image processing includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for optimizing a titanium alloy forging process based on image processing can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc.
[0126] Referring to Figure 1 as shown, FIG. is a schematic flowchart of a method for optimizing a titanium alloy forging process based on image processing provided by an embodiment of the present invention. In this embodiment, the method for optimizing a titanium alloy forging process based on image processing includes:
[0127] S1. Obtain an initial titanium ingot, a high-temperature camera, a hot forging machine, and an infrared imager. Among them, the resolution of the high-temperature camera is the same as that of the infrared imager.
[0128] It should be explained that the initial titanium ingot is a titanium ingot pre-produced by a titanium alloy manufacturing factory for forging titanium alloys. The high-temperature camera is a camera that can photograph the forged titanium alloy in an environment of 0°C to 70°C. The infrared imager is a photographing device that can detect the infrared radiation of the forged titanium alloy during photographing and perform imaging based on the infrared radiation. Optionally, a Baumer-VCXG-13M.I.XT industrial camera is used as the high-temperature camera, and a FOTRIC-3610 expert-level digital thermal imager is used as the infrared imager.
[0129] Exemplarily, the resolution of the Baumer-VCXG-13M.I.XT industrial camera is 1280 pixels × 1024 pixels, and the resolution of the FOTRIC-3610 expert-level digital thermal imager is 1280 pixels × 1024 pixels. At this time, the resolution of the high-temperature camera is the same as that of the infrared imager.
[0130] It should be understood that in the embodiments of the present invention, by limiting the resolution of the high-temperature camera to be the same as that of the infrared imager, it is ensured that the subsequent obtained high-temperature image and infrared image have the same image resolution. Moreover, since the position and shooting direction of the high-temperature camera when photographing the forged titanium alloy are the same as those of the infrared imager when photographing the forged titanium alloy, the high-temperature pixel points in the high-temperature grayscale image correspond one-to-one with the infrared pixel points in the infrared image. Furthermore, only then can the target image area be obtained according to the intersection of the first standard area corresponding to the high-temperature grayscale image and the second standard area corresponding to the infrared image.
[0131] Exemplarily, when the resolution of the high-temperature camera is the same as that of the infrared imager and the position and shooting direction of the high-temperature camera when photographing the forged titanium alloy are the same as those of the infrared imager when photographing the forged titanium alloy, the following effects can be achieved: If the point corresponding to the high-temperature pixel point with coordinates (10, 10) in the first plane coordinate system in reality is the geometric center of the side of the forged titanium alloy, then the point corresponding to the infrared pixel point with coordinates (10, 10) in the second plane coordinate system in reality is also the geometric center of the side of the forged titanium alloy.
[0132] S2. Start the hot forging machine, record the time in real time starting from the time when the hot forging machine is started to obtain the forging time, and use the started hot forging machine to forge the initial titanium ingot to obtain a forged titanium alloy. Among them, the initial forging frequency and initial forging temperature for the started hot forging machine to forge the initial titanium ingot are preset.
[0133] It should be noted that the high-temperature forging machine is a forging machine that can forge the initial titanium ingot. Among them, the specific forging process is determined by the forging process of the titanium alloy manufacturing factory. The initial forging frequency refers to the ratio of the number of times the high-temperature forging machine strikes or hammers the workpiece to the unit time (usually per minute) when the high-temperature forging machine forges the initial titanium ingot. The initial forging temperature refers to the temperature at which the initial titanium ingot is heated when the high-temperature forging machine forges the initial titanium ingot.
[0134] Preferably, the initial forging frequency is 30 times per minute, and the initial forging temperature is 950 degrees Celsius.
[0135] Importantly, the forged titanium alloy refers to the initial titanium ingot during the forging process, not the initial titanium ingot after forging. That is, when the high-temperature camera and the infrared imager are used to photograph the forged titanium alloy subsequently, the forged titanium alloy is always in the forging process.
[0136] Exemplarily, if the high-temperature forging machine is started at 10:00, then starting from 10:00 and recording the time in real-time, when it is 10:11, the forging time is 11 minutes.
[0137] S3. Use a high-temperature camera and an infrared imager to obtain the high-temperature grayscale image and infrared image of the forged titanium alloy.
[0138] Specifically, the use of a high-temperature camera and an infrared imager to obtain the high-temperature grayscale image and infrared image of the forged titanium alloy includes:
[0139] Use a high-temperature camera to photograph the forged titanium alloy to obtain a high-temperature image, and use an infrared imager to photograph the forged titanium alloy to obtain an infrared image. Among them, the position where the high-temperature camera photographs the forged titanium alloy is the same as the position where the infrared imager photographs the forged titanium alloy, and the shooting direction when the high-temperature camera photographs the forged titanium alloy is the same as the shooting direction when the infrared imager photographs the forged titanium alloy. Among them, the infrared image includes: a plurality of infrared pixel points;
[0140] Perform a grayscale operation on the high-temperature image to obtain a high-temperature grayscale image. Among them, the high-temperature grayscale image includes: a plurality of high-temperature pixel points.
[0141] It should be noted that the high-temperature image is the image obtained when the high-temperature camera photographs the forged titanium alloy, and the infrared image is the thermal infrared image generated when the infrared imager photographs the forged titanium alloy. An infrared pixel point refers to a pixel point in the infrared image, and a high-temperature pixel point refers to a pixel point in the high-temperature grayscale image.
[0142] It should be understood that the operation of grayscale conversion on the high-temperature image means: grayscaling each pixel point in the high-temperature image. And the technology of performing grayscale conversion on the high-temperature image to obtain the high-temperature grayscale image is a prior art and will not be elaborated here.
[0143] S4. Perform grayscale edge analysis on the high-temperature grayscale image to obtain a grayscale edge coordinate set, and perform temperature edge analysis on the infrared image to obtain a temperature edge coordinate set;
[0144] Specifically, the operation of performing grayscale edge analysis on the high-temperature grayscale image to obtain a grayscale edge coordinate set includes:
[0145] Identify the main point of the high-temperature image in the high-temperature grayscale image, where the main point of the high-temperature image is a high-temperature pixel point located at the geometric center of the high-temperature grayscale image;
[0146] Construct a first plane coordinate system in the high-temperature grayscale image with the main point of the high-temperature image as the origin. Among them, the direction from the first high-temperature pixel point in the upper left corner of the high-temperature grayscale image to the first high-temperature pixel point in the upper right corner of the high-temperature grayscale image is used as the positive direction of the horizontal axis of the first plane coordinate system, and the direction from the first high-temperature pixel point in the upper left corner of the high-temperature grayscale image to the first high-temperature pixel point in the lower left corner of the high-temperature grayscale image is used as the positive direction of the vertical axis of the first plane coordinate system, and the length of the high-temperature pixel point is used as the unit length of the first plane coordinate system;
[0147] Perform the following operations on each of the multiple high-temperature pixel points:
[0148] Confirm the high-temperature grayscale value of the high-temperature pixel point, and compare the high-temperature grayscale value with a preset background grayscale threshold;
[0149] If the high-temperature grayscale value is less than the background grayscale threshold, then record the high-temperature pixel point as a background pixel point;
[0150] Summarize the background pixel points to obtain multiple background pixel points, and perform the following operations on each of the multiple background pixel points:
[0151] Confirm the background coordinates of the background pixel point on the first plane coordinate system, and calculate the first reference coordinate and the second reference coordinate based on the background coordinates. The calculation formulas are as follows:
[0152] ,
[0153] Among them, and are the abscissa and ordinate of the background coordinates respectively, and are the abscissa and ordinate of the first reference coordinate respectively, and They are respectively the abscissa and ordinate of the second reference coordinate;
[0154] Based on the first reference coordinate, the first plane coordinate system, and the high-temperature grayscale image, confirm the first reference pixel point. Among them, the first reference pixel point is a high-temperature pixel point in the high-temperature grayscale image, and the coordinate of the first reference pixel point in the first plane coordinate system is the first reference coordinate;
[0155] Based on the second reference coordinate, the first plane coordinate system, and the high-temperature grayscale image, confirm the second reference pixel point;
[0156] Confirm the first reference grayscale value of the first reference pixel point, and confirm the second reference grayscale value of the second reference pixel point;
[0157] Calculate the reference grayscale difference according to the first reference grayscale value and the second reference grayscale value. Among them, the reference grayscale difference is the absolute difference between the first reference grayscale value and the second reference grayscale value;
[0158] Compare the reference grayscale difference with a preset difference grayscale threshold;
[0159] If the reference grayscale difference is greater than or equal to the difference grayscale threshold, record the background pixel point corresponding to the reference grayscale difference as the target pixel point;
[0160] Summarize the target pixel points to obtain multiple target pixel points;
[0161] Use the multiple target pixel points and the first plane coordinate system to obtain a grayscale edge coordinate set.
[0162] It should be explained that the high-temperature grayscale value refers to the grayscale value of the high-temperature pixel point. Optionally, the background grayscale threshold is a value manually set by the staff in the titanium alloy manufacturing factory. Optionally, the background grayscale threshold is 90. The background coordinate refers to the coordinate corresponding to the background pixel point on the first plane coordinate system.
[0163] It should be understood that the method for confirming the second reference pixel point based on the second reference coordinate, the first plane coordinate system, and the high-temperature grayscale image is the same as the method for confirming the first reference pixel point based on the first reference coordinate, the first plane coordinate system, and the high-temperature grayscale image, and will not be elaborated here.
[0164] It should be explained that the first reference grayscale value and the second reference grayscale value respectively refer to the grayscale value of the first reference pixel point and the grayscale value of the second reference pixel point. Optionally, the difference grayscale threshold is 20.
[0165] Specifically, the method for obtaining the grayscale edge coordinate set by using the multiple target pixel points and the first plane coordinate system includes:
[0166] Denote the target pixel points in the first quadrant, second quadrant, third quadrant, and fourth quadrant of the first plane coordinate system among multiple target pixel points as the first pixel points, second pixel points, third pixel points, and fourth pixel points respectively, and summarize the first pixel points, second pixel points, third pixel points, and fourth pixel points respectively to obtain multiple first pixel points, multiple second pixel points, multiple third pixel points, and multiple fourth pixel points;
[0167] Perform the following operations on each of the multiple first pixel points:
[0168] Confirm the test pixel coordinates of the first pixel point on the first plane coordinate system, and calculate the Euclidean distance according to the test pixel coordinates. The calculation formula is as follows:
[0169] ,
[0170] where, is the Euclidean distance, is the abscissa of the test pixel coordinates, is the ordinate of the test pixel coordinates;
[0171] Summarize the Euclidean distances to obtain multiple Euclidean distances. Denote the largest Euclidean distance among the multiple Euclidean distances as the target distance, and denote the first pixel point corresponding to the target distance as the first edge point;
[0172] Obtain the second edge point based on the multiple second pixel points and the first plane coordinate system, obtain the third edge point based on the multiple third pixel points and the first plane coordinate system, and obtain the fourth edge point based on the multiple fourth pixel points;
[0173] Respectively confirm the first pixel coordinates, second pixel coordinates, third pixel coordinates, and fourth pixel coordinates of the first edge point, second edge point, third edge point, and fourth edge point on the first plane coordinate system;
[0174] Summarize the first pixel coordinates, second pixel coordinates, third pixel coordinates, and fourth pixel coordinates to obtain the gray-scale edge coordinate set.
[0175] It should be explained that the test pixel coordinates refer to the coordinates corresponding to the first pixel point on the first plane coordinate system. The Euclidean distance refers to the distance between the first pixel point and the origin of the first plane coordinate system.
[0176] It should be understood that the method for obtaining the second edge point based on multiple second pixel points and the first plane coordinate system, the method for obtaining the third edge point based on multiple third pixel points and the first plane coordinate system, and the method for obtaining the fourth edge point based on multiple fourth pixel points are the same as the method for obtaining the first edge point by using multiple first pixel points and the first plane coordinate system, and will not be elaborated here.
[0177] It should be explained that the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate respectively refer to the coordinates corresponding to the first edge point, the second edge point, the third edge point, and the fourth edge point in the first plane coordinate system.
[0178] Specifically, the temperature edge analysis of the infrared image to obtain the temperature edge coordinate set includes:
[0179] Obtain a second plane coordinate system based on the infrared image, and perform the following operations on each infrared pixel point among the multiple infrared pixel points:
[0180] Identify the infrared temperature of the infrared pixel point, and compare the infrared temperature with a preset forging temperature threshold;
[0181] If the infrared temperature is less than the forging temperature threshold, then record the infrared pixel point as a background infrared point;
[0182] Summarize the background infrared points to obtain multiple background infrared points, and perform the following operations on each background infrared point among the multiple background infrared points:
[0183] Obtain a first reference infrared point and a second reference infrared point based on the background infrared point, the second plane coordinate system, and the infrared image;
[0184] Identify the first reference temperature of the first reference infrared point and the second reference temperature of the second reference infrared point;
[0185] Calculate a reference temperature difference according to the first reference temperature and the second reference temperature, where the reference temperature difference is the absolute difference between the first reference temperature and the second reference temperature;
[0186] Compare the reference temperature difference with a preset reference temperature difference threshold;
[0187] If the reference temperature difference is greater than or equal to the reference temperature difference threshold, then use the background infrared point corresponding to the reference temperature difference as the target infrared point;
[0188] Summarize the target infrared points to obtain multiple target infrared points;
[0189] Obtain a first infrared coordinate, a second infrared coordinate, a third infrared coordinate, and a fourth infrared coordinate based on the multiple target infrared points and the second plane coordinate system;
[0190] Summarize the first infrared coordinate, the second infrared coordinate, the third infrared coordinate, and the fourth infrared coordinate to obtain a temperature edge coordinate set.
[0191] It can be understood that the method for obtaining the second plane coordinate system based on the infrared image is the same as the method for obtaining the first plane coordinate system using the high-temperature grayscale image, which will not be elaborated here. Preferably, the forging temperature threshold is 800 degrees Celsius, and the reference temperature difference threshold is 30 degrees Celsius.
[0192] It should be understood that the infrared temperature, the first reference temperature, and the second reference temperature respectively refer to the temperatures of the points corresponding to the infrared pixel point, the first reference infrared point, and the second reference infrared point in reality. Since the intensity of infrared radiation is proportional to the temperature, when the infrared imager generates an infrared image based on the infrared radiation intensity, each infrared pixel point in the infrared image corresponds to a temperature value. Therefore, the infrared temperature, the first reference temperature, and the second reference temperature can be obtained through the infrared pixel point, the first reference infrared point, and the second reference infrared point. Moreover, the technologies for identifying the infrared temperature of the infrared pixel point, the first reference temperature of the first reference infrared point, and the second reference temperature of the second reference infrared point are all existing technologies, which will not be elaborated here.
[0193] It can be understood that the method for obtaining the first reference infrared point and the second reference infrared point based on the background infrared point, the second plane coordinate system, and the infrared image is the same as the method for confirming the first reference pixel point and the second reference pixel point using the background pixel point, the first plane coordinate system, and the high-temperature grayscale image. The method for obtaining the first infrared coordinate, the second infrared coordinate, the third infrared coordinate, and the fourth infrared coordinate based on multiple target infrared points and the second plane coordinate system is the same as the method for obtaining the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate using multiple target pixel points and the first plane coordinate system, which will not be elaborated here.
[0194] S5. Use the grayscale edge coordinate set and the temperature edge coordinate set to construct a target image area on the pre-constructed standard plane coordinate system, and perform a forging evaluation operation on the high-temperature grayscale image and the infrared image based on the target image area to obtain a forging completion index, a forging uniformity, and a forging defect degree.
[0195] It should be explained that the standard plane coordinate system is a plane rectangular coordinate system.
[0196] Specifically, the step of using the grayscale edge coordinate set and the temperature edge coordinate set to construct a target image area on the pre-constructed standard plane coordinate system includes:
[0197] Based on the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate in the grayscale edge coordinate set, the first reference point, the second reference point, the third reference point, and the fourth reference point are confirmed in the standard plane coordinate system. Among them, the coordinates of the first reference point, the second reference point, the third reference point, and the fourth reference point in the standard plane coordinate system are the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate respectively;
[0198] Connect the first reference point and the second reference point in the standard plane coordinate system to obtain the first line segment. Connect the second reference point and the third reference point in the standard plane coordinate system to obtain the second line segment. Connect the third reference point and the fourth reference point in the standard plane coordinate system to obtain the third line segment. Connect the fourth reference point and the first reference point in the standard plane coordinate system to obtain the fourth line segment;
[0199] Based on the first line segment, the second line segment, the third line segment, and the fourth line segment in the standard plane coordinate system, a first standard region is constructed. Among them, the first standard region is the region enclosed by the first line segment, the second line segment, the third line segment, and the fourth line segment in the standard plane coordinate system;
[0200] Based on the temperature edge coordinate set and the standard plane coordinate system, a second standard region is obtained;
[0201] Based on the first standard region and the second standard region, the target image region is confirmed. Among them, the target image region is the intersection of the first standard region and the second standard region.
[0202] It should be understood that when shooting a high-temperature image and an infrared image, it is impossible that there is only an image of forged titanium alloy in the high-temperature image and the infrared image. There must also be images of the devices or backgrounds around the forged titanium alloy (for example: partial images of a high-temperature forging machine). At the junction of the image of the forged titanium alloy and the image of the devices or backgrounds around the forged titanium alloy, there will be a sudden change in the grayscale value. Therefore, in the embodiments of the present invention, by performing grayscale edge analysis on the high-temperature grayscale image, the approximate region where the image of the forged titanium alloy is located in the high-temperature image can be confirmed. That is, the first standard region reflects the region where the image of the forged titanium alloy is located in the high-temperature image. And in reality, at the junction of the forged titanium alloy and the devices around the forged titanium alloy, there will be a sudden change in temperature. Therefore, by performing temperature edge analysis on the infrared image, the approximate region where the image of the forged titanium alloy is located in the infrared image can be confirmed. That is, the second standard region reflects the region where the image of the forged titanium alloy is located in the infrared image. And due to possible interferences such as noise in the high-temperature image and the infrared image, the intersection of the first standard region and the second standard region is used to further eliminate the interference and narrow the range, and finally the target image region is confirmed. That is, the target image region reflects the region corresponding to the image of the forged titanium alloy in the standard plane coordinate system.
[0203] It should be explained that the first reference point, the second reference point, the third reference point, and the fourth reference point are points with the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate in the standard plane coordinate system, respectively.
[0204] It should be understood that the method for obtaining the second standard region based on the temperature edge coordinate set and the standard plane coordinate system is the same as the method for obtaining the first standard region using the gray-scale edge coordinate set and the standard plane coordinate system, and will not be elaborated here.
[0205] Specifically, the forging evaluation operation is performed on the high-temperature gray-scale image and the infrared image based on the target image region to obtain the forging completion index, the forging uniformity, and the forging defect degree, including:
[0206] The following operations are performed on each high-temperature pixel point among the multiple high-temperature pixel points of the high-temperature gray-scale image:
[0207] Confirm the high-temperature coordinate of the high-temperature pixel point in the first plane coordinate system, and confirm the corresponding high-temperature point in the standard plane coordinate system based on the high-temperature coordinate;
[0208] Judge whether the corresponding high-temperature point is located in the target image region. If the corresponding high-temperature point is located in the target image region, record the high-temperature pixel point corresponding to the corresponding high-temperature point as an in-domain pixel point, and confirm the in-domain gray-scale value of the in-domain pixel point;
[0209] Summarize the in-domain pixel points to obtain multiple in-domain pixel points, summarize the in-domain gray-scale values to obtain multiple in-domain gray-scale values, and calculate the in-domain gray-scale mean value according to the multiple in-domain gray-scale values, where the in-domain gray-scale mean value is the average value of the multiple in-domain gray-scale values;
[0210] Obtain multiple in-domain infrared points based on the infrared image, the second plane coordinate system, the standard plane coordinate system, and the target image region;
[0211] The following operations are performed on each in-domain infrared point among the multiple in-domain infrared points:
[0212] Identify the in-domain temperature of the in-domain infrared point;
[0213] Summarize the in-domain temperatures to obtain multiple in-domain temperatures, and calculate the in-domain temperature mean value according to the multiple in-domain temperatures, where the in-domain temperature mean value is the average value of the multiple in-domain temperatures;
[0214] Calculate the forging uniformity according to the in-domain gray-scale mean value, the in-domain temperature mean value, the multiple in-domain gray-scale values, and the multiple in-domain temperatures. The calculation formula is as follows:
[0215] ,
[0216] where, is the forging uniformity, is the gray value within the th domain among multiple domain gray values, is the average gray value within the domain, is the temperature within the th domain among multiple domain temperatures, is the average temperature within the domain, is the number of gray values within the domain among multiple domain gray values, is the number of temperatures within the domain among multiple domain temperatures;
[0217] Perform the following operations on each pixel point within the domain among multiple domain pixel points:
[0218] Calculate the single-point difference degree according to the gray value within the domain corresponding to the pixel point within the domain and the average gray value within the domain. The calculation formula is as follows:
[0219] ,
[0220] where, is the single-point difference degree, is the gray value within the domain corresponding to the pixel point within the domain;
[0221] Compare the single-point difference degree with a preset defect threshold. If the single-point difference degree is greater than the defect threshold, then regard the pixel point within the domain corresponding to the single-point difference degree as a primary defect pixel point;
[0222] Construct a primary defect window in the high-temperature gray image based on the primary defect pixel points. Among them, the size corresponding to the primary defect window is 3 pixels × 3 pixels, and the primary defect pixel point is located at the geometric center of the primary defect window;
[0223] Remove the primary defect pixel points from the primary defect window, and summarize the high-temperature pixel points in the primary defect window after removing the primary defect pixel points to obtain a primary updated point set;
[0224] Confirm the gray values of each primary updated point in the primary updated point set to obtain multiple primary gray values;
[0225] Perform the following operations on each primary gray value among multiple primary gray values:
[0226] Calculate the similar gray difference according to the primary gray value and the gray value within the domain. Among them, the similar gray difference is the absolute difference between the primary gray value and the gray value within the domain;
[0227] Summarize the similar gray differences to obtain multiple similar gray differences, and regard the primary updated point with the smallest similar gray difference among multiple primary updated points as an intermediate defect pixel point;
[0228] Calculate the intermediate difference degree according to the primary gray value corresponding to the intermediate defect pixel point and the average gray value within the domain;
[0229] Compare the intermediate difference degree with the defect threshold. If the intermediate difference degree is greater than the defect threshold, obtain an intermediate defect window based on the intermediate defect pixel points;
[0230] Remove the intermediate defect pixel points and the primary defect pixel points from the intermediate defect window, and summarize the high-temperature pixel points in the intermediate defect window after removing the intermediate defect pixel points and the primary defect pixel points to obtain an intermediate update point set;
[0231] Obtain the high-level difference degree based on the intermediate update point set;
[0232] Compare the high-level difference degree with the defect threshold. If the high-level difference degree is greater than the defect threshold, use the in-domain pixel points corresponding to the high-level difference degree as target defect pixel points;
[0233] Summarize the target defect pixel points to obtain multiple target defect pixel points, and calculate the forging defect degree according to the multiple target defect pixel points. The calculation formula is as follows:
[0234] ,
[0235] wherein, is the forging defect degree, is the number of target defect pixel points among the multiple target defect pixel points;
[0236] Calculate the forging completion index according to the forging time, the target image area, the forging uniformity, and the forging defect degree.
[0237] It should be explained that the high-temperature coordinate refers to the coordinate corresponding to the high-temperature pixel point in the first plane coordinate system. The confirmation of the high-temperature corresponding point in the standard plane coordinate system based on the high-temperature coordinate means taking the point with the coordinate of the high-temperature coordinate in the standard plane coordinate system as the high-temperature corresponding point. The in-domain gray value is the gray value of the in-domain pixel point.
[0238] It should be understood that the method for obtaining multiple in-domain infrared points based on the infrared image, the second plane coordinate system, the standard plane coordinate system, and the target image area is the same as the method for obtaining multiple in-domain pixel points using the high-temperature gray image, the first plane coordinate system, the standard plane coordinate system, and the target image area, and will not be elaborated here. The method for identifying the in-domain temperature of the in-domain infrared points is the same as the method for identifying the infrared temperature of the infrared pixel points, and will not be elaborated here.
[0239] It is understandable that the forging uniformity reflects the degree of similarity of the states of various positions on the surface of the forged titanium alloy. The higher the forging uniformity, the higher the degree of similarity of the states of various positions on the surface of the forged titanium alloy. The single-point difference degree reflects the degree of difference between the in-domain gray value of the pixel points in the domain and the in-domain gray mean value. The higher the single-point difference degree, the greater the degree of difference between the in-domain gray value of the pixel points in the domain and the in-domain gray mean value. Optionally, the defect threshold is 0.2.
[0240] It should be explained that the primary defect window is composed of primary defect pixel points and 8 high-temperature pixel points adjacent to the primary defect pixel points.
[0241] It should be understood that the primary update point set includes multiple primary update points, and the intermediate update point set includes multiple intermediate update points. The method for calculating the intermediate difference degree according to the primary gray value corresponding to the intermediate defect pixel point and the in-domain gray mean value is the same as the method for calculating the single-point difference degree according to the in-domain gray value corresponding to the pixel points in the domain and the in-domain gray mean value. The method for obtaining the intermediate defect window based on the intermediate defect pixel points is the same as the method for obtaining the primary defect window using the primary defect pixel points. The method for obtaining the high-level difference degree based on the intermediate update point set is the same as the method for obtaining the intermediate difference degree using the intermediate update point set, and will not be elaborated here.
[0242] It is understandable that in the embodiment of the present invention, the intermediate defect pixel points and the high-level defect pixel points are confirmed through the defect threshold, the primary defect window, and the intermediate defect window. If there are intermediate defect pixel points and high-level defect pixel points among the high-temperature pixel points adjacent to the pixel points in the domain, since the intermediate difference degree corresponding to the intermediate defect pixel points and the high-level difference degree corresponding to the high-level defect pixel points are both greater than the defect threshold, it means that the image composed of the pixel points in the domain and the high-temperature pixel points near the pixel points in the domain may correspond to cracks and damages on the surface of the forged titanium alloy in reality. Therefore, the pixel points in the domain are recorded as target defect pixel points, and finally the target defect pixel points are summarized. The severity of the surface defects of the forged titanium alloy is evaluated by the number of target defect pixel points among the multiple target defect pixel points. Therefore, the greater the forging defect degree, the more serious the surface defects of the forged titanium alloy.
[0243] Specifically, calculating the forging completion index according to the forging time, the target image area, the forging uniformity, and the forging defect degree includes:
[0244] Confirm the area of the target image area;
[0245] Calculate the forging completion index according to the forging time, the area, the forging uniformity, and the forging defect degree. The calculation formula is as follows:
[0246] ,
[0247] Where, is the forging completion index, is the forging time, is the area of the region, is the natural logarithm, is the natural constant.
[0248] It should be understood that the area of the region refers to the area of the target image region. The forging completion index reflects the degree of completion of the forging process of the forged titanium alloy. The larger the forging completion index, the higher the degree of completion of the forging process of the forged titanium alloy.
[0249] It can be understood that during the forging process, the forged titanium alloy will deform under the forging of the high-temperature forging machine, and its height in the vertical direction will gradually decrease. Since the forged titanium alloy is often photographed from the side, the area of the region corresponding to the target image region of the forged titanium alloy will gradually decrease during the forging process. Therefore, when the forging time is longer and the area of the region is smaller, the forging completion index is larger.
[0250] S6. Compare the forging completion index with the preset forging completion threshold. If the forging completion index is less than the forging completion threshold, perform a correction operation on the initial forging frequency and the initial forging temperature based on the forging time, forging uniformity, and forging defect degree to obtain the updated forging frequency and the updated forging temperature.
[0251] Optionally, the staff of the titanium alloy manufacturing factory calculate the average value of the forging completion indices of multiple historically forged qualified titanium alloys as the forging completion threshold.
[0252] Specifically, the performing a correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain the updated forging frequency and the updated forging temperature includes:
[0253] Calculate the updated forging frequency according to the forging uniformity and the initial forging frequency. The calculation formula is as follows:
[0254] ,
[0255] where, is the updated forging frequency, is the initial forging frequency, is the hyperbolic tangent function;
[0256] Calculate the updated forging temperature according to the forging defect degree and the initial forging temperature. The calculation formula is as follows:
[0257] ,
[0258] where, is the updated forging temperature, is the initial forging temperature, is a preset standard defect degree.
[0259] It should be explained that the main function of updating the forging frequency is to update the initial forging frequency when the hot forging machine subsequently forges the initial titanium ingot. The main function of updating the forging temperature is to update the initial forging temperature when the hot forging machine subsequently forges the initial titanium ingot. Optionally, the standard defect degree is 10%.
[0260] It should be understood that when the forging frequency is high, the stress generated by each forging can be transmitted to all parts of the forged titanium alloy more quickly, so that the stress distribution received by the forged titanium alloy is more uniform. Therefore, when the forging uniformity is too low, the forging frequency can be updated through the forging uniformity calculation, and the initial forging frequency can be updated with the updated forging frequency, so as to appropriately increase the initial forging frequency and then improve the forging uniformity. When the forging temperature is too high, the excessive temperature will increase the expansion stress on the surface of the forged titanium alloy, and then cracks will form on the surface. At the same time, when the forging temperature is too high, the forged titanium alloy is more likely to be oxidized by air, so that the surface roughness increases, and then the forging defect degree rises. Therefore, when the forging defect degree is too high, the forging temperature can be updated through the forging defect degree calculation, and the initial forging temperature can be updated with the updated forging temperature, so as to appropriately reduce the initial forging temperature and then improve the forging defect degree.
[0261] S7. Take the updated forging frequency as the initial forging frequency, take the updated forging temperature as the initial forging temperature, take the forged titanium alloy as the initial titanium ingot, and return to the step of forging the initial titanium ingot using the started hot forging machine until the forging time reaches the preset cut-off time or the forging completion index is greater than or equal to the forging completion threshold, then turn off the hot forging machine and take the forged titanium alloy as the target titanium alloy to complete the optimization of the forging process of the titanium alloy.
[0262] It should be explained that the target titanium alloy is the forged titanium alloy required by the titanium alloy manufacturing factory. The cut-off time is set by the staff of the titanium alloy factory according to the forging process of the titanium alloy. Optionally, the cut-off time is 1 hour.
[0263] To solve the problems described in the background art, the present invention obtains an initial titanium ingot, a high-temperature camera, a hot forging machine, and an infrared imager. Among them, the resolution of the high-temperature camera is the same as that of the infrared imager. It can be seen that the embodiments of the present invention provide the basic equipment for obtaining the high-temperature grayscale image and infrared image of the forged titanium alloy by obtaining the high-temperature camera and the infrared imager. Then, the hot forging machine is started, and the time is recorded in real time starting from the time when the hot forging machine is started to obtain the forging time. The initial titanium ingot is forged by the started hot forging machine to obtain the forged titanium alloy. Among them, the initial forging frequency and initial forging temperature for forging the initial titanium ingot by the started hot forging machine are preset. It can be seen that the embodiments of the present invention facilitate the subsequent evaluation of the completion degree of forging according to the forging time by recording the forging time in real time. The high-temperature grayscale image and infrared image of the forged titanium alloy are obtained by using the high-temperature camera and the infrared imager. The grayscale edge analysis is performed on the high-temperature grayscale image to obtain the grayscale edge coordinate set, and the temperature edge analysis is performed on the infrared image to obtain the temperature edge coordinate set. It can be seen that the embodiments of the present invention analyze the position of the edge of the forged titanium alloy image in the high-temperature grayscale image through the mutation of the grayscale value, and analyze the position of the edge of the image of the forged titanium alloy in the infrared image through the mutation of the temperature, which facilitates the subsequent confirmation of the area of the forged titanium alloy in the high-temperature grayscale image and infrared image according to the position of the edge of the forged titanium alloy image. The target image area is constructed on the pre-constructed standard plane coordinate system by using the grayscale edge coordinate set and the temperature edge coordinate set. The forging evaluation operation is performed on the high-temperature grayscale image and the infrared image based on the target image area to obtain the forging completion index, forging uniformity, and forging defect degree. It can be seen that the embodiments of the present invention confirm the area where the forged titanium alloy is located in the high-temperature grayscale image and infrared image by constructing the target image area, so that the images of the forged titanium alloy in the high-temperature grayscale image and infrared image can be analyzed separately, and then the forging completion index, forging uniformity, and forging defect degree are calculated, which facilitates the subsequent optimization of the forging process according to the forging completion index, forging uniformity, and forging defect degree, and improves the accuracy of optimizing the parameters in the forging process. The forging completion index is compared with the preset forging completion threshold. If the forging completion index is less than the forging completion threshold, the correction operation is performed on the initial forging frequency and initial forging temperature based on the forging uniformity and forging defect degree to obtain the updated forging frequency and updated forging temperature. The updated forging frequency is used as the initial forging frequency, the updated forging temperature is used as the initial forging temperature, and the forged titanium alloy is used as the initial titanium ingot, and the step of forging the initial titanium ingot by the started hot forging machine is returned until the forging time reaches the preset cut-off time or the forging completion index is greater than or equal to the forging completion threshold. The hot forging machine is shut down and the forged titanium alloy is used as the target titanium alloy to complete the optimization of the forging process of the titanium alloy. It can be seen that the embodiments of the present invention correct the initial forging frequency and initial forging temperature through the forging uniformity and forging defect degree.Thus, a more suitable forging environment is provided for forging titanium alloy, improving the quality of the final product. And the step of forging the initial titanium ingot using the high-temperature forging machine after startup is returned after correction. Thus, the initial forging frequency and the initial forging temperature during the forging process are adjusted stage by stage and continuously cycled, improving the automation degree of optimizing the parameters in the forging process. Therefore, the present invention can improve the automation degree and accuracy of optimizing the parameters in the forging process and enhance the product quality.
[0264] As Figure 2 shown, it is a functional module diagram of a titanium alloy forging process optimization system based on image processing provided by an embodiment of the present invention.
[0265] The titanium alloy forging process optimization system 100 based on image processing according to the present invention can be installed in an electronic device. According to the implemented functions, the titanium alloy forging process optimization system 100 based on image processing can include an initial titanium ingot forging module 101, a forging image analysis module 102, a forging defect assessment module 103, and a forging process optimization module 104. The modules of the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
[0266] The initial titanium ingot forging module 101 is used to obtain an initial titanium ingot, a high-temperature camera, a high-temperature forging machine, and an infrared imager. Among them, the resolution of the high-temperature camera is the same as that of the infrared imager. The high-temperature forging machine is started, and the time is recorded in real time starting from the time when the high-temperature forging machine is started to obtain the forging time. The initial titanium ingot is forged using the started high-temperature forging machine to obtain forged titanium alloy, where the initial forging frequency and the initial forging temperature for forging the initial titanium ingot using the started high-temperature forging machine are preset;
[0267] The forging image analysis module 102 is used to obtain the high-temperature grayscale image and the infrared image of the forged titanium alloy using the high-temperature camera and the infrared imager, perform grayscale edge analysis on the high-temperature grayscale image to obtain a grayscale edge coordinate set, and perform temperature edge analysis on the infrared image to obtain a temperature edge coordinate set;
[0268] The forging defect assessment module 103 is used to construct a target image area on a pre-constructed standard plane coordinate system using the grayscale edge coordinate set and the temperature edge coordinate set, and perform a forging assessment operation on the high-temperature grayscale image and the infrared image based on the target image area to obtain a forging completion index, a forging uniformity, and a forging defect degree;
[0269] The forging process optimization module 104 is configured to compare the forging completion index with a preset forging completion threshold. If the forging completion index is less than the forging completion threshold, a correction operation is performed on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain an updated forging frequency and an updated forging temperature. The updated forging frequency is used as the initial forging frequency, the updated forging temperature is used as the initial forging temperature, and the forged titanium alloy is used as the initial titanium ingot. Then, return to the step of forging the initial titanium ingot using the started high-temperature forging machine until the forging time reaches the preset cut-off time or the forging completion index is greater than or equal to the forging completion threshold. Then, shut down the high-temperature forging machine and use the forged titanium alloy as the target titanium alloy to complete the optimization of the forging process of the titanium alloy.
[0270] Specifically, when the modules in the titanium alloy forging process optimization system 100 based on image processing in the embodiments of the present invention are used, they adopt the same technical means as those in the Figure 1 titanium alloy forging process optimization method based on image processing described above, and can produce the same technical effects, which will not be elaborated here.
[0271] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing the titanium alloy forging process optimization method based on image processing provided by an embodiment of the present invention.
[0272] The electronic device 1 may include a processor 10, a memory 11, and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a titanium alloy forging process optimization method program based on image processing.
[0273] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as the mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 1. Further, the memory 11 also includes the internal storage unit of the electronic device 1 and the external storage device. The memory 11 can be used not only to store application software installed on the electronic device 1 and various types of data, such as the code of the titanium alloy forging process optimization method program, but also to temporarily store data that has been output or will be output.
[0274] In some embodiments, the processor 10 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and circuits, and by running or executing programs or modules stored in the memory 11 (such as the titanium alloy forging process optimization method program based on image processing, etc.), and calling the data stored in the memory 11, to perform various functions of the electronic device 1 and process data.
[0275] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is set to enable connection and communication between the memory 11 and at least one processor 10, etc.
[0276] Figure 3 Only the electronic device with components is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have a different component layout.
[0277] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for powering each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device 1 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0278] Furthermore, the electronic device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the electronic device 1 and other electronic devices.
[0279] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.
[0280] The titanium alloy forging process optimization method program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, which can be implemented when running in the processor 10:
[0281] Obtain an initial titanium ingot, a high-temperature camera, a high-temperature forging machine, and an infrared imager, wherein the resolution of the high-temperature camera is the same as that of the infrared imager;
[0282] Start the high-temperature forging machine, record the time in real time starting from the time when the high-temperature forging machine is started to obtain the forging time, and use the started high-temperature forging machine to forge the initial titanium ingot to obtain forged titanium alloy, wherein the initial forging frequency and the initial forging temperature for forging the initial titanium ingot by the started high-temperature forging machine are preset;
[0283] Use the high-temperature camera and the infrared imager to obtain the high-temperature grayscale image and the infrared image of the forged titanium alloy;
[0284] Perform grayscale edge analysis on the high-temperature grayscale image to obtain a grayscale edge coordinate set, and perform temperature edge analysis on the infrared image to obtain a temperature edge coordinate set;
[0285] Use the grayscale edge coordinate set and the temperature edge coordinate set to construct a target image area on a pre-constructed standard plane coordinate system, and perform a forging evaluation operation on the high-temperature grayscale image and the infrared image based on the target image area to obtain a forging completion index, a forging uniformity, and a forging defect degree;
[0286] Compare the forging completion index with a preset forging completion threshold. If the forging completion index is less than the forging completion threshold, perform a correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain an updated forging frequency and an updated forging temperature;
[0287] Take the updated forging frequency as the initial forging frequency, take the updated forging temperature as the initial forging temperature, take the forged titanium alloy as the initial titanium ingot, and return the step of forging the initial titanium ingot using the started high-temperature forging machine until the forging time reaches the preset cut-off time or the forging completion index is greater than or equal to the forging completion threshold. Then, turn off the high-temperature forging machine and take the forged titanium alloy as the target titanium alloy to complete the optimization of the forging process of the titanium alloy.
[0288] Specifically, the specific implementation method of the above instructions by the processor 10 can refer to Figures 1 to 3 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.
[0289] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory).
[0290] The present invention also provides a computer-readable storage medium. The readable storage medium stores a computer program, and when the computer program is executed by the processor of the electronic device, it can implement:
[0291] Obtain an initial titanium ingot, a high-temperature camera, a high-temperature forging machine, and an infrared imager, where the resolution of the high-temperature camera is the same as that of the infrared imager;
[0292] Start the high-temperature forging machine, record the time in real-time starting from the time when the high-temperature forging machine is started to obtain the forging time, and use the started high-temperature forging machine to forge the initial titanium ingot to obtain a forged titanium alloy, where the initial forging frequency and the initial forging temperature for forging the initial titanium ingot by the started high-temperature forging machine are preset;
[0293] Use the high-temperature camera and the infrared imager to obtain the high-temperature grayscale image and the infrared image of the forged titanium alloy;
[0294] Perform grayscale edge analysis on the high-temperature grayscale image to obtain a grayscale edge coordinate set, and perform temperature edge analysis on the infrared image to obtain a temperature edge coordinate set;
[0295] Use the grayscale edge coordinate set and the temperature edge coordinate set to construct a target image area on a pre-constructed standard plane coordinate system, and perform a forging evaluation operation on the high-temperature grayscale image and the infrared image based on the target image area to obtain a forging completion index, a forging uniformity, and a forging defect degree;
[0296] Compare the forging completion index with a preset forging completion threshold. If the forging completion index is less than the forging completion threshold, perform a correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain an updated forging frequency and an updated forging temperature;
[0297] Use the updated forging frequency as the initial forging frequency, use the updated forging temperature as the initial forging temperature, use the forged titanium alloy as the initial titanium ingot, and return to the step of forging the initial titanium ingot using the started high-temperature forging machine until the forging time reaches a preset cut-off time or the forging completion index is greater than or equal to the forging completion threshold. Then, turn off the high-temperature forging machine and use the forged titanium alloy as the target titanium alloy to complete the optimization of the forging process of the titanium alloy.
[0298] In several embodiments provided by the present invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and there may be other division methods in actual implementation.
[0299] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0300] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.
[0301] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention.
[0302] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A titanium alloy forging process optimization method based on image processing, characterized in that: The method comprises: Obtain an initial titanium ingot, a high temperature camera, a high temperature forging machine and an infrared imager, wherein the resolution of the high temperature camera is the same as that of the infrared imager; Starting the high temperature forging machine, taking the time of starting the high temperature forging machine as the starting point and recording the time in real time to obtain the forging time, and using the started high temperature forging machine to forge the initial titanium ingot to obtain the forged titanium alloy, wherein the initial forging frequency and initial forging temperature of the started high temperature forging machine for forging the initial titanium ingot are preset; Use a high-temperature camera and infrared imager to obtain high-temperature grayscale images and infrared images of forged titanium alloys; Perform grayscale edge analysis on the high temperature grayscale image to obtain a grayscale edge coordinate set, and perform temperature edge analysis on the infrared image to obtain a temperature edge coordinate set; The target image region is constructed on a pre-constructed standard plane coordinate system using a grayscale edge coordinate set and a temperature edge coordinate set; The method of constructing a target image region on a pre-constructed standard plane coordinate system using a grayscale edge coordinate set and a temperature edge coordinate set includes: A first reference point, a second reference point, a third reference point, and a fourth reference point are identified in the standard plane coordinate system based on the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate in the grayscale edge coordinate set, wherein the coordinates of the first reference point, the second reference point, the third reference point, and the fourth reference point in the standard plane coordinate system are the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate, respectively; Connecting the first reference point with the second reference point in the standard plane coordinate system to obtain a first line segment, connecting the second reference point with the third reference point in the standard plane coordinate system to obtain a second line segment, connecting the third reference point with the fourth reference point in the standard plane coordinate system to obtain a third line segment, and connecting the fourth reference point with the first reference point in the standard plane coordinate system to obtain a fourth line segment; Constructing a first standard area based on the first line segment, the second line segment, the third line segment and the fourth line segment in the standard plane coordinate system, wherein the first standard area is an area enclosed by the first line segment, the second line segment, the third line segment and the fourth line segment in the standard plane coordinate system; Acquire a second standard area based on the temperature edge coordinate set and the standard plane coordinate system; Confirming a target image region based on the first standard region and the second standard region, wherein the target image region is an intersection of the first standard region and the second standard region; Performing forging evaluation operations on the high temperature grayscale image and the infrared image based on the target image area to obtain the forging completion index, forging uniformity and forging defect degree; Comparing the forging completion index with a preset forging completion threshold, if the forging completion index is less than the forging completion threshold, performing a correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree, and obtaining an updated forging frequency and an updated forging temperature; The updated forging frequency is used as the initial forging frequency, the updated forging temperature is used as the initial forging temperature, and the forged titanium alloy is used as the initial titanium ingot. The process returns to the step of forging the initial titanium ingot using the started high-temperature forging machine until the forging time reaches the preset deadline or the forging completion index is greater than or equal to the forging completion threshold. The high-temperature forging machine is turned off and the forged titanium alloy is used as the target titanium alloy to complete the forging process optimization of the titanium alloy.
2. The titanium alloy forging process optimization method based on image processing according to claim 1, characterized in that: The method of using a high temperature camera and an infrared imager to obtain a high temperature grayscale image and an infrared image of a forged titanium alloy includes: The forged titanium alloy is photographed by a high temperature camera to obtain a high temperature image, and the forged titanium alloy is photographed by an infrared imager to obtain an infrared image, wherein the position of the high temperature camera when photographing the forged titanium alloy is the same as the position of the infrared imager when photographing the forged titanium alloy, and the shooting direction of the high temperature camera when photographing the forged titanium alloy is the same as the shooting direction of the infrared imager when photographing the forged titanium alloy, wherein the infrared image includes: a plurality of infrared pixel points; A grayscale operation is performed on the high temperature image to obtain a high temperature grayscale image, wherein the high temperature grayscale image includes: a plurality of high temperature pixel points.
3. The titanium alloy forging process optimization method based on image processing according to claim 2, characterized in that: The grayscale edge analysis is performed on the high temperature grayscale image to obtain a grayscale edge coordinate set, including: Identifying a high temperature image principal point in the high temperature grayscale image, wherein the high temperature image principal point is a high temperature pixel point located at a geometric center of the high temperature grayscale image; A first plane coordinate system is constructed in the high-temperature grayscale image with the principal point of the high-temperature image as the origin, wherein the direction from the first high-temperature pixel point in the upper left corner of the high-temperature grayscale image to the first high-temperature pixel point in the upper right corner of the high-temperature grayscale image is used as the positive horizontal axis direction of the first plane coordinate system, the direction from the first high-temperature pixel point in the upper left corner of the high-temperature grayscale image to the first high-temperature pixel point in the lower left corner of the high-temperature grayscale image is used as the positive vertical axis direction of the first plane coordinate system, and the length of the high-temperature pixel point is used as the unit length of the first plane coordinate system; The following operations are performed on each of the multiple high-temperature pixels: Confirm the high temperature gray value of the high temperature pixel point, and compare the high temperature gray value with the preset background gray threshold; If the high temperature grayscale value is less than the background grayscale threshold, the high temperature pixel point is recorded as a background pixel point; Summarize the background pixels to obtain multiple background pixels, and perform the following operations on each of the multiple background pixels: Confirm the background coordinates of the background pixel point in the first plane coordinate system, and calculate the first reference coordinates and the second reference coordinates based on the background coordinates. The calculation formula is as follows: , in, and are the horizontal and vertical coordinates of the background coordinates, and are the horizontal and vertical coordinates of the first reference coordinate, and are the abscissa and ordinate of the second reference coordinate respectively; Confirming a first reference pixel based on the first reference coordinates, the first plane coordinate system, and the high-temperature grayscale image, wherein the first reference pixel is a high-temperature pixel in the high-temperature grayscale image and the coordinates of the first reference pixel in the first plane coordinate system are the first reference coordinates; confirming a second reference pixel point based on the second reference coordinate, the first plane coordinate system, and the high temperature grayscale image; Confirming a first reference grayscale value of a first reference pixel, and confirming a second reference grayscale value of a second reference pixel; Calculate a reference grayscale difference value according to the first reference grayscale value and the second reference grayscale value, wherein the reference grayscale difference value is an absolute difference value between the first reference grayscale value and the second reference grayscale value; Comparing the reference grayscale difference value with a preset grayscale difference threshold; If the reference grayscale difference is greater than or equal to the grayscale difference threshold, the background pixel corresponding to the reference grayscale difference is recorded as the target pixel; Summarize the target pixel points to obtain multiple target pixel points; A grayscale edge coordinate set is obtained using a plurality of target pixel points and a first plane coordinate system.
4. The titanium alloy forging process optimization method based on image processing according to claim 3, characterized in that: The method of obtaining a grayscale edge coordinate set by using a plurality of target pixel points and a first plane coordinate system includes: The target pixel points located in the first quadrant of the first plane coordinate system, the second quadrant of the first plane coordinate system, the third quadrant of the first plane coordinate system, and the fourth quadrant of the first plane coordinate system among the multiple target pixel points are respectively recorded as the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point, and the first pixel point, the second pixel point, the third pixel point, and the fourth pixel point are respectively summarized to obtain a plurality of first pixel points, a plurality of second pixel points, a plurality of third pixel points, and a plurality of fourth pixel points; The following operation is performed on each of the plurality of first pixel points: Confirm the test pixel coordinates of the first pixel point on the first plane coordinate system, and calculate the Euclidean distance based on the test pixel coordinates. The calculation formula is as follows: , in, is the Euclidean distance, is the horizontal coordinate of the test pixel coordinate, is the ordinate of the test pixel coordinate; Summarize the Euclidean distances to obtain multiple Euclidean distances, record the largest Euclidean distance among the multiple Euclidean distances as the target distance, and record the first pixel point corresponding to the target distance as the first edge point; Acquire a second edge point based on a plurality of second pixel points and the first plane coordinate system, acquire a third edge point based on a plurality of third pixel points and the first plane coordinate system, and acquire a fourth edge point based on a plurality of fourth pixel points; Respectively confirming first pixel coordinates, second pixel coordinates, third pixel coordinates and fourth pixel coordinates of the first edge point, the second edge point, the third edge point and the fourth edge point on the first plane coordinate system; The first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate are aggregated to obtain a grayscale edge coordinate set.
5. The titanium alloy forging process optimization method based on image processing according to claim 4, characterized in that: The step of performing temperature edge analysis on the infrared image to obtain a temperature edge coordinate set includes: The second plane coordinate system is obtained based on the infrared image, and the following operations are performed on each of the multiple infrared pixel points: Identify the infrared temperature of the infrared pixel point and compare the infrared temperature with the preset forging temperature threshold; If the infrared temperature is less than the forging temperature threshold, the infrared pixel point is recorded as a background infrared point; The background infrared points are aggregated to obtain multiple background infrared points, and the following operations are performed on each of the multiple background infrared points: Acquire a first reference infrared point and a second reference infrared point based on the background infrared point, the second plane coordinate system and the infrared image; Identify a first reference temperature of a first reference infrared point, and identify a second reference temperature of a second reference infrared point; Calculating a reference temperature difference according to the first reference temperature and the second reference temperature, wherein the reference temperature difference is an absolute difference between the first reference temperature and the second reference temperature; comparing the reference temperature difference value with a preset reference temperature difference threshold; If the reference temperature difference is greater than or equal to the reference temperature difference threshold, the background infrared point corresponding to the reference temperature difference is taken as the target infrared point; Summarize the target infrared points to obtain multiple target infrared points; Acquire a first infrared coordinate, a second infrared coordinate, a third infrared coordinate, and a fourth infrared coordinate based on the plurality of target infrared points and the second plane coordinate system; The first infrared coordinate, the second infrared coordinate, the third infrared coordinate, and the fourth infrared coordinate are summarized to obtain a temperature edge coordinate set.
6. The titanium alloy forging process optimization method based on image processing according to claim 5, characterized in that: The forging evaluation operation is performed on the high temperature grayscale image and the infrared image based on the target image area to obtain the forging completion index, forging uniformity and forging defect degree, including: The following operations are performed on each of the multiple high-temperature pixels in the high-temperature grayscale image: Confirm the high temperature coordinates of the high temperature pixel point in the first plane coordinate system, and confirm the high temperature corresponding point in the standard plane coordinate system based on the high temperature coordinates; Determine whether the high temperature corresponding point is located in the target image area. If the high temperature corresponding point is located in the target image area, record the high temperature pixel point corresponding to the high temperature corresponding point as the in-domain pixel point, and confirm the in-domain grayscale value of the in-domain pixel point. Summarize the pixels in the domain to obtain multiple pixels in the domain, summarize the grayscale values in the domain to obtain multiple grayscale values in the domain, and calculate the grayscale mean in the domain according to the multiple grayscale values in the domain, wherein the grayscale mean in the domain is the average value of the multiple grayscale values in the domain; Acquire multiple infrared points in the domain based on the infrared image, the second plane coordinate system, the standard plane coordinate system and the target image area; The following operations are performed on each of the multiple intra-domain infrared points: Identify the temperature of the infrared points in the domain; Summarize the temperatures in the domain to obtain multiple temperatures in the domain, and calculate the average temperature in the domain according to the multiple temperatures in the domain, wherein the average temperature in the domain is the average value of the multiple temperatures in the domain; The forging uniformity is calculated based on the grayscale mean value in the domain, the temperature mean value in the domain, multiple grayscale values in the domain, and multiple temperatures in the domain. The calculation formula is as follows: , in, For forging uniformity, is the gray value in multiple domains Gray value in the domain, is the grayscale mean in the domain, is the temperature in multiple domains The temperature in the domain, is the mean temperature in the domain, is the number of intra-domain grayscale values among multiple intra-domain grayscale values, is the number of intra-domain temperatures in the plurality of intra-domain temperatures; The following operations are performed on each of the multiple in-domain pixels: The single-point difference is calculated based on the grayscale value in the domain corresponding to the pixel point in the domain and the grayscale mean in the domain. The calculation formula is as follows: , in, is the single point difference, is the gray value in the domain corresponding to the pixel point in the domain; Compare the single point difference with the preset defect threshold. If the single point difference is greater than the defect threshold, the pixel point in the domain corresponding to the single point difference is taken as the primary defect pixel point. A primary defect window is constructed in the high-temperature grayscale image based on the primary defect pixel point, wherein the size corresponding to the primary defect window is 3 pixels×3 pixels, and the primary defect pixel point is located at the geometric center of the primary defect window; Eliminate primary defect pixels from the primary defect window, and aggregate high-temperature pixels in the primary defect window after the primary defect pixels are eliminated to obtain a primary update point set; Confirming the grayscale value of each primary update point in the primary update point set to obtain multiple primary grayscale values; The following operation is performed on each of the plurality of primary grayscale values: Calculate the approximate grayscale difference value according to the primary grayscale value and the grayscale value in the domain, wherein the approximate grayscale difference value is the absolute difference between the primary grayscale value and the grayscale value in the domain; Summarize similar grayscale differences to obtain multiple similar grayscale differences, and use the primary update point with the smallest similar grayscale difference among the multiple primary update points as the intermediate defective pixel point; The intermediate difference is calculated based on the primary grayscale value corresponding to the intermediate defect pixel and the grayscale mean in the domain; Compare the intermediate difference with the defect threshold, if the intermediate difference is greater than the defect threshold, obtain the intermediate defect window based on the intermediate defect pixel point; Eliminate intermediate defect pixels and primary defect pixels from the intermediate defect window, and summarize the high-temperature pixels in the intermediate defect window after eliminating the intermediate defect pixels and primary defect pixels to obtain an intermediate update point set; Obtain high-level differences based on the intermediate update point set; Compare the high-level difference with the defect threshold. If the high-level difference is greater than the defect threshold, the pixel point in the domain corresponding to the high-level difference is taken as the target defect pixel point. The target defect pixel points are summarized to obtain multiple target defect pixel points. The forging defect degree is calculated based on the multiple target defect pixel points. The calculation formula is as follows: , in, is the forging defect degree, is the number of target defective pixels among multiple target defective pixels; The forging completion index is calculated based on the forging time, target image area, forging uniformity and forging defectivity.
7. The titanium alloy forging process optimization method based on image processing according to claim 6, characterized in that: The forging completion index is calculated according to the forging time, the target image area, the forging uniformity and the forging defect degree, including: Confirm the area of the target image region; The forging completion index is calculated based on the forging time, area, forging uniformity and forging defect degree. The calculation formula is as follows: , in, Forging completion index, Forging time, is the area of the region, is the natural logarithm, is a natural constant.
8. The titanium alloy forging process optimization method based on image processing according to claim 7, characterized in that: The performing of correction operation on the initial forging frequency and the initial forging temperature based on the forging uniformity and the forging defect degree to obtain the updated forging frequency and the updated forging temperature comprises: The updated forging frequency is calculated based on the forging uniformity and the initial forging frequency. The calculation formula is as follows: , in, To update the forging frequency, is the initial forging frequency, is the hyperbolic tangent function; The updated forging temperature is calculated based on the forging defect degree and the initial forging temperature. The calculation formula is as follows: , in, To update the forging temperature, is the initial forging temperature, The default standard defect degree.
9. A titanium alloy forging process optimization system based on image processing, characterized in that: The system comprises: The initial titanium ingot forging module is used to obtain the initial titanium ingot, a high-temperature camera, a high-temperature forging machine and an infrared imager, wherein the resolution of the high-temperature camera is the same as that of the infrared imager, start the high-temperature forging machine, take the time of starting the high-temperature forging machine as the starting point and record the time in real time to obtain the forging time, and use the started high-temperature forging machine to forge the initial titanium ingot to obtain a forged titanium alloy, wherein the initial forging frequency and initial forging temperature of the started high-temperature forging machine for forging the initial titanium ingot are preset; A forging image analysis module is used to obtain a high-temperature grayscale image and an infrared image of a forged titanium alloy using a high-temperature camera and an infrared imager, perform grayscale edge analysis on the high-temperature grayscale image to obtain a grayscale edge coordinate set, and perform temperature edge analysis on the infrared image to obtain a temperature edge coordinate set; A forging defect assessment module is used to construct a target image area on a pre-constructed standard plane coordinate system using a grayscale edge coordinate set and a temperature edge coordinate set; The method of constructing a target image region on a pre-constructed standard plane coordinate system using a grayscale edge coordinate set and a temperature edge coordinate set includes: A first reference point, a second reference point, a third reference point, and a fourth reference point are identified in the standard plane coordinate system based on the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate in the grayscale edge coordinate set, wherein the coordinates of the first reference point, the second reference point, the third reference point, and the fourth reference point in the standard plane coordinate system are the first pixel coordinate, the second pixel coordinate, the third pixel coordinate, and the fourth pixel coordinate, respectively; Connecting the first reference point with the second reference point in the standard plane coordinate system to obtain a first line segment, connecting the second reference point with the third reference point in the standard plane coordinate system to obtain a second line segment, connecting the third reference point with the fourth reference point in the standard plane coordinate system to obtain a third line segment, and connecting the fourth reference point with the first reference point in the standard plane coordinate system to obtain a fourth line segment; Constructing a first standard area based on the first line segment, the second line segment, the third line segment and the fourth line segment in the standard plane coordinate system, wherein the first standard area is an area enclosed by the first line segment, the second line segment, the third line segment and the fourth line segment in the standard plane coordinate system; Acquire a second standard area based on the temperature edge coordinate set and the standard plane coordinate system; Confirming a target image region based on the first standard region and the second standard region, wherein the target image region is an intersection of the first standard region and the second standard region; Performing forging evaluation operations on the high temperature grayscale image and the infrared image based on the target image area to obtain the forging completion index, forging uniformity and forging defect degree; The forging process optimization module is used to compare the forging completion index with the preset forging completion threshold. If the forging completion index is less than the forging completion threshold, the initial forging frequency and the initial forging temperature are corrected based on the forging uniformity and the forging defect degree to obtain the updated forging frequency and the updated forging temperature. The updated forging frequency is used as the initial forging frequency, the updated forging temperature is used as the initial forging temperature, and the forged titanium alloy is used as the initial titanium ingot. The module returns to the step of forging the initial titanium ingot using the started high-temperature forging machine until the forging time reaches the preset deadline or the forging completion index is greater than or equal to the forging completion threshold, the high-temperature forging machine is turned off, and the forged titanium alloy is used as the target titanium alloy to complete the forging process optimization of the titanium alloy.
Citation Information
Patent Citations
Titanium alloy blooming and forging process method based on fracture criterion and finite element optimization
CN104504185A
Intelligent manufacturing method, device and equipment for titanium alloy ring forging and storage medium
CN118204452A