Storage method and apparatus for point cloud data, and device and medium
By converting point cloud data from single-precision floating-point format to half-precision floating-point format storage, it solves the problems of reduced data quality and high computational load in the existing technology when reducing memory requirements, and achieves high-precision and real-time Memory optimization.
Patent Information
- Application Number
- PCT/CN2024/079949
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2024-03-04
- Publication Date
- 2024-09-12
AI Technical Summary
When existing technologies reduce the memory requirements for point cloud data storage, they usually reduce data quality or require a high amount of calculation, and cannot meet scanning tasks that require high precision and real-time performance.
By acquiring point cloud data from a single frame image, determining effective points according to preset matching conditions, and converting them from single-precision floating-point format to half-precision floating-point format for storage, reducing storage requirements.
While retaining data details and ensuring real-time performance, it reduces the memory requirements of scanning tasks, adapts to the needs of high-precision scanning tasks, and reduces the memory requirements of the device.
Smart Images

Figure CN2024079949_12092024_PF_FP_ABST
Abstract
Description
Point cloud data storage method, device, equipment and medium
[0001] This disclosure claims priority to a Chinese patent application filed with the Patent Office of China on March 6, 2023, with application number 202310213136.X and invention name “Method, device, equipment and medium for storing point cloud data”, the entire contents of which are incorporated by reference into this disclosure. Technical Field
[0002] The present disclosure relates to the field of scanning technology, and in particular to a method, apparatus, device, and medium for storing point cloud data. Background Art
[0003] Point cloud data, a collection of vectors in a three-dimensional coordinate system, can be acquired using scanning devices. As the camera resolution of scanning devices increases, simultaneous multitasking can become difficult to complete due to the large amount of scanned data and insufficient computer memory. Therefore, it's necessary to reduce the memory requirements of scanning devices.
[0004] In related technologies, memory requirements are reduced by reducing the resolution of the point cloud or compressing the data. However, if the resolution is reduced, the data quality will be reduced, resulting in the inability to reflect details and being unable to adapt to situations requiring high precision such as intraoral scanning and professional scanning. In addition, if data compression is used, a high amount of computing power will be required, which cannot meet the needs of tasks with high real-time and computing requirements.
[0005] Summary of the Invention
[0006] The technical problem to be solved by the present disclosure is to solve the problem that reducing the memory requirement will reduce the data quality or require a higher amount of calculation.
[0007] In order to solve the above technical problems, the present disclosure provides a method, apparatus, device and medium for storing point cloud data.
[0008] In a first aspect, an embodiment of the present disclosure provides a method for storing point cloud data, comprising:
[0009] Get the point cloud data of each point in a single frame image;
[0010] Determining, based on the point cloud data and a preset matching condition, valid points that meet the matching condition from all points of the single-frame image;
[0011] The point cloud data of the valid points are converted from a single-precision floating-point format to a half-precision floating-point format, and the point cloud data in the half-precision floating-point format are stored.
[0012] In a second aspect, an embodiment of the present disclosure provides a storage device for point cloud data, comprising:
[0013] The acquisition module is used to obtain the point cloud data of each point in a single frame image;
[0014] a determination module, configured to determine, based on the point cloud data and a preset matching condition, valid points that meet the matching condition from all points in the single-frame image;
[0015] The storage module is used to convert the point cloud data of the valid points from a single-precision floating-point format to a half-precision floating-point format, and store the point cloud data in the half-precision floating-point format.
[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; and the processor for reading the executable instructions from the memory and executing the instructions to implement the point cloud data storage method described in the first aspect above.
[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the point cloud data storage method described in the first aspect is implemented.
[0018] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: through the point cloud data of each point in a single-frame image, valid points that meet the matching conditions are determined from all points in the single-frame image, the point cloud data of the valid points are converted from single-precision floating-point format to half-precision floating-point format, and the point cloud data in the half-precision floating-point format is stored. As a result, the memory requirements for the device when storing point cloud data can be reduced, and the problem of being unable to complete tasks due to large amounts of scanned data and insufficient computer memory when processing multiple tasks simultaneously is solved. The memory requirements of the scanning task are reduced while retaining data details and ensuring real-time performance.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] FIG1 is a schematic diagram of a flow chart of a method for storing point cloud data provided by an embodiment of the present disclosure;
[0023] FIG2 is a schematic diagram of a flow chart of another method for storing point cloud data provided by an embodiment of the present disclosure;
[0024] FIG3 is a schematic structural diagram of a point cloud data storage device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0027] Figure 1 is a flow chart of a method for storing point cloud data provided in an embodiment of the present disclosure. The method provided in an embodiment of the present disclosure can be executed by a storage device for point cloud data, which can be implemented using software and / or hardware and can be integrated on any electronic device with computing capabilities.
[0028] As shown in FIG1 , the point cloud data storage method provided by the embodiment of the present disclosure may include:
[0029] Step 101: Obtain point cloud data of each point in a single frame image.
[0030] The method of the embodiment of the present disclosure can be applied to a device that stores point cloud data in a scanning scenario. For example, the point cloud data can be stored in the memory of a device such as a tablet computer.
[0031] In this embodiment, a scanning device is used to scan a target object to obtain multiple frames of scanned images. For each frame of the scanned image (i.e., a single frame image), point cloud data of each pixel in the scanned image can be obtained. The point cloud data includes, but is not limited to, three-dimensional coordinate information, normal information, etc.
[0032] As an example, in response to a scanning task of a target object, a depth camera is used to collect a depth map of the target object, and calculations are performed based on the collected depth map to obtain point cloud data of each point in a single frame image as a preliminary model of the target object.
[0033] Step 102 : According to the point cloud data and the preset matching conditions, valid points that meet the matching conditions are determined from all points in the single-frame image.
[0034] In this embodiment, matching conditions are set in advance to determine whether the point cloud data of each point in a single-frame image meets the matching conditions. Based on the matching conditions, valid points and invalid points are determined from all points in the single-frame image, wherein valid points are points used for subsequent calculation steps, and invalid points are data that are invalid for subsequent calculation steps. By determining the valid points in the single-frame image, the valid points can be stored subsequently.
[0035] There are multiple ways to determine whether point cloud data meets the matching conditions.
[0036] As an example, the point cloud data includes three-dimensional coordinate information, which includes depth values. Based on the point cloud data and preset matching conditions, valid points that meet the matching conditions are determined from all points in a single-frame image, including: from all points in the single-frame image, points with invalid depth values are determined as invalid points, invalid points are eliminated from all points in the single-frame image, and the remaining points are retained as valid points.
[0037] Among them, an invalid depth value refers to a point with a depth value of zero. In some scenarios, the depth value is based on the camera. It should be noted that, depending on the specific application scenario, an invalid depth value may also refer to a depth value outside a specified numerical range, etc., and no specific restrictions are made here.
[0038] As another example, the point cloud data also includes normal information. From all points in a single-frame image, the points for which normal information is not obtained are determined to be invalid points. The invalid points are removed from all points in the single-frame image, and the remaining points are retained as valid points.
[0039] As another example, for a scanning scene where the point cloud data also includes texture information, the points for which texture information is not obtained are determined to be invalid points from all points in a single-frame image, and the invalid points are eliminated from all points in the single-frame image, and the remaining points are retained as valid points.
[0040] Step 103 : converting the point cloud data of the valid points from the single-precision floating point format to the half-precision floating point format, and storing the point cloud data in the half-precision floating point format.
[0041] In this embodiment, only the point cloud data of valid points are stored, and the point cloud data is stored in floating point format. Therefore, the point cloud data of the valid points are converted from single-precision floating point format to half-precision floating point format to store the point cloud data of the valid points in half-precision floating point format.
[0042] Among them, valid points can be stored as ordered point clouds or as unordered point clouds. It should be noted that the subsequent embodiments are described with ordered point clouds, and the operational differences between unordered point clouds and ordered point clouds are not explained. However, it can be understood that unordered point clouds do not require bool lists, and this should not be understood as a limitation on this application.
[0043] Optionally, half-IEEE technology is used to implement the point cloud data structure to convert the point cloud data of valid points from a single-precision floating-point format (IEEE 754 32 bits) to a half-precision floating-point format (half-IEEE 754-base 16 bits), wherein the single-precision floating-point format is implemented based on IEEE 754, which is a binary floating-point arithmetic standard. IEEE 754 specifies three floating-point formats: single precision, double precision, and extended precision. Half-IEEE is a half-precision floating-point format implemented on the basis of IEEE 754, wherein the half-precision floating-point number is 16 bits and 2 bytes, and the single-precision floating-point number is 32 bits and 4 bytes.
[0044] As an example, the three-dimensional coordinate information (x, y, z) and normal information (n x , n y , n z ) as an example, the x, y, z in the three-dimensional coordinate information and the n in the normal information x 、n y 、n z All are represented by float, which corresponds to single-precision floating-point numbers. The three-dimensional coordinate information and normal information of each point occupy a total of 24 bytes. Then, based on the half-IEEE technology, the first coordinate value x, the second coordinate value y, and the third coordinate value z in the three-dimensional coordinate information are converted from single-precision floating-point format to half-precision floating-point format, and the first normal value n in the normal information is converted from single-precision floating-point format to half-precision floating-point format. x , the second normal value n y , the third normal value n z All are converted from single-precision floating-point format to half-precision floating-point format. After the conversion, the 3D coordinate information and normal information of each point occupy a total of 12 bytes. Therefore, the point cloud data of valid points is stored in half-precision floating-point format. In the subsequent calculation steps, the stored point cloud data of valid points is called and converted from half-precision floating-point format to single-precision floating-point format for use in the subsequent calculation steps.
[0045] According to the technical solution of the embodiment of the present disclosure, the point cloud data of each point in a single-frame image is used to determine the valid points that meet the matching conditions from all the points in the single-frame image, the point cloud data of the valid points are converted from single-precision floating-point format to half-precision floating-point format, and the point cloud data in the half-precision floating-point format is stored. As a result, the memory requirements for the device when storing point cloud data can be reduced, and the problem of being unable to complete tasks due to large amounts of scanned data and insufficient computer memory when processing multiple tasks simultaneously is solved. The memory requirements of the scanning tasks are reduced while retaining data details and ensuring real-time performance. Compared with the method of reducing resolution and the method of data compression, it can adapt to occasions requiring high precision such as intraoral scanning and professional scanning, and can meet the needs of tasks with high real-time and computing requirements. In addition, the present application can also complete scanning tasks with higher memory requirements on a lower memory configuration or the same memory configuration, thereby not only reducing the hardware cost of scanning equipment such as intraoral scanning and professional scanning, but also can be applied to portable devices such as laptops, mobile phones, and tablets. Users can use portable devices to generate and view 3D models, facilitating communication between users and viewers, or between doctors and patients.
[0046] Based on the above embodiment, in order to further reduce the memory requirements of the scanning task and achieve memory optimization of the three-dimensional point cloud data, FIG2 is a flow chart of another point cloud data storage method provided by the embodiment of the present disclosure for the case where valid points are stored as an ordered point cloud. As shown in FIG2, the method includes:
[0047] Step 201 : obtaining point cloud data of each point in a single-frame image, and determining valid points that meet the matching conditions from all points in the single-frame image based on the point cloud data and preset matching conditions.
[0048] The explanations of step 101 and step 102 in the above embodiment are also applicable to step 201 and are not repeated here.
[0049] Step 202: When storing valid points in an ordered point cloud, generate a bool list corresponding to the resolution of a single frame image.
[0050] Among them, the bool list (correspondence table) is used to indicate whether a point in a single-frame image is a valid point.
[0051] In this embodiment, valid points are stored as an ordered point cloud, and valid and invalid points in a single-frame image are represented by a bool list. The size of the bool list corresponds to the resolution of the single-frame image. For example, for a single-frame image of M×N, an M×N bool list is generated, and the position of each point in the bool list corresponds to the pixel position of each point in the single-frame image.
[0052] As an example, using a list L of n bool (1 bit) n Indicates whether each point in a single-frame image is a valid point. For a valid point, the value of the corresponding position in the bool list is 1. For an invalid point, the value of the corresponding position in the bool list is 0. Furthermore, for point cloud data, only the three-dimensional coordinate information and normal information of the valid points are stored.
[0053] In this way, when storing as an ordered point cloud, point cloud data without invalid points can be realized, further reducing the memory requirement.
[0054] Step 203 : converting the three-dimensional coordinate information and normal information of the valid points, converting the converted three-dimensional coordinate information and normal information from single-precision floating point format to half-precision floating point format and storing them.
[0055] In this embodiment, the point cloud data includes three-dimensional coordinate information and normal information. In order to further reduce the memory requirements when storing point cloud data and achieve memory optimization of three-dimensional point cloud data, the three-dimensional coordinate information and normal information of the valid points are converted before storing them.
[0056] The conversion process of three-dimensional coordinate information is described below.
[0057] In one embodiment of the present disclosure, the three-dimensional coordinate information of the effective point is converted, including: extracting the depth value of the effective point according to the three-dimensional coordinate information of the effective point; and determining the converted three-dimensional coordinate information according to the depth value and pixel coordinates of the effective point.
[0058] In this embodiment, the three-dimensional coordinate information (x, y, z) can be represented by the depth value. When the depth value is known, the three-dimensional coordinate information can be restored by the following method: n The pixel coordinates (u, v) are determined by the position in the image, and then the three-dimensional coordinate information is restored based on the camera intrinsic parameter K: c P x =KP c , where P x is the pixel coordinate, z c is the scale factor, P c Substituting the depth value in the 3D coordinate information into the above formula can restore the 3D coordinate information. In this way, the 3D coordinate information that originally occupied three floats can be represented by the depth value that occupies one float, further reducing the memory requirements when storing point cloud data.
[0059] The conversion process of the normal information is described below. The normal information includes a first normal value, a second normal value, and a third normal value.
[0060] In one embodiment of the present disclosure, the normal information of the valid point is converted, including retaining any two normal values from the first normal value, the second normal value and the third normal value of the valid point as the converted normal information.
[0061] In this embodiment, for the normal information (n x , n y , n z ), only two normal values are stored, for example, the first normal value n is stored x and the second normal value n y , where when the first normal value and the second normal value are known, the normal information can be restored by the following method, n x 2 +n y 2 +n z 2 =1, the first normal value n x and the second normal value n y Substituting this into the above formula, we can restore the normal information. Therefore, the normal information that originally occupied three floats can be represented by a normal value that occupies two floats, further reducing the memory requirements when storing point cloud data.
[0062] In one embodiment of the present disclosure, the normal information of the valid point is converted, including: determining a specified direction based on a first normal value, a second normal value, and a third normal value of the valid point; determining a first rotation angle between a first coordinate axis and the specified direction, and a second rotation angle between a second coordinate axis and the specified direction; and using the first rotation angle and the second rotation angle as the converted normal information.
[0063] In this embodiment, for the normal information (n x , n y , n z ), which can be converted into two angle representations, such as for the normal information (n x , n y , n z ) can determine the specified direction n, and then for the three-dimensional coordinate system xyz, the angle between the specified direction n and the coordinate axis x is recorded as α, the angle between the specified direction n and the coordinate axis y is recorded as β, and the angle between the specified direction n and the coordinate axis z is recorded as γ, where (cosα, cosβ, cosγ) = (n x , n y , n z), the first coordinate axis and the second coordinate axis can be any two of the coordinate axis x, coordinate axis y, and coordinate axis z. For example, α and γ are stored. Thus, the normal information that originally occupied three floats can be represented by an angle that occupies two floats, thereby further reducing the memory requirements when storing point cloud data.
[0064] Step 204 : In response to a call request for point cloud data, the converted three-dimensional coordinate information and normal information are converted from a half-precision floating point format to a single-precision floating point format.
[0065] In this embodiment, after the point cloud data of the valid points in the single-frame image are stored in the memory, when calculating the high-quality model of the target object based on the point cloud data, the stored point cloud data is called. Taking the point cloud data including three-dimensional coordinate information and normal information as an example, the half-IEEE technology and the IEEE 754 technology are used to convert the depth value, two normal values or two rotation angles of the valid points from half-precision floating point format to single-precision floating point format.
[0066] Step 205 : Restore the converted three-dimensional coordinate information and normal information in the single-precision floating-point format through the reverse operation of the conversion process to generate the three-dimensional coordinate information and normal information of the valid point.
[0067] In this embodiment, corresponding to the conversion process in the aforementioned steps, the converted three-dimensional coordinate information and normal information are restored by using the reverse operation of the conversion process to generate the three-dimensional coordinate information and normal information of the valid point.
[0068] As an example, the pixel coordinates of the valid points are determined based on their positions in the bool list. The depth values of the valid points in single-precision floating-point format are restored based on the pixel coordinates of the valid points and the camera intrinsic parameters to generate the three-dimensional coordinate information of the valid points. In this example, z c P x =KP c , where P x is the pixel coordinate, z c is the scale factor, P c is the three-dimensional coordinate information, and K represents the camera intrinsic parameter.
[0069] As another example, the normal information of the valid point is generated based on the two normal values retained from the first normal value, the second normal value, and the third normal value, and the mapping relationship between the first normal value, the second normal value, and the third normal value. In this example, the mapping relationship is n x 2 +n y 2 +n z 2 =1.
[0070] As another example, according to the first rotation angle α and the second rotation angle γ of the effective point, based on the mapping relationship between the three normal values, the third rotation angle β is calculated, and then the first normal value, the second normal value and the third normal value are determined according to the cosine values of the three angles, thereby generating the normal information of the effective point.
[0071] Step 206 : Calculate based on the three-dimensional coordinate information and normal information of the valid points to generate a model corresponding to the single-frame image.
[0072] In the disclosed embodiment, point cloud data such as three-dimensional coordinate information and normal information are converted and processed, and in the case of storing valid points as ordered point clouds, valid points are represented by bool lists. Ordered point clouds can be achieved by storing only point cloud data of valid points, thereby further reducing the memory requirements of scanning tasks and achieving memory optimization of three-dimensional point cloud data. Tasks with high memory requirements can be completed on a lower memory configuration or the same configuration.
[0073] In one embodiment of the present disclosure, after storing the point cloud data in half-precision floating-point format, the method further includes sending the point cloud data in half-precision floating-point format to a designated receiving end. Transmission via the stored point cloud data in half-precision floating-point format can speed up transmission and reduce transmission burden. For example, when the point cloud data is stored by a computer, the point cloud data in half-precision floating-point format can be sent to a tablet computer. When the point cloud data is stored by a tablet computer, the point cloud data in half-precision floating-point format can be sent to a computer. Optionally, when the point cloud data is stored by a tablet computer or a computer, the tablet computer or the computer can also perform calculations based on the point cloud data in half-precision floating-point format to generate and send results or models to a cloud platform. When the point cloud data is stored by an intraoral scanner host or a scanner host, the point cloud data in half-precision floating-point format can be sent to a tablet computer or a computer or a cloud platform. When the point cloud data is stored by a CPU (Central Processing Unit) running, the point cloud data in half-precision floating-point format can be sent to a GPU (Graphics Processing Unit).
[0074] In one embodiment of the present disclosure, storing point cloud data in a half-precision floating point format includes: storing the point cloud data in a half-precision floating point format in a graphics card device, which can reduce graphics memory consumption in the device.
[0075] In one embodiment of the present disclosure, point cloud data in half-precision floating-point format can also be used for direct calculations. In response to a calculation request for the point cloud data, calculation operations on the point cloud data in half-precision floating-point format are performed using Advanced Vector Extensions instructions. The aforementioned acceleration method based on Advanced Vector Extensions instructions is applicable to the same calculation operations on different data. As an example, when converting data from a camera coordinate system to a world coordinate system, calculation operations on the point cloud data in half-precision floating-point format are performed using Advanced Vector Extensions instructions. By combining half-precision data with instruction acceleration, more data calculations can be performed simultaneously compared to single-precision, thereby improving code efficiency.
[0076] In one embodiment of the present disclosure, point cloud data in a half-precision floating point format may also be used for direct display. In response to a display request for the point cloud data, a direct display operation is performed on the point cloud data in a half-precision floating point format.
[0077] In one embodiment of the present disclosure, based on the interval nature of the data, the accuracy of the point cloud data stored in the half-precision floating point format is improved by using conversion, and the point cloud data of the valid points are converted from the single-precision floating point format to the half-precision floating point format, including: offsetting the values of the point cloud data in the single-precision floating point format to convert the value range of the values from a first range to a second range; or performing modulo processing on the values of the point cloud data in the single-precision floating point format to convert the value range of the values from a first range to a third range, and then converting the processed point cloud data from the single-precision floating point format to the half-precision floating point format. Among them, the value of the point cloud data in the single-precision floating-point format is in a first range. If the first range is less than the threshold, the value is offset. If the first range is greater than or equal to the threshold, the value is modulo processed. For example, if the current value range is between 100 and 120, the value is offset (minus 110) and transformed to between -10 and 10 to improve the accuracy. If the current value range is between -200 and 200, the value is transformed to between -1 and 1 by modulo (dividing by 200) to improve the accuracy. Therefore, when the value based on the half-precision format is between (-1, 1), the accuracy is the highest. By offset processing or modulo processing, the value is close to or in the above range, which can improve the accuracy of the stored point cloud data in the half-precision floating-point format.
[0078] Among them, in some usage scenarios (such as oral scanning, etc.), the numerical range (first range) of the point cloud data in the single-precision floating-point format is small, and only offset processing (subtraction) is needed to reach the range of (-10, 10), (-5, 5), or (-1, 1). Not only can its accuracy meet the usage requirements, but the conversion efficiency is also higher. For some usage scenarios (such as industrial product scanning, etc.), the numerical range (first range) of the point cloud data in the single-precision floating-point format is large, and modulo processing (division) can be selected to meet its usage requirements for accuracy.
[0079] In this embodiment, when performing calculations, the numerical value of the point cloud data in the half-precision floating point format is subjected to the opposite processing of the offset processing, or the numerical value of the point cloud data in the half-precision floating point format is subjected to the opposite processing of the modulo processing. For example, in the case of offsetting the numerical value (subtracting 110) in the aforementioned step, the opposite processing in this step is adding 110. For another example, in the case of over-moduloing (dividing by 200) in the aforementioned step, the opposite processing in this step is multiplying by 200. Then, the point cloud data after the opposite processing is converted from the half-precision floating point format to the single-precision floating point format, and calculations are performed based on the point cloud data in the single-precision floating point format. Therefore, based on the small loss in the conversion between single precision and half precision, the calculation result is more accurate by converting to single precision after performing the opposite processing of offset or modulo in half precision and then performing the calculation, achieving an accuracy similar to that of single-precision calculation.
[0080] FIG3 is a schematic structural diagram of a point cloud data storage device provided by an embodiment of the present disclosure. As shown in FIG3 , the point cloud data storage device includes: an acquisition module 31 , a determination module 32 , and a storage module 33 .
[0081] The acquisition module 31 is used to acquire the point cloud data of each point in a single frame image.
[0082] The determination module 32 is used to determine valid points that meet the matching conditions from all points in the single-frame image based on the point cloud data and the preset matching conditions.
[0083] The storage module 33 is configured to convert the point cloud data of valid points from a single-precision floating-point format to a half-precision floating-point format, and store the point cloud data in the half-precision floating-point format.
[0084] In one embodiment of the present disclosure, the point cloud data includes depth values, and the determination module 32 is specifically configured to: determine points with a depth value of zero as invalid points; and remove invalid points from all points in a single-frame image to obtain valid points.
[0085] In one embodiment of the present disclosure, the point cloud data includes three-dimensional coordinate information and normal information, and the storage module 33 includes: a generation unit for generating a bool list corresponding to the resolution of a single-frame image when storing valid points in an ordered point cloud, wherein the bool list is used to indicate whether the points in the single-frame image are valid points; a conversion unit for converting the three-dimensional coordinate information and normal information of the valid points, and converting the converted three-dimensional coordinate information and normal information from a single-precision floating-point format to a half-precision floating-point format.
[0086] In one embodiment of the present disclosure, the conversion unit is specifically configured to: extract the depth value of the valid point according to the 3D coordinate information of the valid point; and determine the converted 3D coordinate information according to the depth value and pixel coordinates of the valid point.
[0087] In one embodiment of the present disclosure, the normal information includes a first normal value, a second normal value, and a third normal value, and the conversion unit is specifically used to retain any two normal values from the first normal value, the second normal value, and the third normal value of the valid point as the converted normal information.
[0088] In one embodiment of the present disclosure, the normal information includes a first normal value, a second normal value, and a third normal value, and the conversion unit is specifically used to: determine a specified direction based on the first normal value, the second normal value, and the third normal value of the valid point; determine a first rotation angle between the first coordinate axis and the specified direction, and a second rotation angle between the second coordinate axis and the specified direction; and use the first rotation angle and the second rotation angle as the converted normal information.
[0089] In one embodiment of the present disclosure, the device also includes: a computing module, which is used to convert the converted three-dimensional coordinate information and normal information from a half-precision floating-point format to a single-precision floating-point format in response to a call request for point cloud data; restore the converted three-dimensional coordinate information and normal information in the single-precision floating-point format through the reverse operation of the conversion process to generate three-dimensional coordinate information and normal information of valid points; and perform calculations based on the three-dimensional coordinate information and normal information of the valid points to generate a model corresponding to a single-frame image.
[0090] In one embodiment of the present disclosure, the device also includes: a transmission module for sending point cloud data in half-precision floating point format to a designated receiving end, wherein when the point cloud data storage method is run by an intraoral scanning device, the designated receiving end includes a tablet computer or a computer or a cloud platform.
[0091] In one embodiment of the present disclosure, the storage module 33 is specifically configured to store the point cloud data in the half-precision floating point format into a graphics card device.
[0092] In one embodiment of the present disclosure, the apparatus further includes: a first computing module, configured to, in response to a computing request for the point cloud data, perform computing operations on the point cloud data in half-precision floating point format according to advanced vector extension instructions.
[0093] In one embodiment of the present disclosure, the storage module 33 is specifically used to: perform offset processing on the numerical value of the point cloud data in the single-precision floating-point format to convert the value range of the numerical value from the first range to the second range; or perform modulo processing on the numerical value of the point cloud data in the single-precision floating-point format to convert the value range of the numerical value from the first range to the third range; and convert the processed point cloud data from the single-precision floating-point format to the half-precision floating-point format.
[0094] In one embodiment of the present disclosure, the device also includes: a second computing module, used to perform the opposite processing of the offset processing on the numerical value of the point cloud data in the half-precision floating point format, or to perform the opposite processing of the modulo processing on the numerical value of the point cloud data in the half-precision floating point format; converting the point cloud data after the opposite processing from the half-precision floating point format to the single-precision floating point format, and performing calculations based on the point cloud data in the single-precision floating point format.
[0095] The point cloud data storage device provided in the embodiments of the present disclosure can execute any point cloud data storage method provided in the embodiments of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For any content not fully described in the embodiments of the present disclosure, please refer to the description of any method embodiment of the present disclosure.
[0096] The present disclosure also provides an electronic device, which includes one or more processors and a memory. The processor can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device to perform desired functions. The memory can include one or more computer program products, and the computer program product can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory can include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory can include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions can be stored on the computer-readable storage medium, and the processor can run the program instructions to implement the method of the embodiment of the present disclosure above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
[0097] In one example, the electronic device may further include an input device and an output device, these components being interconnected via a bus system and / or other forms of connection mechanisms. Furthermore, the input device may include, for example, a keyboard, a mouse, and the like. The output device may output various information to the outside, including determined distance information, direction information, and the like. The output device may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto. Furthermore, depending on the specific application, the electronic device may further include any other appropriate components, such as a bus, an input / output interface, and the like.
[0098] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0099] The computer program product may be written in any combination of one or more programming languages to implement the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0100] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor is enabled to perform any method provided by the embodiments of the present disclosure.
[0101] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0102] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0103] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein. Industrial Applicability
[0104] The point cloud data storage method provided by the present invention can reduce the memory requirements of the device when storing point cloud data, solve the problem of being unable to complete tasks due to the large amount of scanned data and insufficient computer memory when processing multiple tasks simultaneously, and reduce the memory requirements of scanning tasks while retaining data details and ensuring real-time performance, and has strong industrial practicality.
Claims
1. A method for storing point cloud data, comprising: Get the point cloud data of each point in a single frame image; According to the point cloud data and a preset matching condition, determining a valid point satisfying the matching condition from all points of the single frame image; The point cloud data of the valid points are converted from a single-precision floating point format to a half-precision floating point format, and the point cloud data in the half-precision floating point format are stored.
2. The method according to claim 1, wherein the point cloud data comprises depth values, texture information, and normal information, and wherein determining, based on the point cloud data and a preset matching condition, valid points satisfying the matching condition from all points of the single frame image comprises: Determine the points with zero depth value and / or points without texture information and / or points that cannot provide information as invalid points; The invalid points are eliminated from all points of the single-frame image to obtain the valid points.
3. The method according to claim 1 or 2, wherein the point cloud data includes three-dimensional coordinate information and normal information, and the step of converting the point cloud data of the valid points from a single-precision floating point format to a half-precision floating point format comprises: When storing the valid points in an ordered point cloud, generating a corresponding table corresponding to the resolution of the single-frame image, wherein the corresponding table is used to indicate whether a point in the single-frame image is the valid point; The three-dimensional coordinate information and normal information of the effective point are converted, and the converted three-dimensional coordinate information and normal information are converted from a single-precision floating point format to a half-precision floating point format.
4. The method according to claim 3, wherein the three-dimensional coordinate information of the effective point is converted, comprising: Extracting the depth value of the effective point according to the three-dimensional coordinate information of the effective point; The converted three-dimensional coordinate information is determined according to the depth value and the pixel coordinates of the effective point, and the pixel coordinates are determined by the position of the effective point in the correspondence table.
5. The method according to claim 3, wherein the normal information comprises a first normal value, a second normal value and a third normal value, and the normal information of the valid point is converted, comprising: From the first normal value, the second normal value and the third normal value of the effective point, any two normal values are retained as converted normal information.
6. The method according to claim 3, wherein the normal information comprises a first normal value, a second normal value and a third normal value, and the normal information of the valid point is converted, comprising: Determining a specified direction according to a first normal value, a second normal value, and a third normal value of the valid point; determining a first rotation angle between a first coordinate axis and the specified direction, and a second rotation angle between a second coordinate axis and the specified direction; The first rotation angle and the second rotation angle are used as converted normal information.
7. The method of claim 3, further comprising: In response to a call request for the point cloud data, converting the converted three-dimensional coordinate information and normal information from a half-precision floating point format to a single-precision floating point format; Restore the converted three-dimensional coordinate information and normal information in the single-precision floating point format through the reverse operation of the conversion process to generate the three-dimensional coordinate information and normal information of the valid point; Calculation is performed based on the three-dimensional coordinate information and normal information of the effective points to generate a model corresponding to the single-frame image.
8. The method according to any one of claims 1 to 7, further comprising: The point cloud data in half-precision floating point format is sent to a designated receiving end, wherein when the method is executed by an intraoral scanning device, the designated receiving end includes a tablet computer or a computer or a cloud platform, and when the method is executed by a CPU, the designated receiving end includes a GPU.
9. The method according to any one of claims 1 to 7, wherein storing the point cloud data in a half-precision floating point format comprises: The point cloud data in the half-precision floating point format is stored in a graphics card device.
10. The method according to any one of claims 1 to 7, further comprising: In response to a computation request for the point cloud data, performing a computation operation on the point cloud data in a half-precision floating point format according to an advanced vector extension instruction; or In response to a request for displaying the point cloud data, a direct display operation is performed on the point cloud data in the half-precision floating point format.
11. The method according to any one of claims 1 to 7, wherein converting the point cloud data of the valid points from a single-precision floating point format to a half-precision floating point format comprises: Performing an offset process on the numerical value of the point cloud data in the single-precision floating point format to convert the value range of the numerical value from a first range to a second range; Alternatively, a modulo process is performed on the numerical value of the point cloud data in the single-precision floating point format to convert the value range of the numerical value from the first range to the third range; The processed point cloud data is converted from a single-precision floating point format to a half-precision floating point format.
12. The method according to claim 11, after storing the point cloud data in the half-precision floating point format, further comprising: Performing the opposite processing of the offset processing on the value of the point cloud data in the half-precision floating point format, or performing the opposite processing of the modulo processing on the value of the point cloud data in the half-precision floating point format; The point cloud data after the reverse processing is converted from a half-precision floating point format to a single-precision floating point format, and calculation is performed based on the point cloud data in the single-precision floating point format.
13. A storage device for point cloud data, comprising: An acquisition module is used to acquire point cloud data of each point in a single frame image; A determination module, configured to determine, based on the point cloud data and a preset matching condition, valid points satisfying the matching condition from all points of the single frame image; The storage module is used to convert the point cloud data of the valid points from a single-precision floating point format to a half-precision floating point format, and store the point cloud data in the half-precision floating point format.
14. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the point cloud data storage method described in any one of claims 1-12.
15. A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the point cloud data storage method described in any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Point cloud data storage method and device, equipment and medium
CN116302523A
Data storage method, device, equipment and storage medium
CN110737669A
Laser radar point cloud filtering method based on depth estimation of camera
CN113409376A
Deformation monitoring radar area data processing method
CN113932703A
Point cloud viewpoint and scalable compression / decompression
US20200043182A1
