Size measurement method for cold-drawn steel based on multi-source image fusion and nonlinear correction
By employing multi-source image fusion and nonlinear correction methods, and utilizing an improved Mask DINO network and multi-view image fusion technology, the problems of multi-view information fusion and geometric error correction in the measurement of cold-drawn steel dimensions were solved, achieving high-precision measurement of cold-drawn steel dimensions.
Patent Information
- Application Number
- CN202611150421.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-10
AI Technical Summary
Existing methods for measuring the dimensions of cold-drawn steel sections have shortcomings in multi-view information fusion, complex contour recognition, and geometric error correction, resulting in low dimensional accuracy and difficulty in adapting to surface reflections, rounded corner transitions, and complex cross-sectional structural changes in cold-drawn steel sections.
A method based on multi-source image fusion and nonlinear correction is adopted. By using an improved Mask DINO network and multi-view image fusion technology, high-precision measurement of cold-drawn steel sections is achieved through steel body query, contour segment query, and size benchmark query, combined with a nonlinear coordinate correction field.
It improves the ability to extract complex cross-sectional contours of cold-drawn steel, reduces the impact of single-view occlusion and imaging deviation, and improves the stability and accuracy of dimensional measurement.
Smart Images

Figure CN123065339A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision dimension measurement technology, and in particular to a method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction. Background Technology
[0002] Cold-drawn steel sections are crucial basic materials in mechanical equipment, rail transportation, automobile manufacturing, and precision structural components. The accuracy of their cross-sectional dimensions directly affects subsequent assembly performance and structural stability. Currently, dimensional inspection in the production process of cold-drawn steel sections mainly employs contact measuring tools, single-camera vision inspection methods, and contour extraction methods based on traditional image processing. Contact measuring methods acquire the edge position of the steel section and calculate dimensional parameters using a measuring probe; however, their accuracy is affected by the contact state, equipment wear, and human operation. Single-camera vision inspection methods utilize industrial cameras to acquire images of the steel section and extract cross-sectional dimensions through edge detection and contour fitting, achieving non-contact inspection. However, single-view images suffer from occlusion, viewing angle variations, and imaging distortion. Traditional image processing methods rely on fixed thresholds and manually designed features, making it difficult to adapt to surface reflections, rounded corner transitions, and complex cross-sectional structural variations in cold-drawn steel sections.
[0003] Existing methods for measuring the dimensions of cold-drawn steel sections still have shortcomings in multi-view information fusion, complex contour recognition, and geometric error correction. There is a lack of effective geometric constraints between images from different viewpoints, and the accuracy of contour point correspondence is affected by camera pose changes, easily leading to cross-view fusion errors. For steel sections containing straight edges and rounded transitions, traditional contour extraction methods struggle to establish continuous segmental relationships, resulting in inaccurate dimensional benchmark determination. During measurement, lens distortion, installation deviations, and imaging errors can affect the accuracy; directly calculating dimensions using image coordinates can introduce nonlinear measurement biases, reducing dimensional detection accuracy. Therefore, a method for measuring the dimensions of cold-drawn steel sections that combines multi-source image fusion, intelligent contour recognition, and nonlinear coordinate correction is needed to achieve accurate extraction of complex cross-sectional contours and high-precision dimensional calculation.
[0004] Therefore, how to provide a method for measuring the dimensions of cold-drawn steel based on multi-source image fusion and nonlinear correction is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction. This invention utilizes industrial machine vision, an improved Mask DINO network, multi-view image fusion, and nonlinear coordinate correction technology to extract contours, fuse cross-view images, and calculate dimensions of cold-drawn steel profiles, achieving high-precision measurement of complex cross-sectional structures. This invention possesses advantages such as high contour recognition accuracy, strong measurement stability, and high dimensional detection accuracy.
[0006] The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to an embodiment of the present invention includes the following steps:
[0007] Collect images of cold-drawn steel profiles from multiple sources at the same cross section, and preprocess them to generate standardized images of the multiple sources.
[0008] Standardized multi-source steel profile images are input into an improved Mask DINO network to extract multi-scale features. Camera calibration parameters and observation directions are encoded and fused with multi-scale features to generate multi-source geometric enhancement features.
[0009] Based on multi-source geometric enhancement features, cascaded measurement queries are performed. The main steel body query generates a main body mask and defines the measurement area. The contour segment query identifies edge segments and corner transition segments and outputs segment decoding features. The size reference query determines the connection position and reference position based on the segment decoding features and cross-sectional topology, and generates a local measurement contour.
[0010] Local measurement contours are mapped to a unified cross-sectional measurement coordinate system, cross-view correspondences are established, and initial measurement contours are generated by fusion.
[0011] Input the initial measurement profile points, cross-section center, and rotation angle into the nonlinear coordinate correction field to obtain coordinate compensation and generate the corrected measurement profile;
[0012] The corrected measurement contour is back-projected onto the source image coordinate system, the deviation from the local measurement contour is calculated, the query reference point offset and error space mask are generated and written into the Transformer decoder, the reference position and attention range of the contour segment query and the size reference query are updated, and the contour generation, fusion and correction are re-executed until the deviation meets the convergence condition, and the final measurement contour is generated.
[0013] The measurement datum is determined based on the final measurement profile, the cross-sectional dimensions are calculated, and the dimensional measurement results are generated.
[0014] Optionally, the preprocessing process includes: reading the acquisition time and image acquisition unit identifier of the multi-source steel profile image, completing image binding according to the acquisition time of the same cross section, performing background grayscale correction and grayscale normalization on the bound multi-source steel profile image, performing noise suppression on the grayscale normalized multi-source steel profile image, cropping images from each perspective according to the cross section measurement area, arranging the cropped images from each perspective according to the image acquisition unit identifier, and generating a standardized multi-source steel profile image.
[0015] Optionally, the improved Mask DINO network includes a shared parameter feature encoder, a geometric encoding layer, a pixel decoder, a Transformer decoder, and a query feedback interface;
[0016] Standardized multi-source steel profile images from different perspectives are connected to a shared parameter feature encoder according to the image acquisition unit identifier. The shared parameter feature encoder outputs the multi-scale features corresponding to each perspective to the geometric coding layer.
[0017] The camera calibration parameters and observation direction are fed into the geometric coding layer. The geometric coding layer fuses the encoded results of the camera calibration parameters and observation direction with the multi-scale features of the corresponding viewpoint and outputs multi-source geometric enhancement features to the pixel decoder.
[0018] The pixel decoder performs scale alignment and feature fusion on multi-source geometric enhancement features and inputs the processing results into the Transformer decoder;
[0019] The Transformer decoder is set to sequentially perform the main body query, contour segment query, and dimensional reference query. The output of the main body query is connected to the contour segment query, and the output of the contour segment query is connected to the dimensional reference query.
[0020] The contour segment query and the dimension reference query set the reference position and the mask attention range, respectively. The query feedback interface receives the query reference point offset and the error space mask, writes the query reference point offset to the corresponding reference position, writes the error space mask to the corresponding mask attention range, and inputs the updated contour segment query and dimension reference query into the Transformer decoder.
[0021] Optionally, the process of generating multi-source geometric enhancement features includes:
[0022] Standardized multi-source steel profile images from different perspectives are input into a shared parameter feature encoder, and features of different spatial resolutions are read from different feature layers to generate multi-scale features corresponding to each perspective.
[0023] The camera calibration parameters and observation direction are read according to the image acquisition unit identifier, and the view geometry code is generated through the geometric coding layer and mapped to the channel dimension and spatial size of the corresponding multi-scale features.
[0024] The mapped viewpoint geometric code is fused with the corresponding viewpoint and scale multi-scale features according to spatial location to generate multi-source geometric enhancement features.
[0025] Optionally, the process of executing the cascaded measurement query includes:
[0026] Cross-attention calculation is performed on the main steel body query and multi-source geometric enhancement features to generate main body decoding features and main body mask. The measurement area is determined based on the main body mask. The main body mask is used as the mask attention range of the contour segment query and the main body decoding features are written into the contour segment query.
[0027] Perform mask cross-attention calculation on the multi-source geometric enhancement features within the contour segment query and measurement area, identify edge segments based on the continuous state of the contour direction, identify corner transition segments based on the changing state of the contour direction, and generate segment decoding features and end positions corresponding to each contour segment.
[0028] Write the segment decoding features and end positions into the size reference query, establish the adjacent constraints between the edge segments and the corner transition segments according to the cross-sectional topology, match the end positions of each contour segment according to the adjacent constraints, and determine the connection order and connection position.
[0029] The reference position is determined based on the segment decoding features corresponding to the connection position. The corresponding edge segments and corner transition segments are connected in the connection order to generate the local measurement contours corresponding to each viewpoint.
[0030] Optionally, the process of generating the initial measurement profile includes:
[0031] The contour points in the local measurement contour are converted into imaging rays, the intersection points of the imaging rays and the cold-drawn steel section measurement plane are calculated, and the intersection points are converted to a unified section measurement coordinate system.
[0032] Based on the edge segment, corner transition segment and connection sequence, the local measurement contour of each viewpoint in the unified cross-section measurement coordinate system is segmented to generate cross-viewpoint candidate corresponding segments.
[0033] Cross-view candidate corresponding segments are normalized in arc length according to the contour extension direction. Contour points with corresponding normalized arc length positions and spatial distances that meet the corresponding thresholds are matched to establish cross-view correspondence.
[0034] Based on the segment confidence and observation direction corresponding to the contour points, contour points with cross-view correspondence are weighted and fused to generate fused contour points;
[0035] Arrange the fusion contour points according to the cross-sectional topology and connection order, connect adjacent edge segments and corner transition segments, and generate the initial measurement contour.
[0036] Optionally, the process of generating the corrected measurement profile includes:
[0037] Read the initial measurement contour points, cross-section center, and corners; calculate the position vector of each initial measurement contour point relative to the cross-section center and the distance to the adjacent corners; and generate correction input features by combining the corresponding segment categories.
[0038] Input the correction input features into the nonlinear coordinate correction field, and output the coordinate compensation amounts corresponding to the horizontal and vertical axes;
[0039] Project the coordinate compensation amount corresponding to the edge segment onto the contour normal, and distribute the coordinate compensation amount corresponding to the corner transition segment to the adjacent contour normal according to the distance to the adjacent corner, thus generating constrained coordinate compensation amount;
[0040] The constrained coordinate compensation amount is added to the coordinates of the corresponding initial measurement contour points, and the updated contour points are arranged in the connection order to generate the corrected measurement contour.
[0041] Optionally, the process of generating the query reference point offset and error spatial mask includes:
[0042] Based on the coordinate mapping relationship of each image acquisition unit, the correction measurement contour points are back-projected to the corresponding source image coordinate system to generate the back-projected contours corresponding to each viewpoint.
[0043] According to the contour segment category and connection order, the arc length position of the back-projected contour points is matched with the local measured contour points from the same viewpoint. The difference between the horizontal axis coordinates and the difference between the vertical axis coordinates between the matched contour points are calculated to generate the back-projection deviation.
[0044] Filter out contour points whose deviation amplitude exceeds the preset deviation threshold and are continuous along the connection sequence, and merge the continuous contour points into abnormal contour segments.
[0045] Based on the direction and magnitude of the back projection deviation within the abnormal contour segment, the segment is aggregated, and the aggregated deviation is converted to the reference position coordinate scale for contour segment query and size reference query, generating the query reference point offset.
[0046] The abnormal contour segments are mapped to the spatial locations of each scale corresponding to the multi-scale decoding features. The corresponding spatial locations are expanded according to the deviation amplitude and written into the error weight to generate an error spatial mask.
[0047] Optionally, the process of generating the final measurement profile includes:
[0048] The offset of the query reference point is superimposed with the reference positions of the corresponding contour segment query and size datum query to generate the updated reference position;
[0049] The error space mask is mapped to the attention score matrix at each scale, and the mask attention bias is generated according to the error weight, keeping the position outside the original mask attention range in a shielded state.
[0050] The updated reference position and mask attention bias are written into the Transformer decoder. The feature sampling positions of the contour segment query and the size reference query are changed according to the updated reference position. The participation range of the multi-source geometric enhancement features is adjusted according to the mask attention bias.
[0051] Re-execute the contour segment query and dimension reference query, update the edge segments, corner transition segments, connection positions and reference positions, and generate updated local measurement contours;
[0052] The updated local measurement profile will be sequentially subjected to unified coordinate mapping, cross-view fusion and nonlinear coordinate correction to generate an updated and corrected measurement profile.
[0053] The updated and corrected measurement contour is back-projected onto the corresponding source image coordinate system, and the back-projection deviation between the updated local measurement contour and the original local measurement contour is recalculated.
[0054] When the maximum amplitude of the back projection deviation is not greater than the preset convergence threshold and the average amplitude change of the back projection deviation in two consecutive rounds is not greater than the preset change threshold, the updated and corrected measurement profile is determined as the final measurement profile; if the preset convergence condition is not met, the query reference point offset and error space mask are regenerated based on the back projection deviation and the next round of decoding is executed until the preset convergence condition is met.
[0055] Optionally, the process of generating the dimensional measurement results includes:
[0056] The relative edge datum and corner datum are determined based on the datum position, segment type, and cross-sectional topology in the final measured profile;
[0057] The cross-sectional width, cross-sectional height, and edge spacing are obtained by calculating the normal distance between relative edge references. The corner radius is obtained by fitting the corner transition section, and the dimensional measurement results are generated.
[0058] The beneficial effects of this invention are:
[0059] (1) This invention constructs a multi-source image feature extraction and cascaded measurement query mechanism through an improved Mask DINO network, and links the steel body query, contour section query and size reference query step by step to realize the accurate identification of the edge section, corner transition section and measurement reference position of the cold-drawn steel section, and improve the ability to extract complex cross-section contours.
[0060] (2) This invention achieves geometric information fusion between different image acquisition units by multi-view local measurement contour mapping, cross-view correspondence establishment and contour point weighted fusion, thereby reducing the impact of single-view occlusion, view change and imaging deviation on the size measurement results and improving the stability of size measurement.
[0061] (3) This invention uses a nonlinear coordinate correction field, back projection deviation analysis and query feedback update mechanism to iteratively correct the nonlinear geometric error in the measurement process, realize the continuous optimization of the measurement profile, and improve the calculation accuracy of the cross-sectional dimensions of cold-drawn steel. Attached Figure Description
[0062] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0063] Figure 1 This is a flowchart of the cold-drawn steel dimension measurement method based on multi-source image fusion and nonlinear correction proposed in this invention;
[0064] Figure 2 This is a schematic diagram of the multi-view steel section image acquisition proposed in this invention;
[0065] Figure 3 This is a schematic diagram of the steel profile query based on the improved Mask DINO network proposed in this invention;
[0066] Figure 4 This is a schematic diagram of the contour segment recognition based on cascaded measurement query proposed in this invention;
[0067] Figure 5 This is a schematic diagram of the cross-sectional measurement benchmark determination based on size benchmark query proposed in this invention;
[0068] Figure 6 This is a schematic diagram of contour segment connection matching based on cross-sectional topological constraints proposed in this invention;
[0069] Figure 7 This is a schematic diagram of the multi-view local measurement contour generation process proposed in this invention. Detailed Implementation
[0070] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0071] Example 1: Reference Figure 1 A method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction includes the following steps:
[0072] Collect images of cold-drawn steel profiles from multiple sources at the same cross section, and preprocess them to generate standardized images of the multiple sources.
[0073] Standardized multi-source steel profile images are input into an improved Mask DINO network to extract multi-scale features. Camera calibration parameters and observation directions are encoded and fused with multi-scale features to generate multi-source geometric enhancement features.
[0074] Based on multi-source geometric enhancement features, cascaded measurement queries are performed. The main steel body query generates a main body mask and defines the measurement area. The contour segment query identifies edge segments and corner transition segments and outputs segment decoding features. The size reference query determines the connection position and reference position based on the segment decoding features and cross-sectional topology, and generates a local measurement contour.
[0075] Local measurement contours are mapped to a unified cross-sectional measurement coordinate system, cross-view correspondences are established, and initial measurement contours are generated by fusion.
[0076] Input the initial measurement profile points, cross-section center, and rotation angle into the nonlinear coordinate correction field to obtain coordinate compensation and generate the corrected measurement profile;
[0077] The corrected measurement contour is back-projected onto the source image coordinate system, the deviation from the local measurement contour is calculated, the query reference point offset and error space mask are generated and written into the Transformer decoder, the reference position and attention range of the contour segment query and the size reference query are updated, and the contour generation, fusion and correction are re-executed until the deviation meets the convergence condition, and the final measurement contour is generated.
[0078] The measurement datum is determined based on the final measurement profile, the cross-sectional dimensions are calculated, and the dimensional measurement results are generated.
[0079] In this embodiment, the preprocessing process includes: reading the acquisition time and image acquisition unit identifier of the multi-source steel profile image, completing image binding according to the acquisition time of the same cross section, performing background grayscale correction and grayscale normalization on the bound multi-source steel profile image, performing noise suppression on the grayscale normalized multi-source steel profile image, cropping images from each perspective according to the cross section measurement area, arranging the cropped images from each perspective according to the image acquisition unit identifier, and generating a standardized multi-source steel profile image.
[0080] The multi-source steel profile image consists of cross-sectional images of cold-drawn steel profiles acquired from different observation directions by multiple image acquisition units. Each image acquisition unit receives the same cross-section acquisition trigger signal, and each steel profile image is written with the acquisition time, image acquisition unit identifier, and cross-section acquisition sequence number. In the specific implementation, four image acquisition units are set up, and the observation directions of the four image acquisition units are sequentially 90° apart around the cross-section measurement position. Four steel profile images with the same cross-section acquisition sequence number and an acquisition time difference of no more than 100 microseconds are bound into the same group of multi-source steel profile images.
[0081] A pre-established correspondence table between image acquisition unit identifiers and observation directions was created. The four image acquisition units were sequentially labeled as C1, C2, C3, and C4, corresponding to observation directions of 0°, 90°, 180°, and 270°, respectively. The image acquisition unit identifiers corresponding to each cropped view were read, and the view images were arranged in a fixed order of C1, C2, C3, and C4. Each view image was scaled to 1024×1024 pixels while keeping the center of the cold-drawn steel section located in the center region of the image, thus generating a standardized multi-source steel image with a fixed view sequence.
[0082] The standardized multi-source steel profile image consists of four standardized viewpoint images corresponding to the same cold-drawn steel profile section. Each standardized viewpoint image contains a normalized grayscale pixel matrix, associated with the image acquisition unit identifier, observation direction, acquisition time, and section acquisition sequence number. The four standardized viewpoint images are arranged in a fixed viewpoint order to form a multi-viewpoint image sequence, which serves as the input to the improved Mask DINO network.
[0083] In this embodiment, the improved Mask DINO network includes a shared parameter feature encoder, a geometric coding layer, a pixel decoder, a Transformer decoder, and a query feedback interface;
[0084] Standardized multi-source steel profile images from different perspectives are connected to a shared parameter feature encoder according to the image acquisition unit identifier. The shared parameter feature encoder outputs the multi-scale features corresponding to each perspective to the geometric coding layer.
[0085] The camera calibration parameters and observation direction are fed into the geometric coding layer. The geometric coding layer fuses the encoded results of the camera calibration parameters and observation direction with the multi-scale features of the corresponding viewpoint and outputs multi-source geometric enhancement features to the pixel decoder.
[0086] The pixel decoder performs scale alignment and feature fusion on multi-source geometric enhancement features and inputs the processing results into the Transformer decoder;
[0087] The Transformer decoder is set to sequentially perform the main body query, contour segment query, and dimensional reference query. The output of the main body query is connected to the contour segment query, and the output of the contour segment query is connected to the dimensional reference query.
[0088] The contour segment query and the dimension reference query set the reference position and the mask attention range, respectively. The query feedback interface receives the query reference point offset and the error space mask, writes the query reference point offset to the corresponding reference position, writes the error space mask to the corresponding mask attention range, and inputs the updated contour segment query and dimension reference query into the Transformer decoder.
[0089] The original Mask DINO network is an object detection and image segmentation network formed by adding a mask prediction branch to the DINO object detection framework. The main body of the network consists of a backbone network, a pixel decoder, and a Transformer decoder. The backbone network extracts multi-scale image features from the input image. The pixel decoder performs scale restoration and feature fusion on the multi-scale image features to generate a high-resolution pixel embedding map. The Transformer decoder uses the object query to extract object-level query features from the image features and outputs the object category, object location, and query embedding. The mask prediction branch performs a dot product operation between the query embedding and the high-resolution pixel embedding map to generate a binary segmentation mask corresponding to each object query. The original Mask DINO network is designed for general object detection, instance segmentation, panoptic segmentation, and semantic segmentation tasks, and uses a unified object query set to complete object localization and mask prediction.
[0090] This invention retains the original Mask DINO network's feature encoding, pixel decoding, and Transformer decoding basic structure, and adds a geometric encoding layer, a cascaded measurement query structure, and a query feedback interface to the original Mask DINO network, adjusting the general target mask prediction process to a contour generation process oriented towards the measurement of cross-sectional dimensions of cold-drawn steel.
[0091] A geometric coding layer is positioned between the shared parameter feature encoder and the pixel decoder. Standardized multi-source steel profile images from different viewpoints are input into the shared parameter feature encoder to obtain multi-scale features corresponding to each viewpoint. The geometric coding layer reads the camera calibration parameters and observation directions corresponding to each viewpoint, converts the camera calibration parameters and observation directions into geometric codes with corresponding channel dimensions and spatial positions to the multi-scale features, and fuses the geometric codes with the multi-scale features of the corresponding viewpoints to generate multi-source geometric enhancement features. The pixel decoder performs scale alignment and feature fusion on the multi-source geometric enhancement features, so that the image features entering the Transformer decoder carry the imaging position relationship and observation direction relationship corresponding to each viewpoint.
[0092] The unified target query set in the original Mask DINO network has been adjusted to include steel body query, contour segment query, and dimensional reference query. The steel body query reads multi-source geometric enhancement features to generate a cold-drawn steel body mask and define the measurement area. The contour segment query reads features output by the pixel decoder within the measurement area, identifies edge segments and corner transition segments, and generates segment decoding features. The dimensional reference query reads the segment decoding features, combines them with cross-sectional topology to determine the connection positions and reference positions of adjacent contour segments, and generates a local measurement contour. The three types of queries transmit decoding results in the order of body region definition, contour segment identification, and dimensional reference determination, which differs from the unified query processing method in the original Mask DINO network, which was geared towards general target detection and segmentation.
[0093] Contour segment query and size reference query are configured with reference positions and mask attention ranges, respectively. The reference position is used to limit the initial sampling position of the query in the pixel decoder output features, and the mask attention range is used to limit the spatial region of the query participating in the cross-attention calculation.
[0094] The query feedback interface is positioned between the nonlinear coordinate correction result and the Transformer decoder. After the corrected measured contour is back-projected onto the source image coordinate system, a query reference point offset and an error spatial mask are generated based on the deviation between the back-projected contour and the local measured contour. The query feedback interface writes the query reference point offset into the reference position of the contour segment query and the size reference query, and writes the error spatial mask into the corresponding mask attention range. The Transformer decoder changes the feature sampling position according to the updated reference position, adjusts the image region participating in the query decoding according to the updated mask attention range, and re-executes the contour segment query and the size reference query.
[0095] The improved Mask DINO network of this invention forms a closed-loop processing relationship of multi-source geometric enhancement feature generation, cascaded measurement query, contour nonlinear correction, back projection deviation calculation, and query feedback update. This allows the measurement deviation generated by nonlinear correction to directly affect the query reference position and mask attention range inside the Transformer decoder, thereby repositioning the measurement contour. It does not use the nominal size of cold-drawn steel to modify the network output, thus preserving the actual size deviation of the cold-drawn steel cross-section.
[0096] In this embodiment, the process of generating multi-source geometric enhancement features includes:
[0097] Standardized multi-source steel profile images from different perspectives are input into a shared parameter feature encoder, and features of different spatial resolutions are read from different feature layers to generate multi-scale features corresponding to each perspective.
[0098] The shared parameter feature encoder sets up four consecutive feature layers, reading features from feature layers with strides of 4, 8, 16, and 32, respectively. When the size of the standardized multi-source steel profile image is 1024×1024 pixels, the feature space sizes corresponding to each viewpoint are 256×256, 128×128, 64×64, and 32×32, respectively. Convolutional mapping is used to unify the number of channels of each feature to 256, and they are arranged from high to low spatial resolution to generate multi-scale features corresponding to each viewpoint.
[0099] The camera calibration parameters and observation direction are read according to the image acquisition unit identifier, and the view geometry code is generated through the geometric coding layer and mapped to the channel dimension and spatial size of the corresponding multi-scale features.
[0100] The geometric coding layer reads the internal calibration parameters, external calibration parameters, and observation direction of the corresponding image acquisition unit; it transforms the spatial positions in the features at each scale to the pixel positions in the standardized multi-source steel profile image according to the scaling ratio; it uses the internal calibration parameters to convert the pixel positions into imaging rays in the camera coordinate system; and it uses the external calibration parameters to convert the imaging rays into a unified cross-section measurement coordinate system; it stitches together the converted imaging ray direction, image acquisition unit position, and observation direction, and generates a 256-channel view geometric code through linear mapping. The spatial size of the view geometric code is consistent with the multi-scale features at the corresponding scale.
[0101] The mapped viewpoint geometric code is fused with the corresponding viewpoint and scale multi-scale features according to spatial location to generate multi-source geometric enhancement features.
[0102] Read the multi-scale feature vector and viewpoint geometric encoding vector at the same spatial location under the corresponding viewpoint and scale, concatenate the two vectors along the channel direction, map the concatenation result to 256 channels through 1×1 convolution, and add the residual with the multi-scale feature vector before fusion to generate geometric enhancement features for the corresponding viewpoint and scale; save the geometric enhancement features according to four spatial resolutions, and aggregate the geometric enhancement features from different viewpoints to generate multi-source geometric enhancement features.
[0103] In this embodiment, the process of executing cascaded measurement queries includes:
[0104] Cross-attention calculation is performed on the main steel body query and multi-source geometric enhancement features to generate main body decoding features and main body mask. The measurement area is determined based on the main body mask. The main body mask is used as the mask attention range of the contour segment query and the main body decoding features are written into the contour segment query.
[0105] Specifically, the steel profile main body query is mapped to a query matrix, and the multi-source geometric enhancement features are expanded into feature sequences according to viewpoint and spatial location, and mapped to key and value matrices respectively. The dot product between the query matrix and the key matrix is calculated, and the dot product result is divided by the square root of the feature dimension of a single attention head. After Softmax processing, attention weights are obtained, and the value matrices are weighted and summed using the attention weights to generate the main body decoding features. In the specific implementation, the channel dimension of both the steel profile main body query and the multi-source geometric enhancement features is set to 256, and 8 attention heads are used to perform cross-attention calculation. The main body decoding features are dot-producted with the pixel features output by the pixel decoder, and converted into a main body probability map using the Sigmoid function. Pixels with a probability value of not less than 0.5 are marked as main body pixels, generating a main body mask.
[0106] Connectivity analysis is performed on the subject mask, retaining the largest connected region and deleting isolated pixel regions. A 3×3 structuring element is used to perform a closing operation to fill in discontinuous regions within the subject mask with a width not exceeding 2 pixels. The processed subject mask is then extended outwards by 8 pixels, and the area where the extended region intersects with the image boundary is defined as the measurement region. The measurement region retains the local background outside the edge of the cold-drawn steel subject, used to identify subject edges and corner transitions.
[0107] The main mask is scaled to the spatial size corresponding to the multi-source geometric enhancement features at each scale. The mask value within the measurement area is set to 0, and the mask value outside the measurement area is set to negative infinity. The processed mask value is then superimposed on the attention score matrix corresponding to the contour segment query, so that the contour segment query reads the multi-source geometric enhancement features only from the measurement area.
[0108] Perform mask cross-attention calculation on the multi-source geometric enhancement features within the contour segment query and measurement area, identify edge segments based on the continuous state of the contour direction, identify corner transition segments based on the changing state of the contour direction, and generate segment decoding features and end positions corresponding to each contour segment.
[0109] Specifically, the contour segment query is mapped to a query matrix, and the multi-source geometric enhancement features within the measurement area are mapped to a key matrix and a value matrix. The attention score between the query matrix and the key matrix is calculated, and the mask value corresponding to the main body mask is superimposed on the attention score. After Softmax processing, the mask attention weight is obtained. The value matrix is weighted using the mask attention weight to generate the segment decoding features corresponding to the contour segment query. The contour point position, contour direction, and segment confidence are output through linear mapping.
[0110] Candidate contour points are sorted by adjacency according to their positions. The local contour direction formed by each candidate contour point and its adjacent candidate contour points is calculated. Contour point sets with an angle difference of no more than 5° between adjacent local contour directions and no less than 8 consecutive candidate contour points are identified as edge segments. Candidate contour points with a segment confidence score of less than 0.6 are deleted from the edge segments, and the positions of the two ends of the edge segments are redefined.
[0111] For each candidate contour point, select four candidate contour points before and after it, and calculate the change in the angle between the local contour direction at the beginning and the local contour direction at the end within the window. Identify the set of candidate contour points with an angle change greater than 15° and a consistent direction of change as the corner transition section. Read the candidate contour points whose angle change recovers to less than 5° along the contour extension direction, and determine the recovered position as the end position of the corner transition section.
[0112] Write the segment decoding features and end positions into the size reference query, establish the adjacent constraints between the edge segments and the corner transition segments according to the cross-sectional topology, match the end positions of each contour segment according to the adjacent constraints, and determine the connection order and connection position.
[0113] Specifically, a cross-sectional topology relationship is pre-established based on the cross-sectional category of the target cold-drawn steel. The cross-sectional topology relationship records the number of edge segments, the number of corner transition segments, the category of each segment, and the adjacent order along the cross-sectional contour direction. The identified edge segments and corner transition segments are read, and the segment category, contour direction, and end position are matched with the cross-sectional topology relationship. Only the edge segments and corner transition segments that are allowed to be adjacent in the cross-sectional topology relationship are retained, and candidate adjacent relationships of segments are generated.
[0114] For adjacent candidate relationships of segments, the pixel distance, the angle between the end positions of the two candidate contour segments and the segment confidence difference are calculated respectively. End combinations with a pixel distance of no more than 8 pixels and an angle between the end positions of no more than 20° are retained as candidate matches. The pixel distance, the angle between the contours and the segment confidence difference are normalized and weighted to generate the end matching cost. The Hungarian algorithm is used to obtain the one-to-one matching results of the end positions.
[0115] The edge segment containing the minimum abscissa point of the cross-sectional contour is selected as the starting contour segment. The end matching results are read sequentially according to the contour direction recorded by the cross-sectional topology, and the reading order is determined as the connection order. For each set of matching end positions, a weighted average is calculated according to the segment confidence of the two contour segments, and the weighted average position is determined as the connection position. When the segment confidence is the same, the midpoint of the two end positions is taken as the connection position.
[0116] The reference position is determined based on the segment decoding features corresponding to the connection position. The corresponding edge segments and corner transition segments are connected in the connection order to generate the local measurement contours corresponding to each viewpoint.
[0117] In practice, each segment's decoding feature is associated with the contour segment identifier, segment category, contour point position, end position, contour direction, and segment confidence. The two end positions forming the connection position are read, and the segment decoding features corresponding to the edge segments and corner transition segments to which the two end positions belong are retrieved based on the contour segment identifier. The connection position is projected onto the contour point sequences corresponding to the two segment decoding features, and the contour point with the smallest distance from the connection position, along with four contour points before and after it, are selected. Weighted aggregation is then performed to obtain the connection position feature. The connection position feature is input into a size reference query, which outputs the reference category and reference position offset. The connection position is added to the reference position offset to generate the reference position. The reference categories include the outer contour extreme value reference, the edge extension line intersection reference, and the corner tangent intersection reference. The corresponding reference position is retained when the reference category confidence is not less than 0.7.
[0118] Read adjacent edge segments and corner transition segments sequentially according to the connection order, and determine the contour point closest to the connection position in the two contour segments as the endpoint to be connected; delete contour points that are repeated or reversed between the endpoint to be connected and the connection position, and write the connection position to the end of the two contour segments; when the distance between the endpoints to be connected is no more than 2 pixels, directly merge the two ends using the connection position; when the distance between the endpoints to be connected is greater than 2 pixels but no more than 8 pixels, use cubic spline interpolation to generate transition contour points; arrange the connected contour points in the order of edge segment, corner transition segment and next edge segment until the end contour segment closes with the starting contour segment, generating a local measurement contour.
[0119] In this embodiment, the process of generating the initial measurement profile includes:
[0120] The contour points in the local measurement contour are converted into imaging rays, the intersection points of the imaging rays and the cold-drawn steel section measurement plane are calculated, and the intersection points are converted to a unified section measurement coordinate system.
[0121] The pixel coordinates of contour points in the local measurement contour are read, and the pixel coordinates are corrected according to the distortion parameters of the corresponding image acquisition unit. The corrected horizontal coordinate, vertical coordinate, and homogeneous component are combined to form a pixel coordinate vector. The ray direction vector in the camera coordinate system is obtained by multiplying the inverse of the internal calibration matrix by the pixel coordinate vector, and the ray direction vector is normalized. According to the external calibration parameters, the ray direction vector is transformed to the common calibration coordinate system, and the optical center position of the corresponding image acquisition unit is used as the ray starting point to generate the imaging ray. In specific implementation, the camera calibration reprojection error is no greater than 0.10 pixels.
[0122] The plane normal vector and plane offset of the cold-drawn steel section measurement plane are pre-calibrated. The imaging ray is represented as a parametric line formed by the optical center position and the ray direction vector. The parametric line is substituted into the equation of the section measurement plane to obtain the ray parameters and calculate the intersection point. The absolute value of the dot product between the ray direction vector and the plane normal vector is less than... When the time is right, delete the corresponding contour points. The unified cross-section measurement coordinate system is set in the cross-section measurement plane, with the center of the calibration plate as the coordinate origin, the horizontal direction of the calibration plate as the horizontal axis, and the direction perpendicular to the horizontal axis in the cross-section measurement plane as the vertical axis; calculate the projection values of the vector of the intersection point relative to the coordinate origin on the horizontal and vertical axes respectively, and use the projection values as the coordinates of the contour points in the unified cross-section measurement coordinate system, with the coordinate unit set to millimeters.
[0123] Based on the edge segment, corner transition segment and connection sequence, the local measurement contour of each viewpoint in the unified cross-section measurement coordinate system is segmented to generate cross-viewpoint candidate corresponding segments.
[0124] Read the edge segments, corner transition segments, connection sequence, connection position, and reference position in the local measurement contour from each viewpoint. Select the reference position with the same reference category as the starting point for segment sorting. Assign topological numbers to each contour segment in sequence according to the contour direction specified by the cross-sectional topological relationship. Group contour segments with the same segment category and the same topological number into the same candidate group. Calculate the center position distance and average contour direction angle of contour segments from different viewpoints within the candidate group. When the center position distance is not greater than 0.50 mm and the average contour direction angle is not greater than 10°, the corresponding contour segment is determined as the cross-viewpoint candidate corresponding segment.
[0125] Cross-view candidate corresponding segments are normalized in arc length according to the contour extension direction. Contour points with corresponding normalized arc length positions and spatial distances that meet the corresponding thresholds are matched to establish cross-view correspondence.
[0126] Starting from the matching starting end positions in the cross-view candidate corresponding segments, the distances between each contour point are accumulated according to the connection order. The accumulated distance of each contour point is divided by the total arc length of the contour segment in which it is located to obtain the normalized arc length position with a value ranging from 0 to 1. For a contour point in one view, candidate contour points with a normalized arc length position difference of no more than 0.02 are searched in the corresponding contour segment of another view. The Euclidean distance of the candidate contour points in the unified cross-section measurement coordinate system is calculated. When the Euclidean distance corresponding to the edge segment is no more than 0.20 mm and the Euclidean distance corresponding to the corner transition segment is no more than 0.30 mm, the cross-view correspondence between contour points is established.
[0127] Based on the segment confidence and observation direction corresponding to the contour points, contour points with cross-view correspondence are weighted and fused to generate fused contour points;
[0128] For contour points in the same cross-view correspondence, the segment confidence of the contour segment to which each contour point belongs is read, and contour points with segment confidence below 0.60 are deleted; the angle between the observation direction of the corresponding image acquisition unit and the normal vector of the cross-sectional measurement plane is calculated, and the absolute value of the cosine of the angle is used as the observation direction weight; the segment confidence is multiplied by the observation direction weight, and normalization is performed according to the sum of the products of contour points in the same group to obtain the fusion weight of each contour point; the abscissa and ordinate of each contour point in the unified cross-sectional measurement coordinate system are weighted and summed to generate fused contour points.
[0129] Arrange the fusion contour points according to the cross-sectional topology and connection order, connect adjacent edge segments and corner transition segments, and generate the initial measurement contour.
[0130] In this embodiment, the process of generating the correction measurement profile includes:
[0131] Read the initial measurement contour points, cross-section center, and corners; calculate the position vector of each initial measurement contour point relative to the cross-section center and the distance to the adjacent corners; and generate correction input features by combining the corresponding segment categories.
[0132] The initial measured contour points are arranged into a closed contour according to the connection order. The geometric centroid is calculated based on the area enclosed by the closed contour, and the geometric centroid is determined as the center of the cross section. The corner transition section is read, and polynomial smoothing is performed on the contour points in the corner transition section. The curvature of each contour point is calculated, and the contour point with the largest curvature and a section confidence level of not less than 0.60 is determined as the corner. Adjacent corners are determined according to the cross section topology and connection order.
[0133] Input the correction input features into the nonlinear coordinate correction field, and output the coordinate compensation amounts corresponding to the horizontal and vertical axes;
[0134] The nonlinear coordinate correction field is a two-dimensional continuous compensation function formed by fitting the coordinate residuals between the coordinates of the calibrated contour points and the coordinates of the reference contour points. It includes horizontal and vertical axis compensation components. In specific implementation, 121 calibration positions are arranged within a unified cross-section measurement coordinate system. The measured coordinates and reference coordinates of each calibration position are obtained. The horizontal and vertical axis coordinate residuals are obtained by subtracting the measured coordinates from the reference coordinates. Gaussian radial basis functions are used to fit the horizontal and vertical axis coordinate residuals respectively to form the nonlinear coordinate correction field. The initial measured contour point coordinates, the position vector relative to the cross-section center, the normalized distance to the adjacent turning angle, and the segment category code are used to form the correction input features. The response value is calculated based on the distance between the correction input features and the center of the radial basis function. The response values are weighted and summed to output the coordinate compensation amounts corresponding to the horizontal and vertical axes. The absolute value of the coordinate compensation amount is limited to within 0.50 mm.
[0135] Project the coordinate compensation amount corresponding to the edge segment onto the contour normal, and distribute the coordinate compensation amount corresponding to the corner transition segment to the adjacent contour normal according to the distance to the adjacent corner, thus generating constrained coordinate compensation amount;
[0136] For the initial measured contour points in the edge segment, read the adjacent contour points before and after to calculate the contour tangent vector. Rotate the contour tangent vector by 90° and normalize it to obtain the contour normal. Calculate the inner product of the coordinate compensation amount and the contour normal. Multiply the inner product by the contour normal, retain the normal component of the coordinate compensation amount and delete the tangent component to obtain the constrained coordinate compensation amount corresponding to the edge segment.
[0137] Based on the cross-sectional topology, determine the adjacent edge segments on both sides of the corner transition section. Read the unit profile normals of the two edge segments at the connection point. Calculate the arc length distance from the current profile point in the corner transition section to the two corners before and after the connection sequence. Use the ratio of the distance from the current profile point to one corner to the sum of the two distances as the weight for the other profile normal, ensuring that profile points closer to any corner receive a larger weight for the corresponding side profile normal. Project the coordinate compensation amount onto the two unit profile normals respectively, and sum the projection results of the two normals according to the weighted average to generate the constrained coordinate compensation amount corresponding to the corner transition section. The sum of the weighted averages is 1.
[0138] The constrained coordinate compensation amount is added to the coordinates of the corresponding initial measurement contour points, and the updated contour points are arranged in the connection order to generate the corrected measurement contour.
[0139] In this embodiment, the process of generating the query reference point offset and error space mask includes:
[0140] Based on the coordinate mapping relationship of each image acquisition unit, the correction measurement contour points are back-projected to the corresponding source image coordinate system to generate the back-projected contours corresponding to each viewpoint.
[0141] The coordinate mapping relationship for each image acquisition unit consists of the origin of the unified cross-sectional measurement coordinate system, the horizontal axis unit vector, the vertical axis unit vector, the internal calibration parameters, external calibration parameters, and distortion parameters of the image acquisition unit. The horizontal and vertical coordinates of the calibration measurement contour points in the unified cross-sectional measurement coordinate system are read, and the points are moved by corresponding distances along the horizontal and vertical axis unit vectors respectively to restore their three-dimensional coordinates in the common calibration coordinate system. Using the external calibration parameters, the three-dimensional coordinates are transformed to the camera coordinate system of the corresponding image acquisition unit. The horizontal and vertical coordinates of the camera coordinates are divided by the depth coordinates to generate normalized imaging coordinates. Radial and tangential distortion mappings are performed on the normalized imaging coordinates according to the distortion parameters, and the internal calibration parameters are used to convert them into pixel coordinates to generate the back-projected contour points for the corresponding viewpoint. Contour points with depth coordinates less than or equal to zero do not participate in back-projection.
[0142] According to the contour segment category and connection order, the arc length position of the back-projected contour points is matched with the local measured contour points from the same viewpoint. The difference between the horizontal axis coordinates and the difference between the vertical axis coordinates between the matched contour points are calculated to generate the back-projection deviation.
[0143] Following the connection order, read contour segments of the same category from both the back-projected contour and the local measurement contour. Using the corresponding connection position as the starting point of the segment, accumulate the pixel distance between adjacent contour points within the segment. Divide the accumulated distance by the total arc length of the corresponding contour segment to obtain the normalized arc length position, which ranges from 0 to 1. For each back-projected contour point, search for candidate contour points with a normalized arc length position difference of no more than 0.01 in the local measurement contours of the same viewpoint and segment category. Select the contour point with the smallest pixel distance from the candidate contour points to establish a position match. If the minimum pixel distance is greater than 5 pixels, delete the corresponding match result. A local measurement contour point is matched with only one back-projected contour point.
[0144] Filter out contour points whose deviation amplitude exceeds the preset deviation threshold and are continuous along the connection sequence, and merge the continuous contour points into abnormal contour segments.
[0145] Based on the direction and magnitude of the back projection deviation within the abnormal contour segment, the segment is aggregated, and the aggregated deviation is converted to the reference position coordinate scale for contour segment query and size reference query, generating the query reference point offset.
[0146] The back projection deviations within the abnormal contour segments are weighted and averaged according to their magnitudes to obtain the horizontal and vertical aggregation deviations in the source image coordinate system. The reference positions for contour segment queries and size baseline queries are represented using coordinates normalized relative to the source image width and height. The horizontal aggregation deviation is divided by the source image width, and the vertical aggregation deviation is divided by the source image height to generate a query reference point offset with a scale consistent with the reference position. When the source image size is 1024×1024 pixels, the horizontal and vertical aggregation deviations are divided by 1024 respectively. The absolute value of a single update of the query reference point offset is limited to within 0.05, and any excess is truncated to 0.05.
[0147] The abnormal contour segments are mapped to the spatial locations of each scale corresponding to the multi-scale decoding features. The corresponding spatial locations are expanded according to the deviation amplitude and written into the error weight to generate an error spatial mask.
[0148] The pixel coordinates of each contour point in the abnormal contour segment are read in the source image coordinate system. Based on the scaling ratio between the source image size and the multi-scale decoding feature space size, the contour points are mapped to feature space positions of 256×256, 128×128, 64×64, and 32×32 respectively. The back projection deviation amplitude is divided by a preset deviation threshold and truncated to the range of 0 to 1 to obtain the error weight of the corresponding contour point. An extended region is established centered on the mapped feature space position. When the deviation amplitude is equal to the preset deviation threshold, the extended radius is set to 1 feature position. For each additional preset deviation threshold, the extended radius increases by 1 feature position, with a maximum extended radius of 5 feature positions. The corresponding error weight is written to the center position. The error weights within the extended region decrease progressively with distance from the center position, and zero values are written outside the extended region, generating error space masks for each scale. When the error space mask is combined with the attention range of the original mask, positions outside the attention range of the original mask remain masked.
[0149] In this embodiment, the process of generating the final measurement profile includes:
[0150] The offset of the query reference point is superimposed with the reference positions of the corresponding contour segment query and size datum query to generate the updated reference position;
[0151] The reference positions for contour segment queries and size reference queries are represented by two-dimensional coordinates normalized relative to the width and height of the source image. Based on the contour segment identifier associated with the abnormal contour segment, the offset of the query reference point is written into the corresponding contour segment query. Based on the connection position and reference position associated with the abnormal contour segment, the offset of the query reference point is written into the corresponding size reference query. The horizontal and vertical components of the query reference point offset are added to the horizontal and vertical coordinates of the reference position component by component, and the sum is truncated to the coordinate range of 0 to 1 to generate the updated reference position. The absolute value of the reference point offset in a single round of queries is no greater than 0.05, and the query reference position for unassociated abnormal contour segments remains unchanged.
[0152] The error space mask is mapped to the attention score matrix at each scale, and the mask attention bias is generated according to the error weight, keeping the position outside the original mask attention range in a shielded state.
[0153] The attention score matrix at each scale is the score matrix formed after cross-attention calculation of contour segment queries and size benchmark queries with multi-source geometric enhancement features of the corresponding scale, and before Softmax normalization. The matrix rows correspond to the queries, and the matrix columns correspond to the feature space positions. Error space masks with sizes of 256×256, 128×128, 64×64, and 32×32 are read and expanded into mask vectors in order from left to right and from top to bottom. According to the correspondence between abnormal contour segments and queries, the mask vectors are written into the matrix rows of the corresponding queries. In the multi-head attention calculation, the same mask vector is copied to each attention head of the corresponding query to ensure that the spatial positions of the error space mask and the attention score matrix at each scale correspond one-to-one.
[0154] For feature space locations within the original mask's attention range, the error weights in the error space mask are multiplied by a bias coefficient to generate a positive mask attention bias. Locations with zero error weights are written as zero biases, and locations outside the original mask's attention range are written as negative infinity. In specific implementations, the bias coefficient is set to 4, the error weights range from 0 to 1, and the positive mask attention bias ranges from 0 to 4. The mask attention biases are then added position-by-position to the corresponding attention score matrix, followed by Softmax normalization, so that abnormal contour locations with larger deviation amplitudes receive higher attention weights.
[0155] The updated reference position and mask attention bias are written into the Transformer decoder. The feature sampling positions of the contour segment query and the size reference query are changed according to the updated reference position. The participation range of the multi-source geometric enhancement features is adjusted according to the mask attention bias.
[0156] The x-coordinate and y-coordinate of the updated reference position are multiplied by the width and height of the corresponding scale feature map, respectively, to obtain the coordinates of the updated reference position in the feature space of each scale. These feature space coordinates are used as the sampling centers of the multi-scale deformable attention. The sampling offset output by the Transformer decoder is superimposed on these sampling centers to generate the feature sampling positions corresponding to each attention head. Bilinear interpolation is used to read the feature values of non-integer sampling positions, and sampling positions exceeding the feature space boundary are truncated to the boundary. In specific implementation, the Transformer decoder sets up 8 attention heads, and each attention head sets 4 feature sampling positions at each scale. When the updated reference position changes, the sampling centers and feature sampling positions corresponding to each scale move synchronously.
[0157] For contour segment queries and size benchmark queries related to anomalous contour segments, the basic participation region with a radius of 2 feature positions around the updated reference position is retained. The extended regions with error weights greater than zero in the error space mask are merged into the basic participation region. The intersection of the merged region and the original mask attention range is taken to generate the updated attention range. Multi-source geometric enhancement features within the updated attention range participate in cross-attention calculation. Feature space positions with larger error weights have their participation weight increased based on the positive mask attention bias. Positions outside the updated attention range are written with negative infinity and stop participating in cross-attention calculation. Queries of unrelated anomalous contour segments use the attention range from the previous round.
[0158] Re-execute the contour segment query and dimension reference query, update the edge segments, corner transition segments, connection positions and reference positions, and generate updated local measurement contours;
[0159] The updated local measurement profile will be sequentially subjected to unified coordinate mapping, cross-view fusion and nonlinear coordinate correction to generate an updated and corrected measurement profile.
[0160] The updated and corrected measurement contour is back-projected onto the corresponding source image coordinate system, and the back-projection deviation between the updated local measurement contour and the original local measurement contour is recalculated.
[0161] When the maximum amplitude of the back projection deviation is not greater than the preset convergence threshold and the average amplitude change of the back projection deviation in two consecutive rounds is not greater than the preset change threshold, the updated and corrected measurement profile is determined as the final measurement profile; if the preset convergence condition is not met, the query reference point offset and error space mask are regenerated based on the back projection deviation and the next round of decoding is executed until the preset convergence condition is met.
[0162] In this embodiment, the process of generating dimensional measurement results includes:
[0163] The relative edge datum and corner datum are determined based on the datum position, segment type, and cross-sectional topology in the final measured profile;
[0164] Assign topological numbers to the edge segments and corner transition segments in the final measured profile according to the cross-sectional topological relationship, and read the segment where the reference position is located and the corresponding topological number; extract profile points within a 3 mm arc length on both sides of the reference position of the edge segment, with no less than 10 profile points, and fit the edge reference line using orthogonal distance regression; determine the two edge reference lines that are parallel in direction and used for the same target size calculation in the cross-sectional topological relationship as relative edge references; determine the reference position corresponding to the corner transition segment and the connection position on both sides as the corner reference.
[0165] The cross-sectional width, cross-sectional height, and edge spacing are obtained by calculating the normal distance between relative edge references. The corner radius is obtained by fitting the corner transition section, and the dimensional measurement results are generated.
[0166] Specifically, the unit normals of the relative edge references are adjusted to the same direction, and the perpendicular distance from the reference position on one edge reference to the straight line of another edge reference is calculated. According to the preset correspondence between size type and topology number, the horizontal normal distance relative to the edge reference is determined as the section width, the vertical normal distance relative to the edge reference is determined as the section height, and the normal distance between specified edge segments is determined as the edge spacing. When the directional angle relative to the edge reference is greater than 2°, the corresponding dimension is marked as a dimension to be verified.
[0167] Read the contour points of the corner transition section corresponding to the corner reference, delete the end contour points that are less than 0.20 mm away from the adjacent connection position, and retain no less than 12 contour points. Use least squares circle fitting to calculate the center and radius. When the root mean square of the fitting residual is not greater than 0.05 mm, the fitting radius is determined as the corner radius. When the root mean square of the fitting residual exceeds 0.05 mm, the corresponding corner radius is marked as the dimension to be verified.
[0168] The cross-sectional width, cross-sectional height, edge spacing, and corner radius are associated with the corresponding reference position, topology number, and fitting residual, respectively, and the measured values are output with a resolution of 0.01 mm to generate dimensional measurement results.
[0169] Example 2: Reference Figures 2 to 7 To verify the feasibility of this invention in practice, it was applied to the measurement of the cross-sectional dimensions of rectangular hollow steel sections on a continuous inspection production line for cold-drawn steel. The nominal cross-sectional width of the cold-drawn steel section being measured is 80.00 mm, the nominal cross-sectional height is 50.00 mm, the specified parallel edge spacing is 42.00 mm, and the nominal corner radius is 6.00 mm. The allowable deviations for the cross-sectional width and height are set to ±0.20 mm, the allowable deviation for the specified parallel edge spacing is set to ±0.15 mm, and the allowable deviation for the corner radius is set to ±0.30 mm. The surface of the cold-drawn steel section exhibits oil film, drawing texture, localized oxide spots, and light and dark reflections, with the corner area showing a continuous arc transition. Single-view images are prone to discontinuities in contour grayscale at the sides and corners; fixed-threshold edge detection is prone to producing breakpoints, duplicate edges, and false contours; and directly using a single image to calculate the dimensions makes it difficult to guarantee the consistency of measurement results in all directions.
[0170] Four image acquisition units are arranged around the cross-section of the cold-drawn steel section, covering the front, left-side tilt, right-side tilt, and bottom tilt directions of the section, respectively. Each image acquisition unit uses a 5-megapixel industrial camera with a 25mm focal length, a working distance controlled between 360mm and 390mm, and an exposure time of 2.5 milliseconds. The cross-section area is illuminated by a diffuse ring light source. Each image acquisition unit outputs a raw image of 2048×2048 pixels, with the cross-section measurement area cropped to 1024×1024 pixels. The four image acquisition units acquire multi-source images of the same cross-section via hardware triggering, with the acquisition time difference controlled within 0.2 milliseconds.
[0171] Before image acquisition, a planar calibration board was used to determine internal, external, and distortion parameters. The calibration board had 11×11 calibration positions, resulting in 121 coordinate correction positions. The average reprojection error after calibration was 0.073 pixels, and the maximum reprojection error was 0.096 pixels. A unified cross-section measurement coordinate system was established within the measurement plane of the cold-drawn steel section, with the center of the calibration board as the origin. The horizontal axis was set along the width of the cross-section, and the vertical axis along the height of the cross-section. The coordinate unit was millimeters.
[0172] refer to Figure 2 Four image acquisition units generate multi-source steel profile images corresponding to viewpoints C1, C2, C3, and C4, respectively. Acquisition time binding, background grayscale correction, grayscale normalization, noise suppression, and cross-sectional region cropping are performed on the four images to generate standardized multi-source steel profile images. The grayscale difference between the main cross-section and the background is improved from 46-71 grayscale levels in the original image to 92-118 grayscale levels after processing, and the standard deviation of local grayscale fluctuation in the oil film reflection area is reduced from 18.6 to 7.4, facilitating stable reading of the cross-sectional contour by the subsequent network.
[0173] A standardized multi-source steel profile image input is used with an improved Mask DINO network. A shared-parameter feature encoder reads multi-scale features from feature layers with strides of 4, 8, 16, and 32, corresponding to spatial dimensions of 256×256, 128×128, 64×64, and 32×32, respectively, with a unified channel count of 256. Camera calibration parameters and observation direction are processed by a geometric coding layer to generate viewpoint geometric codes. These viewpoint geometric codes are then fused with the corresponding viewpoint and scale multi-scale features according to their spatial location, forming multi-source geometrically enhanced features. Geometric coding processing increases the average cosine similarity of the same cross-section location across different viewpoint features from 0.71 to 0.89, reducing feature shift caused by viewpoint changes.
[0174] refer to Figure 3The main body query of the steel profile and the multi-source geometric enhancement features undergo cross-attention calculation, outputting the main body decoding features and the main body mask. The main body mask is processed by maximum connected region preservation and 3×3 closing operation, expanding outward by 8 pixels to form the measurement area. The average cross-union ratio (CUI) of the main body mask for 120 cross-sectional samples reaches 0.987, and the lowest CUI is 0.972. The main body mask eliminates the supporting structure, light source reflection boundaries, and equipment background, so that subsequent contour segment queries are concentrated near the cold-drawn steel profile cross-section.
[0175] refer to Figure 4 The contour segment query performs mask cross-attention calculation within the attention range defined by the main mask. When the angle between adjacent contour directions is no greater than 5° and the number of consecutive contour points is no less than 8, the corresponding contour points are classified as edge segments; when the local contour direction change is greater than 15° and the change direction is continuous, the corresponding contour points are classified as corner transition segments. Viewpoints C1 to C4 identify 4 edge segments and 4 corner transition segments respectively. The average confidence of edge segments of a single section is 0.962, and the average confidence of corner transition segments is 0.941. Scattered contour points with a segment confidence below 0.60 are deleted, and the retained contour points are arranged according to the connection direction. The segment decoding features and end positions are output.
[0176] refer to Figure 5 The dimensional benchmark query reads the segment decoding features and end positions, and searches for candidate connection positions according to the cross-sectional topology. End positions are marked in red, candidate connection positions are marked in yellow, and benchmark positions are marked in purple. The dimensional benchmark query reads the segment decoding features of four contour points before and after each connection position, and outputs the benchmark category and benchmark position offset. Benchmark positions are retained when the benchmark category confidence is not lower than 0.70. A total of 1920 benchmark positions were generated from 120 cross-sectional samples. After verification by a coordinate measuring machine, the number of correct benchmark positions was confirmed to be 1906, achieving a benchmark position recognition accuracy of 99.27%.
[0177] refer to Figure 6 The cross-sectional topology arranges edge segments S1, S2, S3, and S4 with corner transition segments T1, T2, T3, and T4 in a fixed connection order. The end-matching process calculates the pixel distance between end positions, the contour direction angle, and the segment confidence difference. Candidate matches are retained when the end distance is no greater than 8 pixels and the direction angle is no greater than 20°. Candidate matches are assigned one-to-one using the Hungarian algorithm, prohibiting the establishment of end connections across cross-sectional topology. End distances no greater than 2 pixels are directly merged; when the end distance is greater than 2 pixels but no greater than 8 pixels, cubic spline interpolation is used to supplement transition contour points. After processing, each viewpoint forms a closed contour, and the number of contour breakpoints is reduced from an average of 5.8 in traditional edge detection methods to 0.13.
[0178] refer to Figure 7 Local measurement profiles are output from viewpoints C1 to C4. Each local measurement profile retains edge segments, corner transition segments, end positions, connection positions, and reference positions. Local measurement profiles from each viewpoint are mapped to a unified cross-sectional measurement coordinate system. Profile segments with the same segment category and topological index establish cross-view candidate correspondences. Cross-view correspondences are established when the spatial distance between edge segment profile points is no greater than 0.20 mm and the spatial distance between corner transition segment profile points is no greater than 0.30 mm. Profile points are weighted and fused according to segment confidence and observation direction to generate the initial measurement profile. The profile integrity rate after fusion from the four views reaches 99.61%, and single-view occlusion areas can be supplemented by the corresponding profiles from the other three views.
[0179] The initial measurement profile was input into a nonlinear coordinate correction field. This field was constructed using the measurement coordinate residuals from 121 calibration locations, with Gaussian radial basis functions fitted to the horizontal and vertical compensation components, respectively. The coordinate compensation amounts for edge sections were projected onto the profile normal, while those for corner transition sections were distributed to the contour normals on both sides according to their distance to adjacent corners. The average coordinate compensation for the 120 cross-sectional samples was 0.083 mm, and the maximum was 0.214 mm. After nonlinear coordinate correction, the dimensional deviation distribution at different locations around the cross-section changed from a marked increase at the edges to a uniform distribution.
[0180] The corrected measurement contours are back-projected onto the source image coordinate system corresponding to viewpoints C1 to C4. The back-projected contour points are matched with the local measurement contour points at the same viewpoint according to the normalized arc length. When the back-projection deviation amplitude exceeds 1.20 pixels and the number of consecutive contour points is not less than 6, the corresponding consecutive contour points are identified as abnormal contour segments. The deviation direction and deviation amplitude of the abnormal contour segments are aggregated to generate the offset of the query reference point. The offset of the query reference point in a single round is limited to within 0.05 of the normalized coordinates. The abnormal contour segments are mapped to the decoding feature space of four scales, and the deviation amplitude is converted into error weights of 0 to 1 to generate an error space mask.
[0181] The reference point offset is written to the reference position of the contour segment query and the size benchmark query. The error space mask is converted into a mask attention bias and written to the Transformer decoder. The updated reference position changes the sampling center of the multi-scale deformable attention, and the mask attention bias increases the participation weight of features near the abnormal contour segment. The regenerated local measurement contours are sequentially subjected to unified coordinate mapping, cross-view fusion, and nonlinear coordinate correction. Decoding stops when the maximum backprojection deviation is no greater than 0.60 pixels and the average deviation change is no greater than 0.05 pixels over two consecutive rounds. The average number of iterations for 120 cross-sectional samples is 2.7 rounds, with a minimum of 2 rounds and a maximum of 4 rounds; the initial average backprojection deviation is 1.46 pixels, and the average value after convergence is 0.31 pixels, a decrease of 78.77%.
[0182] The final measured profiles determined the edge and corner references based on the reference positions, segment categories, and cross-sectional topological relationships. For each edge reference position, profile points within a 3 mm arc length were extracted, and orthogonal distance regression was used to fit the edge reference straight line. For corner transition sections, end profile points with a distance less than 0.20 mm from the connection point were deleted, and the corner radius was calculated using least-squares circle fitting. Measurement results were output at a resolution of 0.01 mm. A coordinate measuring machine was used as a reference device, and three measurements were performed on 120 cross-sectional samples. The reference measurements covered cross-sectional widths from 79.84 mm to 80.17 mm, cross-sectional heights from 49.86 mm to 50.15 mm, specified parallel edge spacings from 41.88 mm to 42.13 mm, and corner radii from 5.72 mm to 6.26 mm.
[0183] To verify the measurement results, a comparison was made between a manual measuring tool method, a single-view traditional vision method, and a multi-view fusion method without nonlinear coordinate correction and query feedback. The manual measuring tool method used vernier calipers and a radius gauge, while the single-view traditional vision method employed Canny edge detection and least-squares fitting. Test results showed that the average absolute error of the cross-section width was 0.04 mm, the average absolute error of the cross-section height was 0.05 mm, the average absolute error of the specified parallel edge spacing was 0.05 mm, and the average absolute error of the corner radius was 0.08 mm. Compared with the single-view traditional vision method, the average absolute errors of the four types of dimensions decreased by 76.47%, 73.68%, 76.19%, and 71.43%, respectively. The average processing time for a single cross-section of this invention was 0.86 seconds, meeting the cycle time requirements of a continuous inspection production line; the standard deviation of repeated measurements was 0.03 mm, and the consistency rate of dimensional qualification judgment reached 99.17%.
[0184] Table 1: Comparison of Measurement Results of Cross-sectional Dimensions of Cold-Drawn Steel Sections
[0185] Comparison indicators Manual measuring tools Single-view traditional vision Multi-view fusion without correction feedback This invention Average absolute error of cross-section width / mm 0.08 0.17 0.09 0.04 Average absolute error of cross-section height / mm 0.09 0.19 0.10 0.05 Mean absolute error of specified parallel edge spacing / mm 0.10 0.21 0.11 0.05 Mean absolute error of corner radius / mm 0.18 0.28 0.15 0.08 Maximum absolute error / mm 0.31 0.46 0.27 0.14 Repeated measures standard deviation / mm 0.06 0.11 0.06 0.03 Outline completeness rate / % — 94.18 98.07 99.61 Corner transition section recognition accuracy / % — 91.54 96.72 99.17 Dimensional conformity rate / % 95.83 92.50 97.50 99.17 Average processing time per section / s 21.40 0.42 0.68 0.86
[0186] Table 1 shows that the present invention achieves the lowest mean absolute error in the measurement of four dimensions: cross-section width, cross-section height, specified parallel edge spacing, and corner radius, with measurement errors of 0.04 mm, 0.05 mm, 0.05 mm, and 0.08 mm, respectively. Compared with the traditional single-view vision method, the four errors are reduced by 76.47%, 73.68%, 76.19%, and 71.43%, respectively. Although the multi-view fusion method without correction feedback can supplement contour information using different viewpoints, the four errors still reach 0.09 mm, 0.10 mm, 0.11 mm, and 0.15 mm. After introducing nonlinear coordinate correction and back projection feedback, the four errors of the present invention are reduced by 55.56%, 50.00%, 54.55%, and 46.67% respectively compared with the multi-view fusion method without correction feedback, indicating that coordinate correction and query feedback can effectively correct viewpoint mapping errors, local contour offsets, and corner fitting deviations.
[0187] The maximum absolute error of this invention is 0.14 mm, lower than 0.31 mm for manual measurement, 0.46 mm for single-view traditional vision methods, and 0.27 mm for multi-view fusion methods without correction feedback. The standard deviation of repeated measurements is 0.03 mm, a decrease of 72.73% compared to single-view traditional vision methods and a decrease of 50.00% compared to multi-view fusion methods without correction feedback. Related data indicate that multi-source geometric enhancement features, cross-view contour fusion, and constrained coordinate compensation can reduce the impact of surface reflection, local occlusion, and contour extraction fluctuations on repeated measurement results, ensuring high consistency in dimensional output across different batches of image inputs.
[0188] The contour integrity rate improved from 94.18% with the single-view traditional vision method to 99.61%, and the multi-view fusion method without correction feedback improved it by 1.54 percentage points. The accuracy of corner transition section recognition reached 99.17%, an improvement of 7.63 percentage points compared with the single-view traditional vision method, and an improvement of 2.45 percentage points compared with the multi-view fusion method without correction feedback. The steel body query can define the effective measurement area, the contour section query can distinguish the edge section and the corner transition section, and the size reference query, combined with the cross-sectional topology, determines the connection position and reference position, reducing contour breaks, incorrect connections, and corner positioning deviations.
[0189] The consistency rate of dimensional conformity assessment reached 99.17%, higher than 95.83% for manual measuring tools, 92.50% for single-view traditional vision methods, and 97.50% for multi-view fusion methods without correction feedback. The average processing time for a single section in this invention is 0.86 seconds, a reduction of 20.54 seconds compared to 21.40 seconds for manual measuring tools. Compared to multi-view fusion methods without correction feedback, the back projection deviation calculation and iterative decoding increase processing time by 0.18 seconds, but yield lower measurement errors, higher contour integrity, and more stable conformity assessment results. The data in the table demonstrate that this invention can balance the accuracy, repeatability, contour integrity, and inspection efficiency of cold-drawn steel section dimensional measurement, making it suitable for non-contact dimensional inspection under continuous production conditions.
[0190] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction, characterized in that, Includes the following steps: Collect images of cold-drawn steel profiles from multiple sources at the same cross section, and preprocess them to generate standardized images of the multiple sources. Standardized multi-source steel profile images are input into an improved Mask DINO network to extract multi-scale features. Camera calibration parameters and observation directions are encoded and fused with multi-scale features to generate multi-source geometric enhancement features. Based on multi-source geometric enhancement features, cascaded measurement queries are performed. The main steel body query generates a main body mask and defines the measurement area. The contour segment query identifies edge segments and corner transition segments and outputs segment decoding features. The size reference query determines the connection position and reference position based on the segment decoding features and cross-sectional topology, and generates a local measurement contour. Local measurement contours are mapped to a unified cross-sectional measurement coordinate system, cross-view correspondences are established and fused to generate initial measurement contours; Input the initial measurement profile points, cross-section center, and rotation angle into the nonlinear coordinate correction field to obtain the coordinate compensation amount and generate the corrected measurement profile; The corrected measurement contour is back-projected onto the source image coordinate system, the deviation from the local measurement contour is calculated, the query reference point offset and error space mask are generated and written into the Transformer decoder, the reference position and attention range of the contour segment query and the size reference query are updated, and the contour generation, fusion and correction are re-executed until the deviation meets the convergence condition, and the final measurement contour is generated. The measurement datum is determined based on the final measurement profile, the cross-sectional dimensions are calculated, and the dimensional measurement results are generated.
2. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 1, characterized in that, The preprocessing process includes: reading the acquisition time and image acquisition unit identifier of the multi-source steel profile image, binding the images according to the acquisition time of the same cross section, performing background grayscale correction and grayscale normalization on the bound multi-source steel profile image, suppressing noise on the grayscale normalized multi-source steel profile image, cropping the images from each perspective according to the cross section measurement area, arranging the cropped images from each perspective according to the image acquisition unit identifier, and generating a standardized multi-source steel profile image.
3. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 1, characterized in that, The improved Mask DINO network includes a shared parameter feature encoder, a geometric coding layer, a pixel decoder, a Transformer decoder, and a query feedback interface; Standardized multi-source steel profile images from different perspectives are connected to a shared parameter feature encoder according to the image acquisition unit identifier. The shared parameter feature encoder outputs the multi-scale features corresponding to each perspective to the geometric coding layer. The camera calibration parameters and observation direction are fed into the geometric coding layer. The geometric coding layer fuses the encoded results of the camera calibration parameters and observation direction with the multi-scale features of the corresponding viewpoint and outputs multi-source geometric enhancement features to the pixel decoder. The pixel decoder performs scale alignment and feature fusion on multi-source geometric enhancement features and inputs the processing results into the Transformer decoder; The Transformer decoder is set to sequentially perform the main body query, contour segment query, and dimensional reference query. The output of the main body query is connected to the contour segment query, and the output of the contour segment query is connected to the dimensional reference query. The contour segment query and the dimension reference query set the reference position and the mask attention range, respectively. The query feedback interface receives the query reference point offset and the error space mask, writes the query reference point offset to the corresponding reference position, writes the error space mask to the corresponding mask attention range, and inputs the updated contour segment query and dimension reference query into the Transformer decoder.
4. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 3, characterized in that, The process of generating multi-source geometric enhancement features includes: Standardized multi-source steel profile images from different perspectives are input into a shared parameter feature encoder, and features of different spatial resolutions are read from different feature layers to generate multi-scale features corresponding to each perspective. The camera calibration parameters and observation direction are read according to the image acquisition unit identifier, and the view geometry code is generated through the geometric coding layer and mapped to the channel dimension and spatial size of the corresponding multi-scale features. The mapped viewpoint geometric code is fused with the corresponding viewpoint and scale multi-scale features according to spatial location to generate multi-source geometric enhancement features.
5. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 4, characterized in that, The process of executing the cascaded measurement query includes: Cross-attention calculation is performed on the main steel body query and multi-source geometric enhancement features to generate main body decoding features and main body mask. The measurement area is determined based on the main body mask. The main body mask is used as the mask attention range of the contour segment query and the main body decoding features are written into the contour segment query. Perform mask cross-attention calculation on the multi-source geometric enhancement features within the contour segment query and measurement area, identify edge segments based on the continuous state of the contour direction, identify corner transition segments based on the changing state of the contour direction, and generate segment decoding features and end positions corresponding to each contour segment. Write the segment decoding features and end positions into the size reference query, establish the adjacent constraints between the edge segments and the corner transition segments according to the cross-sectional topology, match the end positions of each contour segment according to the adjacent constraints, and determine the connection order and connection position. The reference position is determined based on the segment decoding features corresponding to the connection position. The corresponding edge segments and corner transition segments are connected in the connection order to generate the local measurement contours corresponding to each viewpoint.
6. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 5, characterized in that, The process of generating the initial measurement profile includes: The contour points in the local measurement contour are converted into imaging rays, the intersection points of the imaging rays and the cold-drawn steel section measurement plane are calculated, and the intersection points are converted to a unified section measurement coordinate system. Based on the edge segment, corner transition segment and connection sequence, the local measurement contour of each viewpoint in the unified cross-section measurement coordinate system is segmented to generate cross-viewpoint candidate corresponding segments. Cross-view candidate corresponding segments are normalized in arc length according to the contour extension direction. Contour points with corresponding normalized arc length positions and spatial distances that meet the corresponding thresholds are matched to establish cross-view correspondence. Based on the segment confidence and observation direction corresponding to the contour points, contour points with cross-view correspondence are weighted and fused to generate fused contour points; Arrange the fusion contour points according to the cross-sectional topology and connection order, connect adjacent edge segments and corner transition segments, and generate the initial measurement contour.
7. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 6, characterized in that, The process of generating the corrected measurement profile includes: Read the initial measurement contour points, cross-section center, and corners; calculate the position vector of each initial measurement contour point relative to the cross-section center and the distance to the adjacent corners; and generate correction input features by combining the corresponding segment categories. Input the correction input features into the nonlinear coordinate correction field, and output the coordinate compensation amounts corresponding to the horizontal and vertical axes; Project the coordinate compensation amount corresponding to the edge segment onto the contour normal, and distribute the coordinate compensation amount corresponding to the corner transition segment to the adjacent contour normal according to the distance to the adjacent corner, thus generating constrained coordinate compensation amount; The constrained coordinate compensation amount is added to the coordinates of the corresponding initial measurement contour points, and the updated contour points are arranged in the connection order to generate the corrected measurement contour.
8. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 7, characterized in that, The process of generating the query reference point offset and error space mask includes: Based on the coordinate mapping relationship of each image acquisition unit, the correction measurement contour points are back-projected to the corresponding source image coordinate system to generate the back-projected contours corresponding to each viewpoint. According to the contour segment category and connection order, the arc length position of the back-projected contour points is matched with the local measured contour points from the same viewpoint. The difference between the horizontal axis coordinates and the difference between the vertical axis coordinates between the matched contour points are calculated to generate the back-projection deviation. Filter out contour points whose deviation amplitude exceeds the preset deviation threshold and are continuous along the connection sequence, and merge the continuous contour points into abnormal contour segments. Based on the direction and magnitude of the back projection deviation within the abnormal contour segment, the segment is aggregated, and the aggregated deviation is converted to the reference position coordinate scale for contour segment query and size reference query, generating the query reference point offset. The abnormal contour segment is mapped to the spatial location of each scale corresponding to the multi-scale decoding feature. The corresponding spatial location is expanded according to the deviation amplitude and written into the error weight to generate an error spatial mask.
9. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 8, characterized in that, The process of generating the final measurement profile includes: The offset of the query reference point is superimposed with the reference positions of the corresponding contour segment query and size datum query to generate the updated reference position; The error space mask is mapped to the attention score matrix at each scale, and the mask attention bias is generated according to the error weight, keeping the position outside the original mask attention range in a shielded state. The updated reference position and mask attention bias are written into the Transformer decoder. The feature sampling positions of the contour segment query and the size reference query are changed according to the updated reference position. The participation range of the multi-source geometric enhancement features is adjusted according to the mask attention bias. Re-execute the contour segment query and dimension reference query, update the edge segments, corner transition segments, connection positions and reference positions, and generate updated local measurement contours; The updated local measurement profile will be sequentially subjected to unified coordinate mapping, cross-view fusion and nonlinear coordinate correction to generate an updated and corrected measurement profile. The updated and corrected measurement contour is back-projected onto the corresponding source image coordinate system, and the back-projection deviation between the updated local measurement contour and the original local measurement contour is recalculated. When the maximum amplitude of the back projection deviation is not greater than the preset convergence threshold and the average amplitude change of the back projection deviation in two consecutive rounds is not greater than the preset change threshold, the updated and corrected measurement profile is determined as the final measurement profile; if the preset convergence condition is not met, the query reference point offset and error space mask are regenerated based on the back projection deviation and the next round of decoding is executed until the preset convergence condition is met.
10. The method for measuring the dimensions of cold-drawn steel profiles based on multi-source image fusion and nonlinear correction according to claim 9, characterized in that, The process of generating the dimensional measurement results includes: The relative edge datum and corner datum are determined based on the datum position, segment type, and cross-sectional topology in the final measured profile; The cross-sectional width, cross-sectional height, and edge spacing are obtained by calculating the normal distance between relative edge references. The corner radius is obtained by fitting the corner transition section, and the dimensional measurement results are generated.
