Point cloud data generation method and apparatus, storage medium, and electronic device
By acquiring image data simultaneously through multiple calibrated image acquisition devices, constructing pyramid image data, and performing correlation information extraction and parallax processing, the problem of high cost and low efficiency in point cloud data generation in existing technologies is solved, and efficient obstacle detection in complex outdoor scenes is achieved.
Patent Information
- Application Number
- CN202311119248.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-08-31
AI Technical Summary
Existing 3D point cloud data perception methods suffer from high costs, limited accuracy, and significant environmental influences in autonomous driving, making it difficult to meet the obstacle detection needs of complex outdoor scenarios.
Multiple calibrated image acquisition devices acquire image data simultaneously to construct pyramid image data, extract related information and perform parallax processing to generate point cloud data of the target scene.
It reduces the cost of point cloud data generation, improves generation efficiency, and enables efficient obstacle detection in complex outdoor scenes.
Smart Images

Figure CN117315136B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to point cloud data generation methods, apparatus, storage media and electronic devices. Background Technology
[0002] In the field of autonomous driving technology, to ensure that autonomous vehicles fully understand their driving environment and achieve goals such as navigation and positioning, obstacle detection, and assisted driving, it is necessary to perceive the surrounding environment through various physical sensors. Among these, scene 3D point cloud data perception is an indispensable part of autonomous driving. 3D point cloud data perception is a set of 3D coordinate points used to describe the environment surrounding the autonomous vehicle. These 3D coordinate points originate from targets such as the driving surface, vegetation, buildings, pedestrians, and other vehicles. Using this information, it is easier to perform 3D modeling of the surrounding environment.
[0003] Currently, 3D point cloud data perception can be divided into two categories: contact-based measurement methods and non-contact-based measurement methods. Contact-based methods involve sensors actively sending and receiving light beams hitting spatial targets, using changes in the beams to achieve 3D measurement. A commonly used method is the Time of Flight (TOF) method, which calculates the coordinates of 3D points by utilizing the time difference between the round trip of a signal between two asynchronous transceiver modules. LiDAR sensors utilize the TOF principle to directly acquire 360-degree high-precision point cloud data of the driving environment; however, their high cost, complex mechanical structure, and susceptibility to environmental and weather conditions limit their application in autonomous driving. Non-contact methods primarily utilize depth cameras, structured light cameras, or binocular cameras to acquire basic scene information, and then obtain 3D point cloud data through calibration and coordinate mapping. Depth cameras (such as Kinect cameras) simultaneously generate depth information for each pixel based on acquired 2D image data; however, due to the inherently limited measurement range of depth cameras, it is difficult to meet the perception distance requirements of real-world autonomous driving environments. Depth cameras can only detect obstacles within a range of less than 6 meters. Structured light cameras are a typical non-contact 3D measurement sensor. They first project fixed structured light onto the surface of the target object. Based on the deformation of the structured light on the target surface, triangulation is used to calculate the 3D point cloud data of the object's surface, thus achieving 3D reconstruction of the object's surface. While structured light cameras offer advantages such as easy operation and high accuracy, they also suffer from short measurement distances and inability to adapt to complex outdoor lighting conditions. Binocular vision cameras utilize the imaging results of two calibrated cameras, constructing 3D spatial point cloud data through stereo matching of different points on the imaging planes of the two cameras. This method has advantages such as low cost, high efficiency, and high accuracy. However, current research mostly focuses on indoor scenes, performing poorly in outdoor scenes with complex backgrounds, diverse moving targets, and large variations in lighting conditions. Summary of the Invention
[0004] To address at least one of the aforementioned technical problems, this disclosure provides a point cloud data generation method, apparatus, storage medium, and electronic device.
[0005] According to one aspect of this disclosure, a method for generating point cloud data is provided, comprising:
[0006] Multiple images to be processed are acquired, which are multiple image data obtained by multiple calibrated image acquisition devices simultaneously acquiring images of the target scene.
[0007] Each image to be processed is scaled a preset number of times based on a preset scaling ratio to obtain pyramid image data corresponding to each image to be processed. The pyramid image data includes multiple levels of scaled image data.
[0008] Based on the pyramid image data corresponding to any two adjacent images to be processed, the association information of the two adjacent images to be processed is extracted to obtain the set of associated corner points corresponding to the two adjacent images to be processed. The two adjacent images to be processed are the images to be processed acquired by the two adjacent image acquisition devices respectively.
[0009] Based on the set of associated corner points corresponding to any two adjacent images to be processed, parallax processing is performed to obtain the parallax image data corresponding to any two adjacent images to be processed.
[0010] Coordinate processing is performed on the disparity image data corresponding to any two adjacent images among the plurality of images to be processed to obtain the target point cloud data corresponding to the target scene.
[0011] In some possible implementations, the scaling ratios of the pyramid image data corresponding to the multiple images to be processed are the same for the scaling map data at the same level. The step of extracting association information from the pyramid image data corresponding to any two adjacent images to be processed, to obtain a set of associated corner points corresponding to the two adjacent images to be processed, includes:
[0012] Based on the scaling ratio of each level in descending order, the multiple levels are traversed;
[0013] Feature extraction is performed on the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain the first corner feature data and the second corner feature data. The first image to be processed is any one of the two adjacent images to be processed, and the second image to be processed is the other one of the two adjacent images to be processed.
[0014] The first corner feature data and the second corner feature data are matched to obtain the matching result;
[0015] Based on the matching result, the scaled image data of the next level in the pyramid image data corresponding to the first image to be processed, and the scaled image data of the next level in the pyramid image data corresponding to the second image to be processed, an error is calculated to obtain the matching error; the next level is the next level adjacent to the current level;
[0016] If the matching error meets the first preset condition, the current corner point set is updated based on the first corner point feature data and the second corner point feature data to obtain the associated corner point set, and the traversal stops.
[0017] In some possible implementations, the step of calculating the matching error based on the matching result, the scaled image data of the next level in the pyramid image data corresponding to the first image to be processed, and the scaled image data of the next level in the pyramid image data corresponding to the second image to be processed, includes:
[0018] The matching result is mapped to the next level of scaled image data in the pyramid image data corresponding to the first image to be processed and the next level of scaled image data in the pyramid image data corresponding to the second image to be processed, to obtain the first target scaled image data and the second target scaled image data.
[0019] Based on a preset block size, the first target scaled image data and the second target scaled image data are respectively divided into blocks to obtain at least two block image data;
[0020] Determine the error value for each block of image data;
[0021] The matching error is determined based on the error values of all segmented image data.
[0022] In some possible implementations, the method further includes:
[0023] If the matching error does not meet the first preset condition, the target block data with the error value greater than the preset error value is determined.
[0024] Extract the target corner feature data from the target block data;
[0025] The current corner point set is updated based on the target corner point feature data, the first corner point feature data, and the second corner point feature data;
[0026] The next level after the current processing layer is taken as the current processing layer;
[0027] Repeat the following steps: Extract features from the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain the first corner feature data and the second corner feature data. Based on the matching result, calculate the error from the scaled image data of the next layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the next layer in the pyramid image data corresponding to the second image to be processed, to obtain the matching error.
[0028] In some possible implementations, the method further includes, prior to acquiring the multiple images to be processed:
[0029] Acquire the first sample image data acquired by each of the plurality of image acquisition devices for a preset calibration plate;
[0030] Based on the first sample image data, determine the image coordinate information of the preset points on the preset calibration plate;
[0031] Obtain the physical location information of the preset point;
[0032] The intrinsic and extrinsic parameter matrices of each image acquisition device are determined based on the image coordinate information and physical location information of the preset points.
[0033] In some possible implementations, after determining the intrinsic and extrinsic parameter matrices of each image acquisition device based on the corner pixel coordinate information and the physical size information, the method further includes:
[0034] The first image acquisition device and the second image acquisition device respectively acquire the second sample image data and the third sample image data acquired by the first image acquisition device and the second image acquisition device for the preset calibration plate. The first image acquisition device and the second image acquisition device are any two adjacent image acquisition devices among a plurality of image acquisition devices.
[0035] Determine the target corner point in the preset calibration plate;
[0036] Based on the second sample image data, the intrinsic parameter matrix corresponding to the first image acquisition device, and the extrinsic parameter matrix corresponding to the first image acquisition device, the first pose information of the target corner point relative to the first image acquisition device is determined;
[0037] Based on the third sample image data, the intrinsic parameter matrix corresponding to the second image acquisition device, and the extrinsic parameter matrix corresponding to the second image acquisition device, the second pose information of the target corner point relative to the second image acquisition device is determined;
[0038] Based on the first pose information and the second pose information, target pose transformation information between the first image acquisition device and the second image acquisition device is determined.
[0039] In some possible implementations, the method further includes:
[0040] Acquire the initial image data of the target scene collected by multiple calibrated image acquisition devices at the same time;
[0041] Correction processing is performed on the intrinsic and extrinsic parameter matrices of each image acquisition device corresponding to each initial image data in the multiple initial image data, as well as the target pose transformation information between each pair of adjacent image acquisition devices, to obtain the multiple images to be processed.
[0042] In some possible implementations, prior to acquiring the multiple images to be processed, the method includes:
[0043] Obtain the time information of any one of the plurality of image acquisition devices;
[0044] The time of other image acquisition devices among the plurality of image acquisition devices is updated based on the time information.
[0045] According to a second aspect of this disclosure, a point cloud data generation apparatus is provided, the apparatus comprising:
[0046] The image acquisition module is used to acquire multiple images to be processed, which are multiple image data obtained by multiple calibrated image acquisition devices acquiring images of the target scene at the same time.
[0047] The scaling processing module is used to perform scaling processing on each image to be processed a preset number of times based on a preset scaling ratio, so as to obtain the pyramid image data corresponding to each image to be processed. The pyramid image data includes multiple levels of scaled image data.
[0048] The feature processing module is used to extract the association information of any two adjacent images to be processed based on the pyramid image data corresponding to any two adjacent images to be processed, and to obtain the set of associated corner points corresponding to the two adjacent images to be processed. The two adjacent images to be processed are the images to be processed acquired by any two adjacent image acquisition devices.
[0049] The disparity calculation module is used to perform disparity processing based on the set of associated corner points corresponding to any two adjacent images to be processed, so as to obtain disparity image data corresponding to any two adjacent images to be processed.
[0050] The point cloud data determination module is used to perform coordinate processing based on the disparity image data corresponding to any two adjacent images to be processed among the plurality of images to be processed, so as to obtain the target point cloud data corresponding to the target scene.
[0051] According to a third aspect of this disclosure, an electronic device is provided, including at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the point cloud data generation method as described in any one of the first aspects by executing the instructions stored in the memory.
[0052] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided that stores at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by a processor to implement the point cloud data generation method as described in any of the first aspects.
[0053] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0054] Implementing this disclosure will have the following beneficial effects:
[0055] Multiple images to be processed are acquired simultaneously from multiple calibrated image acquisition devices capturing images of the target scene. These images are then used to generate point cloud data, reducing costs. Each image is scaled a predetermined number of times based on a preset scaling ratio, resulting in pyramid image data for each image. This pyramid image data includes scaled image data at multiple levels. Based on the pyramid image data of any two adjacent images, association information is extracted to obtain a set of associated corner points. These two adjacent images are captured by two adjacent image acquisition devices. An image scaling pyramid is constructed, and a cascaded stereo matching algorithm is used to improve stereo matching efficiency. Disparity processing is performed on the set of associated corner points of any two adjacent images to obtain disparity image data. Finally, coordinate processing is performed on the disparity image data of any two adjacent images to obtain target point cloud data for the target scene. This reduces the cost of point cloud data generation and improves the efficiency of point cloud data generation.
[0056] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0057] To more clearly illustrate the technical solutions and advantages in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A flowchart illustrating a point cloud data generation method according to an embodiment of the present disclosure is shown.
[0059] Figure 2 A top view schematic diagram of the image acquisition device installed according to an embodiment of the present disclosure is shown;
[0060] Figure 3 A side view of the structure of the image acquisition device installed according to an embodiment of the present disclosure is shown;
[0061] Figure 4 This diagram illustrates the connection method of the image acquisition device according to an embodiment of the present disclosure.
[0062] Figure 5 A flowchart illustrating a method for determining a set of associated corner points according to an embodiment of this disclosure is shown.
[0063] Figure 6 A flowchart illustrating a matching error determination method according to an embodiment of the present disclosure is shown.
[0064] Figure 7 A flowchart illustrating the current corner point combination update method according to an embodiment of the present disclosure is shown;
[0065] Figure 8 A schematic flowchart of an image acquisition device calibration method according to an embodiment of the present disclosure is shown;
[0066] Figure 9 A flowchart illustrating a joint calibration method for two adjacent image acquisition devices according to an embodiment of the present disclosure is shown.
[0067] Figure 10 A flowchart illustrating a method for determining an image to be processed according to an embodiment of the present disclosure is shown.
[0068] Figure 11 A flowchart illustrating a time synchronization processing method according to an embodiment of the present disclosure is shown;
[0069] Figure 12 This diagram illustrates the structure of a point cloud data generation apparatus according to an embodiment of the present disclosure.
[0070] Figure 13 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0071] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0072] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0073] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0074] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0075] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0076] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0077] Figure 1 This diagram illustrates a flow chart of a point cloud data generation method according to an embodiment of the present disclosure, such as... Figure 1 As shown, the above method includes:
[0078] S101. Acquire multiple images to be processed. The multiple images to be processed are multiple image data obtained by multiple calibrated image acquisition devices acquiring images of the target scene at the same time.
[0079] The executing entity of this disclosure can be a data processing terminal, which acquires multiple images to be processed. These multiple images can be used to represent a 360-degree panorama of the target scene. The multiple images to be processed are initial image data acquired simultaneously by multiple calibrated image acquisition devices targeting the target scene. Each initial image data is corrected using its corresponding intrinsic and extrinsic parameter matrices and the target pose transformation information between adjacent image acquisition devices. The calibrated image acquisition devices are arranged in a circle, forming a 360-degree horizontal field of view. The image acquisition devices can be sensors used to acquire two-dimensional images. The multiple image acquisition devices are connected to the data processing terminal via a switch. The data processing terminal may include a network interface card (NIC) with Precision Time Protocol (PTP) functionality to assist in time synchronization of the multiple image acquisition devices.
[0080] In some embodiments, such as Figure 2 and Figure 3 As shown, the image acquisition device can consist of six industrial cameras. Each camera has a horizontal field of view of 120 degrees, a vertical field of view of 45 degrees, and a frame rate of 24 frames per second. The six industrial cameras are arranged in a circle and fixed by a camera mounting bracket, which can be a regular hexagon. The six industrial cameras are horizontally mounted at the vertices of the hexagonal camera bracket, with their lenses facing outwards. Figure 4 As shown, the six industrial cameras are connected to an industrial-grade switch using gigabit Ethernet cables. The other end of the switch is connected to a data processing terminal using a gigabit Ethernet cable. The data processing terminal must include a network card with PTP functionality to assist in the time synchronization of the six industrial cameras.
[0081] S102. Based on a preset scaling ratio, each image to be processed is scaled a preset number of times to obtain the pyramid image data corresponding to each image to be processed. The pyramid image data includes multiple levels of scaled image data.
[0082] Each image to be processed undergoes a first scaling process based on a preset scaling ratio. The resulting scaled image data is stored at the bottom layer of the corresponding pyramid image data. Then, based on the same preset scaling ratio, the same scaled image data is scaled a second time, with the resulting scaled image data stored at the level above the bottom layer of the pyramid image data. This scaling process is repeated a preset number of times, with each scaling result stored at the corresponding level of the pyramid image data. The final scaled image data is stored at the top layer of the pyramid image data. The scaling ratio increases sequentially from the top to the bottom of the pyramid image data, from high to low. Higher levels result in smaller image sizes and lower resolutions.
[0083] S103. Based on the pyramid image data corresponding to any two adjacent images to be processed, extract the association information of any two adjacent images to be processed to obtain the set of associated corner points corresponding to any two adjacent images to be processed. Any two adjacent images to be processed are the images to be processed acquired by any two adjacent image acquisition devices.
[0084] From top to bottom, corner features are extracted from the scaled image data corresponding to any two adjacent images to be processed in the pyramid image data. Stereo matching is then performed using a preset algorithm. The matching results calculated at each level are passed to the next level. At the next level, the matching error between the two scaled image data is first calculated. The matching error is calculated by dividing the scaled image data of the current level into blocks and calculating the cumulative error value of the block images. If the cumulative error value meets the minimum error requirement, the algorithm terminates and obtains the associated corner point set corresponding to any two adjacent images to be processed. Otherwise, corner points need to be extracted from the block images with large errors and added to the corner point set already generated in the previous level. The calculation continues until the associated corner point set corresponding to any two adjacent images to be processed is obtained.
[0085] In some embodiments, the two adjacent image acquisition devices can be two industrial cameras mounted adjacent to each other at the vertices of a regular hexagonal camera bracket. The two adjacent images to be processed are image data acquired and corrected by the two adjacent industrial cameras. The preset algorithm can be a semi-global block matching algorithm (SGBM). Corner features are extracted from the scaled image data in the pyramid image data corresponding to any two adjacent images to be processed, and stereo matching is performed using a cascaded SGBM algorithm until the set of associated corner points corresponding to any two adjacent images to be processed is obtained.
[0086] S104. Perform disparity processing based on the set of associated corner points corresponding to any two adjacent images to be processed, and obtain disparity image data corresponding to any two adjacent images to be processed.
[0087] By using the calibration matrices of two adjacent image acquisition devices corresponding to any two adjacent images to be processed, disparity is calculated on the associated corner point sets corresponding to any two adjacent images to be processed, thus obtaining the disparity image data corresponding to any two adjacent images to be processed. The calibration matrix of the image acquisition device can be obtained by converting the intrinsic parameter matrix and extrinsic parameter matrix of the image acquisition device.
[0088] In some embodiments, the parallax image data corresponding to any two adjacent images to be processed is calculated by using the calibration matrix of each image acquisition device obtained through joint calibration of multiple image acquisition devices.
[0089] Specifically, for any two adjacent industrial cameras, the origin of the world coordinate system is determined to be O1 at the optical axis center of the left industrial camera and O2 at the optical axis center of the right industrial camera. The distance between the optical axis centers of the two cameras is denoted as T. 12 Let the three-dimensional coordinates of a point in space be P(x). c ,y c ,z c Let P1(x1,y) be the corner point captured by the left industrial camera and P2(x2,y) be the corner point captured by the right industrial camera. P1 and P2 are points in the associated corner point set. The distance from point P to line segments O1 and O2 is z. c According to the principle of projection similarity, we know that z c The calculation formula is as follows:
[0090] z c =fT 12 / (x1-x2)
[0091] Where f is the focal length.
[0092] Using the relationship between the image coordinate system and the pixel coordinate system, the x-axis coordinates x′1 and x′2 of the 3D coordinate point P under the two industrial cameras can be obtained, denoted as:
[0093] x′1=u0+x1s x
[0094] x′2=u0+x2s x
[0095] Par = x′1 - x′2
[0096] Where u0 represents the x-axis coordinate of the origin in the image coordinate system in the pixel coordinate system, and s xIt records the number of pixels within each millimeter, measured in millimeters. Par represents the disparity image data corresponding to two adjacent images to be processed, calculated from the data.
[0097] S105. Based on the disparity image data corresponding to any two adjacent images to be processed among multiple images to be processed, coordinate processing is performed to obtain the target point cloud data corresponding to the target scene.
[0098] After obtaining the disparity image data corresponding to any two adjacent images among multiple images to be processed, the three-dimensional coordinates are calculated based on the disparity image data to obtain the target point cloud data.
[0099] In some embodiments, the three-dimensional coordinates P(x) of each point in the target point cloud data c ,y c ,z c ) in x c ,y c ,z c The calculation formula is as follows:
[0100] x c =T 12 (x′1-u0) / Par
[0101] y c =T 12 f x (y′1-v0) / f y Par
[0102] z c =T 12 f x / Par
[0103] Among them, T 12 Let x′1 be the distance between the optical axis centers of the two cameras, x′1 be the x-axis coordinate of the 3D coordinate point P under the two industrial cameras, y′1 be the y-axis coordinate of the 3D coordinate point P under the two industrial cameras, Par be the disparity image data corresponding to two adjacent images to be processed, u0 be the x-axis coordinate of the origin in the image coordinate system under the pixel coordinate system, v0 be the y-axis coordinate of the origin in the image coordinate system under the pixel coordinate system, and f ... x-axis coordinate of the origin in the image coordinate system under the pixel coordinate system. x It uses pixels to describe the length of the focal length in the x-axis direction, f y It uses pixels to describe the length of the focal length in the y-axis direction.
[0104] The above technical solution utilizes a combination of multiple image acquisition devices to simulate the acquisition of LiDAR data and obtain point cloud data. This solves the problems of high cost of LiDAR-based acquisition and limited acquisition scenarios for devices such as depth cameras or structured light cameras in existing technologies. Secondly, by limiting the acquisition of images by multiple image acquisition devices at the same time, it is possible to obtain temporal consistency matching of multiple images. Combining pyramid image data with stereo matching improves stereo matching efficiency and shortens the generation time of 3D point cloud data of the target scene.
[0105] Please see Figure 5 In some embodiments, the scaling ratios of the pyramid image data corresponding to the same level of the scaled image data of multiple images to be processed are the same. Based on the pyramid image data corresponding to any two adjacent images to be processed, the association information of any two adjacent images to be processed is extracted to obtain the set of associated corner points corresponding to any two adjacent images to be processed, including:
[0106] S1031. Based on the scaling ratio of each level from large to small, traverse multiple levels.
[0107] S1032. Extract features from the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain the first corner feature data and the second corner feature data.
[0108] The first image to be processed is any one of any two adjacent images to be processed, and the second image to be processed is the other one of any two adjacent images to be processed.
[0109] S1033. Perform matching processing on the first corner feature data and the second corner feature data to obtain the matching result;
[0110] S1034. Based on the matching result, the scaled image data of the next level in the pyramid image data corresponding to the first image to be processed and the scaled image data of the next level in the pyramid image data corresponding to the second image to be processed are used to calculate the error and obtain the matching error.
[0111] The next level is the level immediately following the current level;
[0112] S1035. If the matching error meets the first preset condition, update the current corner point set based on the first corner point feature data and the second corner point feature data to obtain the associated corner point set, and stop traversing.
[0113] Starting from the top layer of the pyramid image data corresponding to any two adjacent images in a plurality of images to be processed, feature processing is performed on each layer of the pyramid image data corresponding to any two adjacent images in a plurality of images until the set of associated corner points is obtained. Corner feature extraction is performed on the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed in two adjacent images to be processed, to obtain the first corner feature data. Corner feature extraction is also performed on the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed in two adjacent images to be processed, to obtain the second corner feature data. The first corner feature data and the second corner feature data are then stereo matched using a preset algorithm to obtain the matching result corresponding to the current processing layer. The matching result corresponding to the current processing layer is then passed to the next layer of the current processing layer. Based on the matching result, the scaled image data of the next layer in the pyramid image data corresponding to the first image to be processed, and the scaled image data of the next layer in the pyramid image data corresponding to the second image to be processed, block processing is performed, and the block error is calculated. The accumulated block error is the matching error. If the matching error meets the first preset condition, which can be that the matching error is less than or equal to the preset matching error, the first corner feature data and the second corner feature data are added to the current corner set to obtain the associated corner set, and the traversal of the pyramid image data is stopped.
[0114] In some embodiments, a semi-global block matching (SGBM) algorithm is used to perform stereo matching on the first and second corner feature data. Starting with the smallest scaled image data in the pyramid image data corresponding to any two adjacent images from multiple images to be processed, corner features are extracted sequentially towards the larger images. SGBM is used to perform stereo matching on the corner feature data of the two scaled image data in the pyramid image data corresponding to the two adjacent images to be processed, obtaining a matching result. Each calculated matching result is passed to the next level of the pyramid image data. At the next level, the matching error between the two scaled image data is first calculated. The matching error is calculated by dividing the scaled image data into blocks and accumulating the block Sampson error values to obtain the matching error. If the matching error meets the minimum error requirement, the calculation terminates, and the obtained corner feature data is added to the current corner set to obtain the associated corner set.
[0115] The time efficiency of stereo matching is greatly affected by the image size and the number of corner points. In the above technical solution, the original image is scaled multiple times to form a pyramid image, and corner point features are extracted sequentially starting from the smallest image. Combined with stereo matching methods, the calculation is terminated when the matching error meets the conditions, which greatly shortens the calculation time and achieves stereo matching quickly.
[0116] Please see Figure 6 In some embodiments, error calculation is performed based on the matching result, the scaled image data of the next level in the pyramid image data corresponding to the first image to be processed, and the scaled image data of the next level in the pyramid image data corresponding to the second image to be processed, to obtain the matching error, including:
[0117] S10351. Map the matching result to the next level of scaled image data in the pyramid image data corresponding to the first image to be processed and the next level of scaled image data in the pyramid image data corresponding to the second image to be processed, to obtain the first target scaled image data and the second target scaled image data.
[0118] S10352. Divide the first target scaled image data and the second target scaled image data into blocks based on the preset block size to obtain at least two block image data.
[0119] S10353. Determine the error value of each block of image data;
[0120] S10354. Determine the matching error based on the error values of all segmented image data.
[0121] The matching result at the current level is mapped to the next level of scaled image data in the pyramid image data corresponding to the first image to be processed, to obtain the first target scaled image data. The matching result at the current level is mapped to the next level of scaled image data in the pyramid image data corresponding to the second image to be processed, to obtain the second target scaled image data. The first target scaled image data and the second target scaled image data are divided into blocks based on a preset block size to obtain at least two block image data. The error value of each block image data is calculated and the error values of each block image data are accumulated to obtain the matching error.
[0122] In some embodiments, the Sampson error value for each block of image data is calculated using the Sampson error model to obtain the error value for each block of image data.
[0123] The above technical solution calculates the matching error of the segmented images at each layer to ensure the accuracy of stereo matching.
[0124] Please see Figure 7 In some embodiments, the method further includes:
[0125] S10361. If the matching error does not meet the first preset condition, determine the target block data whose error value is greater than the preset error value.
[0126] S10362. Extract target corner feature data from the target block data;
[0127] S10363. Update the current corner point set based on the target corner point feature data, the first corner point feature data, and the second corner point feature data;
[0128] S10364. Set the next level of the current processing layer as the current processing layer;
[0129] S10365. Repeat the following steps: Extract features from the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain the first corner feature data and the second corner feature data. Based on the matching result, calculate the error from the scaled image data of the next layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the next layer in the pyramid image data corresponding to the second image to be processed, to obtain the matching error.
[0130] The first preset condition can be that the matching error is less than or equal to a preset matching error. If the matching error is greater than the preset matching error, it is determined that the matching error does not meet the first preset condition. At least two target block data with error values greater than the preset error value are queried. Corner point data is extracted from the target block data to obtain target corner point feature data. The target corner point feature data, the first corner point feature data, and the second corner point feature data are added to the current corner point set. The next level after the current processing layer is taken as the current processing layer.
[0131] Repeat the following steps: Extract features from the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain first corner feature data and second corner feature data. The first image to be processed is any one of two adjacent images to be processed, and the second image to be processed is the other one of two adjacent images to be processed. Perform matching processing on the first corner feature data and the second corner feature data to obtain matching results. Based on the matching results, the scaled image data of the next layer in the pyramid image data corresponding to the first image to be processed and the second corner feature data... Error calculation is performed on the scaled image data of the next level in the pyramid image data corresponding to the image to be processed to obtain the matching error. The next level is the next level adjacent to the current level. If the matching error meets the first preset condition, the current corner point set is updated based on the first corner point feature data and the second corner point feature data to obtain the associated corner point set, and the traversal stops. If the matching error does not meet the first preset condition, the target block data with an error value greater than the preset error value is determined. The target corner point feature data of the target block data is extracted. The current corner point set is updated based on the target corner point feature data, the first corner point feature data, and the second corner point feature data. This process continues until the associated corner point set is obtained.
[0132] The above technical solution involves extracting and matching image features from the scaled image data of the pyramid image data corresponding to the image to be processed, from small to large, until a set of associated corner points with small errors is obtained, thereby improving the efficiency of stereo matching and thus improving the efficiency of point cloud data generation.
[0133] Please see Figure 8 In some embodiments, the method further includes, before acquiring multiple images to be processed:
[0134] S201. Acquire the first sample image data acquired by each of the multiple image acquisition devices for a preset calibration plate;
[0135] S202. Determine the image coordinate information of preset points on the preset calibration plate based on the first sample image data;
[0136] S203. Obtain the physical location information of the preset point;
[0137] S204. Determine the intrinsic and extrinsic parameter matrices of each image acquisition device based on the image coordinate information and physical location information of preset points.
[0138] The preset calibration board can be a black and white checkerboard with a preset number of squares. Preset points can be any point on the preset calibration board. Each image acquisition device is calibrated using a preset calibration method. Image coordinate information includes the pixel coordinates of the preset point in the pixel coordinate system, and physical location information includes the physical coordinates of the preset point in the world coordinate system. Specifically, the preset calibration board is placed at different angles within the field of view of each image acquisition device, and image acquisition is performed to obtain first sample image data. The pixel coordinates of a preset point on the preset calibration board in the first sample image data are determined, i.e., the image coordinate information. Combined with the world coordinate information of the preset point on the preset calibration board, i.e., the physical location information, the relationship matrix between the two is calculated, thereby determining the intrinsic and extrinsic parameter matrices of each image acquisition device. The more images and the more diverse the angles in the acquired first sample image data, the more accurate the final calibration result.
[0139] In some embodiments, a 7x10 standard black and white checkerboard is selected as the preset calibration board, and Zhang Zhengyou's calibration method is used to calibrate each image acquisition device. The specific calibration matrix conversion formula is as follows:
[0140]
[0141] Where (u,v) are the pixel coordinates of the preset point. Let f be the intrinsic parameter matrix. x It uses pixels to describe the length of the focal length in the x-axis direction, f yIt uses pixels to describe the focal length along the y-axis, u0, v0 are the coordinates of the camera's principal point in pixels, [R|T] is the extrinsic parameter matrix, R is the coordinate rotation matrix, T is the coordinate translation matrix, (X w Y w Z w ) represents the physical coordinates of the preset point.
[0142] In addition, when considering camera distortion, distortion parameters need to be corrected. Radial distortion and tangential distortion satisfy the following formula:
[0143]
[0144] Where (x,y) represents the normalized image coordinates without distortion, (x',y') represents the normalized image coordinates with distortion, and r is the distance from the image pixel to the image center point, satisfying r 2 =x 2 +y 2 k1, k2, and k3 are radial distortion coefficients, and p1 and p2 are tangential distortion coefficients.
[0145] The above technical solution calibrates each image acquisition device, improving the accuracy and efficiency of generating point cloud data from images acquired by multiple image acquisition devices.
[0146] Please see Figure 9 In some embodiments, after determining the intrinsic and extrinsic parameter matrices of each image acquisition device based on corner pixel coordinate information and physical size information, the method further includes:
[0147] S301. Acquire the second sample image data and the third sample image data acquired by the first image acquisition device and the second image acquisition device for the preset calibration board, respectively. The first image acquisition device and the second image acquisition device are any two adjacent image acquisition devices among a plurality of image acquisition devices.
[0148] S302. Determine the target corner point in the preset calibration plate;
[0149] S303. Based on the second sample image data, the intrinsic parameter matrix corresponding to the first image acquisition device and the extrinsic parameter matrix corresponding to the first image acquisition device, determine the first pose information of the target corner point relative to the first image acquisition device;
[0150] S304. Determine the second pose information of the target corner point relative to the second image acquisition device based on the third sample image data, the intrinsic parameter matrix corresponding to the second image acquisition device and the extrinsic parameter matrix corresponding to the second image acquisition device.
[0151] S305. Determine the target pose conversion information between the first image acquisition device and the second image acquisition device based on the first pose information and the second pose information.
[0152] After determining the intrinsic and extrinsic parameter matrices of each image acquisition device, the image acquisition devices that are adjacent to each other are jointly calibrated. Joint calibration is used to calculate the coordinate relationship between any two adjacent image acquisition devices. A preset calibration board is placed in the common field of view of the two adjacent image acquisition devices. Second sample image data acquired by the first image acquisition device and third sample image data acquired by the second image acquisition device are obtained to determine the target corner point in the preset calibration board. Based on the second sample image data and the intrinsic and extrinsic parameter matrices corresponding to the first image acquisition device, the pose information of the target corner point relative to the first image acquisition device, i.e., the first pose information, is determined. The first pose information includes the rotation and translation matrices of the target corner point relative to the first image acquisition device. Based on the third sample image data and the intrinsic and extrinsic parameter matrices corresponding to the second image acquisition device, the pose information of the target corner point relative to the second image acquisition device, i.e., the second pose information, is determined. The second pose information includes the rotation and translation matrices of the target corner point relative to the second image acquisition device. Based on the first and second pose information, the target pose transformation information of the two adjacent image acquisition devices is calculated.
[0153] In some embodiments, the target pose transformation information includes a rotation matrix R and a translation matrix T of the second image acquisition device relative to the first image acquisition device, and the target corner point is set as P. C The calculation formula is as follows:
[0154]
[0155] T = T2 - RT1
[0156] Where R1 is the target corner point P C The rotation matrix relative to the principal point of the first image acquisition device; T1 is the target corner point P. C The translation matrix relative to the principal point of the first image acquisition device; R2 is the target corner point P. C The rotation matrix relative to the principal point of the second image acquisition device; T2 is the target corner point P. C The translation matrix relative to the principal point of the second image acquisition device. In the calibration of the aforementioned single image acquisition device, R1 and T can be determined based on the first pose information. 1, R2 and T2 can be determined based on the second pose information.
[0157] The above technical solution performs joint calibration on two adjacent image acquisition devices among multiple image acquisition devices, thereby improving the accuracy and efficiency of generating point cloud data from images acquired by multiple image acquisition devices.
[0158] Please see Figure 10 In some embodiments, the method further includes:
[0159] S401. Obtain the initial image data of the target scene collected by multiple calibrated image acquisition devices at the same time.
[0160] S402. Based on the intrinsic parameter matrix and extrinsic parameter matrix of each initial image data corresponding to each initial image data and the target pose transformation information between two adjacent image acquisition devices, a correction process is performed to obtain multiple images to be processed.
[0161] Multiple image acquisition devices that have been set up and calibrated are simultaneously acquired for the target scene to obtain initial image data acquired by each image acquisition device. The initial image data is then corrected based on the intrinsic and extrinsic parameter matrices of the respective image acquisition devices, as well as the initial image data based on the respective image acquisition devices and their adjacent image acquisition devices, to obtain the image to be processed corresponding to each initial image data.
[0162] In some embodiments, multiple calibrated image acquisition devices are arranged in a circle to form a 360-degree field of view, and a 360-degree panoramic image of the target scene is acquired to obtain six initial image data. The six initial image data are then corrected based on the intrinsic and extrinsic parameter matrices of their respective cameras and the target pose transformation information with adjacent cameras to obtain their respective corresponding images to be processed.
[0163] The above technical solution unifies the parameters of the calibrated image acquisition device after the initial image data is collected, which is beneficial to the accurate generation of 3D point cloud data.
[0164] Please see Figure 11 In some embodiments, the method includes, before acquiring multiple images to be processed:
[0165] S501. Obtain the time information of any one of the multiple image acquisition devices;
[0166] S502. Update the time of other image acquisition devices among multiple image acquisition devices based on time information.
[0167] By using any one of the multiple image acquisition devices as the primary time service provider for the Precision Time Protocol (PTP), the other image acquisition devices obtain the time information of the primary image acquisition device through the PTP protocol as their own reference time, thus achieving relative time synchronization among multiple image acquisition devices.
[0168] The above technical solution has low time synchronization cost and ensures the time consistency of images acquired by multiple image acquisition devices, thereby improving the accuracy of simulated point cloud data.
[0169] In some embodiments, the firmware of each image acquisition device can support the Precision Time Protocol (PTP), a precision clock synchronization protocol for network measurement and control systems conforming to the IEEE 1588 standard. Each image acquisition device can independently send and receive timestamp information, and the internal counter of the camera can achieve precise calibration and synchronization. If the data processing terminal is configured with a network card supporting the PTP protocol, then the network card of the data processing terminal can be used as the time master server in the time synchronization scheme. Each image acquisition device can obtain the absolute time synchronization information of the network card through the local area network. The time synchronization method has high accuracy, and the error is concentrated in the latency of the entire local area network link.
[0170] Please see Figure 12 According to a second aspect of this disclosure, a point cloud data generation apparatus is provided, the apparatus comprising:
[0171] The image acquisition module 10 is used to acquire multiple images to be processed. These multiple images are obtained by multiple image acquisition devices that have been calibrated and simultaneously acquire images of the target scene.
[0172] The scaling processing module 20 is used to perform a preset number of scaling processes on each image to be processed based on a preset scaling ratio to obtain the pyramid image data corresponding to each image to be processed. The pyramid image data includes multiple levels of scaled image data.
[0173] The feature processing module 30 is used to extract the association information of any two adjacent images to be processed based on the pyramid image data corresponding to any two adjacent images to be processed, and obtain the set of associated corner points corresponding to any two adjacent images to be processed. Any two adjacent images to be processed are the images to be processed acquired by any two adjacent image acquisition devices.
[0174] The disparity calculation module 40 is used to perform disparity processing based on the set of associated corner points corresponding to any two adjacent images to be processed, so as to obtain disparity image data corresponding to any two adjacent images to be processed.
[0175] The point cloud data determination module 50 is used to perform coordinate processing based on the disparity image data corresponding to any two adjacent images to be processed among multiple images to be processed, so as to obtain the target point cloud data corresponding to the target scene.
[0176] In some embodiments, the scaling ratios of the pyramid image data corresponding to the same level of the scaled image data of multiple images to be processed are the same. The feature processing module 30 includes:
[0177] The traversal order determination unit is used to traverse multiple levels based on the scaling ratios of each level from largest to smallest.
[0178] The corner feature data determination unit is used to extract features from the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain the first corner feature data and the second corner feature data. The first image to be processed is any one of any two adjacent images to be processed, and the second image to be processed is the other one of any two adjacent images to be processed.
[0179] The matching result determination unit is used to match the first corner feature data and the second corner feature data to obtain the matching result;
[0180] The matching error determination unit is used to calculate the matching error based on the matching result, the scaled image data of the next level in the pyramid image data corresponding to the first image to be processed, and the scaled image data of the next level in the pyramid image data corresponding to the second image to be processed. The next level is the next level adjacent to the current level.
[0181] The associated corner point set determination unit is used to update the current corner point set based on the first corner point feature data and the second corner point feature data when the matching error meets the first preset condition, to obtain the associated corner point set and stop traversing.
[0182] In some embodiments, the matching error determination unit includes:
[0183] The mapping unit is used to map the matching result to the next level of scaled image data in the pyramid image data corresponding to the first image to be processed and the next level of scaled image data in the pyramid image data corresponding to the second image to be processed, so as to obtain the first target scaled image data and the second target scaled image data.
[0184] The segmentation unit is used to segment the first target scaled image data and the second target scaled image data into blocks based on a preset segmentation size, so as to obtain at least two block image data.
[0185] The error value determination unit is used to determine the error value of each block of image data;
[0186] The error determination unit is used to determine the matching error based on the error values of all segmented image data.
[0187] In some embodiments, the apparatus further includes:
[0188] The target block data determination module is used to determine the target block data with an error value greater than a preset error value when the matching error does not meet the first preset condition.
[0189] The target focus feature data extraction unit is used to extract the target corner feature data from the target block data;
[0190] The current corner point set update unit is used to update the current corner point set based on the target corner point feature data, the first corner point feature data, and the second corner point feature data;
[0191] The current processing layer update unit is used to set the next level of the current processing layer as the current processing layer.
[0192] The repeated execution unit is used to repeatedly execute the following steps: extracting features from the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain the first corner feature data and the second corner feature data. Based on the matching result, the next level scaled image data in the pyramid image data corresponding to the first image to be processed and the next level scaled image data in the pyramid image data corresponding to the second image to be processed are used to calculate the error and obtain the matching error.
[0193] In some embodiments, the apparatus further includes:
[0194] The preset calibration board image acquisition module is used to acquire the first sample image data acquired by each of the multiple image acquisition devices for the preset calibration board.
[0195] The image coordinate information determination module is used to determine the image coordinate information of preset points on the preset calibration plate based on the first sample image data.
[0196] The physical location information determination module is used to obtain the physical location information of preset points;
[0197] The matrix determination module is used to determine the intrinsic and extrinsic parameter matrices of each image acquisition device based on the image coordinate information and physical location information of preset points.
[0198] In some embodiments, the apparatus further includes:
[0199] The sample image data acquisition module is used to acquire the second sample image data and the third sample image data acquired by the first image acquisition device and the second image acquisition device for the preset calibration plate, respectively. The first image acquisition device and the second image acquisition device are any two adjacent image acquisition devices among a plurality of image acquisition devices.
[0200] The target focus determination module is used to determine the target corner point in the preset calibration board;
[0201] The first pose information determination module is used to determine the first pose information of the target corner point relative to the first image acquisition device based on the second sample image data, the intrinsic parameter matrix corresponding to the first image acquisition device and the extrinsic parameter matrix corresponding to the first image acquisition device;
[0202] The second pose information determination module is used to determine the second pose information of the target corner point relative to the second image acquisition device based on the third sample image data, the intrinsic parameter matrix corresponding to the second image acquisition device and the extrinsic parameter matrix corresponding to the second image acquisition device.
[0203] The pose transformation information determination module is used to determine the target pose transformation information between the first image acquisition device and the second image acquisition device based on the first pose information and the second pose information.
[0204] In some embodiments, the apparatus further includes:
[0205] The initial image data acquisition module is used to acquire the initial image data of the target scene acquired by multiple calibrated image acquisition devices at the same time.
[0206] The initial image data correction module is used to perform correction processing based on the intrinsic parameter matrix and extrinsic parameter matrix of each image acquisition device corresponding to each initial image data in multiple initial image data and the target pose transformation information between two adjacent image acquisition devices, so as to obtain multiple images to be processed.
[0207] In some embodiments, the apparatus includes:
[0208] The time information acquisition module is used to acquire the time information of any one of the multiple image acquisition devices.
[0209] The time update module is used to update the time of other image acquisition devices among multiple image acquisition devices based on time information.
[0210] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0211] This application provides a point cloud data generation device, which can be a terminal or a server. The point cloud data generation device includes a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by the processor to implement the point cloud data generation method provided in the above method embodiments.
[0212] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.
[0213] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 13 This is a hardware structure block diagram of an electronic device for a point cloud data generation method provided in an embodiment of this application. For example... Figure 13 As shown, the electronic device 900 can vary significantly due to differences in configuration or performance. It may include one or more central processing units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module may include a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute the series of instruction operations in the storage media 920 on the electronic device 900. Electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0214] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module for wireless communication with the Internet.
[0215] Those skilled in the art will understand that Figure 13 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include... Figure 13 The more or fewer components shown, or having the same Figure 13 The different configurations shown.
[0216] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a point cloud data generation method in the method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the point cloud data generation method provided in the above method embodiment.
[0217] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0218] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
[0219] As can be seen from the embodiments of the point cloud data generation method, apparatus, device, terminal, server, storage medium, or computer program provided in this application, this application acquires multiple images to be processed. These multiple images to be processed are multiple image data obtained by multiple calibrated image acquisition devices simultaneously acquiring images of a target scene. Point cloud data is generated based on the multiple image data acquired by the multiple image acquisition devices, reducing costs. Each image to be processed is scaled a preset number of times based on a preset scaling ratio to obtain pyramid image data corresponding to each image to be processed. The pyramid image data includes scaled image data at multiple levels. Based on the pyramid image data corresponding to any two adjacent images to be processed, association information is extracted from any two adjacent images to obtain the current corner point set corresponding to any two adjacent images to be processed. Any two adjacent images to be processed are the images acquired by each of the two adjacent image acquisition devices. An image scaling pyramid is constructed, and a cascaded stereo matching algorithm is used to improve stereo matching efficiency. Disparity processing is performed on the current corner point set corresponding to any two adjacent images to be processed, resulting in disparity image data corresponding to any two adjacent images to be processed. Coordinate processing is then performed on the disparity image data corresponding to any two adjacent images to be processed from multiple images to obtain target point cloud data corresponding to the target scene. This reduces the cost and improves the efficiency of point cloud data generation.
[0220] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0221] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0222] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0223] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for generating point cloud data, characterized in that, The method includes: Multiple images to be processed are acquired, which are multiple image data obtained by multiple calibrated image acquisition devices simultaneously acquiring images of the target scene. Each image to be processed is scaled a preset number of times based on a preset scaling ratio to obtain pyramid image data corresponding to each image to be processed. The pyramid image data includes multiple levels of scaled image data. Based on the pyramid image data corresponding to any two adjacent images to be processed, the association information of the two adjacent images to be processed is extracted to obtain the set of associated corner points corresponding to the two adjacent images to be processed. The two adjacent images to be processed are the images to be processed acquired by the two adjacent image acquisition devices respectively. Based on the set of associated corner points corresponding to any two adjacent images to be processed, parallax processing is performed to obtain the parallax image data corresponding to any two adjacent images to be processed. Coordinate processing is performed on the disparity image data corresponding to any two adjacent images among the plurality of images to be processed to obtain the target point cloud data corresponding to the target scene.
2. The method according to claim 1, characterized in that, The pyramid image data corresponding to the multiple images to be processed have the same scaling ratio at the same level of the scaled image data. Based on the pyramid image data corresponding to any two adjacent images to be processed, correlation information is extracted from these two adjacent images to obtain a set of associated corner points corresponding to these two adjacent images, including: Based on the scaling ratio of each level in descending order, the multiple levels are traversed; The scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed are respectively subjected to feature extraction to obtain the first corner feature data and the second corner feature data. The first image to be processed is any one of the two adjacent images to be processed, and the second image to be processed is the other one of the two adjacent images to be processed. The first corner feature data and the second corner feature data are matched to obtain the matching result; Based on the matching result, the scaled image data of the next level in the pyramid image data corresponding to the first image to be processed and the scaled image data of the next level in the pyramid image data corresponding to the second image to be processed, the error is calculated to obtain the matching error, wherein the next level is the next level adjacent to the current level; If the matching error meets the first preset condition, the current corner point set is updated based on the first corner point feature data and the second corner point feature data to obtain the associated corner point set, and the traversal stops.
3. The method according to claim 2, characterized in that, The matching error is calculated based on the matching result, the scaled image data of the next level in the pyramid image data corresponding to the first image to be processed, and the scaled image data of the next level in the pyramid image data corresponding to the second image to be processed. The error includes: The matching result is mapped to the next level of scaled image data in the pyramid image data corresponding to the first image to be processed and the next level of scaled image data in the pyramid image data corresponding to the second image to be processed, to obtain the first target scaled image data and the second target scaled image data. Based on a preset block size, the first target scaled image data and the second target scaled image data are respectively divided into blocks to obtain at least two block image data; Determine the error value for each block of image data; The matching error is determined based on the error values of all segmented image data.
4. The method according to claim 3, characterized in that, The method further includes: If the matching error does not meet the first preset condition, the target block data with the error value greater than the preset error value is determined. Extract the target corner feature data from the target block data; The current corner point set is updated based on the target corner point feature data, the first corner point feature data, and the second corner point feature data; The next level after the current processing layer is taken as the current processing layer; Repeat the following steps: Extract features from the scaled image data of the current layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the current processing layer in the pyramid image data corresponding to the second image to be processed, respectively, to obtain the first corner feature data and the second corner feature data. Based on the matching result, calculate the error from the scaled image data of the next layer in the pyramid image data corresponding to the first image to be processed and the scaled image data of the next layer in the pyramid image data corresponding to the second image to be processed, to obtain the matching error.
5. The method according to claim 1, characterized in that, Before acquiring multiple images to be processed, the method further includes: Acquire the first sample image data acquired by each of the plurality of image acquisition devices for a preset calibration plate; Based on the first sample image data, determine the image coordinate information of the preset points on the preset calibration plate; Obtain the physical location information of the preset point; The intrinsic and extrinsic parameter matrices of each image acquisition device are determined based on the image coordinate information and physical location information of the preset points.
6. The method according to claim 5, characterized in that, After determining the intrinsic and extrinsic parameter matrices of each image acquisition device based on the image coordinate information and physical location information of the preset points, the method further includes: The first image acquisition device and the second image acquisition device respectively acquire the second sample image data and the third sample image data acquired by the first image acquisition device and the second image acquisition device for the preset calibration plate. The first image acquisition device and the second image acquisition device are any two adjacent image acquisition devices among a plurality of image acquisition devices. Determine the target corner point in the preset calibration plate; Based on the second sample image data, the intrinsic parameter matrix corresponding to the first image acquisition device, and the extrinsic parameter matrix corresponding to the first image acquisition device, the first pose information of the target corner point relative to the first image acquisition device is determined; Based on the third sample image data, the intrinsic parameter matrix corresponding to the second image acquisition device, and the extrinsic parameter matrix corresponding to the second image acquisition device, the second pose information of the target corner point relative to the second image acquisition device is determined; Based on the first pose information and the second pose information, target pose transformation information between the first image acquisition device and the second image acquisition device is determined.
7. The method according to claim 6, characterized in that, The method further includes: Acquire the initial image data of the target scene collected by multiple calibrated image acquisition devices at the same time; Correction processing is performed on the intrinsic and extrinsic parameter matrices of each image acquisition device corresponding to each initial image data in the multiple initial image data, as well as the target pose transformation information between each pair of adjacent image acquisition devices, to obtain the multiple images to be processed.
8. The method according to claim 1, characterized in that, Before acquiring multiple images to be processed, the method includes: Obtain the time information of any one of the plurality of image acquisition devices; The time of other image acquisition devices among the plurality of image acquisition devices is updated based on the time information.
9. A point cloud data generation device, characterized in that, The device includes: The image acquisition module is used to acquire multiple images to be processed, which are multiple image data obtained by multiple calibrated image acquisition devices acquiring images of the target scene at the same time. The scaling processing module is used to perform scaling processing on each image to be processed a preset number of times based on a preset scaling ratio, so as to obtain the pyramid image data corresponding to each image to be processed. The pyramid image data includes multiple levels of scaled image data. The feature processing module is used to extract the association information of any two adjacent images to be processed based on the pyramid image data corresponding to any two adjacent images to be processed, and to obtain the set of associated corner points corresponding to the two adjacent images to be processed. The two adjacent images to be processed are the images to be processed acquired by any two adjacent image acquisition devices. The disparity calculation module is used to perform disparity processing based on the set of associated corner points corresponding to any two adjacent images to be processed, so as to obtain disparity image data corresponding to any two adjacent images to be processed. The point cloud data determination module is used to perform coordinate processing based on the disparity image data corresponding to any two adjacent images to be processed among the plurality of images to be processed, so as to obtain the target point cloud data corresponding to the target scene.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the point cloud data generation method as described in any one of claims 1-8.
11. An electronic device, characterized in that, The method includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that are executed by the at least one processor, and the at least one processor implements the point cloud data generation method as described in any one of claims 1-8 by executing the instructions stored in the memory.
Citation Information
Patent Citations
Disparity map acquisition method and device, electronic equipment and storage medium
CN111768434A
Monocular structured light depth recovery method, electronic equipment and storage medium
CN113658241A
