Color point cloud generation method, device and storage medium based on bilinear interpolation

Through the method based on bilinear interpolation, the problem that the existing technology cannot generate color point clouds outdoors is solved, the depth information and color information can be obtained in the outdoor environment, and the generation effect of color point clouds is improved.

CN114463180BActive Publication Date: 2024-10-25GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210125265.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-10
Publication Date
2024-10-25
Estimated Expiration
2042-02-10

AI Technical Summary

Technical Problem

Existing color point cloud generation methods are easily affected by sunlight, making it impossible to generate color point clouds outdoors.

Method used

Using a method based on bilinear interpolation, by obtaining the initial laser point cluster and image data, coordinate system conversion, laser point screening, projection and color information calculation are performed, colorless laser points are eliminated, and finally between the camera and lidar coordinate systems Convert, calculate the color information of each laser point, and form a cluster of colored laser points.

Benefits of technology

It realizes the generation of color point clouds in outdoor environments, reduces the influence of color discreteness in the process of merging point clouds and photos, and improves the generation effect of color point clouds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114463180B_ABST
    Figure CN114463180B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and storage medium for generating a color point cloud based on bilinear interpolation, and the method comprises: obtaining a first laser point cloud set and image data; performing coordinate system transformation on the first laser point cloud set to obtain a second laser point cloud set; removing the laser points at the negative pole of the z coordinate axis in the second laser point cloud set to obtain a third laser point cloud set at the positive pole of the z coordinate axis; projecting the third laser point cloud set onto the plane of the image data to form a fourth laser point cloud set; calculating the color information of each laser point in the fourth laser point cloud set by using an interpolation method, comparing the fourth laser point cloud set with the third laser point cloud set, removing the laser points without color in the third laser point cloud set to obtain a fifth laser point cloud set; performing coordinate system transformation on the fifth laser point cloud set to obtain a color laser point cloud set. The present invention can generate a color point cloud in an outdoor environment, and can effectively improve the generation effect of a color point cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, a device and a storage medium for generating a color point cloud based on bilinear interpolation. Background Art

[0002] The existing color point cloud generation method is usually the RGBD camera direct imaging method, which physically combines a depth camera with an ordinary camera to simultaneously obtain the pixel grayscale and depth of the object being photographed, and then obtains a color point cloud image after processing. The existing color point cloud generation method is easily affected by sunlight and becomes ineffective, resulting in the inability of the existing color point cloud generation method to generate color point clouds outdoors. Summary of the invention

[0003] The present invention provides a color point cloud generation method, device and storage medium based on bilinear interpolation, so as to solve the technical problem that the existing color point cloud generation method is easily affected by sunlight and becomes ineffective, resulting in the inability of the existing color point cloud generation method to generate color point clouds outdoors.

[0004] An embodiment of the present invention provides a method for generating a color point cloud based on bilinear interpolation, comprising:

[0005] Acquire an initial laser point cloud set and image data of the target area, and use the initial laser point cloud set as a first laser point cloud set;

[0006] Performing coordinate system transformation on the first laser point cloud set, transforming the first laser point cloud set from the laser radar coordinate system to the camera coordinate system, to obtain a second laser point cloud set;

[0007] Remove the laser points at the negative pole of the z-coordinate axis from the second laser point cloud set to obtain a third laser point cloud set at the positive pole of the z-coordinate axis;

[0008] Projecting the third laser point cloud set onto the plane of the image data to form a fourth laser point cloud set;

[0009] Calculate the color information of each laser point in the fourth laser point cloud set by using an interpolation method, compare the fourth laser point cloud set with the third laser point cloud set, and remove the laser points without color in the third laser point cloud set to obtain a fifth laser point cloud set;

[0010] The fifth laser point cloud set is subjected to a coordinate system transformation, and the fifth laser point cloud set is transformed from the camera coordinate system to the laser radar coordinate system to obtain a color laser point cloud set.

[0011] Furthermore, the coordinate system transformation of the first laser point cloud set to obtain a second laser point cloud set includes:

[0012] The coordinates of each laser point in the first laser point cloud set are multiplied by the transformation matrix to obtain a second laser point cloud set.

[0013] Furthermore, the method of calculating the color information of each laser point in the fourth laser point cloud set by using an interpolation method includes:

[0014] Setting the coordinates of any laser point of the fourth laser point cloud set, and acquiring the coordinates of four surrounding laser points according to the coordinates of the laser point;

[0015] Bilinear interpolation processing is performed according to the laser point coordinate and the four surrounding laser point coordinates to obtain color information of each laser point coordinate.

[0016] Furthermore, the bilinear interpolation processing is performed according to the laser point coordinates and the four surrounding laser point coordinates to obtain the color information of each laser point coordinate, including:

[0017] Determine the first color channel information corresponding to the coordinates of each of the peripheral laser points;

[0018] Determine two difference point coordinates according to the laser point coordinates and the four surrounding laser point coordinates;

[0019] Determine the second color channel information corresponding to each difference point according to the linear difference;

[0020] The color channel information of the laser point coordinates is determined according to the second color channel information.

[0021] An embodiment of the present invention provides a color point cloud generation device based on bilinear interpolation, comprising:

[0022] An initial data acquisition module, used to acquire an initial laser point cloud set and image data of a target area, and use the initial laser point cloud set as a first laser point cloud set;

[0023] A first coordinate system conversion module is used to perform coordinate system conversion on the first laser point cloud set, converting the first laser point cloud set from a laser radar coordinate system to a camera coordinate system to obtain a second laser point cloud set;

[0024] A laser point screening module, used to remove the laser points at the negative pole of the z coordinate axis in the second laser point cloud set, and obtain a third laser point cloud set at the positive pole of the z coordinate axis;

[0025] A laser point projection module, used for projecting the third laser point cloud set onto the plane of the image data to form a fourth laser point cloud set;

[0026] a laser point elimination module, configured to calculate the color information of each laser point in the fourth laser point cloud set by using an interpolation method, compare the fourth laser point cloud set with the third laser point cloud set, eliminate the laser points without color in the third laser point cloud set, and obtain a fifth laser point cloud set;

[0027] The second coordinate system conversion module is used to perform coordinate system conversion on the fifth laser point cloud set, converting the fifth laser point cloud set from the camera coordinate system to the laser radar coordinate system to obtain a color laser point cloud set.

[0028] Furthermore, the first coordinate system conversion module is specifically used for:

[0029] The coordinates of each laser point in the first laser point cloud set are multiplied by the transformation matrix to obtain a second laser point cloud set.

[0030] Furthermore, the laser point removal module is specifically used for:

[0031] Setting the coordinates of any laser point of the fourth laser point cloud set, and acquiring the coordinates of four surrounding laser points according to the coordinates of the laser point;

[0032] Bilinear interpolation processing is performed according to the laser point coordinate and the four surrounding laser point coordinates to obtain color information of each laser point coordinate.

[0033] Furthermore, the laser point removal module is specifically used for:

[0034] Determine the first color channel information corresponding to the coordinates of each of the peripheral laser points;

[0035] Determine two difference point coordinates according to the laser point coordinates and the four surrounding laser point coordinates;

[0036] Determine the second color channel information corresponding to each difference point according to the linear difference;

[0037] The color channel information of the laser point coordinates is determined according to the second color channel information.

[0038] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the color point cloud generation method based on bilinear interpolation as described above.

[0039] The embodiment of the present invention obtains an initial laser point cloud set and image data, and projects the laser point cloud set onto the plane of the image data. It is not limited by the scene, and can obtain the depth information of the image in an outdoor environment to realize the generation of a color point cloud in an outdoor environment. The embodiment of the present invention calculates the color information of the laser point cloud based on the bilinear interpolation method, and obtains colored laser points by appending the laser point cloud with the color information to the previous laser point cloud set, thereby obtaining a color laser point cloud set, which can effectively reduce the discrete effect of color in the process of merging the point cloud and the photo, and can effectively improve the generation effect of the color point cloud. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is the process intention of the method for generating a color point cloud based on bilinear interpolation provided by an embodiment of the present invention;

[0041] Figure 2 is a structural schematic diagram of a color point cloud generation system based on bilinear interpolation provided by an embodiment of the present invention;

[0042] Figure 3 is a schematic diagram of a bilinear interpolation method provided by an embodiment of the present invention;

[0043] Figure 4 It is a structural schematic diagram of a color point cloud generation device based on bilinear interpolation provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0046] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0047] See also Figure 1 An embodiment of the present invention provides a method for generating a color point cloud based on bilinear interpolation, comprising:

[0048] S1, obtaining an initial laser point cloud set and image data of the target area, and using the initial laser point cloud set as a first laser point cloud set;

[0049] In an embodiment of the present invention, a laser point cloud set and an image data are collected respectively by using a laser radar and a camera, wherein the laser radar and the camera are arranged in a target area as required, and the data collected by the laser radar and the camera are the surrounding environment data of the target area.

[0050] S2, performing coordinate system transformation on the first laser point cloud set, transforming the first laser point cloud set from the laser radar coordinate system to the camera coordinate system, to obtain a second laser point cloud set;

[0051] In one embodiment, the coordinate system transformation is achieved by using the coordinate system transformation relationship between the laser radar coordinate system and the camera coordinate system, and the coordinate system transformation relationship includes a rotation matrix and a translation vector transformation matrix.

[0052] S3, removing the laser points at the negative pole of the z coordinate axis in the second laser point cloud set, and obtaining a third laser point cloud set at the positive pole of the z coordinate axis;

[0053] In one embodiment, the laser point cloud of the first laser point cloud set is located on the z coordinate axis in the laser point cloud coordinate system. In order to improve the accuracy of generating a color point cloud, the embodiment of the present invention removes the laser points at the negative pole of the z coordinate axis to obtain a third laser point cloud set located at the positive pole of the z coordinate axis.

[0054] S4, projecting the third laser point cloud set onto the plane of the image data to form a fourth laser point cloud set;

[0055] In the embodiment of the present invention, the third laser point cloud set is projected onto the plane of the image data to form a fourth laser point cloud set located on the camera plane.

[0056] S5, using an interpolation method to calculate the color information of each laser point in the fourth laser point cloud set, comparing the fourth laser point cloud set with the third laser point cloud set, removing laser points without color in the third laser point cloud set, and obtaining a fifth laser point cloud set;

[0057] In the embodiment of the present invention, the color information of each laser point located on the photo plane is calculated using the bilinear interpolation method, which can effectively reduce the discrete effect of color in the process of fusion of laser points and photos, thereby effectively improving the generation effect of color laser point cloud.

[0058] S6. Perform coordinate system transformation on the fifth laser point cloud set, transforming the fifth laser point cloud set from the camera coordinate system to the laser radar coordinate system to obtain a color laser point cloud set.

[0059] The embodiment of the present invention obtains an initial laser point cloud set and image data, and projects the laser point cloud set onto the plane of the image data. It is not limited by the scene, and can obtain the depth information of the image in an outdoor environment to realize the generation of a color point cloud in an outdoor environment. The embodiment of the present invention calculates the color information of the laser point cloud based on the bilinear interpolation method, and obtains colored laser points by appending the laser point cloud with the color information to the previous laser point cloud set, thereby obtaining a color laser point cloud set, which can effectively reduce the discrete effect of color in the process of merging the point cloud and the photo, and can effectively improve the generation effect of the color point cloud.

[0060] See also Figure 2 , an embodiment of the present invention provides a structural schematic diagram of a color point cloud generation system based on bilinear interpolation.

[0061] In one embodiment, the coordinate system of the first laser point cloud set is transformed to obtain the second laser point cloud set, including:

[0062] The coordinates of each laser point in the first laser point cloud set are multiplied by the transformation matrix to obtain a second laser point cloud set.

[0063] Exemplarily, assuming that the coordinates p1 of a laser point in the first laser point cloud set are (x1, y1, z1), the coordinates are multiplied by the transformation matrix T to obtain the coordinates p2 (x2, y2, z2) represented by the coordinates p1 in the camera coordinate system. The calculation formula is:

[0064] p2=T*p1

[0065] The coordinates in the first laser point cloud set are multiplied by the transformation matrix T to obtain a second laser point cloud set represented in the camera coordinate system.

[0066] In one embodiment, the color information of each laser point in the fourth laser point cloud set is calculated using an interpolation method, including:

[0067] Set the coordinates of any laser point of the fourth laser point cloud set, and obtain the coordinates of four surrounding laser points according to the coordinates of the laser point;

[0068] It should be noted that the color information includes RGB three-channel color information. The embodiment of the present invention calculates R channel color information, G channel color information and B channel color information respectively, and fuses the three-channel information to obtain the total color information.

[0069] See also Figure 3 , set the coordinates of any laser point of the fourth laser point cloud set to (x, y), and obtain the coordinates of the four surrounding laser points according to the laser point coordinates, which are (x1, y1), (x2, y1), (x1, y2), and (x2, y2).

[0070] Bilinear interpolation is performed based on the laser point coordinates and the coordinates of four surrounding laser points to obtain the color information of each laser point coordinate.

[0071] In one embodiment, bilinear interpolation is performed based on the laser point coordinates and the coordinates of four surrounding laser points to obtain color information of each laser point coordinate, including:

[0072] Determine the first color channel information corresponding to the coordinates of each peripheral laser point;

[0073] In the embodiment of the present invention, the R channel color information of the four peripheral laser points are r11, r21, r12, and r22 respectively.

[0074] Determine the coordinates of two difference points according to the coordinates of the laser point and the coordinates of four surrounding laser points;

[0075] In the embodiment of the present invention, two difference point coordinates are determined as (x, y1) and (x, y2) according to the laser point coordinates and the four surrounding laser point coordinates.

[0076] Determine the second color channel information corresponding to each difference point according to the linear difference;

[0077]

[0078] Among them, r1 is the R channel color information corresponding to the difference point (x, y1), and r2 is the color channel information corresponding to the difference point (x, y2).

[0079] The color channel information of the laser point coordinates is determined according to the second color channel information.

[0080] Specifically:

[0081]

[0082] The R channel color information can be obtained, and based on the same technical concept as the above technical solution, the G channel color information and the B channel color information are calculated.

[0083] The implementation of the embodiments of the present invention has the following beneficial effects:

[0084] The embodiment of the present invention obtains an initial laser point cloud set and image data, and projects the laser point cloud set onto the plane of the image data. It is not limited by the scene, and can obtain the depth information of the image in an outdoor environment to realize the generation of a color point cloud in an outdoor environment. The embodiment of the present invention calculates the color information of the laser point cloud based on the bilinear interpolation method, and obtains colored laser points by appending the laser point cloud with the color information to the previous laser point cloud set, thereby obtaining a color laser point cloud set, which can effectively reduce the discrete effect of color in the process of merging the point cloud and the photo, and can effectively improve the generation effect of the color point cloud.

[0085] See also Figure 4 Based on the same technical concept as the above embodiment, an implementation of the present invention provides a color point cloud generation device based on bilinear interpolation, comprising:

[0086] An initial data acquisition module 10 is used to acquire an initial laser point cloud set and image data of a target area, and use the initial laser point cloud set as a first laser point cloud set;

[0087] A first coordinate system conversion module 20 is used to perform coordinate system conversion on the first laser point cloud set, converting the first laser point cloud set from the laser radar coordinate system to the camera coordinate system to obtain a second laser point cloud set;

[0088] The laser point screening module 30 is used to remove the laser points at the negative pole of the z coordinate axis in the second laser point cloud set to obtain a third laser point cloud set at the positive pole of the z coordinate axis;

[0089] A laser point projection module 40 is used to project the third laser point cloud set onto the plane of the image data to form a fourth laser point cloud set;

[0090] The laser point removal module 50 is used to calculate the color information of each laser point in the fourth laser point cloud set by using an interpolation method, compare the fourth laser point cloud set with the third laser point cloud set, remove the laser points without color in the third laser point cloud set, and obtain a fifth laser point cloud set;

[0091] The second coordinate system conversion module 60 is used to perform coordinate system conversion on the fifth laser point cloud set, and convert the fifth laser point cloud set from the camera coordinate system to the laser radar coordinate system to obtain a color laser point cloud set.

[0092] In one embodiment, the first coordinate system conversion module 20 is specifically used for:

[0093] The coordinates of each laser point in the first laser point cloud set are multiplied by the transformation matrix to obtain a second laser point cloud set.

[0094] In one embodiment, the laser point removal module 50 is specifically used for:

[0095] Set the coordinates of any laser point of the fourth laser point cloud set, and obtain the coordinates of four surrounding laser points according to the coordinates of the laser point;

[0096] Bilinear interpolation is performed based on the laser point coordinates and the coordinates of four surrounding laser points to obtain the color information of each laser point coordinate.

[0097] In one embodiment, the laser point removal module 50 is specifically used for:

[0098] Determine the first color channel information corresponding to the coordinates of each peripheral laser point;

[0099] Determine the coordinates of two difference points according to the coordinates of the laser point and the coordinates of four surrounding laser points;

[0100] Determine the second color channel information corresponding to each difference point according to the linear difference;

[0101] The color channel information of the laser point coordinates is determined according to the second color channel information.

[0102] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the color point cloud generation method based on bilinear interpolation as described above.

[0103] The above are preferred embodiments of the present invention. It should be noted that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for generating a color point cloud based on bilinear interpolation, characterized in that: include: Acquire an initial laser point cloud set and image data of the target area, and use the initial laser point cloud set as a first laser point cloud set; Performing coordinate system transformation on the first laser point cloud set, transforming the first laser point cloud set from the laser radar coordinate system to the camera coordinate system, to obtain a second laser point cloud set; Remove the laser points at the negative pole of the z-coordinate axis from the second laser point cloud set to obtain a third laser point cloud set at the positive pole of the z-coordinate axis; Projecting the third laser point cloud set onto the plane of the image data to form a fourth laser point cloud set; The color information of each laser point in the fourth laser point cloud set is calculated by using an interpolation method, and the fourth laser point cloud set is compared with the third laser point cloud set, and laser points without color in the third laser point cloud set are eliminated to obtain a fifth laser point cloud set; the color information of each laser point in the fourth laser point cloud set is calculated by using an interpolation method, including: setting any laser point coordinate (x, y) of the fourth laser point cloud set, and obtaining four peripheral laser point coordinates (x1, y1), (x2, y1), (x1, y2), and (x2, y2) according to the laser point coordinate; performing bilinear interpolation processing on the laser point coordinate and the four peripheral laser point coordinates to obtain the color information of each laser point coordinate; The step of performing bilinear interpolation processing on the laser point coordinate and the four peripheral laser point coordinates to obtain color information of each laser point coordinate includes: determining first color channel information corresponding to each peripheral laser point coordinate; Determine two difference point coordinates (x, y1), (x, y2) according to the laser point coordinates and the four surrounding laser point coordinates; determine the second color channel information corresponding to each difference point according to the linear difference: Among them, r1 is the R channel color information corresponding to the difference point (x, y1), r2 is the color channel information corresponding to the difference point (x, y2), and r 11 、r 21 、r 12 、r 22 They are the R channel color information of the four surrounding laser points; Determine the color channel information of the laser point coordinates according to the second color channel information: Wherein, r is the R color channel information of the laser point coordinates; The fifth laser point cloud set is subjected to a coordinate system transformation, and the fifth laser point cloud set is transformed from the camera coordinate system to the laser radar coordinate system to obtain a color laser point cloud set.

2. The method for generating a color point cloud based on bilinear interpolation according to claim 1, characterized in that: The step of performing coordinate system transformation on the first laser point cloud set to obtain a second laser point cloud set includes: The coordinates of each laser point in the first laser point cloud set are multiplied by the transformation matrix to obtain a second laser point cloud set.

3. A color point cloud generation device based on bilinear interpolation, characterized in that: include: An initial data acquisition module, used to acquire an initial laser point cloud set and image data of a target area, and use the initial laser point cloud set as a first laser point cloud set; A first coordinate system conversion module is used to perform coordinate system conversion on the first laser point cloud set, converting the first laser point cloud set from a laser radar coordinate system to a camera coordinate system to obtain a second laser point cloud set; A laser point screening module, used to remove the laser points at the negative pole of the z coordinate axis in the second laser point cloud set, and obtain a third laser point cloud set at the positive pole of the z coordinate axis; A laser point projection module, used for projecting the third laser point cloud set onto the plane of the image data to form a fourth laser point cloud set; A laser point removal module is used to calculate the color information of each laser point in the fourth laser point cloud set by using an interpolation method, compare the fourth laser point cloud set with the third laser point cloud set, remove the laser points without color in the third laser point cloud set, and obtain a fifth laser point cloud set; the method of calculating the color information of each laser point in the fourth laser point cloud set by using an interpolation method includes: setting any laser point coordinate (x, y) of the fourth laser point cloud set, and obtaining four peripheral laser point coordinates (x1, y1), (x2, y1), (x1, y2), and (x2, y2) according to the laser point coordinate; and performing bilinear interpolation processing on the laser point coordinate and the four peripheral laser point coordinates to obtain the color information of each laser point coordinate; The step of performing bilinear interpolation processing on the laser point coordinate and the four peripheral laser point coordinates to obtain color information of each laser point coordinate includes: determining first color channel information corresponding to each peripheral laser point coordinate; Determine two difference point coordinates (x, y1), (x, y2) according to the laser point coordinates and the four surrounding laser point coordinates; determine the second color channel information corresponding to each difference point according to the linear difference: Among them, r1 is the R channel color information corresponding to the difference point (x, y1), r2 is the color channel information corresponding to the difference point (x, y2), and r 11 、r 21 、r 12 、r 22 They are the R channel color information of the four surrounding laser points; Determine the color channel information of the laser point coordinates according to the second color channel information: Wherein, r is the R color channel information of the laser point coordinates; The second coordinate system conversion module is used to perform coordinate system conversion on the fifth laser point cloud set, converting the fifth laser point cloud set from the camera coordinate system to the laser radar coordinate system to obtain a color laser point cloud set.

4. The color point cloud generation device based on bilinear interpolation according to claim 3, characterized in that: The first coordinate system conversion module is specifically used for: The coordinates of each laser point in the first laser point cloud set are multiplied by the transformation matrix to obtain a second laser point cloud set.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the color point cloud generation method based on bilinear interpolation as described in any one of claims 1 to 2.