Near-infrared image correction method and device, equipment and storage medium
By using array test block calibration and image correction methods, the problems of geometric deformation and intensity inhomogeneity in near-infrared images during selective laser melting and forming were solved, achieving high-precision image correction and improving the reliability and accuracy of monitoring.
Patent Information
- Application Number
- CN202610517135.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-20
- Publication Date
- 2026-05-15
- Estimated Expiration
- 2046-04-20
AI Technical Summary
Existing near-infrared image correction methods cannot effectively solve the problems of geometric deformation and uneven grayscale distribution caused by factors such as uneven camera response, lens attenuation, and dust in the chamber during selective laser melting forming. They cannot truly reflect the thermal state of the forming plane, affecting defect identification and process optimization.
The method involves array block calibration, image fusion correction, and grayscale surface fitting, including anomaly screening, geometric correction, and grayscale value calculation. This process removes abnormal images, eliminates geometric deformation and intensity inhomogeneity, and generates intensity-corrected images.
It effectively eliminates the problem of uneven strength caused by geometric deformation and fixed interference due to camera tilt, improves the monitoring reliability and accuracy of near-infrared images, and truly reflects the thermal state of the formed plane.
Smart Images

Figure CN122048747A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image correction, and more particularly to a near-infrared image correction method, apparatus, device, and storage medium. Background Technology
[0002] In the selective laser melting forming process, near-infrared tomography is the core means to monitor the forming quality of parts in real time. However, the acquired near-infrared images are easily affected by factors such as uneven camera response, lens attenuation, dust in the chamber, and installation tilt, resulting in problems such as geometric deformation and uneven grayscale distribution. They cannot truly reflect the thermal state of the forming plane, which restricts subsequent defect identification and process optimization. Therefore, a precise image correction method is urgently needed.
[0003] Current near-infrared image calibration methods mostly employ general techniques, such as offline radiometric calibration based on blackbodies, geometric calibration based on calibration plates, or single-frame histogram equalization and simple multi-frame averaging. Offline calibration cannot adapt to the dynamic conditions of selective laser melting, resulting in insufficient calibration accuracy; single-factor calibration cannot solve the combined problems of geometric deformation and intensity inhomogeneity; simple multi-frame averaging cannot eliminate outlier data and is prone to introducing errors; and the lack of a dedicated calibration sample designed in conjunction with the selective laser melting process makes it impossible to eliminate process interference, resulting in insufficient reliability and versatility of the calibration results. Summary of the Invention
[0004] This invention provides a near-infrared image correction method, apparatus, device, and storage medium. By using an array test block calibration, fusion image correction, and grayscale surface fitting, the near-infrared image correction method solves the technical problem of uneven infrared signal intensity and geometric deformation caused by fixed interference from cameras, equipment, etc., in the near-infrared image during selective laser melting forming.
[0005] According to one aspect of the present invention, a near-infrared image correction method is provided, the method comprising: During the printing process of the array test block, near-infrared images are acquired, and anomalies are screened and effective images are fused to obtain a fused image. Geometric correction is performed on the fused image to obtain a standard image; Grayscale values are calculated and surfaces are fitted based on standard images to obtain intensity-corrected images. Near-infrared images are then corrected based on these corrected images.
[0006] Optionally, during the printing process of the array test block, near-infrared images are acquired, including: uniformly arranging the array test blocks in the forming plane of the selected area laser melting equipment according to the preset calibration scheme, and starting printing with uniform forming process parameters and scanning path; using a near-infrared tomography camera, taking the completion of single-layer test block processing as a fixed acquisition node, the entire forming process of each layer is photographed to obtain near-infrared images of each layer.
[0007] Optionally, anomaly screening and effective image fusion are performed on each near-infrared image to obtain a fused image. This includes: after metallographic observation or CT inspection verifies that the array test block has no unacceptable defects, abnormal images in the near-infrared images are removed to obtain effective images. Abnormal images include images taken near the bottom of the test block during printing, images before and after the printing interruption, and images with obvious hot spots in the image. The average gray value of the corresponding pixel position of each effective image is calculated to obtain the fused image.
[0008] Optionally, geometric correction is performed on the fused image to obtain a standard image, including: performing affine transformation correction on the fused image to obtain an affine transformed image; removing invalid pixel regions at the edges of the affine transformed image to obtain a standard image.
[0009] Optionally, the intensity correction image is obtained by calculating grayscale values and fitting surfaces based on a standard image, including: processing the standard image using an image recognition algorithm to identify the complete outer contour of the array blocks in the standard image; removing interfering contours from the complete outer contour and retaining the valid block contours; numbering all valid block contours according to a preset rule to obtain each contour number; calculating the average grayscale value within each valid block contour according to the contour number; and performing surface fitting based on the average grayscale value to obtain the intensity correction image.
[0010] Optionally, a surface fitting is performed based on the average gray value to obtain an intensity correction image, including: determining the final correction area by using the square circumscribed by the center point of each valid test block contour, and calculating the number of pixels in the final correction area; within the final correction area, using linear interpolation to fit the average gray value of each valid test block contour into a continuous surface; and generating a correction image that matches the final correction area from the continuous surface according to the number of pixels.
[0011] Optionally, the near-infrared image is corrected based on the corrected image, including: cropping the near-infrared image according to the final correction area to obtain the image to be corrected; dividing the gray value of the image to be corrected by the gray value of the corrected image at the corresponding pixel position; and adjusting the gray value of the new image obtained after the division to a preset standard to complete the correction of the near-infrared image.
[0012] According to another aspect of the present invention, a near-infrared image correction apparatus is provided, the apparatus comprising: The image filtering and fusion module is used to acquire various near-infrared images during the printing process of array test blocks, perform anomaly filtering and effective image fusion on each near-infrared image to obtain a fused image; The standard image generation module is used to perform geometric correction on the fused image to obtain a standard image; The image correction module is used to calculate grayscale values and fit surfaces based on standard images to obtain intensity-corrected images, and then correct near-infrared images based on these corrected images.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform a near-infrared image correction method according to any embodiment of the present invention.
[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement a near-infrared image correction method according to any embodiment of the present invention.
[0015] The technical solution of this invention can eliminate invalid images through anomaly screening, avoid abnormal data interfering with the correction results, eliminate geometric deformation caused by camera tilt through correction, and eliminate invalid edge areas; through gray value calculation, infrared intensity feature data of each test block can be extracted, and surface fitting can transform discrete data into a continuous surface reflecting the global interference distribution; by correcting the near-infrared image according to the corrected image, the problem of uneven intensity caused by fixed interference can be effectively offset, the true forming thermal state can be restored, and the monitoring reliability of near-infrared image can be improved.
[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a near-infrared image correction method provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the arrangement of array test blocks according to Embodiment 1 of the present invention; Figure 3This is a schematic diagram of a fused image provided according to Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of a standard image provided according to Embodiment 1 of the present invention; Figure 5 This is a flowchart of another near-infrared image correction method provided in Embodiment 2 of the present invention; Figure 6 This is a schematic diagram of an outline number provided according to Embodiment 2 of the present invention; Figure 7 This is a schematic diagram of a fitted surface region provided according to Embodiment 2 of the present invention; Figure 8 This is a schematic diagram of a corrected image provided according to Embodiment 2 of the present invention; Figure 9 This is a schematic diagram of a correction result provided according to Embodiment 2 of the present invention; Figure 10 This is a schematic diagram of a near-infrared image correction device according to Embodiment 3 of the present invention; Figure 11 This is a schematic diagram of the structure of an electronic device that implements a near-infrared image correction method according to an embodiment of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0021] Example 1 Figure 1This is a flowchart of a near-infrared image correction method provided in Embodiment 1 of the present invention. This embodiment is applicable to near-infrared camera correction scenarios on selected area laser melting equipment. The method can be executed by a near-infrared image correction device, which can be implemented in hardware and / or software and can be configured in a computer controller. Figure 1 As shown, the method includes: S110. During the printing process of the array test block, acquire each near-infrared image, perform anomaly screening and fuse the effective images to obtain a fused image.
[0022] Among them, array test blocks refer to square samples printed in an array pattern, uniformly arranged within the forming plane of the selective laser melting equipment. The forming process parameters and scanning paths of the test blocks are completely consistent, and the number of test blocks can be determined according to the calibration accuracy requirements. These are calibration samples specifically designed and printed for near-infrared image calibration. For example, 16×16 10mm×10mm×10mm titanium alloy square test blocks with a forming area of 265mm×265mm can be selected for printing. Anomaly screening is the operation of quality identification and removal of invalid images from the near-infrared images acquired by the camera. Effective image fusion refers to the process of processing all effective near-infrared images obtained after anomaly screening, averaging the gray values at corresponding positions in each image, and generating a new fused image. Effective image fusion can reduce local interference caused by sputtering and other accidental heating points, allowing the fused image to better reflect the true infrared signal characteristics of the forming surface, serving as the base image for subsequent calibration. The fused image is the new image obtained by averaging the corresponding gray values of the remaining effective near-infrared images after anomaly screening to remove invalid images.
[0023] For example, Figure 2 This invention provides a schematic diagram of the arrangement of array test blocks according to Embodiment 1. Figure 2 In the middle, the gray cube is an array of test blocks with completely uniform size, process parameters and scanning path. All test blocks are evenly arranged in a regular array in the white rectangular area, that is, in the forming plane of the selective laser melting equipment.
[0024] Optionally, during the printing process of the array test block, near-infrared images are acquired, including: uniformly arranging the array test blocks in the forming plane of the selected area laser melting equipment according to the preset calibration scheme, and starting printing with uniform forming process parameters and scanning path; using a near-infrared tomography camera, taking the completion of single-layer test block processing as a fixed acquisition node, the entire forming process of each layer is captured to obtain each near-infrared image.
[0025] Specifically, the initial design and initiation of array test block printing must first be completed. The target calibration area is determined based on actual calibration requirements. Then, within the forming plane of the selective laser melting equipment, which is slightly larger than the target calibration area, the arrangement of the array test blocks is planned. The test blocks must be evenly distributed within the forming plane. The number of test blocks can be adjusted according to the calibration accuracy requirements. In principle, the more test blocks, the richer the grayscale data points that can be acquired, and the higher the accuracy of the fitted calibration surface. Simultaneously, to ensure that the acquired infrared images are only affected by non-process interference factors such as camera sensors, lenses, and printing dust, and to eliminate the inhomogeneity of the infrared signal itself caused by differences in process parameters, all array test blocks use completely uniform forming process parameters and scanning paths. After determining the arrangement and process, the selective laser melting equipment is started, and the metal powder is melted and solidified layer by layer according to the preset scanning path and process parameters to begin the printing of the array test blocks. Then, the system performs point-to-point acquisition of near-infrared images, relying on a near-infrared tomography camera installed on the selective laser melting equipment to complete the acquisition operation. Near-infrared tomography cameras are characterized by high signal sensitivity, enabling them to accurately capture infrared signals during the specimen forming process and convert them into images. The acquisition node is fixed at the completion of each layer of specimen processing. In principle, at the node where a single layer is completed, the state of the forming plane is stable, which can avoid interference from dynamic factors such as laser action and powder splashing during processing on infrared signal acquisition. This ensures that each acquired image can truly reflect the infrared intensity distribution of the current layer in the near-infrared system. After the equipment completes the processing of each layer of specimen, the camera system generates an image of the forming process of the current layer. The imaging operation is completed sequentially for all layers of specimen processing, and finally a series of near-infrared images corresponding to the forming state of each layer are obtained.
[0026] Optionally, anomaly screening and effective image fusion are performed on each near-infrared image to obtain a fused image. This includes: after metallographic observation or CT inspection verifies that the array test block has no unacceptable defects, abnormal images in the near-infrared images are removed to obtain effective images. Abnormal images include images taken near the bottom of the test block during printing, images before and after the printing interruption, and images with obvious hot spots in the image. The average gray value of the corresponding pixel position of each effective image is calculated to obtain the fused image.
[0027] Specifically, during the defect verification and image anomaly screening of the array test blocks, the printed array test blocks are first physically inspected using metallographic observation or CT scans to verify that all test blocks within the correction area are free of unacceptable forming defects. If the test block itself has defects, it will directly cause anomalies in the infrared signal at the corresponding location. Images acquired based on such test blocks will introduce grayscale deviations from factors other than equipment and environmental factors. If used for subsequent correction, this will distort the correction results. Only when the physical condition of the test block is qualified can it be guaranteed that the abnormality in the acquired infrared image is caused only by interference factors that need correction, such as camera sensor, lens, and printing dust. After the test block verification is completed, the system will screen all acquired near-infrared images one by one, discarding abnormal images and retaining valid images. Images taken near the bottom of the printed test block may show irregular deviations in the infrared signal due to issues such as unstable thermal state of the equipment and poor powder spreading effect in the early stages of printing. Images before and after the printing interruption point show abrupt changes in infrared signals due to the temporary interruption of the printing process, which disrupts the heat distribution and powder state of the forming plane. Images with obvious hot spots are often caused by sputtering, local laser energy anomalies, or other incidental factors. Abnormal images cannot reflect the infrared signal distribution pattern under normal forming conditions and must be discarded. The remaining images without the above anomalies are considered valid images.
[0028] Furthermore, the system performs grayscale value fusion processing on the effective images. The core of the fusion is to use the statistical averaging characteristics of multiple frames to offset occasional interference. Precise matching of pixel positions is performed on all effective images to ensure that the same pixel position in different images corresponds to the same physical position on the forming plane. Then, the arithmetic mean of the grayscale values of each corresponding pixel position in all effective images is calculated. The calculated average grayscale value is used as the grayscale value of that pixel position in the fused image. After calculating the grayscale values of all pixel positions in sequence, a fused image is obtained. This fused image eliminates local grayscale anomalies caused by occasional factors such as splashing in single-frame images, making the grayscale distribution of the image more consistent with the infrared signal distribution patterns caused by fixed interference factors such as cameras and equipment, effectively improving the accuracy of subsequent corrections.
[0029] For example, Figure 3 This is a schematic diagram of a fused image provided in Embodiment 1 of the present invention. Figure 3 The bright white squares arranged in a regular pattern correspond to the array test block area, while the black background represents the forming plane. The image as a whole exhibits a clear grayscale gradient, which intuitively reflects the uneven distribution of infrared signal intensity caused by fixed interference factors such as cameras and equipment within the forming plane. It serves as the foundational image for subsequent affine correction, grayscale value calculation, and surface fitting.
[0030] S120. Perform geometric correction on the fused image to obtain a standard image.
[0031] The standard image refers to the image obtained after the fused image has undergone affine correction processing.
[0032] Optionally, geometric correction is performed on the fused image to obtain a standard image, including: performing affine transformation correction on the fused image to obtain an affine transformed image; removing invalid pixel regions at the edges of the affine transformed image to obtain a standard image.
[0033] Specifically, during the installation of a near-infrared tomography camera on a selective laser melting (SLM) device, it is difficult to achieve perfect parallelism between the camera's imaging plane and the device's forming plane. The tilted installation of the camera causes geometric affine distortion in the acquired fused image, manifesting as stretching, offset, or tilting of the square array of test blocks in the image. Directly processing this distorted image can lead to deviations in block contour recognition and errors in grayscale value calculation, ultimately affecting the accuracy of surface fitting and correction. Affine transformation correction uses a corresponding geometric transformation algorithm to linearly transform and map the pixel coordinates of the fused image based on the camera's tilt parameters and the physical dimensions of the forming plane. This corrects the geometric distortion caused by the camera's tilt, restoring the outline of the array of test blocks in the image to a standard square shape, with the relative positions and physical spacing between the test blocks perfectly matching the actual arrangement on the forming plane. The image obtained after this transformation is the affine transformed image. However, this image only eliminates geometric distortion and still retains invalid areas at the image edges. Then, the system removes invalid pixel regions from the edges of the affine transformed image. The edges of the affine transformed image contain pixel regions where the array test blocks were not captured, only the equipment cabin background is present, or there is no valid infrared signal. These invalid pixel regions lack corresponding grayscale data for the test blocks and cannot provide effective information for subsequent grayscale calculations and surface fitting. Retaining them would interfere with subsequent contour recognition and effective region delineation. Therefore, based on the actual arrangement of the array test blocks on the forming plane, the region containing only valid array test blocks needs to be delineated in the affine transformed image. The aforementioned invalid pixel regions at the edges are then removed by image cropping. The cropped image is the standard image.
[0034] For example, Figure 4 This is a schematic diagram of a standard image provided in Embodiment 1 of the present invention. Figure 4 The bright white squares arranged in a regular pattern correspond to the array test block area, while the black background represents the forming plane. The standard image has eliminated the geometric distortion caused by the tilted installation of the camera. The test block outlines are square and the arrangement is regular. Only the effective test block area is retained, which intuitively presents the infrared signal distribution state of the forming plane without geometric distortion. It serves as the benchmark image for subsequent test block outline recognition, gray value calculation, and surface fitting.
[0035] S130. Calculate grayscale values and fit surfaces based on standard images to obtain intensity-corrected images, and then correct near-infrared images based on the corrected images.
[0036] Grayscale value calculation refers to the process of identifying the complete outer contour of the array of test blocks based on a standard image using an image recognition algorithm, systematically numbering each identified contour, and calculating and outputting the average grayscale value of all pixels within each contour, providing basic data for subsequent surface fitting. Surface fitting refers to the process of using the average grayscale values of each test block contour obtained from the grayscale value calculation as basic data, and employing interpolation methods to fit a continuous grayscale surface. The calibration image is a visualization image generated from the grayscale surface obtained from the surface fitting, according to the number of pixels in the final calibration area. The pixel grayscale values of the calibration image correspond to the grayscale distribution of the fitted surface and serve as a reference image for subsequent intensity correction of the original near-infrared image.
[0037] The technical solution of this invention can eliminate invalid images through anomaly screening, avoid abnormal data interfering with the correction results, eliminate geometric deformation caused by camera tilt through correction, and eliminate invalid edge areas; through gray value calculation, infrared intensity feature data of each test block can be extracted, and surface fitting can transform discrete data into a continuous surface reflecting the global interference distribution; by correcting the near-infrared image according to the corrected image, the problem of uneven intensity caused by fixed interference can be effectively offset, the true forming thermal state can be restored, and the monitoring reliability of near-infrared image can be improved.
[0038] Example 2 Figure 5 This is a flowchart of a near-infrared image correction method provided in Embodiment 2 of the present invention. This embodiment adds a specific process to Embodiment 1, involving grayscale value calculation and surface fitting based on a standard image to obtain an intensity correction image, and then correcting the near-infrared image based on the correction image. The specific content of steps S210-S220 is largely the same as steps S110-S120 in Embodiment 1, and therefore will not be repeated in this embodiment. Figure 5 As shown, the method includes: S210. During the printing process of the array test block, acquire each near-infrared image, perform anomaly screening and fuse the effective images to obtain a fused image.
[0039] Optionally, during the printing process of the array test block, near-infrared images are acquired, including: uniformly arranging the array test blocks in the forming plane of the selected area laser melting equipment according to the preset calibration scheme, and starting printing with uniform forming process parameters and scanning path; using a near-infrared tomography camera, taking the completion of single-layer test block processing as a fixed acquisition node, the entire forming process of each layer is captured to obtain each near-infrared image.
[0040] Optionally, anomaly screening and effective image fusion are performed on each near-infrared image to obtain a fused image. This includes: after metallographic observation or CT inspection verifies that the array test block has no unacceptable defects, abnormal images in the near-infrared images are removed to obtain effective images. Abnormal images include images taken near the bottom of the test block during printing, images before and after the printing interruption, and images with obvious hot spots in the image. The average gray value of the corresponding pixel position of each effective image is calculated to obtain the fused image.
[0041] S220. Perform geometric correction on the fused image to obtain a standard image.
[0042] Optionally, geometric correction is performed on the fused image to obtain a standard image, including: performing affine transformation correction on the fused image to obtain an affine transformed image; removing invalid pixel regions at the edges of the affine transformed image to obtain a standard image.
[0043] S230. Use an image recognition algorithm to process the standard image and identify the complete outer contour of the array test block in the standard image.
[0044] Image recognition algorithms, in this step, are used to perform pixel analysis and feature extraction on standard images. They are used to binarize the standard image, accurately identify the square outer contour of the array test block, and determine whether the contour is complete. This is the technical means to extract the test block contour. A complete outer contour refers to the edge contour of a single array test block that is clearly and completely presented in the standard image. This contour matches the actual square shape of the test block, without any defects or breaks, and can accurately delineate the pixel range of a single test block in the image.
[0045] Specifically, by performing preprocessing such as binarization on the standard image through image recognition algorithms, the pixel contrast between the test block outline and the background can be enhanced. Then, by using the outline detection function to extract all the outlines in the image, the outlines that match the shape and size of the actual array test block and are without defects or breaks are selected as the complete outer outline of the array test block.
[0046] S240. Eliminate interfering contours in the complete outer contour and retain the valid test block contours. Number all valid test block contours according to the preset rules to obtain the contour numbers.
[0047] Interference contours refer to false contours identified in the standard image that are not actually part of the array test block. These are formed by factors such as image noise, background noise, and local signal anomalies. Interference contours do not correspond to actual test blocks and interfere with the accuracy of grayscale value calculation, so they must be removed. Valid test block contours refer to the true contours remaining after removing interference contours from the identified complete outer contours, which correspond to the actual array test blocks. They accurately reflect the position and pixel range of the test blocks in the standard image and are the basis for subsequent grayscale value calculations. Preset rules refer to the rules for numbering valid test block contours in advance to facilitate subsequent surface fitting. Generally, this is a left-to-right, top-to-bottom order, so that the contour numbers correspond to the array arrangement positions of the test blocks on the forming plane, making the numbered grayscale value data regular. Contour number is a unique identifier assigned to each valid test block contour according to the preset rules. This identifier allows each contour to be matched one-to-one with the subsequently calculated average grayscale value, facilitating subsequent processing of grayscale value data and surface fitting.
[0048] Specifically, the extracted complete outer contour will contain interfering contours formed by factors such as image noise, local signal anomalies, and background noise. These need to be identified and removed by setting contour area thresholds, such as removing false contours with areas much smaller than the actual test block contour. The remaining contours that correspond one-to-one with the actual array test blocks are the valid test block contours. To facilitate the orderly arrangement of data during subsequent surface fitting, all valid test block contours need to be uniquely numbered according to a preset rule. The preset rule is generally a left-to-right and top-to-bottom order consistent with the test block array arrangement, so that the contour number corresponds to the physical position of the test block on the forming plane. After numbering, each contour number is obtained, realizing the precise association between contour and position.
[0049] For example, Figure 6 This invention provides a schematic diagram of an outline numbering system in Embodiment 2. Figure 6 The diagram shows the numbering of valid array test block contours obtained by identifying and removing interference from standard images. The green box represents the identified valid test block contours, and the blue numbers represent the unique numbers of the corresponding contours. This achieves a precise correspondence between the test block contours and the forming plane, providing an orderly data foundation for subsequent calculation of the average gray value of each test block by number and for surface fitting.
[0050] S250. Calculate the average gray value within the outline of each valid test block according to the outline number.
[0051] The average gray value refers to the value obtained by calculating the arithmetic mean of the gray values of all pixels within the outline of a single valid test block, which can represent the infrared signal intensity level of a single array test block area.
[0052] Specifically, grayscale value is an indicator of the intensity of infrared signal in near-infrared images. The grayscale value of different pixels within each valid test block contour will fluctuate slightly. In order to represent the overall infrared signal intensity level of a single test block area, the system will calculate the arithmetic mean of the grayscale values of all pixels within each valid test block contour based on the contour number, and obtain the average grayscale value corresponding to each contour.
[0053] S260. Surface fitting is performed based on the average gray value to obtain the intensity-corrected image.
[0054] Among them, surface fitting is the process of constructing a continuous gray-value surface by using the average gray value of the contour of each effective test block as the basic data, combined with the physical position of the forming plane corresponding to the contour, and employing interpolation. The corrected image refers to the continuous gray-value surface obtained by surface fitting.
[0055] Optionally, a surface fitting is performed based on the average gray value to obtain an intensity correction image, including: determining the final correction area by using the square circumscribed by the center point of each valid test block contour, and calculating the number of pixels in the final correction area; within the final correction area, using linear interpolation to fit the average gray value of each valid test block contour into a continuous surface; and generating a correction image that matches the final correction area from the continuous surface according to the number of pixels.
[0056] Specifically, the center point of each valid test block contour represents the physical position of the corresponding test block on the forming plane. Taking the center points of all valid test block contours as a whole, a minimum bounding square is drawn; this square area is the final correction area. This method ensures that the correction area completely covers the infrared signal acquisition range of all valid test blocks, while eliminating redundant areas without valid test blocks, thus guaranteeing the accuracy of the correction range. After determining the final correction area, the total number of pixels contained in the image within the final correction area is statistically calculated based on the pixel resolution of the standard image, clarifying the correction range in pixel dimensions and providing a pixel size basis for subsequently generating matching correction images.
[0057] For example, Figure 7 This is a schematic diagram of a fitted surface region provided in Embodiment 2 of the present invention. Figure 7 Using the center point of the array block outline as a reference, the fitted surface region of the smallest bounding square is defined by a black dashed line with a resolution of 2548×2548. The coordinate range and x / y coordinate system of the region are marked, and this region is the final correction region.
[0058] Furthermore, within the final correction area, the system uses linear interpolation to fit the average grayscale value of each valid test block contour into a continuous surface. The average grayscale value of each valid test block is the discrete infrared intensity data corresponding to the center point position. However, the infrared signal intensity within the forming plane is affected by fixed interference factors such as camera sensor, lens, and printing dust, and its distribution is continuously changing, not an isolated discrete point. Linear interpolation can calculate the grayscale value at any position between two points based on the average grayscale value of adjacent valid test blocks, realizing the transformation from discrete data to a continuous distribution. Within the defined final correction area, using the physical coordinates of the center point of each valid test block contour as the x and y coordinates, and the corresponding average grayscale value as the y coordinate, linear interpolation is used to interpolate all discrete grayscale value data, filling in the grayscale values of all pixel positions within the correction area. Finally, a continuous surface covering the entire final correction area is constructed. This surface can truly reflect the overall distribution law of infrared signal intensity affected by fixed interference factors within the correction area.
[0059] As we know, a continuous grayscale surface is a mathematical model reflecting the distribution of infrared intensity. It needs to be converted into a visualized image before it can be used for subsequent near-infrared image intensity correction. The system will pixelate the continuous grayscale surface according to the number of pixels in the final correction area, and use the grayscale value corresponding to each pixel position on the surface as the grayscale value of the same pixel position in the correction image. This value will be assigned to all pixels in the correction area in sequence, ultimately generating a correction image that perfectly matches the final correction area in terms of pixel size and position.
[0060] For example, Figure 8 This is a schematic diagram of a corrected image provided in Embodiment 2 of the present invention. Figure 8 It is a visualization image obtained by fitting the average gray value of the array test block into a continuous gray surface through linear interpolation and then pixelating it according to the final correction area. Its gray distribution intuitively reflects the non-uniformity of infrared signal intensity caused by fixed interference factors such as cameras and equipment in the forming plane. It is the core reference benchmark for subsequent gray division of the original near-infrared image and the realization of intensity uniformity correction.
[0061] S270. Cropping the near-infrared image according to the final correction area yields the image to be corrected.
[0062] The final correction region refers to the area defined by drawing the smallest bounding square based on the center points of all valid test block outlines; it represents the effective range for near-infrared image intensity correction. The image to be corrected refers to the near-infrared image obtained by cropping it according to the pixel coordinates of the final correction region.
[0063] Specifically, the final correction region is a precise and effective correction range covering all valid test blocks, with clearly defined pixel coordinates and pixel counts. However, the original near-infrared image contains invalid pixel portions extending beyond this region. These areas lack corresponding correction data, and including them in the correction would lead to distorted results. Therefore, the system needs to crop the original near-infrared image to be corrected based on the pixel coordinates of the final correction region, removing invalid edge portions that extend beyond the region and retaining only the valid image portion within the final correction region to obtain the image to be corrected.
[0064] S280. Divide the gray value of the image to be corrected by the gray value of the corrected image at the corresponding pixel position.
[0065] The corresponding pixel position refers to the position where the pixel coordinates of the image to be corrected and the corrected image completely match. That is, pixels with the same coordinates in both images correspond to the same physical position on the forming plane. The division calculation refers to the process of dividing the gray value of each pixel position in the image to be corrected by the gray value of the same pixel position in the corrected image. The new image is the image obtained after the division calculation of the corresponding pixel position gray values between the image to be corrected and the corrected image. This image has eliminated intensity deviations caused by fixed interference such as camera sensor, lens, and printing dust, but the gray value range may deviate from the normal observation level and requires further adjustment. The preset standard refers to the image gray value reference level set in advance to ensure the convenience of subsequent observation and analysis of near-infrared images. It is generally based on the average gray value of the original near-infrared image, allowing the adjusted image gray values to be restored to a level that conforms to the judgment habits of process engineers and equipment operators.
[0066] Specifically, the grayscale distribution of the corrected image accurately reflects the infrared signal intensity distribution pattern within the forming plane caused by fixed interference factors such as camera sensors, lenses, and printing dust. The grayscale value deviation in the image to be corrected is precisely caused by this type of fixed interference. During the division calculation, using the pixel position as a reference, the grayscale value of each pixel in the image to be corrected is divided by the grayscale value of the same pixel coordinate position in the corrected image. Zero-sharing must be avoided during the calculation to prevent errors. Through the division operation, the grayscale values of the corrected image can be used to normalize the grayscale values of the image to be corrected at the corresponding positions, canceling out the intensity deviation caused by fixed interference factors. This transforms the originally uneven grayscale image to be corrected into an infrared signal grayscale distribution that reflects the true forming state. The image obtained after the division calculation is the new image.
[0067] S290. Adjust the grayscale value of the new image obtained after the division calculation to the preset standard to complete the near-infrared image correction.
[0068] Among them, adjusting the grayscale value to the preset standard means performing grayscale value scaling operation on the new image obtained after the division calculation. By multiplying by a fixed coefficient, the average grayscale value or the overall grayscale value range of the new image is adjusted to a preset reference level, so that the corrected image not only eliminates the problem of uneven intensity, but also maintains the normal observation range of grayscale values.
[0069] Specifically, while the new image obtained through division eliminates the problem of uneven intensity, the overall grayscale value will be scaled, and its average grayscale value often deviates from the normal observation level of the original near-infrared image. Direct use of this image could negatively impact the visual judgment and subsequent analysis of process engineers and equipment operators due to excessively low or high grayscale values. A preset standard is generally set based on the average grayscale value of the original near-infrared image. By multiplying the grayscale values of all pixels in the new image by a fixed coefficient, the average grayscale value of the new image is adjusted to this preset standard level. This ensures that the corrected image retains the true infrared signal characteristics while restoring it to a grayscale value range suitable for conventional observation and judgment. After this grayscale adjustment, the entire correction operation for the near-infrared image is completed. The corrected image has a uniform grayscale distribution, accurately reflecting the actual infrared signal situation of the selected area laser melting forming plane, effectively avoiding misleading process judgments due to signal deviations.
[0070] For example, Figure 9 This is a schematic diagram of the correction result provided in Embodiment 2 of the present invention. Figure 9 The image is obtained by dividing the gray values of the corresponding pixels of the image to be corrected by the gray values of the corrected image, and then adjusting the gray values to a preset standard. The gray value distribution of the array test block area in the image is uniform and consistent, which has eliminated the problem of uneven intensity caused by fixed interference from cameras, equipment, etc. It can truly reflect the actual infrared signal characteristics of the forming plane, and provides accurate and reliable image data for infrared monitoring of the selected area laser melting forming process.
[0071] The technical solution of this invention identifies the complete outer contour of the array test block in the standard image through an image recognition algorithm, which can accurately locate the test block area and provide a reliable boundary for grayscale extraction. By eliminating interfering contours and numbering the effective test block contours according to a preset rule, noise interference can be eliminated, achieving an orderly correspondence between the test blocks and the data. Calculating the average grayscale value within each effective test block contour according to the numbering yields stable infrared intensity feature data and reduces the influence of local anomalies. Surface fitting based on the average grayscale value constructs a continuous and uniform correction reference distribution, resulting in an accurate correction image. Cropping the near-infrared image according to the final correction area yields the image to be corrected, eliminating invalid areas and ensuring image size matching. Dividing the corresponding pixel grayscale values of the image to be corrected and the correction image directly eliminates grayscale unevenness caused by fixed interference. Adjusting the grayscale of the new image to a preset standard restores the normal observation range, ultimately achieving accurate and reliable correction of the near-infrared image.
[0072] Example 3 Figure 10 This is a schematic diagram of a near-infrared image correction device provided in Embodiment 3 of the present invention. Figure 10 As shown, the device includes: an image screening and fusion module 310, used to acquire various near-infrared images during the array test block printing process, perform anomaly screening and effective image fusion on each near-infrared image to obtain a fused image; The standard image generation module 320 is used to perform geometric correction on the fused image to obtain a standard image; The image correction module 330 is used to calculate gray values and fit surfaces based on a standard image to obtain an intensity correction image, and then correct the near-infrared image based on the correction image.
[0073] Optionally, the image screening and fusion module 310 specifically includes: a near-infrared image acquisition unit, used to: complete the uniform arrangement of array test blocks in the forming plane of the selected area laser melting equipment according to a preset correction scheme, and start printing using unified forming process parameters and scanning path; and use a near-infrared tomography camera to capture the entire forming process of each layer with the completion of single-layer test block processing as a fixed acquisition node to obtain each near-infrared image.
[0074] Optionally, the image filtering and fusion module 310 specifically includes: an image filtering and fusion unit, used to: after metallographic observation or CT detection verifies that the array test block has no unacceptable defects, remove abnormal images from the near-infrared image to obtain valid images, wherein abnormal images include images taken near the bottom of the test block printing, images before and after the printing interruption during the printing process, and images with obvious hot spots in the image; and calculate the average value of the gray values of the corresponding pixel positions of each valid image to obtain the fused image.
[0075] Optionally, the standard image generation module 320 is specifically used for: performing affine transformation correction on the fused image to obtain an affine transformed image; and removing invalid pixel regions at the edges of the affine transformed image to obtain a standard image.
[0076] Optionally, the image correction module 330 specifically includes: a contour recognition unit, used to: process the standard image using an image recognition algorithm to identify the complete outer contour of the array test block in the standard image; a contour numbering unit, used to: remove interfering contours in the complete outer contour and retain the valid test block contours, and number all valid test block contours according to a preset rule to obtain each contour number; a gray value calculation unit, used to: calculate the average gray value within each valid test block contour according to the contour number; and a correction image generation unit, used to: perform surface fitting based on the average gray value to obtain an intensity correction image.
[0077] Optionally, the correction image generation unit is specifically used to: determine the final correction area by the square circumscribed by the center point of each valid test block contour, and calculate the number of pixels in the final correction area; within the final correction area, use linear interpolation to fit the average gray value of each valid test block contour into a continuous surface; and generate a correction image that matches the final correction area from the continuous surface according to the number of pixels.
[0078] Optionally, the image correction module 330 specifically includes: an image correction unit, used to: crop the near-infrared image according to the final correction area to obtain an image to be corrected; divide the gray value of the image to be corrected by the gray value of the corrected image at the corresponding pixel position; and adjust the gray value of the new image obtained after the division calculation to a preset standard to complete the correction of the near-infrared image.
[0079] The technical solution of this invention can eliminate invalid images through anomaly screening, avoid abnormal data interfering with the correction results, eliminate geometric deformation caused by camera tilt through correction, and eliminate invalid edge areas; through gray value calculation, infrared intensity feature data of each test block can be extracted, and surface fitting can transform discrete data into a continuous surface reflecting the global interference distribution; by correcting the near-infrared image according to the corrected image, the problem of uneven intensity caused by fixed interference can be effectively offset, the true forming thermal state can be restored, and the monitoring reliability of near-infrared image can be improved.
[0080] The near-infrared image correction device provided in this embodiment of the invention can execute a near-infrared image correction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0081] Example 4 Figure 11 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0082] like Figure 11As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0083] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0084] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a near-infrared image correction method.
[0085] In some embodiments, a near-infrared image correction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the near-infrared image correction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform a near-infrared image correction method by any other suitable means (e.g., by means of firmware).
[0086] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0087] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0088] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0089] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0090] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0091] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0092] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0093] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A near-infrared image correction method, characterized in that, include: During the printing process of the array test block, near-infrared images are acquired, and anomaly screening and effective image fusion are performed on each near-infrared image to obtain a fused image; The fused image is geometrically corrected to obtain a standard image; Grayscale values are calculated and surface fitting is performed based on the standard image to obtain an intensity-corrected image, and the near-infrared image is corrected based on the corrected image.
2. The method according to claim 1, characterized in that, The acquisition of near-infrared images during the array test block printing process includes: According to the preset calibration scheme, the array test blocks are evenly arranged in the forming plane of the selected area laser melting equipment, and printing is started using uniform forming process parameters and scanning path; Using a near-infrared tomography camera, with the completion of a single-layer sample block as a fixed acquisition node, the entire process of each layer forming is captured, and near-infrared images are obtained.
3. The method according to claim 1, characterized in that, The process of filtering out anomalies and fusing effective images in each of the near-infrared images to obtain a fused image includes: After metallographic observation or CT inspection verifies that the array test block has no unacceptable defects, abnormal images in the near-infrared image are removed to obtain valid images. The abnormal images include images taken near the bottom of the test block during printing, images before and after the printing interruption, and images with obvious hot spots in the image. The average value of the grayscale value at the corresponding pixel position of each valid image is calculated to obtain the fused image.
4. The method according to claim 1, characterized in that, The step of performing geometric correction on the fused image to obtain a standard image includes: The fused image is then subjected to affine transformation correction to obtain an affine transformed image; Invalid pixel regions at the edges of the affine transformed image are removed to obtain a standard image.
5. The method according to claim 1, characterized in that, The process of calculating grayscale values and fitting surfaces based on the standard image to obtain an intensity-corrected image includes: Image recognition algorithms are used to process standard images to identify the complete outer contour of array blocks in the standard images; Distracting contours are removed from the complete outer contour, and valid test block contours are retained. All valid test block contours are numbered according to a preset rule to obtain the contour numbers. Calculate the average gray value within the outline of each valid test block according to the outline number; A surface fitting is performed based on the average gray value to obtain an intensity-corrected image.
6. The method according to claim 5, characterized in that, The step of performing surface fitting based on the average gray value to obtain the intensity-corrected image includes: The final correction area is determined by the square circumscribed by the center point of each valid test block outline, and the number of pixels in the final correction area is calculated. Within the final correction area, the average gray value of each valid test block profile is fitted into a continuous surface using linear interpolation. Based on the number of pixels, a corrected image matching the final corrected region is generated from the continuous surface.
7. The method according to claim 6, characterized in that, The step of correcting the near-infrared image based on the corrected image includes: The near-infrared image is cropped according to the final correction region to obtain the image to be corrected. The gray value of the image to be corrected is divided by the gray value of the corrected image at the corresponding pixel position. The grayscale value of the new image obtained after the division calculation is adjusted to the preset standard to complete the near-infrared image correction.
8. A near-infrared image correction device, characterized in that, include: The image filtering and fusion module is used to acquire various near-infrared images during the printing process of the array test block, perform anomaly filtering and effective image fusion on each near-infrared image to obtain a fused image; A standard image generation module is used to perform geometric correction on the fused image to obtain a standard image; The image correction module is used to calculate grayscale values and fit surfaces based on the standard image to obtain an intensity-corrected image, and to correct the near-infrared image based on the corrected image.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions that are used to cause a processor to execute the method of any one of claims 1-7.