Real-time data compression and transmission system and method based on thinning algorithm
By introducing technical means such as data preprocessing, feature point detection and dilution algorithms into the point cloud data processing system, the problems of low point cloud data processing efficiency and poor display efficiency in the existing technology are solved, and efficient and real-time point cloud data processing and transmission are achieved.
Patent Information
- Application Number
- CN202411504211.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art has problems such as inaccurate dilution results, poor compression effect and low display efficiency when processing three-dimensional point cloud data, which is difficult to meet the requirements of real-time and data quality.
The real-time data compression and transmission system based on the dilution algorithm is adopted, and through multiple modules such as data preprocessing, feature point detection, dilution processing, data compression and real-time display, efficient processing and real-time transmission of large-scale point cloud data is achieved.
It improves the processing efficiency and quality of point cloud data, realizes real-time display and transmission, enhances user experience, and adapts to the needs of different application scenarios.
Smart Images

Figure CN119676320A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of point cloud data processing, and in particular relates to a real-time data compression and transmission system based on a thinning algorithm. Background Art
[0002] With the development of 3D scanning technology, 3D point cloud data has been widely used in industrial manufacturing, geographic information systems, autonomous driving and other fields. However, 3D point cloud data has the following characteristics, which brings challenges to data processing: huge data volume, slow transmission speed and low display efficiency.
[0003] Existing data processing solutions usually have the following deficiencies in practical applications:
[0004] Inaccurate thinning results: Existing thinning algorithms may not be updated or adapted to new data features in a timely manner, resulting in outdated or inaccurate thinning results. Poor compression effect: Static compression algorithms are difficult to meet real-time requirements in real-time applications, and the compression effect is unstable. Inefficient display: Unoptimized display methods lead to inefficient display and poor user experience.
[0005] Chinese patent application CN 117233740 A discloses a method for displaying real-time point clouds by a multi-rotor UAV ground station. The method for displaying real-time point cloud by the multi-rotor UAV ground station is based on installing radar equipment and laser scanning equipment on the multi-rotor UAV, and data transmission adopts the data stream transmission channel integrated in the UAV to realize data communication between the radar equipment and the ground station equipment; the method comprises the following steps: step 1 automatically plans an 8-shaped route: the UAV ground station generates an approximately 8-shaped waypoint combination just above the pole tower according to the three-dimensional coordinates of the starting and ending pole towers selected by the user according to the planning algorithm, and takes the center of the pole tower as the starting point to combine the route in the order of 8, and at the same time, the ground station automatically sets the multi-rotor UAV to a curved flight mode, flies the 8-shaped route at a fixed setting speed above the pole tower, and calibrates the radar inertial navigation equipment; step 2 transmits the radar point cloud and attitude data to the UAV ground station: after the radar equipment is turned on, the GNSS real-time differential positioning result RTK and time synchronization information of the multi-rotor UAV are obtained, and at the same time, the laser equipment performs thinning on the obtained original point cloud data, and the transmission equipment forwards all the data to the UAV ground station; step 3 the UAV ground station calls the real-time point cloud solution and difference algorithm, processes the real-time data of the laser scanning, and maps it to the projection coordinate system, and displays the real-time point cloud and attitude data.
[0006] Chinese patent application CN 114863157 A discloses a data processing method, which includes: obtaining point cloud data to be processed; slicing the point cloud data to be processed into multiple hierarchical slice data and storing them in the form of a tree structure; wherein each hierarchical slice data corresponds to a node in the tree structure, part of the point cloud data extracted from the current hierarchical slice data is stored in the current node corresponding to the current hierarchical slice data, and the lower hierarchical slice data obtained by slicing the current hierarchical slice data corresponds to the child node of the current node; based on the projected pixel area after the hierarchical slice data is projected onto the screen, a target node that meets a preset condition is screened out from the tree structure; and the hierarchical slice data stored corresponding to the target node is loaded.
[0007] In order to solve the above problems, the present invention proposes a real-time data compression and transmission system based on a thinning algorithm. The system introduces the time period of point cloud data acquisition and combines the functions of multiple modules such as data preprocessing, thinning algorithm, data compression, real-time display and data transmission to achieve efficient processing and real-time transmission of large-scale point cloud data. Summary of the invention
[0008] In order to overcome the shortcomings and deficiencies of the above-mentioned prior art, the present invention provides a real-time data compression and transmission system based on a thinning algorithm, including a data acquisition module, a data preprocessing module, a thinning algorithm module, a data compression module, a real-time display module and a data transmission module.
[0009] Data acquisition module: Use a 3D laser scanner to scan the target area and obtain point cloud data of the scanned object. The point cloud data includes position information and attribute information. The position information includes the X, Y, and Z coordinates of each measurement point, and the attribute information includes color and / or reflectivity.
[0010] Data preprocessing module: caches the aforementioned point cloud data within a certain time period and transmits it to the real-time display module. At the same time, the point cloud data in the subsequent time period is collected, stored, cleaned, feature extracted and fed back in sequence to ensure that the thinning algorithm adapts to the data characteristics of the new point cloud data.
[0011] Thinning algorithm module: Use feature point detection algorithm to identify feature points of point cloud data, retain all detected feature points, and perform thinning on non-feature points to ensure that the point cloud data retained after thinning can represent the overall shape and details of the scanned object.
[0012] Data compression module: used to compress the thinned point cloud data. Real-time display module: used to use an efficient graphics library to display the thinned point cloud data in real time. During the display process, different data blocks can be dynamically loaded according to the user's perspective and needs to improve display efficiency.
[0013] Data transmission module: used to transmit the thinned and compressed data to the client or server through the network.
[0014] Furthermore, the present invention also provides a method for real-time data compression and transmission based on a thinning algorithm, the method comprising the following steps:
[0015] Step 1: Data acquisition: Use a 3D laser scanner to scan the target area and obtain point cloud data. The point cloud data includes the location information of the X, Y, and Z coordinates of each measurement point and attribute information, including color and reflectivity.
[0016] Step 2: Data preprocessing, collecting point cloud data within the current time period and storing it; cleaning the aforementioned point cloud data, removing noise points and outliers in the aforementioned point cloud data, and obtaining the data features of the aforementioned point cloud data; collecting point cloud data in a later time period for processing, and obtaining the data features of the point cloud data in a later time period; determining by comparison the data features of the point cloud data in the later time period that are different from the point cloud data in the current time period, and sending them to the thinning algorithm module.
[0017] Step 3: Data thinning: Use feature point detection algorithm to identify feature points in point cloud data, retain all detected feature points, and thin out non-feature points to ensure that the thinned data is still used to fully represent the overall shape of the scanned object and retain details.
[0018] Step 4: Compress the thinned point cloud data file and verify the compressed file size and data integrity.
[0019] Step 5: Display the thinned point cloud data in real time.
[0020] Step 6: Transmit the thinned and compressed point cloud data to the client or server via the network.
[0021] Furthermore, the data thinning in step 3 further includes:
[0022] Feature point detection: Use feature point detection algorithm to identify feature points in point cloud data;
[0023] Feature point retention: retain all detected feature points;
[0024] Non-feature point thinning: Select the first and last points in the 3D laser scanning point cloud data, mark them as Point1 and Point2 respectively, and connect Point1 and Point2 to form a straight line L; calculate the perpendicular distance from each of the remaining points in the point cloud data to the straight line L, find the maximum value Dmax of the perpendicular distance and its corresponding point P; compare Dmax with the preset thinning algorithm threshold d. If Dmax < d, discard all the intermediate points on this curve; if Dmax > d, retain point P, take point P' in the direction of the straight line L on the line perpendicular to the straight line L from point P, calculate the perpendicular distance D' from point P' to the straight line L, compare the magnitudes of D' and d values, and repeat the above process until the maximum perpendicular distance D' from point P' to the straight line L is less than the threshold d.
[0025] Further, the data thinning in step three further includes:
[0026] Multi-level dynamic loading method: Obtain the resolution under the current user's perspective, determine the thinning algorithm threshold d according to the resolution value, load the 3D laser scanning point cloud data, perform point cloud thinning on each scanning area according to the threshold d, and return the thinned point cloud data.
[0027] Gradual scaling thinning: Obtain the size of the scaled perspective scale value in real time, determine the thinning algorithm threshold d according to the scaled scale value, load the 3D laser scanning point cloud data, perform point cloud thinning on each scanning area according to the threshold d, and return the thinned point cloud data.
[0028] Screen display range data thinning; Merge result: Merge the retained feature points with the thinned non-feature points to form the final thinning result.
[0029] Further, the data compression in step four further includes:
[0030] Compression algorithm selection: Select a compression algorithm according to the characteristics of the point cloud data and the application scenario; Execute compression: Input the thinned point cloud data file into the compression tool and perform the compression operation.
[0031] Compression effect verification: Check the size of the compressed file to ensure that the expected compression ratio is achieved and verify the integrity of the data.
[0032] Further, the real-time display in step five further includes:
[0033] Graphics library initialization: Create a window and initialize the rendering environment;
[0034] Data organization: Divide the thinned point cloud data into m data blocks according to the spatial position, and each data block contains point cloud data; m is an integer greater than or equal to 2.
[0035] Data loading within the viewport: Calculate the user's current viewport range and load the data blocks within the viewport. For data blocks that are not within the viewport, unload them from memory.
[0036] Rendering data block: Use the API provided by the graphics library to draw the point cloud data in the data block.
[0037] Dynamic update: As the user's perspective changes, the current viewport range is detected in real time, and the list of data blocks in the viewport is updated according to the viewport range. The data blocks that enter the viewport range are loaded, and the data blocks that leave the viewport range are unloaded.
[0038] Furthermore, the data transmission in step six also includes:
[0039] Data packaging: Pack the thinned and compressed point cloud data into at least one data packet.
[0040] Checksum generation: Generates a checksum for each data packet for data integrity check after transmission.
[0041] Select a transmission protocol; Transmit data: Use the selected transmission protocol to send data packets to the client and / or server in sequence. Receive confirmation: After receiving the data packet, the receiver sends a confirmation message to inform the sender that the data packet has been successfully received. Integrity check: Use the previously generated checksum to perform an integrity check on the received data packet. Reassemble data: Reassemble the received data packet into a point cloud data file.
[0042] Furthermore, the specific method of feeding back the point cloud data features in the later time period includes adjusting the parameters and / or thresholds of the thinning algorithm to adapt to the point cloud data features.
[0043] Furthermore, the screen display range data is thinned, and the specific process is as follows:
[0044] Determine the current 3D laser scanning image display range rectangle T1; take rectangle T1 as the reference, set different expansion distances in the upper, lower, left and right directions of T1; among which, the left expansion distance is dz, the right expansion distance is dy, the upper expansion distance is ds, and the lower expansion distance is dx; set the nonlinear function f(zoom) = k·zoom p, where zoom represents the zoom scale value; k is the scale factor; p is the power; f(zoom) outputs the expansion distance in different directions. When the user's zoom scale value zoom changes, the expansion distance changes accordingly, thereby achieving a nonlinear expansion effect; n levels of expansion rectangles are set around T1, and the expansion distance of each layer of rectangles is different. The surrounding n levels of expansion rectangles are calculated, and n is an integer greater than or equal to 1; T1 and the surrounding n expansion rectangles are merged to obtain rectangle T, and the 3D laser scanning points to be thinned are calculated according to rectangle T, and the 3D laser scanning points are thinned.
[0045] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0046] 1. The point cloud data acquired by the 3D laser scanner of the present invention contains the location information (X, Y, Z coordinates) and attribute information of each measurement point, providing high-quality basic data for subsequent data processing. Data cleaning and block processing are used to remove noise points and outliers to ensure data quality. By introducing the time period of data acquisition, the point cloud data features of the area to be measured are collected in advance, so that the thinning algorithm can better adapt to new data features. And by dividing the scanned area into multiple sub-areas, it is convenient for subsequent thinning processing, reducing unnecessary waste of computing resources, and realizing real-time display and transmission.
[0047] 2. The present invention uses a feature point detection algorithm to identify locations with significant geometric features (such as edges and corners) and retain these feature points. By retaining the feature points and performing thinning processing, it is ensured that the thinned data is still used to fully represent the overall shape of the scanned object and retain key details, thereby ensuring the quality of the data; by compressing the thinned data, the amount of data is further reduced.
[0048] 3. The present invention can effectively improve data transmission efficiency, reduce bandwidth occupancy, and be applicable to data exchange in various network environments by transmitting the thinned and compressed data to the client or server through the network and using the TCP / IP protocol or other protocols suitable for large-scale data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A module diagram of a real-time data compression and transmission system based on a thinning algorithm provided by the present invention;
[0050] Figure 2 A real-time displayed workflow diagram provided by the present invention.
[0051] Description of Reference Numerals
[0052] A data real-time compression and transmission system 100 based on a thinning algorithm; a data acquisition module 110; a data preprocessing module 120; a thinning algorithm module 130; a data compression module 140; a data transmission module 150; and a real-time display module 160. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted.
[0055] Example 1
[0056] See also Figure 1 As shown, it is a module diagram of the real-time data compression and transmission system based on the thinning algorithm provided by the present invention. The real-time data compression and transmission system 100 based on the thinning algorithm includes a data acquisition module 110, a data preprocessing module 120, a thinning algorithm module 130, a data compression module 140, a data transmission module 150 and a real-time display module 160.
[0057] Preferably, a 3D laser scanner is used to scan the target area to obtain point cloud data; the point cloud data is collected or acquired by the data acquisition module. The point cloud data includes the position information (X, Y, Z coordinates) and attribute information of each measurement point, and the attribute information includes color and / or reflectivity.
[0058] In the data preprocessing module, the scanned data is preliminarily cleaned to remove noise points and outliers to ensure data quality. The aforementioned point cloud data within a certain time period is cached and transmitted to the real-time display module. At the same time, the point cloud data within the subsequent time period is sequentially collected, stored, cleaned, feature extracted and fed back to ensure that the thinning algorithm adapts to the data characteristics of the new point cloud data.
[0059] As an example but not a limitation, in the data processing module, the point cloud data in the n-1th time period is cached and transmitted to the real-time display module after preliminary processing. At the same time, the data in the nth time period is preprocessed. The preprocessing includes acquisition, storage, cleaning, feature extraction and feedback.
[0060] The time period is the time period for collecting point cloud data. When the time period is short enough, the purpose of real-time display can be achieved.
[0061] In the thinning algorithm module, feature point detection algorithm is used to identify feature points in the point cloud data, and all detected feature points are retained. Non-feature points are thinned to ensure that the thinned data can still be used to fully represent the overall shape of the scanned object and retain the corresponding details.
[0062] By way of example and not limitation, the feature point detection algorithm is a scale invariant feature transform (SIFT) or a superordinate spatial feature extraction algorithm (SURF).
[0063] Data compression module: compress the thinned data to further reduce the data volume.
[0064] Real-time display module: used to use efficient graphics libraries (such as OpenGL, DirectX, etc.) to achieve real-time display of thinned point cloud data. During the display process, different data blocks can be dynamically loaded according to the user's perspective and needs to improve display efficiency. Data transmission module: used to transmit the thinned and compressed data to the client or server through the network.
[0065] The present invention also provides a method for real-time data compression and transmission based on a thinning algorithm, comprising the following steps: Step 1, data acquisition.
[0066] Preferably, a 3D laser scanner is used to scan scenes such as buildings, building complexes or underground tunnels to obtain a large amount of point cloud data.
[0067] Point cloud data includes the location information (X, Y, Z coordinates) and attribute information of each measurement point, including color and reflectivity. The color and / or reflectivity of the scanned object can reflect the appearance and texture of the object, helping users make corresponding judgments about the object.
[0068] Step 2: Data preprocessing.
[0069] New point cloud data is collected in units of the data collection time period and stored in the cache; the point cloud data in the most recent time period, i.e., the point cloud data in the n-1th time period, is stored in the cache; the point cloud data is preliminarily cleaned to remove noise points and outliers to ensure data quality;
[0070] During the nth time period, new point cloud data is collected, and new data features are extracted therefrom.
[0071] The new data features are fed back to the thinning algorithm module, and the thinning algorithm module is adjusted according to the new data features. The specific methods of feature feedback include, but are not limited to, adjusting the parameters or thresholds of the thinning algorithm to adapt to the new data features.
[0072] The data in the cache is updated in each time period to ensure that the data stored is always that of the most recent 1 time period. By way of example and not limitation, the time period may be 1 second, 50 milliseconds or 20 milliseconds. The smaller the time period, the better the timeliness of the real-time display.
[0073] The above steps are periodically repeated to ensure that the thinning algorithm is used to timely adapt to new data features. The methods of periodic repetition include, but are not limited to, the timer mechanism, and the above steps are executed once every fixed time.
[0074] Step Three: Data thinning.
[0075] Feature point detection: Feature points are identified in the point cloud data using a feature point detection algorithm (such as SIFT, SURF, etc.). Feature points are usually located at positions with significant geometric features such as edges and corners.
[0076] Retain feature points: All detected feature points are retained.
[0077] Non-feature point thinning: Select the first and last two points in the 3D laser scanning point cloud data, and mark them as Point1 and Point2 respectively. Connect Point1 and Point2 to form a straight line L.
[0078] Calculate the perpendicular distance from each of the remaining points in the point cloud data to the straight line L, and find the maximum value Dmax of the perpendicular distance and the corresponding point P;
[0079] Compare Dmax with the preset thinning algorithm threshold d. If D max <d, then all the points inside the surface formed by the aforementioned P point are discarded; if D max >d, then retain point P, and successively take P' points in the direction of the straight line L on the perpendicular connection line between point P and the straight line L. Calculate the perpendicular distance D' from the P' point to the straight line L, and compare the magnitude of D' with the d value. Repeat the above process until the maximum perpendicular distance D' from the P' point to the straight line L is less than the threshold d.
[0080] By way of example and not limitation, when the D max >d, retain the corresponding point P, and take a P' point on the perpendicular connection line between point P and the straight line L. The perpendicular distance from the P' point to the straight line L is D max / 2, judge D max / 2 is related to the threshold d. If D max / 2>d, then continue to pick a new point on the perpendicular line between point P' and line L, set it as P", and continue to determine the perpendicular distance from point P" to line L is D max / 4 is related to the threshold d until the maximum vertical distance D from a point P to the straight line L max is less than the threshold d.
[0081] S302, multi-level dynamic loading method.
[0082] Preferably, the resolution at the user's current viewing angle is obtained, a threshold d of the thinning algorithm is determined according to the resolution value, all 3D laser scanning point cloud data are loaded, point cloud thinning is performed on each scanning area according to the threshold d, and the thinned point cloud data is returned;
[0083] S303, scaling and thinning step by step.
[0084] Obtain the scale value of the zoomed viewing angle in real time, determine the threshold d of the thinning algorithm according to the zoomed scale value, load the 3D laser scanning point cloud data, thin the point cloud for each scanning area according to the threshold d, and return the thinned point cloud data.
[0085] Specifically, the user is viewing a 3D laser scanned building model. In the initial state, the user does not perform any zooming operation. At this time, the system defaults to setting a larger threshold d, and the point cloud data is relatively sparse.
[0086] In the initial state, the scaling value is 100%, then the system calculates the threshold value d=10 based on the 100% scale value, loads the point cloud data, and thins each scan area according to d=10, and returns the thinned point cloud data;
[0087] The user zooms in the view by scrolling the wheel, and the zoom scale value becomes 150%. The system calculates a new threshold value d=5 based on the scale value of 150%. The system reloads the point cloud data, and thins out each scan area based on d=5, and returns the thinned point cloud data;
[0088] The user zooms out the view using the scroll wheel, and the zoom scale value becomes 50%. The system calculates a new threshold value d=20 based on the scale value of 50%. The system reloads the point cloud data, and thins out each scan area based on d=20, and returns the thinned point cloud data.
[0089] S304, thinning out the data in the screen display range.
[0090] Determine the current 3D laser scanning image display range rectangle T1.
[0091] With rectangle T1 as the center, different extension distances are set at the top, bottom, left, and right of T1. Specifically, the left extension distance is dz, the right extension distance is dy, the top extension distance is ds, and the bottom extension distance is dx;
[0092] Set the nonlinear function f(zoom) = k·zoom p , where zoom represents the zoom scale value; k is the scale factor; p is the power; f(zoom) outputs the expansion distance in different directions. When the user's zoom scale value zoom changes, the expansion distance will also change accordingly, thereby achieving a nonlinear expansion effect;
[0093] Set n levels of expansion rectangles around T1, with each level of rectangle expansion distance being different, and calculate the surrounding n levels of expansion rectangles;
[0094] The rectangle T is obtained by merging T1 and the surrounding n extended rectangles. The 3D laser scanning points to be thinned are calculated according to the rectangle T, and the 3D laser scanning points are thinned.
[0095] S305, merging results: merging the retained feature points with the thinned non-feature points to form a final thinning result, ensuring that the thinned data is still used to fully represent the overall shape of the scanned object and retain key details.
[0096] Step 4: Data compression.
[0097] Preferably, choose a compression algorithm: Choose a compression algorithm based on the characteristics of the point cloud data and the application scenario. If the data is mainly used for network transmission, you can choose a general compression algorithm such as several file compression programs (gzip); if the data needs to be stored for a long time, you can consider a compression algorithm specifically for point cloud data.
[0098] Perform compression: Input the thinned point cloud data file into a compression tool or program to perform compression operations. For example, use the gzip command line tool or a compression library in a programming language to compress the file.
[0099] Verify compression effect: Check the size of the compressed file to ensure that the expected compression ratio is achieved. At the same time, verify the integrity of the data to ensure that the data can be correctly restored after decompression.
[0100] Step 5: Real-time display.
[0101] See also Figure 2 The following is a flowchart of the real-time display process provided by the present invention.
[0102] Preferably, initialize the graphics library:
[0103] Use the Open Graphics Library (OpenGL) or the DirectX programming interface to create a window and initialize the associated rendering environment.
[0104] Data organization: The thinned point cloud data is divided into multiple data blocks according to the spatial position, and each data block contains a certain amount of point cloud data. Spatial indexing technology can be used to assist in the management and query of data blocks. By way of example and not limitation, the spatial indexing technology can be, for example, an octree, a quadtree, etc.
[0105] The process of loading data within the viewport includes: calculating the user's current viewport range; loading the data blocks within the viewport and adding them to the rendering queue; for data blocks that are not within the viewport, temporarily not loading them or unloading them from memory.
[0106] Rendering data blocks: Use the application program interface (API) provided by the graphics library to draw the point cloud data in the data block. As an example and not a limitation, technologies such as Vertex Buffer Object (VBO) can be used to improve rendering efficiency.
[0107] Dynamic update: As the user's perspective changes, the list of data blocks in the viewport is continuously updated. Data blocks that leave the viewport are unloaded, and new data blocks that enter the viewport are loaded. This meets the needs of display implementation.
[0108] Preferably, the point cloud data is prepared before transmission, and data is packaged: the thinned and compressed point cloud data is packaged into at least one data packet.
[0109] Checksum generation: Generates a checksum for each data packet for data integrity check after transmission.
[0110] Encryption processing: Encrypt data packets to ensure data security.
[0111] Preferably, select the transport protocol: select the most suitable transport protocol according to the specific situation. If the order and integrity of the data need to be guaranteed, TCP / IP is usually selected.
[0112] Transmit data: Use the selected transmission protocol to send data packets to the client or server in sequence.
[0113] Receiving confirmation: After receiving the data packet, the receiving end sends a confirmation message to inform the sending end that the data packet has been successfully received.
[0114] Post-receiving processing
[0115] Data decryption corresponds to the aforementioned encryption process and decrypts the received data packets.
[0116] Integrity check: Use the previously generated checksum to perform an integrity check on the received data packet.
[0117] Reassemble data: Reassemble the received data packets into the original point cloud data files.
[0118] The beneficial effects of this embodiment are as follows: This embodiment combines multiple modules such as data acquisition, preprocessing, thinning algorithm, data compression, real-time display and data transmission to form a complete solution. This not only improves the efficiency and quality of data processing, but also optimizes the user experience, making it possible to display and transmit large-scale 3D laser scanning data in real time; the system can flexibly adjust parameters according to different application scenarios, such as the thinning algorithm threshold d, etc., to adapt to different needs, ensuring that the system can perform at its best in various situations.
[0119] Preferably, the current 3D laser scanning image display range rectangle T1 is determined.
[0120] With rectangle T1 as the center, different expansion distances are set in the four directions of T1, namely, the expansion distance in the left direction is dz, the expansion distance in the right direction is dy, the expansion distance in the upper direction is ds, and the expansion distance in the lower direction is dx; the nonlinear function f(zoom) = k·zoom is set p , where zoom represents the zoom scale value; k is the scale factor; p is the power; f(zoom) outputs the expansion distance in different directions. When the user's zoom scale value zoom changes, the expansion distance will also change accordingly, thereby achieving a nonlinear expansion effect; n levels of expansion rectangles are set around T1, and the expansion distance of each layer of rectangles is different, and the surrounding n levels of expansion rectangles are calculated; T1 and the surrounding n expansion rectangles are merged to obtain rectangle T, and the 3D laser scanning points to be thinned are calculated based on rectangle T, and the 3D laser scanning points are thinned.
[0121] Merge result: Merge the retained feature points with the thinned non-feature points to form the final thinned result.
[0122] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
[0123] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A real-time data compression and transmission system based on a thinning algorithm, characterized by: The system includes a data acquisition module, a data preprocessing module, a thinning algorithm module, a data compression module, a real-time display module and a data transmission module; Data acquisition module: Use a 3D laser scanner to scan the target area and obtain point cloud data of the scanned object. The point cloud data includes position information and attribute information. The position information includes the X, Y, and Z coordinates of each measurement point, and the attribute information includes color and / or reflectivity. Data preprocessing module: caches the aforementioned point cloud data within a certain time period and transmits it to the real-time display module. At the same time, the point cloud data within the subsequent time period is collected, stored, cleaned, feature extracted and fed back in sequence to ensure that the thinning algorithm adapts to the data characteristics of the new point cloud data; Thinning algorithm module: Use feature point detection algorithm to identify feature points of point cloud data, retain all detected feature points, and perform thinning on non-feature points to ensure that the point cloud data retained after thinning can represent the overall shape and details of the scanned object; Data compression module: compress the point cloud data retained after thinning; Real-time display module: During the display process, the data blocks in the graphics library are dynamically loaded according to user needs to display the point cloud data retained after thinning in real time; Data transmission module: transmits the thinned and compressed point cloud data to the client and / or server through the network.
2. A method for real-time data compression and transmission based on a thinning algorithm, characterized in that: The method comprises the following steps: Step 1: Data acquisition: Use a 3D laser scanner to scan the target area and acquire point cloud data, wherein the point cloud data includes the position information and attribute information of the X, Y, and Z coordinates of each measuring point; the position information includes the X, Y, and Z coordinates of each measuring point, and the attribute information includes color and / or reflectivity; Step 2: Data preprocessing, collecting point cloud data within the current time period and storing it; cleaning the aforementioned point cloud data, removing noise points and outliers in the aforementioned point cloud data, and obtaining the data features of the aforementioned point cloud data; collecting point cloud data within the subsequent time period for processing, and obtaining the data features of the point cloud data within the subsequent time period; determining the data features of the point cloud data within the subsequent time period that are different from the point cloud data within the current time period by comparison, and sending them to the thinning algorithm module, Step 3: Data thinning: Use feature point detection algorithm to identify feature points in point cloud data, retain all detected feature points, and thin out non-feature points to ensure that the thinned data can still fully represent the overall shape of the scanned object and retain details; Step 4: Compress the thinned point cloud data to verify the size and integrity of the compressed data; Step 5: Display the thinned point cloud data in real time; Step 6: Transmit the thinned and compressed point cloud data to the client and / or server via the network.
3. The method for real-time data compression and transmission based on a thinning algorithm according to claim 2, characterized in that: The data thinning in step 3 further includes: Feature point detection: Use feature point detection algorithm to identify feature points in point cloud data; Feature point retention: retain all detected feature points; Non - feature point thinning: Select the first and last two points in the 3D laser scanning point cloud data, mark them as Point1 and Point2 respectively, and connect Point1 and Point2 to form a straight line L; Calculate the perpendicular distance from each of the remaining points in the point cloud data to the straight line L, and find the maximum value Dmax of the perpendicular distance and its corresponding point P; Compare D max with the preset thinning algorithm threshold d. If D max < d, then discard all the points inside the surface formed by the aforementioned P point; If D max > d, then retain point P. Take point P' on the line perpendicular to the straight line L in the direction of the straight line L from point P, calculate the perpendicular distance D' from point P' to the straight line L, compare the size of D' with the d value, and repeat the above process until the maximum perpendicular distance D' from point P' to the straight line L is less than the threshold d.
4. The method for real-time data compression and transmission based on a thinning algorithm according to claim 3 is characterized in that: The data thinning in step 3 further includes: Multi-level dynamic loading method: obtain the resolution of the user's current viewing angle, determine the threshold d of the thinning algorithm according to the resolution value, load the 3D laser scanning point cloud data, perform point cloud thinning for each scanning area according to the threshold d, and return the thinned point cloud data; Step-by-step scaling and thinning: Get the scale value of the zoomed viewing angle in real time, determine the threshold d of the thinning algorithm based on the zoomed scale value, load the 3D laser scanning point cloud data, thin out the point cloud for each scanning area based on the threshold d, and return the thinned point cloud data; Data in the screen display area is sparse; Merge result: Merge the retained feature points with the thinned non-feature points to form the final thinned result.
5. The method for real-time data compression and transmission based on a thinning algorithm according to claim 2, characterized in that: The data compression in step 4 further comprises: Compression algorithm selection: select the compression algorithm according to the characteristics of the point cloud data and the application scenario; perform compression: input the thinned point cloud data file into the compression tool and perform the compression operation; Compression effect verification: Check the size of the compressed file to ensure that the expected compression ratio is achieved and verify the integrity of the data.
6. The method for real-time data compression and transmission based on a thinning algorithm according to claim 2, characterized in that: The real-time display of step 5 further includes: Graphics library initialization: create a window and initialize the rendering environment; Data organization: The thinned point cloud data is divided into m data blocks according to the spatial position, each data block contains point cloud data; m is an integer greater than or equal to 2; Loading data within the viewport: Calculate the user's current viewport range and load the data blocks within the viewport. For data blocks that are not within the viewport, unload them from memory; Rendering data blocks: Use the API provided by the graphics library to draw the point cloud data in the data blocks; Dynamic update: As the user's perspective changes, the current viewport range is detected in real time, and the list of data blocks in the viewport is updated according to the viewport range. The data blocks that enter the viewport range are loaded, and the data blocks that leave the viewport range are unloaded.
7. The method for real-time data compression and transmission based on a thinning algorithm according to claim 2, characterized in that: The data transmission of step 6 further includes: Data packaging: Packing the thinned and compressed point cloud data into at least one data packet; Checksum generation: Generate a checksum for each data packet to check the data integrity after transmission; Select the transport protocol; Transmit data: Use the selected transmission protocol to send data packets to the client and / or server in sequence; Receiving confirmation: After receiving the data packet, the receiving end sends a confirmation message to inform the sending end that the data packet has been successfully received; Integrity check: Use the previously generated checksum to perform integrity check on the received data packet; Reassemble data: Reassemble the received data packets into point cloud data files.
8. The method for real-time data compression and transmission based on a thinning algorithm according to claim 2, characterized in that: The specific method of feeding back the point cloud data features in the later time period includes adjusting the parameters and / or thresholds of the thinning algorithm to adapt to the point cloud data features.
9. The method for real-time data compression and transmission based on a thinning algorithm according to claim 4, characterized in that: The screen display range data thinning, the specific process is as follows: Determine the current 3D laser scanning image display range rectangle T1; take rectangle T1 as the reference, set different expansion distances in the upper, lower, left and right directions of T1; among which, the left expansion distance is dz, the right expansion distance is dy, the upper expansion distance is ds, and the lower expansion distance is dx; set the nonlinear function f(zoom) = k·zoom p , where zoom represents the zoom scale value; k is the scale factor; p is the power; f(zoom) outputs the expansion distance in different directions. When the user's zoom scale value zoom changes, the expansion distance changes accordingly, thereby achieving a nonlinear expansion effect; n levels of expansion rectangles are set around T1, and the expansion distance of each layer of rectangles is different. The surrounding n levels of expansion rectangles are calculated, and n is an integer greater than or equal to 1; T1 and the surrounding n expansion rectangles are merged to obtain rectangle T, and the 3D laser scanning points to be thinned are calculated according to rectangle T, and the 3D laser scanning points are thinned.
Citation Information
Patent Citations
Data processing method and device, electronic equipment and computer program product
CN114863157A
Method for displaying real-time point cloud on ground station of multi-rotor unmanned aerial vehicle
CN117233740A