A color point cloud generation method, system and application method
The bicubic interpolation method is used to fuse photos and point clouds, which solves the problem of large color errors in color point cloud generation in the existing technology, achieves accurate color point cloud generation, and is suitable for the field of multi-source sensor fusion.
Patent Information
- Application Number
- CN202210215242.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-03-07
AI Technical Summary
Among the existing color point cloud generation methods, the nearest neighbor method causes the loss of surrounding pixel information, the color does not conform to the actual situation, and there is a lack of effective color point cloud generation methods.
The bicubic interpolation method is used for point cloud dyeing, and the coordinate system transformation matrix of the synchronized timing unit, photo input unit and point cloud input unit is used to fuse photos and point clouds, calculate the color information of laser points, and reduce color errors.
It achieves accurate generation of color point clouds and reduces color errors. The obtained color point cloud colors are closer to reality with less distortion, and are suitable for the field of multi-source sensor fusion.
Smart Images

Figure CN114627224B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of color point cloud generation, and in particular to a color point cloud generation method, system and application method. Background Art
[0002] The traditional method for generating color point clouds is the RGBD camera direct imaging method, which uses a physical combination of a depth camera and an ordinary camera to simultaneously obtain the pixel grayscale and pixel depth of the object being photographed, and then obtains a color point cloud image after processing. There is also a method that uses the nearest neighbor method to fuse cameras and lidar to form a color point cloud.
[0003] The principle of the nearest neighbor method is that when determining the color of a laser point, the four nearest pixels on the photo will be searched, and the color of the pixel closest to the laser point will be found, that is, the color of the pixel will be determined as the color of the laser point; the disadvantage is that only considering the nearest pixel will often cause the loss of surrounding pixel information, and the color of the point may not necessarily conform to the actual situation.
[0004] The prior art lacks an effective method for generating colored point clouds.
[0005] The disclosure of the above background technology content is only used to assist in understanding the concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the invention
[0006] In order to solve the existing problems, the present invention provides a color point cloud generation method, system and application method.
[0007] In order to solve the above problems, the technical solution adopted by the present invention is as follows:
[0008] A method for generating a color point cloud comprises the following steps: S1: a synchronous timing unit synchronizes the timing of a photo input unit and a point cloud input unit, so that the photo input unit and the point cloud input unit receive acquisition signals at the same time, the photo input unit acquires a photo of an external environment, and the point cloud input unit acquires a point cloud of the external environment; S2: a point cloud coloring unit uses a bicubic interpolation method to perform a point cloud coloring operation of the photo and the point cloud fusion according to the photo and the point cloud and the coordinate system transformation matrix T of the photo input unit and the point cloud input unit to obtain a color point cloud; S3: a result output unit receives the color point cloud of the point cloud coloring unit and outputs it externally.
[0009] Preferably, the carrier of the photo input unit is a camera, and the carrier of the point cloud input unit is a laser radar; the laser point cloud set C0 acquired by the laser radar is transformed into a coordinate system through the coordinate system transformation matrix T, and the first laser point cloud set C1 after the transformation of the coordinate system is obtained from the laser radar coordinate system to the camera coordinate system.
[0010] Preferably, processing the first laser point cloud set C1 to obtain a third laser point cloud set C3 located on the photo plane includes the following steps: removing the points at the negative pole of the z-coordinate axis in the camera coordinate system in the first laser point cloud set C1, and then obtaining the second laser point cloud set C2 at the positive pole of the z-coordinate axis; projecting the second laser point cloud set C2 onto the photo plane by a projection method to form a third laser point cloud set C3 located on the photo plane.
[0011] Preferably, the point cloud coloring operation of the fusion of the photo and the point cloud using the bicubic interpolation method to obtain a colored point cloud includes: S21: calculating the color information of each laser point in the third laser point cloud set C3 located on the plane of the photo using the bicubic interpolation method; S22: obtaining the colored point cloud based on the color information of the laser points in the third laser point cloud set C3.
[0012] Preferably, bicubic interpolation is performed from the laser point in the laser point cloud set C3 to the 16 nearest pixel points around it, and the color information of the laser point in the laser point cloud set C3 is obtained by weighted average of the 16 pixel points, specifically including: the coordinates of any laser point in the third laser point cloud set C3 located on the photo plane are P(x, y), and the RGB three-channel values of the pixel point are r, g, and b respectively; the coordinates of the 16 nearest pixel points around the P point and the R channel information, G channel information, and B channel information of the 16 pixel points are obtained;
[0013] The coordinates of the 16 nearest pixel points around point P are (x1, y1), (x2, y1), (x3, y1), (x4, y1), (x1, y2), (x2, y2), (x3, y2), (x4, y2), (x1, y3), (x2, y3), (x3, y3), (x4, y3), (x1, y4), (x2, y4), (x3, y4), (x4, y4);
[0014] The R channel information of the 16 pixels is r11, r21, r31, r41, r12, r22, r32, r42, r13, r23, r33, r43, r14, r24, r34, r44, the G channel information is g11, g21, g31, g41, g12, g22, g32, g42, g13, g23, g33, g43, g14, g24, g34, g44, and the B channel information is b11, b21, b31, b41, b12, b22, b32, b42, b13, b23, b33, b43, b14, b24, b34, b44;
[0015] Calculate the value r corresponding to the R channel of point P. According to the bicubic interpolation method, the matrix form is defined as follows:
[0016] Ar=[f(x-x1),f(x-x1-1),f(2-x+x1),f(3-x+x1)]
[0017]
[0018] Cr=[f(y-y1),f(y-y1-1),f(2-y+y1),f(3-y+y1)] T
[0019] The interpolation function is:
[0020]
[0021] The R channel fitting pixel value r of point P is:
[0022] r=Ar×Br×Cr
[0023] Calculate the value g corresponding to the G channel of point P, and define the matrix form according to the bicubic interpolation method as follows:
[0024] Ag=[f(x-x1),f(x-x1-1),f(2-x+x1),f(3-x+x1)]
[0025]
[0026] Cg=[f(y-y1),f(y-y1-1),f(2-y+y1),f(3-y+y1)] T
[0027] The G channel fitting pixel value g of P is:
[0028] g=Ag×Bg×Cg
[0029] Calculate the value b corresponding to the B channel of point P, and define the matrix form according to the bicubic interpolation method as follows:
[0030] Ab=[f(x-x1),f(x-x1-1),f(2-x+x1),f(3-x+x1)]
[0031]
[0032] Cb=[f(y-y1),f(y-y1-1),f(2-y+y1),f(3-y+y1)] T
[0033] The B channel fitting pixel value b of P is:
[0034] b=Ab×Bb×Cb
[0035] Through the above steps, the value of the RGB channel corresponding to point P can be obtained, and then the color information of point P can be obtained.
[0036] Preferably, obtaining the colored point cloud based on the color information of the laser points in the third laser point cloud set C3 comprises the following steps: the color information of each laser point on the third laser point cloud set C3 is added to the second laser point cloud set C2 and the laser points without color are removed to obtain a fourth laser point cloud set C4; the fourth laser point cloud set C4 is transformed in the coordinate system by the inverse of the transformation matrix T, from the camera coordinate system to the lidar coordinate system to obtain the colored point cloud after the transformed coordinate system.
[0037] The present invention provides a color point cloud generation system for implementing any of the methods described above, comprising: a synchronous timing unit, a photo input unit, a point cloud input unit, a point cloud coloring unit, and a result output unit; the synchronous timing unit is used to synchronously time the photo input unit and the point cloud input unit so that the photo input unit and the point cloud input unit synchronously receive acquisition signals; the camera acquisition unit is used to acquire photos of the external environment; the point cloud input unit is used to acquire the point cloud of the external environment; the point cloud coloring unit is used to perform a point cloud coloring operation of the fusion of the photo and the point cloud by a bicubic interpolation method according to the point cloud acquired by the point cloud acquisition unit, the photo acquired by the photo acquisition unit, and the coordinate system transformation matrix of the photo input unit and the point cloud input unit to obtain a color point cloud; the result output unit is used to receive the color point cloud and output it externally.
[0038] Preferably, the synchronous timing unit is a synchronous clock, the photo input unit is a camera, the point cloud input unit is a laser radar, the point cloud coloring unit is a central processing unit, and the result output unit is a display screen; the synchronous clock is connected to the camera and the laser radar, the camera and the laser radar are connected to the central processing unit, and the central processing unit is connected to the display screen.
[0039] The present invention further provides an application method of a color point cloud, which generates a color point cloud by using any of the above methods.
[0040] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0041] The beneficial effects of the present invention are: providing a color point cloud generation method, system and application method, by applying the bicubic interpolation method to point cloud coloring, fusing the point cloud input unit and the photo input unit to fit the color of the point cloud, reducing color errors, and realizing the function of point cloud coloring. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 Schematic diagram of a method for generating a color point cloud in an embodiment of the present invention.
[0043] Figure 2 It is a schematic diagram of a method for processing a laser point cloud set to obtain a laser point cloud set located on a photo plane in an embodiment of the present invention.
[0044] Figure 3 2 is a schematic diagram of a method for obtaining a colored point cloud by performing a point cloud coloring operation for fusing a photo and a point cloud using a bicubic interpolation method in an embodiment of the present invention.
[0045] Figure 4 Schematic diagram of the 16 nearest pixel points around point P in an embodiment of the present invention.
[0046] Figure 5 It is a schematic diagram of a method for obtaining a color point cloud based on color information of laser points in a laser point cloud set in an embodiment of the present invention.
[0047] Figure 6 Schematic diagram of a color point cloud generation system in an embodiment of the present invention.
[0048] Figure 7 It is a schematic diagram of a color point cloud generation process in an embodiment of the present invention.
[0049] Figure 8 Schematic diagram of a photo in an embodiment of the present invention.
[0050] Fig. 9Schematic diagram of a laser point cloud set in an embodiment of the present invention.
[0051] Fig.10 Schematic diagram of a second laser point cloud set C2 in an embodiment of the present invention.
[0052] Fig.11 Schematic diagram of a third laser point cloud set C3 in an embodiment of the present invention.
[0053] Fig.12 is a schematic diagram of a fourth laser point cloud C4 in an embodiment of the present invention.
[0054] Fig.13 is a schematic diagram of a fifth laser point cloud set C5 in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the technical problems, technical solutions and beneficial effects to be solved by the embodiments of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0056] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it can be directly on the other component or indirectly on the other component. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element. In addition, connection can be used for both fixing and circuit connection.
[0057] It should be understood that the orientation or position relationship indicated by terms such as "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0058] In addition, 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 features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0059] The bicubic interpolation method in the prior art is generally used for image processing, not for point cloud processing. The present invention uses the bicubic interpolation method for point cloud coloring for the first time. The present invention applies the bicubic interpolation method to point cloud coloring for the first time, which belongs to the field of multi-source sensor fusion, and integrates the laser radar and the photo to realize the function of point cloud coloring. Specifically, the laser point cloud is first transformed into the photo plane, and the laser point is transformed into the pixel point plane of the photo by projection to realize the first synchronization of space; but since the transformed point is generally a floating point number and the point on the photo plane is an integer, the transformed point cannot correspond to the point on the photo plane. If the point with the nearest color is directly selected, the photo information cannot be fully utilized. Therefore, it is designed to select 16 pixels around the transformed point, and fit the color of the point by the bicubic interpolation method, thereby reducing the color error, realizing the second synchronization of space, and finally transforming back to the laser radar coordinate system to realize the function of point cloud coloring.
[0060] like Figure 1 As shown, the present invention provides a method for generating a color point cloud, comprising the following steps:
[0061] S1: The synchronous timing unit synchronizes the timing of the photo input unit and the point cloud input unit, so that the photo input unit and the point cloud input unit receive the acquisition signal at the same time, the photo input unit acquires the photo of the external environment, and the point cloud input unit acquires the point cloud of the external environment;
[0062] S2: the point cloud coloring unit performs a point cloud coloring operation of the fused photo and the point cloud by using a bicubic interpolation method according to the photo and the point cloud and the coordinate system transformation matrix T of the photo input unit and the point cloud input unit to obtain a colored point cloud;
[0063] S3: The result output unit receives the colored point cloud from the point cloud coloring unit and outputs it externally.
[0064] The method based on bicubic interpolation of the present invention reduces the influence of color discreteness in the process of fusion of point cloud and photo to a certain extent, and the color of the obtained color point cloud is closer to the actual color, and the degree of distortion is relatively small.
[0065] Furthermore, a synchronous timing unit is added to reduce the time difference between the camera and the lidar when collecting data at the same time, so as to achieve the effect of synchronous work.
[0066] In a specific embodiment, the carrier of the photo input unit is a camera, and the carrier of the point cloud input unit is a laser radar;
[0067] The laser point cloud set C0 acquired by the laser radar is transformed into a coordinate system through the coordinate system transformation matrix T, and is transformed from the laser radar coordinate system to the camera coordinate system to obtain a first laser point cloud set C1 after the transformed coordinate system.
[0068] The traditional RGBD camera method for generating color point clouds cannot be used outdoors. The present invention uses cameras and lidar equipment to break the environmental limitations of color point cloud generation.
[0069] like Figure 2 As shown, in one embodiment of the present invention, processing the first laser point cloud set C1 to obtain a third laser point cloud set C3 located on the photo plane includes the following steps:
[0070] The points at the negative pole of the z coordinate axis in the camera coordinate system are removed from the first laser point cloud set C1, and then a second laser point cloud set C2 at the positive pole of the z coordinate axis is obtained;
[0071] The second laser point cloud set C2 is projected onto the photo plane by a projection method to form a third laser point cloud set C3 located on the photo plane.
[0072] The above steps are used to realize the transformation of laser point cloud to photo plane, and the laser points are transformed to the pixel point plane of the photo by projection.
[0073] like Figure 3 As shown, in one embodiment of the present invention, using a bicubic interpolation method to perform a point cloud coloring operation of the fusion of the photo and the point cloud to obtain a colored point cloud includes:
[0074] Calculating the color information of each laser point in the third laser point cloud set C3 located on the photo plane by using a bicubic interpolation method;
[0075] The color point cloud is obtained based on the color information of the laser points in the third laser point cloud set C3.
[0076] Specifically, bicubic interpolation is performed from the laser point in the third laser point cloud set C3 to the 16 nearest pixel points around it, and weighted average of the 16 pixel points is performed to obtain the color information of the laser point in the third laser point cloud set C3, specifically including:
[0077] The coordinates of any laser point in the third laser point cloud C3 on the photo plane are P(x, y), and the RGB three-channel values of the pixel point are r, g, and b respectively; the coordinates of the 16 nearest pixel points around point P and the R channel information, G channel information, and B channel information of the 16 pixel points are obtained;
[0078] like Figure 4As shown, the coordinates of the 16 nearest pixel points around point P are (x1, y1), (x2, y1), (x3, y1), (x4, y1), (x1, y2), (x2, y2), (x3, y2), (x4, y2), (x1, y3), (x2, y3), (x3, y3), (x4, y3), (x1, y4), (x2, y4), (x3, y4), (x4, y4);
[0079] The R channel information of the 16 pixels is r11, r21, r31, r41, r12, r22, r32, r42, r13, r23, r33, r43, r14, r24, r34, r44, the G channel information is g11, g21, g31, g41, g12, g22, g32, g42, g13, g23, g33, g43, g14, g24, g34, g44, and the B channel information is b11, b21, b31, b41, b12, b22, b32, b42, b13, b23, b33, b43, b14, b24, b34, b44;
[0080] Calculate the value r corresponding to the R channel of point P. According to the bicubic interpolation method, the matrix form is defined as follows:
[0081] Ar=[f(x-x1),f(x-x1-1),f(2-x+x1),f(3-x+x1)]
[0082]
[0083] Cr=[f(y-y1),f(y-y1-1),f(2-y+y1),f(3-y+y1)] T
[0084] The interpolation function is:
[0085]
[0086] The R channel fitting pixel value r of point P is:
[0087] r=Ar×Br×Cr
[0088] Calculate the value g corresponding to the G channel of point P, and define the matrix form according to the bicubic interpolation method as follows:
[0089] Ag=[f(x-x1),f(x-x1-1),f(2-x+x1),f(3-x+x1)]
[0090]
[0091] Cg=[f(y-y1),f(y-y1-1),f(2-y+y1),f(3-y+y1)] T
[0092] The G channel fitting pixel value g of P is:
[0093] g=Ag×Bg×Cg
[0094] Calculate the value b corresponding to the B channel of point P, and define the matrix form according to the bicubic interpolation method as follows:
[0095] Ab=[f(x-x1),f(x-x1-1),f(2-x+x1),f(3-x+x1)]
[0096]
[0097] Cb=[f(y-y1),f(y-y1-1),f(2-y+y1),f(3-y+y1)] T
[0098] The B channel fitting pixel value b of P is:
[0099] b=Ab×Bb×Cb
[0100] Through the above steps, the value of the RGB channel corresponding to point P can be obtained, and then the color information of point P can be obtained.
[0101] The present invention selects 16 pixels around the transformed point and fits the color of the point through the bicubic interpolation method, thereby reducing the color error and achieving the second synchronization of the space, and finally transforms it back to the laser radar coordinate system to realize the function of point cloud coloring.
[0102] like Figure 5 As shown, obtaining the color point cloud based on the color information of the laser points in the third laser point cloud set C3 includes the following steps:
[0103] The color information of each laser point on the third laser point cloud set C3 is added to the second laser point cloud set C2 and the laser points without color are removed to obtain a fourth laser point cloud set C4;
[0104] The fourth laser point cloud set C4 is transformed in coordinate system by the inverse of the transformation matrix T, and is transformed from the camera coordinate system to the laser radar coordinate system to obtain the color point cloud after the transformed coordinate system.
[0105] like Figure 6 As shown, the present invention also provides a color point cloud generation system, which is used to implement any of the above methods, including: a synchronization timing unit, a photo input unit, a point cloud input unit, a point cloud coloring unit, and a result output unit;
[0106] The synchronous timing unit is used to synchronously provide timing to the photo input unit and the point cloud input unit, so that the photo input unit and the point cloud input unit synchronously receive acquisition signals;
[0107] The camera acquisition unit is used to collect photos of the external environment;
[0108] The point cloud input unit is used to collect the point cloud of the external environment;
[0109] The point cloud coloring unit is used to perform a point cloud coloring operation of the fusion of the photo and the point cloud by using a bicubic interpolation method to obtain a colored point cloud according to the point cloud collected by the point cloud collection unit, the photo collected by the photo collection unit, and the coordinate system transformation matrix of the photo input unit and the point cloud input unit;
[0110] The result output unit is used to receive the color point cloud and output it externally.
[0111] In a specific embodiment, the synchronous timing unit is a synchronous clock, the photo input unit is a camera, the point cloud input unit is a laser radar, the point cloud coloring unit is a central processing unit, and the result output unit is a display screen;
[0112] The synchronous clock is connected to the camera and the laser radar, the camera and the laser radar are connected to the central processing unit, and the central processing unit is connected to the display screen.
[0113] The method for generating a color point cloud of the present invention can be applied to applications of color point clouds, such as the field of unmanned driving.
[0114] like Figure 7 As shown, in the system of the present invention, the collected laser point cloud set C0, the photo P, the photo input unit and the coordinate system transformation matrix T of the point cloud input unit are input.
[0115] like Figure 8 , which is a schematic diagram of a photo in an embodiment of the present invention.
[0116] like Fig. 9 , which is a schematic diagram of a laser point cloud set in an embodiment of the present invention.
[0117] 2. The acquired laser point cloud set C0 is transformed into a coordinate system through the transformation matrix T, and the first laser point cloud set C1 after the transformation is obtained from the laser radar coordinate system to the camera coordinate system;
[0118] 3. Remove the point cloud at the negative pole of the z coordinate axis in the camera coordinate system from the first laser point cloud set C1 to obtain the second laser point cloud set C2 at the positive pole of the z coordinate axis;
[0119] like Fig.10 , which is a schematic diagram of a second laser point cloud set C2 in an embodiment of the present invention.
[0120] 4. Project the second laser point cloud set C2 onto the plane of the photo P by a projection method to form a third laser point cloud set C3 located on the plane of the photo;
[0121] like Fig.11 , which is a schematic diagram of a third laser point cloud set C3 in an embodiment of the present invention.
[0122] 5. The color information of each laser point located on the photo plane is calculated using the bicubic interpolation method. Since the pixel coordinates are all integers, but the laser points projected onto the photo are non-integers, the bicubic interpolation can be performed from the projection point to the laser points of the surrounding 16 pixels to solve the problem that the color information of the laser points cannot be determined due to the discreteness of the color coordinates during the dyeing process. In one embodiment of the present invention, the laser points that cannot be bicubic interpolated are discarded, that is, the laser points with fewer than 16 pixels of surrounding points are discarded.
[0123] 6. The color information of each laser point on the third laser point cloud set C3 obtained in step 5 is added to the second laser point cloud set C2, and then the laser points without color are removed to obtain the fourth laser point cloud set C4.
[0124] like Fig.12 , which is a schematic diagram of a fourth laser point cloud set C4 in an embodiment of the present invention.
[0125] 7. The fourth laser point cloud set C4 obtained in step 6 is transformed from the camera coordinate system to the laser radar coordinate system through the inverse of the transformation matrix T to obtain the fifth laser point cloud set C5 after the transformed coordinate system.
[0126] like Fig.13 , which is a schematic diagram of a fifth laser point cloud set C5 in an embodiment of the present invention.
[0127] 8. Finally, according to step 7, the fifth colored laser point cloud set C5 is output, and the algorithm process ends.
[0128] An embodiment of the present application also provides a control device, including a processor and a storage medium for storing a computer program; wherein the processor is used to execute at least the method described above when executing the computer program.
[0129] An embodiment of the present application also provides a storage medium for storing a computer program, which at least performs the method described above when executed.
[0130] An embodiment of the present application further provides a processor, which executes a computer program and at least performs the method described above.
[0131] The storage medium may be implemented by any type of volatile or non-volatile storage device, or a combination thereof. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a disk memory or a tape memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAMEnhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0132] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0133] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0134] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0135] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.
[0136] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0137] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0138] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0139] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0140] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope of the present invention.
Claims
1. A method for generating a color point cloud, characterized in that: The steps include: S1: The synchronous timing unit synchronizes the timing of the photo input unit and the point cloud input unit, so that the photo input unit and the point cloud input unit receive the acquisition signal at the same time, the photo input unit acquires the photo of the external environment, and the point cloud input unit acquires the point cloud of the external environment; S2: the point cloud coloring unit performs a point cloud coloring operation of the fused photo and the point cloud by using a bicubic interpolation method according to the photo and the point cloud and the coordinate system transformation matrix T of the photo input unit and the point cloud input unit to obtain a colored point cloud; S3: a result output unit receives the colored point cloud from the point cloud coloring unit and outputs it externally; The carrier of the photo input unit is a camera, and the carrier of the point cloud input unit is a laser radar; Step S2 includes performing coordinate system transformation on the laser point cloud set C0 acquired by the laser radar through the coordinate system transformation matrix T, and transforming the laser point cloud set C0 from the laser radar coordinate system to the camera coordinate system to obtain a first laser point cloud set C1 after the coordinate system transformation; Step S2 also includes: The points at the negative pole of the z coordinate axis in the camera coordinate system are removed from the first laser point cloud set C1, and then a second laser point cloud set C2 at the positive pole of the z coordinate axis is obtained; Projecting the second laser point cloud set C2 onto the photo plane by a projection method to form a third laser point cloud set C3 located on the photo plane; The point cloud coloring operation of the fused photo and the point cloud is performed by using a bicubic interpolation method to obtain a colored point cloud, comprising the following steps: S21: Calculate the color information of each laser point in the third laser point cloud set C3 located on the photo plane by using a bicubic interpolation method; S22: Obtaining the color point cloud based on the color information of the laser points in the third laser point cloud set C3; Step S21 specifically includes: The coordinates of any laser point in the third laser point cloud C3 on the photo plane are P(x, y), and the RGB three-channel values of the pixel point are r, g, and b respectively; the coordinates of the 16 nearest pixel points around point P and the R channel information, G channel information, and B channel information of the 16 pixel points are obtained; The coordinates of the 16 nearest pixel points around point P are (x1, y1), (x2, y1), (x3, y1), (x4, y1), (x1, y2), (x2, y2), (x3, y2), (x4, y2), (x1, y3), (x2, y3), (x3, y3), (x4, y3), (x1, y4), (x2, y4), (x3, y4), (x4, y4); The R channel information of the 16 pixels is r11, r21, r31, r41, r12, r22, r32, r42, r13, r23, r33, r43, r14, r24, r34, r44, the G channel information is g11, g21, g31, g41, g12, g22, g32, g42, g13, g23, g33, g43, g14, g24, g34, g44, and the B channel information is b11, b21, b31, b41, b12, b22, b32, b42, b13, b23, b33, b43, b14, b24, b34, b44; Calculate the value r corresponding to the R channel of point P. According to the bicubic interpolation method, the matrix form is defined as follows: Cr=[f(y-y1),f(y-y11),f(2-y+y1),f(3-y+y1)] T The interpolation function is: The R channel fitting pixel value r of point P is: r=Ar×Br×Cr Calculate the value g corresponding to the G channel of point P, and define the matrix form according to the bicubic interpolation method as follows: C=[f(-1),(-1-1),(2-+y1),(3-+1)] T The G channel fitting pixel value g of P is: g=Ag×Bg×Cg Calculate the value b corresponding to the B channel of point P, and define the matrix form according to the bicubic interpolation method as follows: C=[f(-1),(-1-1),(2-+y1),(3-+1)] T The B channel fitting pixel value b of P is: b=Ab×Bb×Cb Through the above steps, the value of the RGB channel corresponding to point P can be obtained, and then the color information of point P can be obtained.
2. The method for generating a color point cloud according to claim 1, wherein: Step S22 specifically includes: The color information of each laser point on the third laser point cloud set C3 is added to the second laser point cloud set C2 and the laser points without color are removed to obtain a fourth laser point cloud set C4; The fourth laser point cloud set C4 is transformed in coordinate system by the inverse of the transformation matrix T, and is transformed from the camera coordinate system to the laser radar coordinate system to obtain the color point cloud after the transformed coordinate system.
3. A color point cloud generation system, characterized in that: Used to implement the method according to any one of claims 1-2, comprising: a synchronous timing unit, a photo input unit, a point cloud input unit, a point cloud coloring unit, and a result output unit; The synchronous timing unit is used to synchronously provide timing to the photo input unit and the point cloud input unit, so that the photo input unit and the point cloud input unit synchronously receive acquisition signals; The camera acquisition unit is used to collect photos of the external environment; The point cloud input unit is used to collect the point cloud of the external environment; The point cloud coloring unit is used to perform a point cloud coloring operation of the fusion of the photo and the point cloud by using a bicubic interpolation method to obtain a colored point cloud according to the point cloud collected by the point cloud collection unit, the photo collected by the photo collection unit, and the coordinate system transformation matrix of the photo input unit and the point cloud input unit; The result output unit is used to receive the color point cloud and output it externally.
4. The color point cloud generation system according to claim 3, characterized in that: The synchronous timing unit is a synchronous clock, the photo input unit is a camera, the point cloud input unit is a laser radar, the point cloud coloring unit is a central processing unit, and the result output unit is a display screen; The synchronous clock is connected to the camera and the laser radar, the camera and the laser radar are connected to the central processing unit, and the central processing unit is connected to the display screen.
5. A method for applying a color point cloud, characterized in that: A color point cloud is generated by the method described in any one of claims 1 to 2.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
