A multi-camera high-precision calibration method based on image enhancement and deep learning and electronic equipment

By combining super-resolution image enhancement and sub-pixel corner detection with data augmentation and continuous learning, a calibration prediction neural network model was constructed, which solved the problem of insufficient calibration accuracy of multi-camera systems and achieved micron-level calibration accuracy over a large scale range.

CN118212304BActive Publication Date: 2026-11-27NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410406513.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-07
Publication Date
2026-11-27
Estimated Expiration
2044-04-07

AI Technical Summary

Technical Problem

In high-precision measurement of large-scale objects, existing technologies struggle to achieve micron-level calibration accuracy with multi-camera systems. Traditional methods suffer from high equipment costs, complex operations, and error accumulation, while deep learning methods exhibit catastrophic forgetting during training, resulting in insufficient calibration accuracy.

Method used

A high-precision calibration method for multi-camera systems based on image enhancement and deep learning is adopted. By super-resolution image enhancement and sub-pixel corner detection, combined with data augmentation and continuous learning, a calibration prediction neural network model is constructed to achieve high-precision calibration of multi-camera systems.

Benefits of technology

Achieving micrometer-level calibration accuracy in meter-level space ensures high precision of the vision measurement system and improves calibration accuracy over a large scale.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118212304B_ABST
    Figure CN118212304B_ABST
Patent Text Reader

Abstract

This invention discloses a high-precision multi-camera calibration method based on image enhancement and deep learning, comprising: acquiring original checkerboard images from different angles using a multi-camera group; controlling the vertical movement distance of the multi-camera group to obtain the world coordinates of the checkerboard corner points; performing super-resolution processing on the original checkerboard images based on a non-blind super-resolution model; detecting checkerboard corner points in the images using a sub-pixel level corner detection algorithm; filtering out error corner points from the normalized corner points and normalizing them; performing data augmentation through interpolation; and constructing and training a calibration prediction neural network model to obtain a target calibration prediction neural network model. Furthermore, an electronic device for implementing the above method is also provided. This invention solves the problem of difficulty in guaranteeing accuracy and large-scale accuracy in multi-camera calibration using a checkerboard calibration board, greatly improving calibration accuracy at large scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual measurement technology, and in particular to a high-precision multi-camera calibration method and electronic device based on image enhancement and deep learning. Background Technology

[0002] Visual measurement technology utilizes images as a means or carrier for detecting and transmitting information, extracting useful signals from images and obtaining the required physical quantity information by processing the measured image. Taking the measurement of geometric quantities as an example, current visual measurement systems are divided into monocular visual measurement, binocular visual measurement, and multi-view visual measurement. The specific imaging system's measurement field of view, accuracy requirements, and measurement principle are determined based on the contour, position, size, surface defects, and morphological changes of different target objects.

[0003] For high-precision measurements of large-scale objects, the accuracy of camera calibration directly affects the measurement accuracy. Measurements of meter-level high-precision workpieces typically require micrometer-level accuracy. Traditional camera calibration uses a checkerboard calibration board to extract corner points and calibrates the camera by calculating its intrinsic and extrinsic parameters. While using a checkerboard calibration board is convenient, its accuracy is typically sub-millimeter, posing a challenge for high-precision camera calibration. Furthermore, to eliminate the influence of camera distortion on calibration, telecentric lenses are used, but this reduces the camera's field of view, making it even more difficult to balance calibration accuracy with the requirements of large-scale measurements.

[0004] Currently, there are also methods using coordinate measuring machines (CMMs) for auxiliary camera calibration. Compared to the checkerboard calibration method, this method achieves micron-level calibration accuracy. However, due to the high cost of the equipment and the complexity of operation, it has not become the mainstream calibration method. In large-scale visual measurement methods, the collaborative calibration of multiple cameras has solved the measurement problem of large workpieces to some extent. The camera is calibrated by calculating the camera's intrinsic and extrinsic parameters, and then the object's size is quickly measured by image stitching of overlapping areas. However, due to the high complexity of the system, the accumulation of errors during multi-camera calibration and image stitching makes it difficult to achieve the required calibration accuracy.

[0005] Deep learning has shown promise in large-scale applications, particularly for the collaborative calibration of multi-camera models. By fitting the corner pixel coordinates of a checkerboard pattern acquired from different cameras with their corresponding world coordinates using neural networks, millimeter-level camera calibration has been achieved within a meter-level spatial range. However, the accuracy still falls short of measurement requirements. In neural network calibration methods, limitations in the accuracy and quantity of extracted corner pixel coordinates during training, coupled with the catastrophic forgetting problem inherent in neural networks during large-scale data training, prevent predictive model accuracy from reaching the micrometer level. Summary of the Invention

[0006] To overcome the shortcomings of the prior art, this invention provides a high-precision calibration method and electronic device for multiple cameras. Based on super-resolution enhanced images and deep learning technology, it solves the problem of difficulty in guaranteeing accuracy and large-scale accuracy in the multi-camera calibration process using a checkerboard calibration board, and greatly improves the calibration accuracy in a large-scale range.

[0007] A high-precision calibration method for multiple cameras based on image enhancement and deep learning is characterized by performing high-precision calibration of a multi-camera group based on a target calibration prediction neural network model, wherein the target calibration prediction neural network model is obtained through the following steps:

[0008] Step 1: Acquire original chessboard images from different angles using a multi-camera group, control the vertical movement distance of the multi-camera group, and obtain the world coordinates (x, y, z) of the chessboard corner points in the original chessboard images; the chessboard is a pre-made square chessboard.

[0009] Step 2: Perform super-resolution processing on the original chessboard image based on a non-blind super-resolution model to obtain a chessboard image with a preset multiple of the original resolution;

[0010] Step 3: Use a sub-pixel level corner detection algorithm to detect the corner points of the checkerboard in the super-resolution processed checkerboard image, extract and save the pixel coordinates of the corner points to the super-resolution point cloud file;

[0011] Step 4: Filter out the corner points that belong to the error points in the chessboard image, standardize the pixel coordinates of the error points and rewrite them into the point cloud file;

[0012] Step 5: Perform interpolation on the normalized pixel coordinates to augment the data, and then map the augmented data from the super-resolution space back to the resolution space of the original checkerboard image to calculate the world coordinates corresponding to the interpolated pixel coordinates.

[0013] Step 6: Construct a calibration prediction neural network model. The pixel coordinates of the corner points extracted in Step 3 and the pixel coordinates of the augmented data obtained in Step 5 are used as the input of the calibration prediction neural network model. The world coordinates (x, y, z) of the corner points in the original chessboard image obtained in Step 1 and the world coordinates corresponding to the augmented data obtained in Step 5 are used as the output of the calibration prediction neural network model. The calibration prediction neural network model is trained using a multilayer perceptron network structure and a continuous learning method to obtain the target calibration prediction neural network model.

[0014] Compared with existing technologies, this invention achieves high-precision calibration of multi-camera systems with a large field of view by combining deep learning with super-resolution image enhancement and data augmentation. It can achieve micrometer-level calibration accuracy in meter-level space, ensuring the accuracy of the visual measurement system. Attached Figure Description

[0015] Figure 1 A flowchart of a multi-camera high-precision calibration method;

[0016] Figure 2 This is a schematic diagram of a multi-camera group acquisition method;

[0017] Figure 3 This is a schematic diagram of the acquisition process for a multi-camera group.

[0018] Figure 4 Here is a framework diagram of the super-resolution BasicVSR network model;

[0019] Figure 5 A diagram illustrating the principle of symmetry between the corner points of a chessboard.

[0020] Figure 6 A schematic diagram of the coordinates of the midpoint of the chessboard grid.

[0021] Figure 7 A schematic diagram of world coordinate calculation after chessboard interpolation;

[0022] Figure 8 A schematic diagram of the calibration prediction neural network model structure;

[0023] Figure 9 For comparison and evaluation of model results in application examples;

[0024] Figure 10 This is a graph showing the error distribution along the X direction of the model's Z-axis variation in an application example.

[0025] Figure 11 This is a graph showing the error distribution along the Y direction of the model's Z-axis variation in an application example.

[0026] Figure 12 This is an error distribution diagram showing the Z-axis variation of the model along the Z-direction in an application example. Detailed Implementation

[0027] To facilitate understanding by those skilled in the art, the present invention will be further explained and described below with reference to embodiments and accompanying drawings. The content mentioned in the embodiments is not intended to limit the present invention.

[0028] This invention first constructs a prototype vision measurement system, considering both hardware system design and software development. The hardware system design includes a hardware framework, a multi-camera group, an illumination compensation module, and a motion control module. In terms of hardware system design, the overlapping areas of the fields of view of each camera in the multi-camera group cover the calibration space. The motion control module is mainly used to control the vertical movement of the multi-camera group to achieve three-dimensional spatial calibration. The illumination compensation module is mainly used to prevent calibration accuracy loss due to shadow occlusion. To meet the meter-level measurement requirements, a space large enough to accommodate the object needs to be constructed, while reserving a small amount of buffer space on top of the actual required measurement space. The frame material for the space is typically European standard 4040W aluminum profile commonly used in industry, including fasteners and slide rails required for motion control.

[0029] The software development mainly includes an image acquisition module, which is mainly used to automatically control the up and down movement of the multi-view camera group and prepare a three-dimensional spatial point cloud; an image processing module, which is mainly used to perform super-resolution processing on the acquired calibration board image to obtain the sub-pixel coordinates of the checkerboard corner points; and a camera calibration module, which is mainly used to calibrate the multi-view camera system and obtain a mapping model between image pixel coordinates and three-dimensional world coordinates through fully connected neural network training.

[0030] Understandably, the world coordinates of the checkerboard corner points describe their precise locations in the real world, typically defined by actual physical dimensions (e.g., millimeters), depending on the design and layout of the checkerboard itself. For example, if a checkerboard cell is 20 millimeters in size, the world coordinates of two adjacent corner points will differ by 20 millimeters in the corresponding dimension. During camera calibration, one corner point of the checkerboard can be chosen as the origin (0,0,0), and the world coordinates of the remaining corner points can be calculated based on this. Simultaneously, when the checkerboard is captured by a camera, these corner points will appear in the resulting image with specific pixel coordinates, usually with the top-left corner of the image as the origin. Image processing algorithms can precisely determine the two-dimensional position (x,y) of each corner point on the image plane. By associating the world coordinates of each corner point with their pixel coordinates on the image and establishing a mapping relationship, this mapping relationship constitutes the camera calibration model.

[0031] Combination Figure 1 As shown, this invention discloses a high-precision multi-camera calibration method based on image enhancement and deep learning, which can be implemented based on the aforementioned visual measurement system, and mainly includes the following steps:

[0032] Step 1: Create a chessboard of the appropriate size according to the spatial range to be marked. Use a multi-camera group to acquire original chessboard images from different angles. Use a motion control module to control the vertical movement distance of the multi-camera group to obtain the world coordinates (x, y, z) of each corner point of the chessboard in the original chessboard image.

[0033] Typically, a chessboard of appropriate size is made according to the required spatial range. This invention uses a square chessboard as the calibration chessboard. The world coordinates (x, y) of each corner point can be calculated based on the geometric shape and physical size of the chessboard.

[0034] Based on a pre-printed calibration checkerboard pattern and the known size and number of corner points, a motion control module controls the vertical movement (i.e., longitudinal displacement z-axis coordinate) of a multi-camera group to acquire original checkerboard images from different angles, obtaining the world coordinates (x, y, z) of each corner point in the original checkerboard image. Since the checkerboard corner point detection is typically performed from left to right and from top to bottom, the first corner point, i.e., the first corner point in the upper left corner of the checkerboard image, is designated as the origin (0, 0, 0).

[0035] A multi-camera setup consists of multiple industrial cameras, which can acquire raw checkerboard images from different angles. Image acquisition methods include... Figure 2 As shown, based on the requirements of measurement range, measurement accuracy, and material cost, eight 4608×3456 resolution industrial cameras can be selected, using the GenICam international standard interface, paired with a large depth-of-field lens with distortion <0.3% and a focal length of 5mm. In software development, camera control utilizes the Aravis camera control library. Aravis provides a set of tools and library functions for controlling and acquiring images. Aravis can control GenICam standard industrial cameras, including detecting networked devices, initializing the camera, and controlling image data streams, achieving camera shooting control and data stream transmission via Gigabit Ethernet protocol. This step can be implemented through the image acquisition module in the aforementioned visual measurement, and its workflow is shown in Figure 3: First, the relevant Aravis interface is called to initialize the camera and set parameters such as camera exposure, gain, and trigger mode. XML-RPC is used to listen for requests from the client, controlling the slider to move the multi-camera group to capture images, and returning the captured original checkerboard image to the client. Simultaneously, the script names the images according to the camera number and the number of times the camera moved vertically, such as 3_11.png, which represents the original checkerboard image captured by camera number 3 on its 11th movement. This naming convention standardizes the order in which pixel coordinates are used to form the point cloud in subsequent corner extraction work.

[0036] Step 2: Based on a non-blind super-resolution model, perform super-resolution processing on the original checkerboard images from different angles acquired by the multi-camera group to obtain checkerboard images with 4 times the original resolution.

[0037] Among them, the non-blind super-resolution model is trained by using high-resolution images and corresponding low-resolution images in the VideoLQ dataset to learn the relationship and features between high and low resolution images at the pixel level, so as to accurately predict high-resolution images based on input low-resolution images.

[0038] like Figure 4 As shown, the image processing module in this embodiment of the invention includes an image cleaning module and a super-resolution module. BasicVSR is used as the basic network architecture for the super-resolution module because it has good performance in non-blind super-resolution processing and has a simple architecture. Specifically, the super-resolution module stores a pre-trained non-blind super-resolution model, which uses the BasicVSR network structure and is therefore also called the "Super-Resolution BasicVSR Network Model," or simply "BasicVSR Network."

[0039] The original checkerboard images acquired by the multi-camera group are sent to the image processing module. In the image processing module, the images in the image sequence are first degraded sequentially by the image cleaning module. The cleaned image sequence is then passed to the BasicVSR network of the super-resolution module. Understandably, the image cleaning module uses an independent cleaning method, which can optimize for the specific degradation of each image without considering the uniform processing of the entire sequence.

[0040] The training process of the super-resolution BasicVSR network model includes: training the initially constructed BasicVSR network using the VideoLQ dataset, which contains consecutive image sequences with different content and resolutions. Specifically, during forward propagation, each frame of the image passes through the BasicVSR network, reconstructing high-resolution details by learning a series of mapping relationships between low-resolution (LR) and high-resolution (HR) images. Internally, the network extracts features from the input low-resolution image using a convolutional neural network. These features then undergo a series of processing steps within the network, including optical flow estimation and feature alignment, to ensure information consistency between different frames in the sequence. Through this feature processing, the network can reconstruct a clear high-resolution image. During the backpropagation process of model training, the network calculates the loss based on the difference between the model output and the real high-resolution image, and then updates the model parameters using optimization algorithms such as gradient descent. This process involves bidirectional propagation along the time axis. Unlike traditional unidirectional propagation, the backward propagation of the BasicVSR network considers both the impact of future frames on the current frame (forward information) and the impact of the current frame on future frames (backward information) in the time series. This means that the network can use information from previous and subsequent frames in the sequence to optimize the super-resolution reconstruction of the current frame.

[0041] Formula (1) shows the image cleaning process in the image cleaning module, where xi represents the i-th image of the input sequence. This is the output of the image cleaning module applied to xi.

[0042]

[0043] In the formula, C represents the image cleaning module.

[0044] Formula (2) represents the image super-resolution process in the super-resolution module, where {yi} is the image sequence applied after cleaning. The output sequence of the BasicVSR network.

[0045]

[0046] In the formula, S represents the Basic VSR network, and y i This represents the image output by the BasicVSR network.

[0047] Furthermore, to ensure that artifacts and noise in the input image are removed as much as possible during the image cleaning process, while ensuring that image details are not lost, this invention also uses low-resolution constraints. Based on the cleaned image... Compared with the original checkerboard image z processed by the downsampling operator d iThe perceptual loss L is calculated from the pixel difference between them. clean And minimize the perceptual loss L clean Perceived loss L clean The calculation formula is as follows:

[0048]

[0049] In the formula, ρ represents the Charbonnier loss function, z i This represents the original chessboard image.

[0050] Charbonnier loss is a commonly used image loss function used to measure the degree of difference between two images. By minimizing the perceptual loss to guide the cleaning process, the image cleaning module can restore as much detail and content as possible from the high-resolution image, thereby improving the quality of subsequent image super-resolution.

[0051] In addition to using perceptual loss to guide the image cleaning module, adversarial loss also guides the cleaning process. Adversarial loss compares the differences between the cleaned image (generated by the BasicVSR network) and the original checkerboard image without downsampling, guiding the cleaning process by minimizing these differences. Adversarial loss L... out The calculation formula is as follows:

[0052]

[0053] Understandably, this embodiment of the invention uses two additional loss functions, namely perceptual loss and adversarial loss, to fine-tune the image cleaning process. The perceptual loss measures the performance of the image cleaning module by comparing the cleaned image with the downsampled high-resolution image, i.e., formula (3). The adversarial loss, during network training, distinguishes the difference between the cleaned image processed by the super-resolution BasicVSR network and the original high-resolution image, thereby prompting the image cleaning module to generate a more realistic image, i.e., formula (4). During fine-tuning, the image cleaning module guides the cleaning process using perceptual loss and adversarial loss, preventing the image from over-adjusting its texture and details during denoising and de-degradation, thus losing some important characteristics of the original image.

[0054] Over-degradation is a phenomenon in which the quality of the generated image decreases due to model imperfections or other factors during image super-resolution reconstruction. Furthermore, to avoid over-degradation, this embodiment of the invention introduces a dynamic cleaning scheme, which involves iteratively applying the image cleaning module to further eliminate degradation in the image. This dynamic thinning scheme can determine whether cleaning needs to continue based on the mean absolute difference between consecutively cleaned images, thereby avoiding overly smoothed and unnaturally flat regions. Equation (5) describes the iterative process of applying the image cleaning module to previously cleaned images until the mean absolute difference between consecutively cleaned images exceeds a threshold θ, at which point cleaning stops.

[0055]

[0056] In this invention, the image cleaning module is based on a stack of residual blocks, a simple and effective method. The image cleaning module is guided by perceptual loss and adversarial loss, while a dynamic thinning scheme is used to further eliminate degradation issues. The cleaned image is processed by a BasicVSR network to obtain a checkerboard image with four times the resolution of the original checkerboard image.

[0057] Step 3: Use a sub-pixel corner detection algorithm to detect corners in the super-resolution checkerboard image, extract and save the pixel coordinates of the corners to the super-resolution point cloud file.

[0058] First, the super-resolution checkerboard image is converted to grayscale, simplifying image processing. Then, a Laplacian transform is applied to the grayscale image to enhance edges and details. Next, a sub-pixel corner detection algorithm is used to detect corners, extracting and saving their pixel coordinates to a point cloud file. If no corners are detected, the image is normalized separately, and the number of iterations for corner detection is increased. If corners are detected, the extracted checkerboard corner pixel coordinates are written to the point cloud file.

[0059] The specific process for step three is as follows:

[0060] S31. Grayscale Image Conversion: Converts the input super-resolution image into a grayscale image, that is, merges the RGB channels of the color image into one channel.

[0061] S32. Oversampled grayscale image: The grayscale image is processed by Laplacian transform to enhance the details of the image edges; then, the resolution of the grayscale image is doubled by the bilinear interpolation algorithm built into OpenCV to improve the image details and anti-aliasing effect.

[0062] S33. Use a sub-pixel level corner detection algorithm to detect checkerboard corners:

[0063] In this embodiment of the invention, the corner detection employs a sub-pixel level corner detection algorithm, the principle of which is as follows: Figure 5 As shown, the calculation is performed using the symmetry of the chessboard corner points. Figure 5 The point with the largest absolute value of the difference between the pixel sum and the inner diameter of the dashed circle is the corner point. It's understandable that an image is composed of pixels, and the color of each pixel corresponds to a pixel value. Because the checkerboard pattern is black and white, pure white has a pixel value of 255, and pure black has a pixel value of 0. Therefore, the pixel sum along the inner diameter of the circle is significant. Furthermore, rotating the image 90 degrees does not change the relative relationships of the checkerboard grid, allowing for rapid corner point location. The sub-pixel level corner detection algorithm mainly includes the following sub-steps:

[0064] A1. Rotating the grayscale image: using f in formula (6) rot [x,y,α] rotates the oversampled image around its center point by angles 0 and π / 4. For example... Figure 5 Based on the symmetry of the chessboard, rotations of 0 and π / 4 can cover all angles of the chessboard edges, such as 0, π / 4, π / 2, 3π / 4, and π.

[0065] f rot [x,y,α]=f[xcos(α)―ysin(α),xsin(α)+ycos(α)] (6)

[0066] A2. Blur the rotated image: using f in formula (7) blur The [x, y] region is used to perform a convolution operation on the rotated image. A box filter matching the window size around the corner points is then used to blur the rotated checkerboard image, resulting in a blurred image in discrete directions. Specifically, blurring is performed on the images after rotations of 0 and π / 4 respectively. Due to the checkerboard's symmetry, the checkerboard corner image in the [0, π) region can cover all angles of the checkerboard edges. To increase computational efficiency, pixels at the angle interval [0, π) are selected to calculate the difference between the sum of pixels representing the inner diameter of the circle.

[0067]

[0068] A3. Reverse Rotation Blur Image: Rotates the blurred image back to its original direction.

[0069] A4. Calculate the response value of the image after reverse rotation: using f in formulas (8) and (9) r [x,y,α]、f c [x,y] is the image rotated back to its original orientation. The response values ​​of the corner points in the image are calculated, and the response values ​​of each corner point are merged to obtain the fuzzy response map.

[0070]

[0071]

[0072] Specifically, through f r The [x,y,α] box filter convolution operation is performed on the rotated image to obtain a local Radon transform result; through f c [x,y]Calculate the difference between the maximum and minimum values ​​of the local Radon transform results to obtain the response values ​​of the corner points; finally, merge the response values ​​of each corner point to obtain the fuzzy result response map.

[0073] A5. Fuzzy Processing of the Result Response Map: The purpose of fuzzy processing of the result response map is to reduce discretization errors. When detecting corner points, the local Radon transform is calculated based on discrete angles, which introduces certain discretization errors. To reduce these errors, a k×k box filter is used to fuzz the result response map. This smooths out noise in the response map and reduces discretization errors, thereby improving the detection accuracy of corner points.

[0074] A6. Corner Location: Corner points are located by searching for local maxima in the fuzzy response map. Typically, a corner point has multiple response values ​​within a certain area. The coordinates of the maximum values ​​are considered the corner point coordinates, while the remaining non-maximum values ​​are called weak corner points.

[0075] A7. Filter out weak corners: Use thresholding and non-maximum suppression to filter out weak corners.

[0076] S34. Sort the corner points detected by the sub-pixel corner detection method according to the camera number and corner point position, and then write them into the super-resolution point cloud file.

[0077] After sub-pixel level corner detection, the data is sorted according to camera number and corner position in the image to ensure logical consistency and ease of subsequent processing. Specifically, in the super-resolution point cloud file, the total number of cameras is predefined, and then arranged sequentially according to camera number. The corner data for each camera is recorded in the format x0, y0, x1, y1..., where x and y represent the pixel coordinates of the corner in the image. Furthermore, the corner data in the file is sorted first by camera number, and then by the corner position in the image from left to right and top to bottom. This method facilitates rapid retrieval and processing of corner data.

[0078] Step 4: Filter out the corner points that are error points in the checkerboard image, standardize the pixel coordinates of the error points, and rewrite them into the point cloud file.

[0079] Based on the geometry of the checkerboard, the angle between the vectors formed by a central corner point and its adjacent corner points should be 90 degrees. Checkerboard corner points in the point cloud whose vector angle deviation from the adjacent corner points is greater than 2° are filtered and marked as error points. The normalized pixel coordinates are calculated by the geometric relationship between the four corner points adjacent to the error point, and the normalized pixel coordinates are rewritten into the point cloud file.

[0080] Specifically, based on the image number, the corner pixel coordinates in the point cloud file are screened, and the angle between the vectors formed by non-edge adjacent corner points (i.e., pixel coordinates) is calculated. For example, the vector formed by a corner point at a certain center position and the corner points in its adjacent directions... and Calculate the vector using the cosine of the included angle. and The angle between them is calculated using the following formula:

[0081]

[0082] In the formula, angle represents the angle between a central corner point and the vector formed by the pairwise vectors of adjacent directional corner points.

[0083] Based on the geometric shape of the checkerboard, the angle between the vectors formed by a central corner point and its adjacent corner points should be 90 degrees. Therefore, checkerboard corner points in the point cloud whose angles deviate from 90 degrees by more than 2° can be screened and marked to obtain error points O(x,y). The normalized pixel coordinates are then calculated using the geometric relationship between the four corner points adjacent to the error point, as shown in formula (11). The normalized corner pixel coordinates O Corrected Replace the original pixel coordinates O(x,y) with (x,y) and rewrite them into the point cloud file.

[0084]

[0085] In the formula, (x j-1 ,y j-1 ), (x j+1 ,y j+1 ), (x i-1,j ,y i-1,j ), (x i+1,j ,y i+1,j ) are the pixel coordinates of the four corner points adjacent to the error point.

[0086] Step 5: Perform interpolation on the normalized pixel coordinates to augment the data. Then, map the interpolated point cloud data (i.e., augmented data) back from the super-resolution space to the resolution space of the original chessboard image. Calculate the geometric midpoint of each cell and the linear midpoint of each cell's edge to obtain the world coordinates corresponding to the interpolated pixel coordinates.

[0087] Real corner data can provide more samples and information, helping neural networks learn and generalize better. Specifically, the more numerous and denser the calibration points in the calibration board, the higher the spatial localization accuracy of the neural network. By creating a calibration board with denser calibration points, the spatial information density can be increased, resulting in a better multi-view visual spatial localization model and improving the overall accuracy of the measurement system. However, as the density and number of calibration points increase, the difficulty of extracting the pixel coordinates of the calibration points also increases. Therefore, this invention proposes a data augmentation method based on linear interpolation and geometric midpoint interpolation.

[0088] Among them, linear interpolation involves taking the linear midpoint between the coordinates of adjacent pixels (x1, y1) and (x2, y2). Although the linear midpoint differs slightly from the actual midpoint due to perspective, they can be considered to correspond because of the high density of coordinate points. Furthermore, the pixel coordinates in point cloud data are the sum of pixel coordinates in each image; therefore, there may be cases where coordinates are adjacent but their actual physical locations are not, meaning they do not belong to the same image. An index is created based on the number of corner points (i.e., the number of pixel coordinates) in each checkerboard image. Then, in the point cloud, the linear midpoint values ​​of two points that are not physically adjacent are removed based on this index.

[0089] For geometric midpoint interpolation Figure 6 The image shows the positions of four adjacent corner points on the actual calibration board, forming a square ABCD. The corner point of the line connecting AC and BD is the center point of the square, and point O is the midpoint of AC and BD. When viewed from a higher position on the right, the shape of ABCD becomes a trapezoid, and point O is no longer the midpoint of AC and BD, but it is still the intersection of the lines connecting AC and BD. Based on this principle, after obtaining the pixel coordinates of the four corner points of ABCD in the image, the pixel coordinates of the center point O can be obtained by finding the intersection of the lines. Correspondingly, the world coordinates of point O are also the world coordinates of the midpoint of the square ABCD.

[0090] The augmented pixel coordinates, after geometric midpoint interpolation and linear interpolation, are mapped back from the super-resolution space to the original checkerboard image resolution space based on the resolution ratio between the super-resolution image and the original checkerboard image. In essence, data augmentation involves performing midpoint interpolation and linear interpolation on the checkerboard grid in the image to obtain augmented pixel coordinates. These augmented pixel coordinates also need to have corresponding world coordinates created and fed into the neural network for training. Figure 7 As shown, based on the geometric characteristics of the created chessboard grid, the geometric midpoint of each grid and the linear midpoint of each grid edge are calculated. The world coordinates of these points are the world coordinates corresponding to the pixel coordinates after interpolation.

[0091] Step Six: Construct a calibration prediction neural network model. Use the normalized corner pixel coordinates obtained in Step Four and the pixel coordinates of the augmented data obtained in Step Five as the input to the initially constructed calibration prediction neural network model. Use the world coordinates (x, y, z) of the corner points in the original checkerboard image obtained in Step One and the world coordinates corresponding to the pixel coordinates of the augmented data obtained in Step Five as the output of the calibration prediction neural network model. Train the model using a multilayer perceptron network structure and a continuous learning method to obtain a neural network model for multi-camera calibration, namely the target calibration prediction neural network model.

[0092] In this context, the normalized corner pixel coordinates obtained in step four and the pixel coordinates of the augmented data obtained in step five are 2n-dimensional input data, while the world coordinates (x, y, z) of the checkerboard corner points obtained in step one and the world coordinates corresponding to the pixel coordinates of the augmented data obtained in step five are 3-dimensional output data, where n is the number of cameras.

[0093] The calibration and prediction neural network model is built based on the TensorFlow framework, including libraries such as NumPy, Pandas, Matplotlib, and Scikit-learn. The `load_data()` function is defined to load and preprocess data; it reads data from a point cloud file and divides it into training, validation, and test sets, typically in an 8:1:1 ratio. The `build_network()` function is defined to build the neural network model, with the network structure as follows: Figure 8 As shown. The number of multilayer perceptrons (MLPs) is set according to the amount of point cloud data. Each MLP contains fully connected layers and ReLU activation functions, with the last layer being a linear output layer that outputs the prediction result. L1 norm regularization is added to each layer. The model is compiled using the Adam optimizer and the Mean Absolute Error (MAE) loss function. The `cosine_annealing_lr()` function is defined as the cosine annealing scheduler for the learning rate. The learning rate is calculated based on the current training epochs and the maximum epoch count.

[0094] This invention employs a continuous learning training method, for example, scenario reenactment. The scenario reenactment-based training method stores a subset of previously seen data or the important gradient space from previous tasks in a memory buffer. The scenario reenactment training process is divided into multiple iterations. Each iteration uses entirely new data Lnew and all data from the previous iteration Lold as input training data. The learning of new and old knowledge is balanced by controlling the weight λ, as shown in formula (12):

[0095] L=Lnew+λLold (12)

[0096] Iterative training through scenario reproduction can help models gradually learn more complex patterns and features.

[0097] During model training, loss refers to the difference between the model's prediction and the true label. A loss function is typically used to measure this difference; in this example, mean absolute error (MAO) is chosen. This loss function guides the training process by calculating the mean absolute error between the predicted world coordinates obtained from the input corner pixel coordinates and the real-world coordinates. During training, the change in loss is observed, aiming to obtain the lowest loss value on the validation set to select the model with the best performance. Therefore, within a specified number of rounds, the model with the lowest loss on the validation set is selected as the optimal model. Based on the target calibration prediction neural network model, high-precision, large-field-of-view calibration of multi-camera systems can be achieved.

[0098] Specifically, the pixel coordinates of the test set are used to divide the input data. The optimal network model then predicts the world coordinates. The mean absolute error between these predicted and real-world coordinates, as well as the mean absolute error along the X, Y, and Z directions, is calculated to evaluate the model's prediction accuracy. The mean absolute error between the neural network-predicted world coordinates and the real-world coordinates is used as the calibration accuracy; the smaller the mean absolute error, the higher the calibration accuracy.

[0099] The target calibration prediction neural network model obtained above can achieve high-precision calibration of multi-camera groups.

[0100] The technical effects achievable by this invention will be further illustrated below with an application example.

[0101] The embodiment designs an eight-lens camera system, such as Figure 2 The calibration used a 200x323 grid with sides of 3.81mm. A calibration space of 758.19mm x 1226.82mm x 32mm was selected, and 128 images were captured by an eight-camera system, with 16 images from each camera. The equipment used was an 8x16MP industrial camera from Medvision MV-GE1600C-T, equipped with a ZLKC FM2518MP5 large depth-of-field lens with distortion <0.3% and a focal length of 5mm.

[0102] Eight cameras were used to capture images every 2mm along the z-axis, moving a total of 15 times along the z-axis to create a 30mm calibration space. The original image resolution was 4608x3456, which was increased to 18432x13824 after 4x super-resolution processing. A total of 8,268,800 corner points were obtained in the original data. Midpoint interpolation yielded 8,201,976 corner points, and linear interpolation yielded 16,419,104 corner points. No offset points were found. The point cloud in the super-resolution space was then mapped back to the original space to obtain the point cloud data.

[0103] The following are the network training parameter settings based on the TensorFlow framework:

[0104] The training, validation, and test sets were configured with a ratio of 8:1:1; the training set dimensions were (1,026,194,19); the network was trained on an RTX 3090 graphics card with an Epoch of 500, a Batch size of 32, and a learning rate dynamically adjusted using annealed cosine, ranging from 0.01 to 0.00001; the network structure was a 5-layer MLP (Multilayer Perceptron), with one-tenth of the old data fed into the network each time; the activation function was ReLU; and the loss function was MAE (Mean Absolute Error).

[0105] After validation on the test set, the average accuracy reached 0.00725mm in the calibration space of 758.19mm x 1226.82mm x 32mm. The results of training the model using data directly extracted from corner points in images captured by the eight-lens camera group are also presented. Figure 9 The error distribution in the X, Y, and Z directions of the example model predicted along a 32mm space along the Z-axis is shown in the following figure. Figure 10 , 11 12.

[0106] exist Figure 9 As can be seen, the original training method extracts pixel coordinates from images without super-resolution processing, and then performs data augmentation using linear interpolation and center interpolation. The model trained without continuous learning has an average error of 0.13824 mm in the XYZ space, and a maximum error of 0.30361 mm and a minimum error of 0.07172 mm in the calibration space. Using the training method of this invention, the image is processed with super-resolution and corner points are extracted. Then, linear interpolation and center interpolation are used for data augmentation. The model trained using continuous learning has an average error of 0.00725 mm in the XYZ space, and a maximum error of 0.24187 mm and a minimum error of 0.00156 mm in the calibration space. Meanwhile... Figure 10 , 11Figure 12 shows the error variation in the XYZ directions as the Z-height increases. The average error in the X direction is 0.01299 mm; the average error in the Y direction is 0.00716 mm; and the average error in the Z direction is 0.00160 mm. This verifies that the method of the present invention is significantly effective and can achieve micrometer-level calibration accuracy in meter-level calibration space.

[0107] Furthermore, this invention also discloses an electronic device, which mainly includes a processor and a memory. The memory stores program code and transmits the program code to the processor; the processor executes the multi-camera high-precision calibration method based on image enhancement and deep learning provided by this invention according to the instructions in the program code. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the program code in the above-described electronic device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A high-precision multi-camera calibration method based on image enhancement and deep learning, characterized in that, High-precision calibration of a multi-camera group is performed based on a target calibration prediction neural network model, which is obtained through the following steps: Step 1: Acquire original chessboard images from different angles using a multi-camera group, control the vertical movement distance of the multi-camera group, and obtain the world coordinates (x, y, z) of the chessboard corner points in the original chessboard images; the chessboard is a pre-made square chessboard. Step 2: Perform super-resolution processing on the original chessboard image based on a non-blind super-resolution model to obtain a chessboard image with a preset multiple of the original resolution; Step 3: Use a sub-pixel level corner detection algorithm to detect the corner points of the checkerboard in the super-resolution processed checkerboard image, extract and save the pixel coordinates of the corner points to the super-resolution point cloud file; Step 4: Filter out the corner points that belong to the error points in the chessboard image, standardize the pixel coordinates of the error points and rewrite them into the point cloud file; Step 5: Perform interpolation on the normalized pixel coordinates to augment the data, and then map the augmented data from the super-resolution space back to the resolution space of the original checkerboard image to calculate the world coordinates corresponding to the interpolated pixel coordinates. Step 6: Construct a calibration prediction neural network model. The pixel coordinates of the corner points extracted in Step 3 and the pixel coordinates of the augmented data obtained in Step 5 are used as the input of the calibration prediction neural network model. The world coordinates (x, y, z) of the corner points in the original chessboard image obtained in Step 1 and the world coordinates corresponding to the augmented data obtained in Step 5 are used as the output of the calibration prediction neural network model. The calibration prediction neural network model is trained using a multilayer perceptron network structure and a continuous learning method to obtain the target calibration prediction neural network model. Step 4 specifically includes: The formula for calculating the angle between vectors formed by adjacent non-edge corner points in a point cloud file is as follows: In the formula, It represents the angle between a central corner point and the vector formed by each pair of adjacent directional corner points; Error points are obtained by filtering out checkerboard corner points where the deviation of the included vector angle from 90 degrees is greater than a preset angle. The normalized pixel coordinates are calculated by the geometric relationships of the four corner points adjacent to the error point, and the pixel coordinates of the error point are normalized. The formula is: In equation (11), These are the pixel coordinates of the four corner points adjacent to the error point; Standardized corner pixel coordinates Replace original pixel coordinates Rewrite the point cloud file; In step 5: Linear interpolation and geometric midpoint interpolation are used to interpolate the normalized pixel coordinates; Calculate the geometric midpoint of each cell in the chessboard and the linear midpoint of each cell's edge to obtain the world coordinates corresponding to the interpolated pixel coordinates; The linear interpolation method is as follows: take the linear midpoint of adjacent pixel coordinates (x1, y1) and (x2, y2). The pixel coordinates of the linear midpoint are obtained; an index is created based on the number of corner points in each chessboard image, and the linear midpoint values ​​of two points that are not adjacent in actual physical location are removed based on the index; The geometric midpoint interpolation method is as follows: obtain the pixel coordinates of the four corner points of the square formed by the line in the image, and obtain the pixel coordinates of the center point by the intersection of the straight lines; Based on the geometric characteristics of the chessboard, the geometric midpoint of each cell and the linear midpoint of each cell edge are calculated to obtain the world coordinates corresponding to the pixel coordinates after geometric midpoint interpolation and linear interpolation.

2. The multi-camera high-precision calibration method as described in claim 1, characterized in that, In step 2, the BasicVSR network is used as the basic network architecture of the super-resolution module. The VideoLQ dataset was used to train the initially constructed BasicVSR network, which learns the relationship and features between high and low resolution images at the pixel level. The VideoLQ dataset comprises consecutive image sequences with different content and resolutions; training is performed using high-resolution images from the VideoLQ dataset along with corresponding low-resolution images.

3. The multi-camera high-precision calibration method as described in claim 1, characterized in that, Before performing super-resolution processing, the original checkerboard image is first cleaned sequentially to remove degradation.

4. The multi-camera high-precision calibration method as described in claim 3, characterized in that, The cleaning process is guided by perceived loss and adversarial loss, specifically including: Based on the cleaned images With downsampling operator Processed original checkerboard image The perceptual loss is calculated from the pixel differences between the pixels, and the perceptual loss is minimized; the formula for calculating the perceptual loss is: (3); In the formula, Indicates perceived loss. Let x̃i represent the Charbonnier loss function, where x̃i is the output of the i-th image after cleaning. Represents the original chessboard grid image; The adversarial loss is calculated based on the difference between the high-resolution image generated by the super-resolution model after cleaning and the original checkerboard image, and the adversarial loss is minimized; the formula for calculating the adversarial loss is: (4); In the formula, Indicating resistance to loss, This represents the high-resolution image output by the super-resolution model.

5. The multi-camera high-precision calibration method as described in claim 4, characterized in that, The cleaning process employs a dynamic cleaning scheme, which involves multiple iterations of cleaning to eliminate degradation in the image until the average absolute difference between consecutively cleaned images does not exceed a threshold θ, at which point the cleaning stops. The iterative cleaning process is described in formula (5). (5).

6. The multi-camera high-precision calibration method as described in claim 1, characterized in that, Step 1 also includes: The detection order of the checkerboard corner points is defined as from left to right and from top to bottom, with the first corner point in the upper left corner of the checkerboard image as the origin (0,0,0). The original checkerboard image is named according to the camera number in the multi-camera group and the number of times the camera has moved vertically. Step 3, before detecting the corner points of the chessboard, also includes: First, convert the super-resolution processed checkerboard image into a grayscale image; The grayscale image is processed by Laplacian transform to enhance the details of the image edges; The resolution of the Laplacian-transformed grayscale image is doubled by using OpenCV's built-in bilinear interpolation algorithm to improve image detail and anti-aliasing effect. During the checkerboard corner detection process, if no corner is detected, the checkerboard image is normalized separately and the number of iterations for searching the corner is increased. The detected corner points are sorted according to camera number and corner point position before being written into the super-resolution point cloud file.

7. The method as described in claim 1, characterized in that, In step 6: The calibration prediction neural network is built based on the TensorFlow framework; Define the load_data() function to load and preprocess data, read data from the point cloud file, and divide it into training set, validation set and test set; The `build_network()` function is defined to build a neural network model. The number of multilayer perceptrons is set according to the size of the point cloud data. The Adam optimizer and the mean absolute error loss function are used for compilation. The mean absolute error loss function is the average absolute error between the predicted world coordinates obtained from the input corner pixel coordinates and the real world coordinates. Define the cosine_annealing_lr() function as a cosine annealing scheduler for the learning rate, which calculates the learning rate based on the current training epoch and the maximum epoch. The continuous learning method is the context replay method, and the entire training process is divided into multiple iterations, with each iteration using entirely new data. All data from the previous iteration As input training data, by controlling the weights Balance the learning of new and old knowledge.

8. An electronic device, characterized in that, It includes a processor and a memory; the processor is used to call the computer program stored in the memory to execute the multi-camera high-precision calibration method based on image enhancement and deep learning as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Checkerboard corner detection method based on neural network and application thereof

    CN111640157A

  • External parameter calibration method and device of automobile panoramic image system based on deep learning

    CN115345946A