An image reconstruction method and system for a target surface based on edge feature stitching
By combining multi-scale edge detection and dynamic grayscale correction models with multi-band fusion algorithms, the problems of feature point extraction in large-area low-texture regions and grayscale inconsistency caused by illumination fluctuations are solved, achieving high-precision image reconstruction suitable for industrial inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN PRECISION INTELLIGENT TECH CO LTD
- Filing Date
- 2026-05-27
- Publication Date
- 2026-07-10
AI Technical Summary
Existing image stitching methods suffer from low feature point extraction efficiency, discontinuous edge structures, and inconsistent grayscale due to illumination fluctuations when processing large areas of low texture, which affects reconstruction accuracy and stability and cannot meet the needs of high-precision industrial inspection.
Edge feature maps are extracted through multi-scale edge detection, edge chain codes and topological constraint functions are constructed, and image registration and grayscale consistency processing are performed by combining random sampling consensus algorithm and dynamic grayscale correction model. High-resolution images are then reconstructed using multi-band fusion algorithm.
It improves the geometric accuracy and grayscale consistency of image reconstruction, solves the problems of inconsistent edge structures and grayscale inconsistencies caused by illumination fluctuations, and enhances the stability and accuracy of image stitching.
Smart Images

Figure CN122368043A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to a method and system for reconstructing target surface images based on edge feature stitching. Background Technology
[0002] With the rapid development of industrial automation technology, computer vision-based surface defect detection, 3D reconstruction, and precision measurement technologies play a crucial role in the quality control of products such as circuit boards, semiconductor wafers, and high-precision mechanical parts. They are core technologies supporting the accuracy and reliability of products leaving the factory. Due to the inherent contradiction between the resolution and field of view of optical imaging systems, acquiring complete high-resolution images of large targets using single-shot imaging methods faces insurmountable physical limitations. Therefore, in industrial settings, mobile imaging components are typically used to acquire localized image sequences with overlapping areas, which are then reconstructed using image stitching technology. In this context, the performance of image stitching technology directly determines the accuracy of industrial inspection, making it a key technology in industrial quality control.
[0003] Currently, existing image stitching methods still have significant room for optimization when processing specific industrial target images, making it difficult to fully adapt to the high-precision requirements of industrial scenarios. Traditional image stitching methods, such as point feature matching algorithms based on Scale Invariant Feature Transform (SIFT) or Accelerated Robust Feature Transform (SURF), suffer from significant uncertainties in the extraction efficiency and number of effective feature points when dealing with large-area, low-texture industrial targets like circuit board substrates and metal sealing surfaces. This can easily lead to deviations in the image registration process, affecting stitching accuracy. Under industrial imaging conditions with low overlap rates or geometric distortions, the edge regions of the stitched images are prone to problems such as physical structural inconsistencies, ghosting, and logical misalignments, which adversely affect the accuracy of subsequent identification of subtle defects, making it difficult to meet the requirements of precision industrial inspection. Furthermore, the complex and variable industrial environment, with factors such as lighting fluctuations and imaging angle deviations, can easily cause shifts in the grayscale characteristics of sequential images. Existing stitching strategies often rely solely on grayscale correlation or generalized scene features, which are inadequate in ensuring the geometric stability of image stitching, significantly limiting the industrial applicability of reconstructed images and failing to fully adapt to the complex application needs of industrial environments.
[0004] For example, patent number CN109636714A, published on April 16, 2019, describes an image stitching method. First, it acquires and stores a sequence of images to be stitched, where each pair of adjacent frames overlaps. Feature points are extracted from each frame, and matching point pairs are obtained by filtering the extracted feature points based on image grayscale correlation. The fundamental transformation matrix between the two adjacent frames is calculated based on the matching point pairs. Each pair of adjacent frames is then aligned to the same coordinate system according to the corresponding fundamental transformation matrix, completing image matching. The two frames are then stitched together using a preset algorithm, and a detail enhancement algorithm is applied to the stitched area for image enhancement. It is evident that the feature point filtering method based on grayscale correlation can calculate an accurate fundamental transformation matrix, improving image stitching quality. Finally, a fast and efficient image detail enhancement method further improves the overall image quality. Secondly, patent number CN120953153A, published on November 14, 2025, discloses a method for enhancing the edge of a backlight effect image based on intelligent recognition. The method first determines the type of the environment; then, based on the determined environment type, it globally optimizes the original image using a set environment-aware enhancement mechanism to output a globally preprocessed image; a backlight region segmentation model is constructed from the globally preprocessed image; a locally enhanced image is output; a structure-aware local adaptive threshold algorithm is designed for the locally enhanced image to output a binarized image that maintains structural continuity; an edge map is extracted from the binarized image using an edge detection algorithm, optimizing the topological structure of the contours in the binarized image; and the edge quality is compared with a template processing standard feature library to output the edge quality assessment result and feed it back to the processing control system. This invention deeply integrates defect detection with processing control, moving from "passive detection" to "active optimization," thereby improving production efficiency and yield. Furthermore, the journal *Journal of Detection and Control*, with the article titled "An Adaptive Acquisition Algorithm for Target Images of Imaging Fuses Based on Compressed Sensing," published on June 6, 2025, discloses an adaptive target image acquisition method for visible light imaging fuses based on compressed sensing theory. This method involves background separation and overlapping block segmentation of the target image, adaptively allocating the sampling rate according to the richness of information contained in each image block, and performing compressed acquisition. The Landweber algorithm for smooth projection is then used for reconstruction. Experimental results show that this algorithm achieves high image reconstruction quality with low data acquisition volume, providing a reference for subsequent visible light fuse imaging technology.
[0005] It is known that existing technologies have at least the following unresolved technical problems or defects, which severely restrict detection efficiency and reliability, mainly reflected in: 1. CN109636714A improves the feature matching accuracy and overall quality of conventional image stitching to a certain extent, but it still has problems such as lack of environmental adaptive global optimization, limited applicable scenarios, and insufficient optimization of image edge details and structural continuity. 2. CN120953153A improves upon the lack of environmental adaptive global optimization, accurate segmentation of backlit areas, and the inability to link quality assessment with industrial control, but it still has shortcomings such as weak automatic stitching and adaptation capabilities for large-scale image sequences and inconsistent edge structures.
[0006] In summary, in the field of image processing technology, existing methods for reconstructing target surface images suffer from drawbacks such as failure to extract feature points in large low-texture areas, discontinuous edge structures, and inconsistent grayscale due to illumination fluctuations. These problems directly lead to decreased reconstruction accuracy and insufficient stability, severely restricting the high-quality development of the industry. Therefore, it is necessary to design a targeted method to solve the various problems existing in the current technology. Summary of the Invention
[0007] The purpose of this invention is to provide: A target surface image reconstruction method and system based on edge feature stitching aims to solve the problems of feature point extraction failure in large-area low-texture areas, discontinuous edge structure, and grayscale inconsistency caused by illumination fluctuations in the current technology.
[0008] Terminology Explanation: Unless otherwise defined, all technical terms used herein have the same meanings as commonly understood by one of ordinary skill in the art to which this subject matter pertains. Unless otherwise stated, all patents, patent inventions, and disclosures cited throughout this document are incorporated herein by reference in their entirety. Where multiple definitions exist for terms herein, the definitions provided in this chapter shall prevail.
[0009] It should be understood that the above brief description and the following detailed description are exemplary and for illustrative purposes only, and do not limit the subject matter of the invention in any way. In this invention, the singular is used in conjunction with the plural unless otherwise specifically stated. It should also be noted that, unless otherwise stated, the use of “or” or “or” means “and / or”. Furthermore, the use of the term “comprising” and other forms such as “including,” “containing,” and “contains” are not limiting.
[0010] The definition of the standard terminology can be found in the reference "Digital Image Processing and Deep Learning Technology Applications", Electronic Industry Press, edited by Yang Shuying.
[0011] Unless otherwise stated, conventional methods within the scope of the art, such as the Zhang Zhengyou calibration method, shall be used.
[0012] Unless specifically defined herein, the use of all commercially available products herein employs standard techniques. For example, it may be carried out using the manufacturer's instructions for use with the kit, or in accordance with methods known in the art or the description of this invention. The techniques and methods described herein can generally be implemented according to conventional methods well known in the art, based on the descriptions in the various summary and more specific documents cited and discussed in this specification.
[0013] The terms “optional / arbitrary” or “optionally / arbitrarily” mean that the event or situation described below may or may not occur, including both the occurrence and non-occurrence of the event or situation.
[0014] The term "σ" used in this article refers to the scale factor, which is used to achieve noise suppression and reasonable preservation of key image structures (fine details and macroscopic contours) by adjusting the strength of Gaussian filtering smoothing.
[0015] The term "Width" used in this article refers to the overlap span, which is used to prevent breaks, gaps, smooth transitions, and ensure a safety margin.
[0016] The term "CLAHE" used in this article refers to Limit Contrast Adaptive Histogram Equalization, an image processing algorithm used to enhance local contrast in images.
[0017] The term "PSNR" used in this article refers to Peak Signal-to-Noise Ratio, which is used to measure the quality of an image / video.
[0018] The term "PCB" as used in this article refers to a printed circuit board, which is a basic board used to connect and support various electronic components.
[0019] The term "CD-ROM" as used in this article refers to a compact optical disc read-only memory, which is used to read data but not write or delete it.
[0020] This invention provides a method for reconstructing a target surface image based on edge feature stitching, comprising: S100: Control the moving imaging component to acquire local sequence images of the target surface along a predetermined trajectory, and perform distortion correction on each local sequence image based on the intrinsic parameter matrix of the moving imaging component to obtain the image sequence to be stitched together. S200. Perform multi-scale edge detection on the image sequence to be stitched, construct a Gaussian scale space using Gaussian filters with different standard deviations, obtain the gradient magnitude and edge direction of each pixel in the horizontal and vertical directions, extract edge pixels and perform non-maximum suppression and double threshold screening to generate an edge feature map. S300: The edge feature map identifies continuous edge chain codes based on pixel neighborhood connectivity, extracts structural feature descriptors based on the length, curvature and centroid coordinates of the edge chain codes, performs preliminary matching by obtaining the Euclidean distance between the structural feature descriptors of adjacent images, and removes mismatches based on the random sampling consensus algorithm to obtain the initial geometric transformation matrix between adjacent images. S400. Construct an edge topology constraint function based on the edge feature map, take the reprojection error of the edge pixels as the objective function, and iteratively correct the initial geometric transformation matrix to obtain a fine registration matrix. S500. Perform grayscale characteristic analysis on the overlapping area, construct a dynamic grayscale correction model based on linear gain and offset, adjust the grayscale distribution of the image sequence to be stitched according to the dynamic grayscale correction model, and obtain a brightness-consistent image. S600. Establish a global coordinate system based on the fine registration matrix, project the brightness consistency image onto the global coordinate system, perform Laplacian pyramid decomposition on the overlapping region image using a multi-band fusion algorithm, obtain weights on each frequency sub-band based on the normalized distance of the pixel from the edge of the overlapping region, and perform weighted convergence to obtain a complete high-resolution reconstructed image.
[0021] The term "distortion correction" is selected from: dynamic calibration correction.
[0022] The preferred terms for "distortion correction" are: radial distortion correction, tangential distortion correction, thin prism distortion correction, lens distortion correction, fisheye distortion correction, wide-angle distortion correction, barrel / pincushion distortion correction, and stereoscopic distortion correction.
[0023] The term "distortion correction" is further preferably defined as radial distortion correction and tangential distortion correction.
[0024] The term "multi-scale edge detection" is selected from: Gaussian multi-scale edge detection, wavelet domain multi-scale edge detection, multi-scale Sobel edge detection, multi-scale Canny edge detection, multi-scale gradient edge detection, multi-scale LoG edge detection, multi-scale directional edge detection, and multi-scale sub-pixel edge detection.
[0025] The preferred term for "multi-scale edge detection" is Gaussian multi-scale edge detection.
[0026] The term "multi-scale edge detection" is further preferred to be: gradient magnitude-based multi-scale edge detection based on Gaussian scale space.
[0027] The term "edge chain code matching" is selected from: Freeman chain code matching, differential chain code matching, rotation / translation / scale invariant chain code matching, segmented chain code matching, chain code edit distance matching, and normalized chain code matching.
[0028] The preferred term for "edge chain code matching" is RANSAC robust matching based on edge chain code structural features.
[0029] The term "edge topology constraint" is selected from: edge triplet topology constraint, edge segment angle topology constraint, edge length ratio topology constraint, edge adjacency relationship topology constraint, edge connectivity topology constraint, edge common endpoint topology constraint, edge relative position topology constraint, edge geometric invariance topology constraint, local edge structure topology constraint, and edge chain topology constraint.
[0030] The term "edge topology constraint" is preferably defined as: topology invariance constraint based on local edge triples.
[0031] The term "grayscale correction" is selected from: global grayscale consistency correction, local grayscale consistency correction, adaptive grayscale correction, illumination fluctuation grayscale compensation, multi-frame image grayscale fusion, histogram matching normalization, overlapping area grayscale smoothing, brightness unevenness correction, gamma correction, and dynamic range normalization.
[0032] The preferred term for "grayscale correction" is grayscale consistency correction.
[0033] The term "grayscale correction" is further preferably defined as: adaptive grayscale correction of overlapping areas based on a linear transformation model.
[0034] The term "multi-band fusion reconstruction" is selected from: Gauss-Laplace pyramid multi-band fusion, multi-band wavelet fusion reconstruction, multi-band edge-preserving fusion, frequency band adaptive weight fusion, multi-band gradient domain fusion reconstruction, multi-band overlapping area smoothing fusion, multi-scale frequency band decomposition fusion, multi-band nonlinear fusion reconstruction, multi-band local structure preservation fusion, and multi-band illumination consistency fusion.
[0035] The preferred term for "multi-band fusion reconstruction" is: multi-band fusion reconstruction based on adaptive pyramid decomposition and Gaussian weights.
[0036] Based on further solutions to the technical problems of the present invention, or simultaneous solutions to multiple technical problems, the preferred solutions provided by the present invention include: First preferred option: The obtained image sequence to be stitched includes: Set the step length and exposure parameters of the moving imaging component to acquire local raw images with an overlap rate of 25% to 35%; The radial and tangential distortion coefficients of the moving imaging component are obtained using a checkerboard calibration plate, and a coordinate mapping table is constructed. The pixel coordinates of the original local image are input into the coordinate mapping table, and the corrected pixel values are obtained through bilinear interpolation. The resulting image sequence is then output.
[0037] This technical solution not only addresses the technical problems of "poor geometric fidelity of original data and insufficient stitching accuracy," but also solves the technical problems of "stitching misalignment and edge distortion caused by geometric deformation and distortion of image edges."
[0038] Second preferred option: The distortion correction process is a dynamic calibration correction: In the edge region of the image sequence to be stitched, a preset reference feature identifier is identified, and the deviation vector between the actual projection position and the theoretical position of the reference feature identifier in the image coordinate system is obtained. An intrinsic parameter compensation model is established based on the deviation vector, and the radial distortion coefficient and tangential distortion coefficient in the coordinate mapping table are corrected online to obtain an optimized coordinate mapping table. The local original image is input into the optimized coordinate mapping table, and the corrected pixel values are obtained through high-order spline interpolation.
[0039] This technical solution not only addresses the technical problem of "the inadequacy of traditional static calibration due to the deviation of intrinsic parameters caused by mechanical wear or changes in object distance, and the inability to guarantee the spatial consistency of image sequences," but also further solves the technical problem of "poor accuracy of edge feature integrity."
[0040] Third preferred option: The range of values for the scale factor σ in the Gaussian scale space is a preset scale factor range. At each scale space, the gradient components of each pixel in the horizontal and vertical dimensions are extracted using the first-order partial derivative operator, that is, the relationship between the horizontal gradient magnitude and the vertical gradient magnitude. The edge response intensity of a pixel is obtained by taking the square root of the sum of the squares of the horizontal and vertical gradient magnitudes.
[0041] This technical solution not only addresses the technical problem of "insufficient feature extraction capability of existing methods in low-texture regions", but also solves the technical problem of "poor robustness and high mismatch rate of edge matching under complex lighting conditions".
[0042] Fourth preferred option: The continuous edge chain code is based on pixel neighborhood connectivity recognition; The structural feature descriptor is extracted based on the length, curvature, and centroid coordinates of the edge chain code; The initial matching is performed based on obtaining the Euclidean distance between the structural feature descriptors of adjacent images; The mismatched items are based on the random sampling consensus algorithm.
[0043] This technical solution not only addresses the technical problem of "poor accuracy in depicting edge features" but also further solves the technical problem of "poor resistance to geometric distortion".
[0044] Fifth preferred option: The structural feature descriptor includes statistical histogram features of edge gradients; The process of extracting the statistical histogram features includes: A rotation-invariant local coordinate system is constructed in the neighborhood of the edge pixel, and the neighborhood is divided into several sub-regions; The gradient direction distribution of edge points within each sub-region is statistically analyzed to generate a local gradient direction histogram. The local gradient direction histogram and the geometric properties of the edge chain code are concatenated and fused, and then normalized to form an enhanced structural feature descriptor.
[0045] This technical solution not only addresses the technical problems of "weak structural feature expression and insufficient feature recognition in image stitching", but also solves the technical problems of "poor feature rotation adaptability, insufficient fusion of local gradient information and geometric information, and unstable matching".
[0046] Sixth preferred option: The initial geometric transformation matrix is obtained by: A predetermined number of sample pairs are randomly selected from the candidate matching pairs. The homography matrix is fitted using the least squares method. The number of inliers with residuals less than a preset error threshold is counted. The homography matrix with the largest number of inliers is selected as the initial geometric transformation matrix.
[0047] This technical solution not only addresses the technical problem of "poor accuracy of geometric transformation matrix", but also solves the technical problem of "poor robustness of traditional fitting methods and susceptibility to outliers leading to splicing offset and misalignment".
[0048] Seventh preferred option: The construction of the edge topology constraint function includes: In the edge feature maps of adjacent images, edge triples with significant topological relationships are extracted. The edge triples consist of three edge segments that have a common endpoint or a proximity relationship. Obtain the topological invariance features of the edge triples, wherein the topological invariance features include the line segment length ratio and the cosine value of the included angle; Based on the topological invariance feature, a coarse alignment relationship of triples is established between adjacent images, and this relationship is used as the initial search range constraint for the iterative optimization algorithm.
[0049] This technical solution not only addresses the technical problem of "registration ambiguity in repetitive texture scenes," but also further solves the technical problem of "poor alignment accuracy in overlapping areas."
[0050] Eighth preferred option: The global coordinate system is established based on the fine registration matrix; The multi-band fusion algorithm includes: The number of Laplace pyramid decomposition layers is adaptively adjusted based on the local width of the overlapping region. When fusing sub-bands of different layers, an adaptive Gaussian weighting function is constructed based on the normal distance from the pixel to the center line of overlap. Bandpass filtering enhancement is performed on the fused sub-bands to compensate for contrast loss during the fusion process.
[0051] This technical solution not only addresses the technical problem of "poor stability of multi-frame image stitching", but also solves the technical problem of "large cumulative error and low visual feature quality during long sequence image reconstruction".
[0052] This invention provides a target surface image reconstruction system based on edge feature stitching, applied to the aforementioned target surface image reconstruction method based on edge feature stitching, comprising: The image acquisition module is used to control the moving imaging component to acquire local sequence images of the target surface along a predetermined trajectory, and to perform distortion correction processing on the local sequence images based on the intrinsic parameter matrix of the moving imaging component to obtain the image sequence to be stitched together. The edge detection module is used to perform multi-scale edge detection on the image sequence to be stitched, extract edge pixels, and perform non-maximum suppression and double threshold filtering to generate an edge feature map. The initial registration module is used to identify continuous edge chain codes based on the edge feature map, extract structural feature descriptors, perform preliminary matching and remove mismatched items, and obtain the initial geometric transformation matrix; The fine optimization module is used to construct an edge topology constraint function based on the edge feature map, and to iteratively correct the initial geometric transformation matrix using the Levenberg-Marquardt algorithm to obtain a fine registration matrix. The grayscale correction module is used to construct a dynamic grayscale correction model and obtain a brightness-consistent image by adjusting the grayscale distribution of the image sequence to be stitched together. The fusion and reconstruction module is used to establish a global coordinate system and perform weighted convergence on overlapping area images using a multi-band fusion algorithm to obtain a complete high-resolution reconstructed image.
[0053] The image acquisition module includes a stepper motor control unit and a camera triggering unit. The stepper motor control unit is mechanically connected to the moving imaging component and is used to drive the moving imaging component to perform a displacement of a predetermined step length. The camera triggering unit is electrically connected to the moving imaging component and is used to trigger an image acquisition action at a predetermined position. The fine optimization module integrates a nonlinear least squares solver for performing iterative calculations.
[0054] The present invention has at least the following beneficial effects: 1. Compared with the prior art, the present invention has better technical effects in terms of geometric accuracy of image reconstruction.
[0055] According to experimental tests, this invention eliminates the influence of optical system geometric distortion on splicing accuracy by acquiring local sequence images and performing distortion correction.
[0056] 2. Compared with the prior art, the present invention has better technical effects in feature point extraction and other aspects.
[0057] According to experimental tests, this invention uses multi-scale edge detection to extract edge feature maps, replacing the traditional point feature extraction strategy that is prone to failure in low-texture areas, thereby improving the stability of feature extraction in specific industrial scenarios such as circuit boards and metal surfaces.
[0058] 3. Compared with the prior art, the present invention has better technical effects in terms of edge structure continuity, etc.
[0059] According to experimental tests, this invention constructs structural feature descriptors based on the geometric attributes of edge chain codes, and combines random sampling consensus algorithm with edge topology constraint function to achieve iterative optimization of geometric transformation matrix from coarse to fine, thus solving the problems of discontinuous edge structure and logical misalignment under low overlap rate or distortion conditions.
[0060] 4. Compared with the prior art, the present invention has better technical effects in terms of grayscale consistency under illumination fluctuations.
[0061] According to experimental tests, this invention eliminates grayscale deviations and stitching gaps caused by illumination fluctuations by constructing a dynamic grayscale correction model and combining it with a multi-band fusion algorithm, thus ensuring the grayscale consistency and physical structure continuity of the reconstructed image.
[0062] 5. Compared with the prior art, the present invention has better technical effects in terms of reconstruction accuracy.
[0063] According to experimental tests, the present invention significantly improves the geometric accuracy and visual quality of the target surface reconstructed image through the edge feature-driven registration and fusion mechanism, providing a reliable data foundation for subsequent high-precision defect detection and measurement. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of the method framework of the present invention; Figure 2 This is a schematic diagram of the process of the present invention; Figure 3 This is a system framework diagram of the present invention; Figure 4 This is a schematic diagram before image stitching. Figure 5 This is a schematic diagram of the image stitching process. Detailed Implementation
[0065] The following non-limiting embodiments are intended to enable those skilled in the art to gain a more comprehensive understanding of the present invention, but do not limit the invention in any way. The following content is merely an exemplary description of the scope of protection claimed by the present invention, and those skilled in the art can make various changes and modifications to the present invention based on the disclosed content, and such changes should also fall within the scope of protection claimed by the present invention.
[0066] The present invention will be further described below by way of specific embodiments. Unless otherwise specified, all instruments, devices, equipment, reagents, products, etc., used in the embodiments of the present invention are obtained through conventional commercial means.
[0067] Example 1 This embodiment provides a target surface image reconstruction method based on edge feature stitching, such as Figure 1 As shown, it includes: The moving imaging component is controlled to acquire local sequence images of the target surface along a predetermined trajectory, and distortion correction is performed on each local sequence image according to the intrinsic parameter matrix of the moving imaging component to obtain an image sequence to be stitched together. Multi-scale edge detection is performed on the image sequence to be stitched. A Gaussian scale space is constructed using Gaussian filters with different standard deviations. The gradient magnitude and edge direction of each pixel in the horizontal and vertical directions are obtained. Edge pixels are extracted and non-maximum suppression and double threshold screening are performed to generate an edge feature map. In the edge feature map, continuous edge chain codes are identified based on pixel neighborhood connectivity. Structural feature descriptors are extracted based on the length, curvature, and centroid coordinates of the edge chain codes. Preliminary matching is performed by obtaining the Euclidean distance between the structural feature descriptors of adjacent images. False matches are eliminated based on the random sampling consensus algorithm to obtain the initial geometric transformation matrix between adjacent images. Based on the edge feature map, an edge topological constraint function is constructed. The reprojection error of the edge pixels is used as the objective function. The initial geometric transformation matrix is iteratively corrected using the Levenberg-Marquardt algorithm to obtain a fine registration matrix. Gray-scale characteristic analysis is performed on the overlapping area, and a dynamic gray-scale correction model based on linear gain and offset is constructed. The gray-scale distribution of the image sequence to be stitched is adjusted according to the dynamic gray-scale correction model to obtain a brightness-consistent image. A global coordinate system is established based on the fine registration matrix. The brightness-consistent image is projected onto the global coordinate system. A multi-band fusion algorithm is used to perform Laplacian pyramid decomposition on the overlapping region image. Weights are obtained on each frequency sub-band based on the normalized distance of the pixel from the edge of the overlapping region, and weighted convergence is performed to obtain a complete high-resolution reconstructed image.
[0068] First, a stepper motor drives the moving imaging component to move along a serpentine trajectory above the target; the overlap rate parameter is set to 25% to 35% to acquire local raw images; the camera's intrinsic parameter matrix and distortion coefficient vector are obtained in advance using the Zhang Zhengyou calibration method to establish a pixel coordinate mapping table.
[0069] When performing distortion correction on a local original image, the pre-stored pixel coordinate mapping table is first called; if the displacement deviation fed back by the stepper motor exceeds 0.1 mm, dynamic calibration correction is initiated; circular reference markers are searched in the four corner regions of the image, and their sub-pixel-level center coordinates are extracted.
[0070] The pixel coordinate mapping table records the mapping relationship between the original coordinates of each pixel in the distorted state and the corresponding target coordinates in the undistorted state. This mapping relationship is typically pre-calculated based on radial distortion models, tangential distortion models, and camera calibration parameters. For example, for a pixel in the original image, the system can directly obtain its target position or backsampled position in the corrected image by looking up the mapping table, thereby avoiding repeated complex distortion calculations in real time and improving image correction efficiency. When a stepper motor displacement deviation exceeds a preset threshold, it indicates that the current imaging posture may have changed. The mapping relationship in the pixel coordinate mapping table is then further corrected online based on the dynamic calibration results to ensure the accuracy of subsequent image correction.
[0071] Calculate the residuals of the center coordinates relative to the theoretical mapping position; construct an intrinsic parameter compensation model, input the residual values into the Jacobian matrix, and solve for the radial distortion coefficients through linearization. , With tangential distortion coefficient , The correction increment; the updated distortion coefficients are rewritten into the pixel coordinate mapping table.
[0072] The theoretical position is not the pixel position in the actual captured image, but a reference coordinate calculated using a pre-established camera intrinsic model, calibration template geometric layout, or standard coordinate mapping. For example, when the reference feature is identified as a checkerboard corner point, a circular marker point, or an edge positioning marker, its two-dimensional projection coordinates in the ideal pinhole imaging model are used as the theoretical position. However, due to the influence of lens radial distortion, tangential distortion, installation offset, or optical imaging errors, the actual detected position will deviate from the theoretical position, thus forming the deviation vector, which is further used to correct the radial distortion coefficient and the tangential distortion coefficient.
[0073] Bilinear interpolation is performed on the original image to eliminate pincushion or barrel distortion caused by lens edges, resulting in the image sequence to be stitched together; when constructing the Gaussian scale space, a scale factor is set. The value ranges from 0.8 to 2.4; the horizontal and vertical gradients are calculated using the Sobel operator at each scale to obtain gradient magnitude maps.
[0074] The horizontal gradient magnitude and the vertical gradient magnitude are squared respectively, and the two squared values are summed and then squared to calculate the edge response intensity of the pixel. Calculate the ratio of the vertical gradient magnitude to the horizontal gradient magnitude, and perform an arctangent operation on the ratio to determine the edge direction corresponding to each pixel. For example, suppose the gradient magnitude of a certain pixel in the horizontal direction is... The gradient magnitude in the vertical direction is Then the edge response intensity of that pixel Calculated using the following formula: ; in This represents the square of the horizontal gradient magnitude. This represents the square of the vertical gradient magnitude. This indicates the edge response intensity of a pixel.
[0075] Pixel edge direction It is obtained by performing arctangent calculation on the ratio between the vertical gradient and the horizontal gradient. The calculation formula is as follows: ; in Indicates the edge direction angle. Represents the arctangent function. It represents the ratio of the directions of the vertical gradient to the horizontal gradient.
[0076] The gradient magnitude of the current pixel is compared with that of its neighboring pixels in the gradient direction, local maxima are retained and non-maxima are suppressed; edge points are filtered by setting dual thresholds, and the edge feature map is generated by connecting strong edge points with adjacent weak edge points.
[0077] For example, let the gradient magnitude of the current pixel be: ; Its gradient direction is: ; The gradient magnitudes of two adjacent pixels selected along the gradient direction are as follows: ; The nonmaximum suppression process can then be expressed as: ; in This is the gradient magnitude after non-maximum suppression. If the current pixel is a local maximum in the gradient direction, it is retained; otherwise, the pixel is suppressed to zero.
[0078] Further set high thresholds With low threshold And satisfy: ; The dual-threshold edge filtering process is then expressed as: ; Where Strong represents a strong edge point, Weak represents a weak edge point, and 0 represents a non-edge point.
[0079] Subsequently, a connectivity check is performed on the weak edge points. If the weak edge point and the strong edge point satisfy the neighborhood connectivity relationship: ; and: ; Then retain the weak edge point: ; otherwise: ; in Represents the neighborhood set of the current pixel. This represents the final generated edge feature map.
[0080] When extracting the edge chain code, an 8-neighborhood search algorithm is used to connect the edge pixels; the structural feature descriptor includes the chain code length, centroid coordinates, and principal orientation angle obtained based on principal component analysis; the L2 norm distance (i.e., Euclidean distance) between the descriptors of two adjacent frames is calculated.
[0081] The random sampling consensus algorithm is set to iterate 500 times. In each iteration, 4 pairs of feature points are selected to fit the homography matrix, and the number of interior points with reprojection residuals less than 1.5 pixels is counted. The homography matrix with the most interior points is selected as the initial geometric transformation matrix.
[0082] The “4 pairs of feature points” refers to four sets of one-to-one feature point matching relationships randomly selected from the candidate matching feature sets of the two images to be stitched together. Each set includes a feature point (or edge feature unit) in the first image and its corresponding matching feature point (or edge feature unit) in the second image.
[0083] A candidate matching feature set, or candidate matching pair, is a set of features that meet the matching conditions. These features are extracted from adjacent images, including edge chain code features, corner features, contour features, or structural descriptors. The corresponding relationships are then selected through feature distance measurement, correlation analysis, or neighborhood similarity calculation. These correspondences constitute a candidate matching pair. Since there may be mismatches during the initial matching process, these candidate matching pairs usually contain both correct and incorrect matching points. Subsequently, through random sampling consistency screening and homography matrix fitting, the mismatched points are eliminated and a stable initial geometric transformation matrix is obtained.
[0084] Specifically, let the coordinates of the feature points in the first image be: ; The coordinates of the corresponding feature points in the second image are as follows: ; The above four sets of correspondences are as follows: The coordinates of the feature points in the first image correspond one-to-one with the coordinates of the feature points in the second image, thus forming "4 pairs of feature points".
[0085] The reason for selecting four pairs of feature points is that a two-dimensional planar homography matrix typically contains eight degrees of freedom, and each pair of corresponding feature points provides two independent constraint equations. Therefore, at least four pairs of non-collinear feature point correspondences are required to solve for the homography matrix. During the iteration of the random sampling consensus algorithm, the system randomly selects four pairs of feature points for matrix fitting each time, and then counts the number of interior points through reprojection error to select the initial homography matrix that best matches the actual geometric transformation relationship.
[0086] When establishing edge topological constraints, extract edge segments with significant topological relationships and lengths greater than 20 pixels; construct an objective function, which is the sum of the products of the squares of the transformed point-line distances and the robust kernel function; perform iterations using the Levenberg-Marquardt algorithm, setting the convergence accuracy threshold to 10. -6The iteration terminates when the change in the iteration parameters is less than the threshold, and the fine registration matrix is output.
[0087] Significant topological relationships are characterized by the existence of common connection endpoints, fixed adjacency, continuous contour relationships, intersection relationships, enclosing relationships, or stable angular structures among multiple edge segments. For example, in the contours of a target surface, the edges of defects, texture transition areas, or structural connection areas, if three edge segments together form a "T-shaped," "Y-shaped," "L-shaped," or closed local contour structure, this type of edge relationship can be identified as having significant topological relationships due to its strong spatial stability and structural distinctiveness. Compared to isolated edge features, this type of topological structure is more robust to changes in viewpoint, grayscale fluctuations, and local occlusion during image stitching, and therefore can serve as an important constraint for establishing coarse alignment relationships between adjacent images.
[0088] Calculate the grayscale gain coefficient of the overlapping region With offset coefficient A mapping equation is established by least squares fitting, and the corrected pixel value is calculated as the product of the original pixel value and the gray level gain coefficient plus the offset coefficient; finally, the corrected pixel value is mapped back to the [0, 255] interval.
[0089] The image is decomposed using a Laplacian pyramid with four layers. Gaussian-weighted masks are applied to each layer for fusion, with the mask weights following a normal distribution based on the distance of each pixel from the center line of overlap. The reconstructed high-resolution image is then subjected to contrast-limited adaptive histogram equalization.
[0090] First, the Laplacian pyramid decomposition process is performed on the image to be fused after geometric registration and grayscale correction. The original image is decomposed into four layers of image components with different spatial frequencies. The lower layer mainly retains the overall brightness and low-frequency contour information of the image, while the higher layer retains the edge texture, defect details and local high-frequency features. Subsequently, Gaussian weighted masks are constructed in the overlapping areas of each layer to perform weighted fusion of pixel information from different images. The mask weights change dynamically according to the distance from the pixel to the center line of the image overlap, following a normal distribution. That is, pixels closer to the center line have higher fusion weights, while pixels farther from the center line have gradually reduced weights, thereby reducing brightness abrupt changes, texture breaks, and stitching marks at the splicing boundary. After completing the fusion of each frequency band, the system reconstructs the image layer by layer according to the hierarchical relationship of the Laplacian pyramid to obtain a high-resolution reconstructed image that combines high-frequency details with low-frequency continuity. Finally, to further improve the recognizability of local textures and the overall visual quality, contrast-limited adaptive histogram equalization is performed on the reconstructed image. This process suppresses excessive noise enhancement by limiting the amplification of local contrast and adaptively adjusts brightness and contrast according to the grayscale distribution of different regions, making the edge details, texture features, and minor defect areas of the target surface clearer and more stable.
[0091] Through the above scheme, the present invention can effectively capture the edge structure characteristics of the target surface, but the following points should be noted: 1. When performing distortion correction on a local original image, the pre-stored coordinate mapping table is first called; if the displacement deviation fed back by the stepper motor exceeds 0.1 mm, dynamic calibration correction is initiated; circular reference markers are searched in the four corner areas of the image, and their sub-pixel-level center coordinates are extracted.
[0092] Calculate the residuals of the center coordinates relative to the theoretical mapping position; construct an intrinsic parameter compensation model, input the residual values into the Jacobian matrix, and solve for the radial distortion coefficients through linearization. , With tangential distortion coefficient , The correction increment; the updated distortion coefficients are rewritten into the coordinate mapping table.
[0093] The image is resampled using the optimized mapping table; the brightness value of the new coordinate point is calculated using a cubic spline interpolation function, and edge brightness enhancement processing is performed; the geometric error of the corrected image sequence at the edge position is controlled within 0.2 pixels.
[0094] When generating the enhanced structural feature descriptor, the tangent direction of the edge pixels is first determined. A circular neighborhood with a diameter of 15 pixels is selected centered on this point and divided into 8 equal fan-shaped regions. Within each fan-shaped region, the gradient direction of all pixels is calculated and mapped to a discrete interval from 0 to 7.
[0095] 2. Construct a gradient orientation histogram, where the weight of each interval is the sum of the gradient magnitudes of the pixels within that interval. Concatenate the histograms of the eight regions sequentially to obtain a 64-dimensional statistical feature vector. Then, fuse this vector with the length of the edge chain code, the average curvature, and the centroid coordinates.
[0096] Perform on the fused feature vector Norm normalization is applied to make its modulus 1. During the matching phase, the Euclidean distance threshold is set to 0.6. If the ratio of the minimum distance to the second minimum distance is less than 0.8, the matching pair is retained.
[0097] 3. When constructing the edge topological constraint function, first extract the top 50 edge intersection points with the strongest responses from each of the two image frames. Using each intersection point as the core, extract the connected edge segments to form a set of triples. Calculate the length ratio vector of each triple in the set.
[0098] Using topological invariance features for fast matching, 10 high-confidence triplet pairs were initially selected. During the Levenberg-Marquardt iteration, the reprojection error weight of these triplet pairs was set to three times that of ordinary edge points. The rotation component of the homography matrix H was constrained to within ±5°.
[0099] During the iteration process, if the descent gradient of the objective function is less than 10... -8 If the error occurs, the calculation is terminated early. The output fine registration matrix undergoes global binding adjustment to ensure that the closed-loop error after multi-image stitching is minimized.
[0100] 4. When performing multi-band fusion, first obtain the finely registered overlapping region mask. Measure the pixel width of each row within the mask and take the average value as the decomposition parameter input. For regions with an average width of 64 pixels, perform a 4-layer Laplacian decomposition.
[0101] During the fusion process, a Gaussian smoothing operator is used to process the weight matrix, and the smoothing kernel size is set to be proportional to the current pyramid level. In the reconstruction stage, Laplacian enhancement is performed on the bottom-level residual image to improve global contrast.
[0102] The final reconstructed image undergoes contrast-limited adaptive histogram equalization (CLAHE) with a cropping factor of 0.01. The output is a complete high-resolution reconstructed image, with the peak signal-to-noise ratio (PSNR) at the stitching points increased to over 35 dB.
[0103] Example 2 This embodiment provides a target surface image reconstruction system based on edge feature stitching, such as Figure 3 As shown, it includes: The image acquisition module is used to control the moving imaging component to acquire local sequence images of the target surface along a predetermined trajectory, and to perform distortion correction processing on the local sequence images based on the intrinsic parameter matrix of the moving imaging component to obtain the image sequence to be stitched together. The edge detection module is used to perform multi-scale edge detection on the image sequence to be stitched, extract edge pixels, and perform non-maximum suppression and double threshold filtering to generate an edge feature map. The initial registration module is used to identify continuous edge chain codes based on the edge feature map, extract structural feature descriptors, perform preliminary matching and remove mismatched items, and obtain the initial geometric transformation matrix; The fine optimization module is used to construct an edge topology constraint function based on the edge feature map, and to iteratively correct the initial geometric transformation matrix using the Levenberg-Marquardt algorithm to obtain a fine registration matrix. The grayscale correction module is used to construct a dynamic grayscale correction model and obtain a brightness-consistent image by adjusting the grayscale distribution of the image sequence to be stitched together. The fusion and reconstruction module is used to establish a global coordinate system and perform weighted convergence on overlapping area images using a multi-band fusion algorithm to obtain a complete high-resolution reconstructed image.
[0104] The image acquisition module includes a stepper motor control unit and a camera triggering unit. The stepper motor control unit is mechanically connected to the moving imaging component and is used to drive the moving imaging component to perform a displacement of a predetermined step length. The camera triggering unit is electrically connected to the moving imaging component and is used to trigger an image acquisition action at a predetermined position. The fine optimization module integrates a nonlinear least squares solver for performing iterative calculations.
[0105] Specifically, the image acquisition module drives the imaging component to perform a predetermined step displacement through the stepper motor control unit, and uses the camera trigger unit to acquire images at predetermined coordinate points.
[0106] The edge detection module uses multi-scale Gaussian filtering and gradient operators to generate edge response maps, and extracts significant edge points through non-maximum suppression and double threshold screening.
[0107] The initial registration module constructs descriptors through chain code search and geometric attribute vectorization, and performs preliminary spatial mapping using distance matrix search.
[0108] The fine optimization module integrates a nonlinear least squares solver, which corrects the registration parameters by iteratively minimizing the point and line reprojection error.
[0109] The grayscale correction module establishes a linear grayscale mapping equation for overlapping areas to achieve dynamic balance of global brightness.
[0110] The fusion and reconstruction module performs spatial reprojection of the image and achieves smooth fusion of different frequency components through Laplacian pyramid decomposition.
[0111] This system achieves end-to-end processing from raw image acquisition to high-resolution image output through modular collaboration, ensuring the geometric consistency and physical structural continuity of the reconstructed image.
[0112] Example 3 This embodiment takes the surface defect detection of a precision printed circuit board (PCB) as an example and provides a target surface image reconstruction system based on edge feature stitching. The target surface to be detected is a PCB board containing fine lines and solder joints.
[0113] 1. During sequence image acquisition and dynamic correction, the image acquisition module controls a stepper motor to drive an industrial camera along a serpentine trajectory above the PCB. The industrial camera acquires local raw images at preset coordinate trigger positions and transmits the image data to the image acquisition module. The image acquisition module calls a pre-stored coordinate mapping table to calculate the radial and tangential distortion offset of each pixel in the local raw image. The image acquisition module uses a bilinear interpolation algorithm to resample the pixel coordinates, eliminate geometric distortion at the lens edges, and generate the image sequence to be stitched together.
[0114] 2. During multi-scale edge feature extraction, the edge detection module uses Gaussian kernel functions with different standard deviations to perform smoothing filtering on the image sequence to be stitched, constructing a Gaussian scale space. At each scale level, the edge detection module calculates the horizontal and vertical gradients of pixels using first-order partial derivative operators, and calculates the edge response intensity based on the square root of the sum of squared gradients. The edge detection module searches for local extrema along the gradient direction and suppresses non-maximum points, connecting strong and weak edge points using a dual-threshold discrimination criterion. The edge detection module outputs edge feature maps for each image to be stitched, which retain the pixel coordinates and orientation information of the PCB circuit outline and solder joint edges.
[0115] 3. During structural descriptor construction and initial registration, the initial registration module traverses connected pixels in the edge feature map to identify continuous edge chains. The initial registration module calculates the length, curvature distribution, and principal orientation angle of each edge chain, encapsulating these geometric attributes into a structural feature descriptor. The initial registration module calculates the Euclidean distance between the structural feature descriptors of adjacent images and extracts the feature pair with the smallest distance as the initial matching point. The initial registration module initiates a random sampling consensus algorithm, selecting four sets of feature points to calculate the homography matrix during the iteration process. The initial registration module counts the number of inliers with projection residuals less than a preset threshold and selects the homography matrix with the most inliers as the initial geometric transformation matrix.
[0116] 4. During edge topology optimization and fine registration, the fine optimization module extracts significant edge segments with lengths exceeding a preset value from the edge feature map and establishes topological correspondences between adjacent images. The fine optimization module constructs an objective function containing the vertical distance from edge points to target line segments and introduces a robust kernel function. The fine optimization module performs a Levenberg-Marquardt iterative operation, updating the rotation and translation parameters of the initial geometric transformation matrix in each iteration. The fine optimization module monitors the gradient change of the objective function and stops calculation when the gradient decrease is below a preset convergence threshold. The fine optimization module outputs a fine registration matrix, achieving physical alignment of edge structures between adjacent images.
[0117] 5. During dynamic grayscale correction and consistent reconstruction, the grayscale correction module identifies the overlapping regions of the images under the fine registration matrix mapping and extracts the set of synchronized pixels within the overlapping regions. The grayscale correction module calculates the average grayscale and variance of the reference image and the image to be corrected in the overlapping regions, and fits linear gain coefficients and offset coefficients. The grayscale correction module applies the linear mapping equation to all pixels of the image to be corrected, eliminating brightness deviations caused by illumination fluctuations. The fusion reconstruction module projects the brightness-consistent image onto the global coordinate system according to the fine registration matrix. The fusion reconstruction module performs Laplacian pyramid decomposition on the overlapping regions, applying Gaussian weights that vary with the centerline distance in each frequency sub-band. The fusion reconstruction module performs inverse transform reconstruction and outputs a complete high-resolution reconstructed image.
[0118] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0119] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0121] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0122] The above specific embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to examples, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for reconstructing a target surface image based on edge feature stitching, characterized in that, include: S100: Control the moving imaging component to acquire local sequence images of the target surface along a predetermined trajectory, and perform distortion correction on each local sequence image based on the intrinsic parameter matrix of the moving imaging component to obtain the image sequence to be stitched together. S200. Perform multi-scale edge detection on the image sequence to be stitched, construct a Gaussian scale space using Gaussian filters with different standard deviations, obtain the gradient magnitude and edge direction of each pixel in the horizontal and vertical directions, extract edge pixels and perform non-maximum suppression and double threshold screening to generate an edge feature map. S300: The edge feature map identifies continuous edge chain codes based on pixel neighborhood connectivity, extracts structural feature descriptors based on the length, curvature and centroid coordinates of the edge chain codes, performs preliminary matching by obtaining the Euclidean distance between the structural feature descriptors of adjacent images, and removes mismatches based on the random sampling consensus algorithm to obtain the initial geometric transformation matrix between adjacent images. S400. Construct an edge topology constraint function based on the edge feature map, take the reprojection error of the edge pixels as the objective function, and iteratively correct the initial geometric transformation matrix to obtain a fine registration matrix. S500. Perform grayscale characteristic analysis on the overlapping area, construct a dynamic grayscale correction model based on linear gain and offset, adjust the grayscale distribution of the image sequence to be stitched according to the dynamic grayscale correction model, and obtain a brightness-consistent image. S600. Establish a global coordinate system based on the fine registration matrix, project the brightness consistency image onto the global coordinate system, perform Laplacian pyramid decomposition on the overlapping region image using a multi-band fusion algorithm, obtain weights on each frequency sub-band based on the normalized distance of the pixel from the edge of the overlapping region, and perform weighted convergence to obtain a complete high-resolution reconstructed image.
2. The target surface image reconstruction method based on edge feature stitching according to claim 1, characterized in that, The obtained image sequence to be stitched includes: Set the step length and exposure parameters of the moving imaging component to acquire local raw images with an overlap rate of 25% to 35%; The radial and tangential distortion coefficients of the moving imaging component are obtained using a checkerboard calibration plate, and a coordinate mapping table is constructed. The pixel coordinates of the original local image are input into the coordinate mapping table, and the corrected pixel values are obtained through bilinear interpolation. The resulting image sequence is then output.
3. The target surface image reconstruction method based on edge feature stitching according to claim 2, characterized in that, It also includes dynamic calibration and correction of the image sequence to be stitched together: In the edge region of the image sequence to be stitched, a preset reference feature identifier is identified, and the deviation vector between the actual projection position and the theoretical position of the reference feature identifier in the image coordinate system is obtained. An intrinsic parameter compensation model is established based on the deviation vector, and the radial distortion coefficient and tangential distortion coefficient in the coordinate mapping table are corrected online to obtain an optimized coordinate mapping table. The local original image is input into the optimized coordinate mapping table, and the corrected pixel values are obtained through high-order spline interpolation.
4. The target surface image reconstruction method based on edge feature stitching according to claim 1, characterized in that, The range of values for the scale factor σ in the Gaussian scale space is a preset scale factor range. At each scale space, the gradient components of each pixel in the horizontal and vertical dimensions are extracted using the first-order partial derivative operator, namely the horizontal gradient magnitude and the vertical gradient magnitude. The edge response intensity of a pixel is obtained by taking the square root of the sum of the squares of the horizontal and vertical gradient magnitudes.
5. The target surface image reconstruction method based on edge feature stitching according to claim 1, characterized in that, The structural feature descriptor also includes statistical histogram features of edge gradients, and the extraction process of the statistical histogram features includes: A rotation-invariant local coordinate system is constructed in the neighborhood of the edge pixel, and the neighborhood is divided into several sub-regions; The gradient direction distribution of edge points within each sub-region is statistically analyzed to generate a local gradient direction histogram. The local gradient direction histogram and the geometric properties of the edge chain code are concatenated and fused, and then normalized to form an enhanced structural feature descriptor.
6. The target surface image reconstruction method based on edge feature stitching according to claim 5, characterized in that, Obtaining the initial geometric transformation matrix includes: A predetermined number of sample pairs are randomly selected from the candidate matching pairs. The homography matrix is fitted using the least squares method. The number of inliers with residuals less than a preset error threshold is counted. The homography matrix with the largest number of inliers is selected as the initial geometric transformation matrix.
7. The target surface image reconstruction method based on edge feature stitching according to claim 1, characterized in that, The edge topology constraint function is constructed in the following manner: In the edge feature maps of adjacent images, edge triples with significant topological relationships are extracted. The edge triples consist of three edge segments that have a common endpoint or a proximity relationship. Obtain the topological invariance features of the edge triples, wherein the topological invariance features include the line segment length ratio and the cosine value of the included angle; Based on the topological invariance feature, a coarse alignment relationship of triples is established between adjacent images, and this relationship is used as the initial search range constraint for the iterative optimization algorithm.
8. The target surface image reconstruction method based on edge feature stitching according to claim 1, characterized in that, The multi-band fusion algorithm includes: The number of Laplace pyramid decomposition layers is adaptively adjusted based on the local width of the overlapping region. When fusing sub-bands of different layers, an adaptive Gaussian weighting function is constructed based on the normal distance from the pixel to the center line of overlap. Bandpass filtering enhancement is performed on the fused sub-bands to compensate for contrast loss during the fusion process.
9. A target surface image reconstruction system based on edge feature stitching, characterized in that, The method for reconstructing a target surface image based on edge feature stitching as described in any one of claims 1 to 8 includes: The image acquisition module is configured to control the moving imaging component to acquire local sequence images of the target surface along a predetermined trajectory, and to perform distortion correction on each local sequence image according to the intrinsic parameter matrix of the moving imaging component to obtain an image sequence to be stitched together. The edge detection module is configured to perform multi-scale edge detection on each of the image sequences to be stitched, extract edge pixels at each scale and perform non-maximum suppression and double threshold filtering to generate edge feature maps. The initial registration module is configured to identify continuous edge chain codes and extract structural feature descriptors in the edge feature map, perform preliminary matching and remove mismatches, and obtain the initial geometric transformation matrix. The fine optimization module is configured to construct an edge topological constraint function based on the edge feature map, and use the Levenberg-Marquardt algorithm to iteratively correct the initial geometric transformation matrix to obtain a fine registration matrix. The grayscale correction module is configured to construct a dynamic grayscale correction model and adjust the grayscale distribution of the image sequence to be stitched together to obtain a brightness-consistent image. The fusion and reconstruction module is configured to establish a global coordinate system and use a multi-band fusion algorithm to perform weighted convergence on the overlapping area images to obtain a complete high-resolution reconstructed image.
10. The target surface image reconstruction system based on edge feature stitching according to claim 9, characterized in that: The image acquisition module includes a stepper motor control unit and a camera triggering unit. The stepper motor control unit is mechanically connected to the moving imaging component and is used to drive the moving imaging component to perform a displacement of a predetermined step length. The camera triggering unit is electrically connected to the moving imaging component and is used to trigger an image acquisition action at a predetermined position; The fine optimization module integrates a nonlinear least squares solver for performing iterative calculations.