A three-dimensional point cloud data storage method based on an outline frame priority
By constructing a shape frame priority operator and a frame priority selection operator to adjust the data storage order of 3D point cloud data, the problems of long loading time and difficulty in hierarchical management in the existing technology are solved, and the ability to quickly view the overall scene and manage data at different levels is realized.
Patent Information
- Application Number
- CN202211131422.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2042-09-16
AI Technical Summary
Existing 3D point cloud data storage methods result in long loading times, high network traffic and power consumption, poor user experience, and a lack of hierarchical management capabilities, making it difficult to distribute data in different levels.
A storage method based on shape frame priority is adopted. By constructing shape frame priority operators and frame priority selection operators, the storage order of 3D point cloud data is adjusted so that the scene shape frame takes precedence over internal details, thereby achieving hierarchical data management.
It enables users to see the entire scene when loading only a small portion of data, and supports progressively refined data storage and hierarchical management, improving user experience and data distribution efficiency.
Smart Images

Figure DEST_PATH_IMAGE001 
Figure DEST_PATH_IMAGE003 
Figure 610204DEST_PATH_IMAGE002
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a three-dimensional point cloud data storage method, in particular to a three-dimensional point cloud data storage method based on an outline frame priority, and belongs to the technical field of data processing. BACKGROUND
[0002] Three-dimensional point cloud data of a region can be obtained by using a laser radar and an unmanned aerial vehicle tilt measurement, and the data has important value for visualization of regional information and checking and identification of specific targets. Reasonable storage of the three-dimensional point cloud data can significantly improve the efficiency of related work, and therefore, a three-dimensional point cloud storage scheme facing certain application targets has important application value.
[0003] The three-dimensional point cloud has the largest feature of a large amount of data, and a plurality of three-dimensional points have a certain storage order in a file or a database. Currently, two storage orders are widely used in the industry: 1) the storage order is directly derived from the scanning order of the sensor for obtaining the data, for example, some laser radars scan from south to north line by line, and the storage three-dimensional points directly copy the scanning order of the data obtained; 2) the result after sorting according to a certain order, for example, all data are sorted according to the priority of Z, X and Y coordinates, and then stored. In the current system environment, a large three-dimensional point cloud needs to be loaded for a long time before the related users can see the overall appearance of the data. This long overall loading process is not friendly to Internet applications, especially Web-based interactive applications, mainly in that: 1) in the three-dimensional scene visualization application based on a Web page, the user needs a long time to see what the scene displayed by the three-dimensional point cloud data looks like. These Web applications mostly need to be browsed quickly, rather than deeply interacted with each point. Long-time overall data loading will cause large network traffic and client power consumption on the one hand, and will also significantly reduce the user experience, and many users completely lack the patience to wait for the data to be loaded; 2) there is a lack of demand-based hierarchical management capability. These data can only be processed as a whole, and cannot be processed in stages, for example, it is difficult to divide the current data into the following levels: seeing the overall appearance of the scene, further refining the scene, enriching the content of the scene and obtaining all the data of the scene. This will bring difficulties to the distribution of data, especially the paid distribution with permission. Part of the overall data cannot represent the entire scene, which will reduce the willingness of some enterprises to distribute three-dimensional point cloud data, thereby reducing the possible income of the three-dimensional point cloud data generation end.
[0004] Therefore, a method is needed to reconstruct the storage order and structure of three-dimensional point cloud data, so that the user can see the overall scene described by the point cloud with only a small amount of data loaded, and the storage of three-dimensional point cloud data can be gradually refined in layers and details, facilitating hierarchical distribution of data. SUMMARY
[0005] The application provides a three-dimensional point cloud data storage method based on an external framework priority, which constructs an external framework priority operator and a framework priority selection operator for input three-dimensional point cloud data. Based on the two operators, the storage order of the three-dimensional point cloud data can be adjusted to make the external framework of the scene priority to the internal details, and finally a three-dimensional point cloud data storage structure is realized.
[0006] The application provides a three-dimensional point cloud data storage method based on an external framework priority, which includes the following steps:
[0007] S1, input a three-dimensional point cloud list TDPList; input a three-dimensional space allocation scale value TPDist; obtain a three-dimensional point cloud X coordinate maximum value XMax; obtain a three-dimensional point cloud X coordinate minimum value XMin; obtain a three-dimensional point cloud Y coordinate maximum value YMax; obtain a three-dimensional point cloud Y coordinate minimum value YMin; obtain a three-dimensional point cloud Z coordinate maximum value ZMax; obtain a three-dimensional point cloud Z coordinate minimum value ZMin; obtain a three-dimensional point number TDNum, establish an external framework priority space allocation table KJCap; and obtain an external framework priority component allocation group number KJGroupNum.
[0008] S101, input a three-dimensional point cloud list TDPList; TDPList is a list, and each table entry in the list is a three-dimensional point, which includes three attributes:
[0009] PX: X coordinate of the three-dimensional point;
[0010] PY: Y coordinate of the three-dimensional point;
[0011] PZ: Z coordinate of the three-dimensional point;
[0012] S102, input a three-dimensional space allocation scale value TPDist, and TPDist is an integer;
[0013] S103, obtain the maximum value XMax of the X coordinate of the three-dimensional point cloud, which is the maximum value of PX of all entries in TDPList; obtain the minimum value XMin of the X coordinate of the three-dimensional point cloud, which is the minimum value of PX of all entries in TDPList; obtain the maximum value YMax of the Y coordinate of the three-dimensional point cloud, which is the maximum value of PY of all entries in TDPList; obtain the minimum value YMin of the Y coordinate of the three-dimensional point cloud, which is the minimum value of PY of all entries in TDPList; obtain the maximum value ZMax of the Z coordinate of the three-dimensional point cloud, which is the maximum value of PZ of all entries in TDPList; obtain the minimum value ZMin of the Z coordinate of the three-dimensional point cloud, which is the minimum value of PZ of all entries in TDPList;
[0014] P104, obtain the number TDNum of three-dimensional points, which is the number of entries in TDPList;
[0015] S105, establish the outer frame priority space allocation table KJCap = an empty list;
[0016] S106, establish the first counter InitCounter1 for initialization = XMin;
[0017] S107, establish the second counter InitCounter2 for initialization = YMin;
[0018] S108, establish the third counter InitCounter3 for initialization = ZMin;
[0019] S109, establish the subspace region variable InitSubSpace for initialization = establish a cubic region:
[0020] the X coordinate range of which is [InitCounter1, InitCounter1 + TPDist],
[0021] the Y coordinate range of which is [InitCounter2, InitCounter2 + TPDist],
[0022] and the Z coordinate range of which is [InitCounter3, InitCounter3 + TPDist];
[0023] S110, the three-dimensional point list variable InitSubPtList in the subspace = select all three-dimensional points in the space region range of InitSubSpace from TDPList;
[0024] S111, delete all three-dimensional points listed in InitSubPtList from TDPList;
[0025] S112, create a shape frame table item variable KJItem; KJItem contains the following attributes:
[0026] KJSubSpace: the space region variable corresponding to the shape frame table item variable, the value of this variable is InitSubSpace;
[0027] KJSubPtList: the three-dimensional point list variable contained in the shape frame table item variable, the value of this variable is InitSubPtList;
[0028] KJPtNum: the number of three-dimensional points contained in the shape frame table item variable, the value of this variable is the number of three-dimensional points in InitSubPtList;
[0029] KJPri: the priority variable of the shape frame table item variable, the default value of this variable is 0;
[0030] KJIndex1: the first index variable of the shape frame table item variable, the value of this variable is InitCounter1;
[0031] KJIndex2: the second index variable of the shape frame table item variable, the value of this variable is InitCounter2;
[0032] KJIndex3: the third index variable of the shape frame table item variable, the value of this variable is InitCounter3;
[0033] S113, add KJItem to KJCap;
[0034] S114, InitCounter3 = InitCounter3 + TPDist;
[0035] S115, if InitCounter3 < ZMax, go to S109, otherwise go to S116;
[0036] S116, InitCounter2 = InitCounter2 + TPDist;
[0037] S117, if InitCounter2 < YMax, go to S108, otherwise go to S118;
[0038] S118, InitCounter1 = InitCounter1 + TPDist;
[0039] S119, if InitCounter1 < XMax, go to S107, otherwise go to S120;
[0040] S120, obtaining the number of groups KJGroupNum=Round((XMax-XMin) / TPDist+ (YMax-YMin) / TPDist+0.5×(ZMax-ZMin) / TPDist)×100 of the priority component of the shape framework; wherein Round is rounding;
[0041] S2, establishing the priority operator KJPrjOpt of the shape framework, the input of KJPrjOpt being the position variable KOPos of the priority operator of the shape framework, and the return being the calculation result variable KOResult of the priority operator of the shape framework;
[0042] S201, establishing the priority operator KJPrjOpt of the shape framework, the input of KJPrjOpt being the position variable KOPos of the priority operator of the shape framework;
[0043] S202, establishing the calculation result variable KOResult of the priority operator of the shape framework, KOResult=-100000;
[0044] S203, if the value of KJCap[KOPos].KJPtNum is 0, then going to S215;
[0045] S204, setting the first selected coordinate KOEx1 of the shape framework expansion=KJCap[KOPos].KJIndex1; setting the second selected coordinate KOEx2 of the shape framework expansion=KJCap[KOPos].KJIndex2; setting the third selected coordinate KOEx3 of the shape framework expansion=KJCap[KOPos].KJIndex3;
[0046] S205, establishing the selected subspace region variable KOSubSpace=establishing a cubic region:
[0047] the X coordinate range of which is [KOEx1-0.5×TPDist, KOEx1+1.5×TPDist],
[0048] the Y coordinate range of which is [KOEx2-0.5×TPDist, KOEx2+1.5×TPDist],
[0049] and the Z coordinate range of which is [KOEx3-0.5×TPDist, KOEx3+1.5×TPDist];
[0050] S206, the selected shape framework table KOSubList=selecting all table items in KJCap intersecting with KOSubSpace;
[0051] S207, the number of selected outer frame table entries KOSubListNum = the number of entries contained in KOSubList;
[0052] S208, if the value of KOSubListNum <= 1, then KOResult = 1 and go to S215; otherwise go to S209;
[0053] S209, the outer frame priority operator counter KOCounter = 1; KOResult = 1;
[0054] S210, if KOSubList[KOCounter].KJPtNum is equal to 0, go to S212; otherwise go to S211;
[0055] S211, KOResult = KOResult - 1 / 27;
[0056] S212, KOCounter = KOCounter + 1;
[0057] S213, if KOCounter < KOSubListNum, go to S210; otherwise go to S214;
[0058] S214, KOResult = tanh(KOResult + 0.1); where tanh is the calculation of hyperbolic tangent value;
[0059] S215, return KOResult as the result of KJPrjOpt operator;
[0060] S3, establish the frame priority selection operator SelectOpt, the input of SelectOpt is the frame priority selection number SONum, and the output is the frame priority selection output point list variable SOList;
[0061] S301, establish the frame priority selection operator SelectOpt; the input of SelectOpt is the frame priority selection number SONum;
[0062] S302, establish the frame priority selection output point list variable SOList = empty list;
[0063] S303, the frame priority selection operator counter SOCounter = 1;
[0064] S304, the frame priority selection highest value table entry variable SOPos = obtain the position of the table entry with the highest KJPri value in KJCap;
[0065] S305, set KJCap[SOPos].KJPri = KJCap[SOPos].KJPri-1 / KJGroupNum;
[0066] S306, if KJCap[SOPos].KJPtNum equals 0, go to S311, otherwise go to S307;
[0067] S307, add KJCap[SOPos].KJSubPtList[1] to SOList;
[0068] S308, delete the first element of KJCap[SOPos].KJSubPtList;
[0069] S309, KJCap[SOPos].KJPtNum = KJCap[SOPos].KJPtNum-1;
[0070] S310, SOCounter = SOCounter+1;
[0071] S311, if SOCounter < SONum, go to S304, otherwise go to S312;
[0072] S312, return SOList as the result of SelectOpt;
[0073] S4, create a table analysis operator AnalysisOpt, which processes the whole KJCap using KJPrjOpt;
[0074] S401, create a table analysis operator AnalysisOpt;
[0075] S402, AONum = the number of table entries in KJCap;
[0076] S403, AOCounter = 1;
[0077] S404, call KJPrjOpt, KOPos = AOCounter, KOResult is stored in AOTemp;
[0078] S405, KJCap[AOCounter].KJPri = AOTemp;
[0079] S406, AOCounter = AOCounter+1;
[0080] S407, if AOCounter < AONum, go to S404, otherwise go to S408;
[0081] S408, AnalysisOpt processing procedure ends;
[0082] S5, input storage path SPath, output three-dimensional point cloud storage result by using AnalysisOpt operator and SelectOpt operator;
[0083] S501, input storage path SPath, SPath is a string expressing computer storage path;
[0084] S502, storage number counter SNumCounter = 0; storage step counter SStepCounter = 1;
[0085] S503, call AnalysisOpt operator;
[0086] S504, variable SGetNum of number of points to be taken out = TDNum - SNumCounter;
[0087] S505, if SGetNum > KJGroupNum, SGetNum = KJGroupNum;
[0088] S506, SNumCounter = SNumCounter + SGetNum;
[0089] S507, call SelectOpt operator, operator input SONum = SGetNum, calculate output SOList and store into variable SGetPoints of list of three-dimensional points to be stored;
[0090] S508, establish variable SFileName of file name to be stored = concat(SPath, str(SStepCounter)); wherein concat is to combine two strings, and str is to convert digital variable into string;
[0091] S509, store all data of SGetPoints into file with file name SFileName;
[0092] S510, SStepCounter = SStepCounter + 1;
[0093] S511, if SNumCounter < TDNum, go to S503, otherwise go to S512;
[0094] S512, the S5 step ends.
[0095] The present application has the following advantages:
[0096] For the input three-dimensional point cloud data, the present application constructs an outline framework priority operator and a framework priority selection operator, based on which the storage order of the three-dimensional point cloud data can be adjusted to make the outline framework of the scene prior to the internal details, and finally realize a storage structure of the three-dimensional point cloud data.
[0097] The present application can convert large three-dimensional point cloud data into a series of sequentially arranged storage files, and the three-dimensional points of the scene features are stored in the files with earlier file names in the series, while the internal details of the scene are stored in the files with later file names in the series; in this way, the user can see the overall appearance of the scene described by the point cloud by loading only a small part of the data, and the gradually refined and multi-file storage structure also directly corresponds to the data management by details and levels; the present application has very important value for the management of three-dimensional point cloud data, especially the Web-based three-dimensional point cloud data visualization and data distribution. DETAILED DESCRIPTION
[0098] The present application will be further described by the following examples, which do not limit the present application in any way, and any modification or change made by those skilled in the art without departing from the technical solutions of the present application will fall within the scope of the claims of the present application.
[0099] Example 1
[0100] The present application is a three-dimensional point cloud data storage method based on outline framework priority, which comprises the following steps:
[0101] S1, input a three-dimensional point cloud list TDPList; input a three-dimensional space allocation scale value TPDist; obtain a three-dimensional point cloud X coordinate maximum value XMax; obtain a three-dimensional point cloud X coordinate minimum value XMin; obtain a three-dimensional point cloud Y coordinate maximum value YMax; obtain a three-dimensional point cloud Y coordinate minimum value YMin; obtain a three-dimensional point cloud Z coordinate maximum value ZMax; obtain a three-dimensional point cloud Z coordinate minimum value ZMin; obtain a three-dimensional point number TDNum; establish an outline framework priority space allocation table KJCap; and obtain an outline framework priority group allocation group number KJGroupNum;
[0102] S101, input a three-dimensional point cloud list TDPList; TDPList is a list, and each table item in the list is a three-dimensional point, which contains three attributes:
[0103] PX: X coordinate of the three-dimensional point;
[0104] PY: Y coordinate of the three-dimensional point;
[0105] PZ: Z coordinate of the three-dimensional point;
[0106] S102, input a three-dimensional space distribution scale value TPDist, TPDist is an integer;
[0107] S103, obtain the maximum value of the X coordinate of the three-dimensional point cloud XMax = the maximum value of PX of all entries in TDPList; obtain the minimum value of the X coordinate of the three-dimensional point cloud XMin = the minimum value of PX of all entries in TDPList; obtain the maximum value of the Y coordinate of the three-dimensional point cloud YMax = the maximum value of PY of all entries in TDPList; obtain the minimum value of the Y coordinate of the three-dimensional point cloud YMin = the minimum value of PY of all entries in TDPList; obtain the maximum value of the Z coordinate of the three-dimensional point cloud ZMax = the maximum value of PZ of all entries in TDPList; obtain the minimum value of the Z coordinate of the three-dimensional point cloud ZMin = the minimum value of PZ of all entries in TDPList;
[0108] P104, obtain the number of three-dimensional points TDNum = the number of entries in TDPList;
[0109] S105, establish an outline frame priority space distribution table KJCap = an empty list;
[0110] S106, establish a first counter InitCounter1 = XMin for initialization;
[0111] S107, establish a second counter InitCounter2 = YMin for initialization;
[0112] S108, establish a third counter InitCounter3 = ZMin for initialization;
[0113] S109, establish a subspace region variable InitSubSpace = establish a cubic region:
[0114] its X coordinate range is [InitCounter1, InitCounter1 + TPDist],
[0115] its Y coordinate range is [InitCounter2, InitCounter2 + TPDist],
[0116] its Z coordinate range is [InitCounter3, InitCounter3 + TPDist];
[0117] S110, a three-dimensional point list variable InitSubPtList in the subspace is selected from all three-dimensional points in the TDPList within the range of the spatial region of InitSubSpace;
[0118] S111, all three-dimensional points listed in InitSubPtList are deleted from TDPList;
[0119] S112, a contour framework table item variable KJItem is established; KJItem contains the following attributes:
[0120] KJSubSpace: the spatial region variable corresponding to the contour framework table item variable, the value of which is InitSubSpace;
[0121] KJSubPtList: the three-dimensional point list variable contained in the contour framework table item variable, the value of which is InitSubPtList;
[0122] KJPtNum: the number of three-dimensional points contained in the contour framework table item variable, the value of which is the number of three-dimensional points in InitSubPtList;
[0123] KJPri: the priority variable of the contour framework table item variable, the default value of which is 0;
[0124] KJIndex1: the first index variable of the contour framework table item variable, the value of which is InitCounter1;
[0125] KJIndex2: the second index variable of the contour framework table item variable, the value of which is InitCounter2;
[0126] KJIndex3: the third index variable of the contour framework table item variable, the value of which is InitCounter3;
[0127] S113, KJItem is added to KJCap;
[0128] S114, InitCounter3 = InitCounter3 + TPDist;
[0129] S115, if InitCounter3 < ZMax, go to S109, otherwise go to S116;
[0130] S116, InitCounter2 = InitCounter2 + TPDist;
[0131] S117, if InitCounter2 < YMax, go to S108, otherwise go to S118;
[0132] S118, InitCounter1 = InitCounter1 + TPDist;
[0133] S119, if InitCounter1 < XMax, go to S107, otherwise go to S120;
[0134] S120, obtain the number of the shape frame priority component allocation groups KJGroupNum = Round((XMax - XMin) / TPDist + (YMax - YMin) / TPDist + 0.5 x (ZMax - ZMin) / TPDist) x 100; wherein Round is rounding;
[0135] S2, establish the shape frame priority operator KJPrjOpt, the input of KJPrjOpt is the shape frame priority operator position variable KOPos, and the return is the shape frame priority operator calculation result variable KOResult;
[0136] S201, establish the shape frame priority operator KJPrjOpt, the input of KJPrjOpt is the shape frame priority operator position variable KOPos;
[0137] S202, establish the shape frame priority operator calculation result variable KOResult = -100000;
[0138] S203, if the value of KJCap[KOPos].KJPtNum is 0, go to S215;
[0139] S204, set the shape frame expansion first selected coordinate KOEx1 = KJCap[KOPos].KJIndex1; set the shape frame expansion second selected coordinate KOEx2 = KJCap[KOPos].KJIndex2; and set the shape frame expansion third selected coordinate KOEx3 = KJCap[KOPos].KJIndex3;
[0140] S205, establish the expansion selected subspace region variable KOSubSpace = establish a cubic region:
[0141] the X coordinate range of which is [KOEx1-0.5 x TPDist, KOEx1+1.5 x TPDist],
[0142] the Y coordinate range of which is [KOEx2-0.5 x TPDist, KOEx2+1.5 x TPDist],
[0143] with a Z coordinate range of [KOE x3- 0.5 x TPDist, KOE x3+ 1.5 x TPDist];
[0144] S206, the selected outer shape frame table entry KOSubList = all entries in KJCap whose KJSubSpace attribute intersects with KOSubSpace;
[0145] S207, the number of selected outer shape frame table entries KOSubListNum = the number of entries contained in KOSubList;
[0146] S208, if the value of KOSubListNum <= 1, then KOResult = 1 and go to S215; otherwise go to S209;
[0147] S209, the outer shape frame priority operator counter KOCounter = 1; KOResult = 1;
[0148] S210, if KOSubList[KOCounter].KJPtNum is equal to 0, then go to S212, otherwise go to S211;
[0149] S211, KOResult = KOResult - 1 / 27;
[0150] S212, KOCounter = KOCounter + 1;
[0151] S213, if KOCounter < KOSubListNum, then go to S210, otherwise go to S214;
[0152] S214, KOResult = tanh(KOResult + 0.1); where tanh is the calculation of hyperbolic tangent value;
[0153] S215, return KOResult as the result of KJPrjOpt operator;
[0154] S3, establish a frame priority selection operator SelectOpt, the input of SelectOpt is the number of frame priority selection SONum, and the output is a frame priority selection output point list variable SOList;
[0155] S301, establish a frame priority selection operator SelectOpt; the input of SelectOpt is the number of frame priority selection SONum;
[0156] S302, establish the frame priority selection output point list variable SOList = empty list;
[0157] S303, frame priority selection operator counter SOCounter = 1;
[0158] S304, frame priority selection highest value table entry variable SOPos = get the position of the table entry with the highest KJPri value in KJCap in KJCap;
[0159] S305, set KJCap[SOPos].KJPri = KJCap[SOPos].KJPri-1 / KJGroupNum;
[0160] S306, if KJCap[SOPos].KJPtNum is equal to 0, go to S311, otherwise go to S307;
[0161] S307, add KJCap[SOPos].KJSubPtList[1] to SOList;
[0162] S308, delete the first element of KJCap[SOPos].KJSubPtList;
[0163] S309, KJCap[SOPos].KJPtNum = KJCap[SOPos].KJPtNum-1;
[0164] S310, SOCounter = SOCounter + 1;
[0165] S311, if SOCounter < SONum, go to S304, otherwise go to S312;
[0166] S312, return SOList as the result of SelectOpt;
[0167] S4, establish the table analysis operator AnalysisOpt, which processes the entire KJCap using KJPrjOpt;
[0168] S401, establish the table analysis operator AnalysisOpt;
[0169] S402, the number of tables to be analyzed AONum = the number of table entries in KJCap;
[0170] S403, analysis counter AOCounter = 1;
[0171] S404, call KJPrjOpt operator, KJPrjOpt input KOPos=AOCouuter, KJPrjOpt output KOResult store in temporary shape frame priority variable AOTemp;
[0172] S405, KJCap[AOCounter].KJPri=AOTemp;
[0173] S406, AOCounter=AOCounter+1;
[0174] S407, if AOCounter
[0175] S408, AnalysisOpt process end;
[0176] S5, input storage path SPath, output 3D point cloud storage result by AnalysisOpt operator and SelectOpt operator;
[0177] S501, input storage path SPath, SPath is a string expressing computer storage path;
[0178] S502, storage number counter SNumCounter=0; storage step counter SStepCounter=1;
[0179] S503, call AnalysisOpt operator;
[0180] S504, to-be-taken-out point number variable SGetNum=TDNum-SNumCounter;
[0181] S505, if SGetNum>KJGroupNum then SGetNum=KJGroupNum;
[0182] S506, SNumCounter=SNumCounter+SGetNum;
[0183] S507, call SelectOpt operator, operator input SONum=SGetNum, calculate output SOList store in to-be-stored 3D point list variable SGetPoints;
[0184] S508, establish to-be-stored file name variable SFileName=concat(SPath, str(SStepCounter)); wherein concat is to combine two strings, str is to convert digital variable into string;
[0185] S509, store all data of SGetPoints into a file with the file name SFileName;
[0186] S510, SStepCounter = SStepCounter + 1;
[0187] S511, if SNumCounter < TDNum, go to S503, otherwise go to S512;
[0188] S512, the S5th step ends.
[0189] Embodiment 2
[0190] S1, input a three-dimensional point cloud list TDPList; input a three-dimensional space allocation scale value TPDist; obtain a three-dimensional point cloud X coordinate maximum value XMax; obtain a three-dimensional point cloud X coordinate minimum value XMin; obtain a three-dimensional point cloud Y coordinate maximum value YMax; obtain a three-dimensional point cloud Y coordinate minimum value YMin; obtain a three-dimensional point cloud Z coordinate maximum value ZMax; obtain a three-dimensional point cloud Z coordinate minimum value ZMin; obtain a three-dimensional point number TDNum, establish an outline frame priority space allocation table KJCap; obtain an outline frame priority component allocation group number KJGroupNum;
[0191] S101, input a three-dimensional point cloud list TDPList; TDPList is a list, each table item in the list is a three-dimensional point, which includes three attributes:
[0192] PX: X coordinate of the three-dimensional point;
[0193] PY: Y coordinate of the three-dimensional point;
[0194] PZ: Z coordinate of the three-dimensional point;
[0195] S102, input a three-dimensional space allocation scale value TPDist, TPDist is an integer;
[0196] S103, obtain a three-dimensional point cloud X coordinate maximum value XMax = maximum value of PX of all table items in TDPList; obtain a three-dimensional point cloud X coordinate minimum value XMin = minimum value of PX of all table items in TDPList; obtain a three-dimensional point cloud Y coordinate maximum value YMax = maximum value of PY of all table items in TDPList; obtain a three-dimensional point cloud Y coordinate minimum value YMin = minimum value of PY of all table items in TDPList; obtain a three-dimensional point cloud Z coordinate maximum value ZMax = maximum value of PZ of all table items in TDPList; obtain a three-dimensional point cloud Z coordinate minimum value ZMin = minimum value of PZ of all table items in TDPList;
[0197] P104, obtain the number of table entries in TDPList, TDNum=TDPList;
[0198] S105, establish the outer shape framework priority space allocation table KJCap=an empty list;
[0199] S106, establish the first counter for initialization, InitCounterl=XMin;
[0200] S107, establish the second counter for initialization, InitCounter2=YMin;
[0201] S108, establish the third counter for initialization, InitCounter3=ZMin;
[0202] S109, establish the sub-space region variable for initialization, InitSubSpace=establish a cubic region with the X coordinate range of [InitCounterl, InitCounterl+TPDist], the Y coordinate range of [InitCounter2, InitCounter2+TPDist], and the Z coordinate range of [InitCounter3, InitCounter3+TPDist];
[0203] S110, the three-dimensional point list variable in the sub-space, InitSubPtList=select all three-dimensional points in the space region range of InitSubSpace from TDPList;
[0204] S111, delete all three-dimensional points listed in InitSubPtList from TDPList;
[0205] S112, establish the outer shape framework table entry variable KJItem; KJItem contains the following attributes:
[0206] KJSubSpace: the space region variable corresponding to the outer shape framework table entry variable, the value of which is InitSubSpace;
[0207] KJSubPtList: the three-dimensional point list variable contained in the outer shape framework table entry variable, the value of which is InitSubPtList;
[0208] KJPtNum: the number of three-dimensional points variable contained in the outer shape framework table entry variable, the value of which is the number of three-dimensional points in InitSubPtList;
[0209] KJPri: the priority variable of the outer shape framework table entry variable, the default value of which is 0;
[0210] KJIndex1: first index variable of the outer frame table variable, the variable value is InitCounter1;
[0211] KJIndex2: second index variable of the outer frame table variable, the variable value is InitCounter2;
[0212] KJIndex3: third index variable of the outer frame table variable, the variable value is InitCounter3;
[0213] S113, add KJItem to KJCap;
[0214] S114, InitCounter3 = InitCounter3 + TPDist;
[0215] S115, if InitCounter3 < ZMax, go to S109, otherwise go to S116;
[0216] S116, InitCounter2 = InitCounter2 + TPDist;
[0217] S117, if InitCounter2 < YMax, go to S108, otherwise go to S118;
[0218] S118, InitCounter1 = InitCounter1 + TPDist;
[0219] S119, if InitCounter1 < XMax, go to S107, otherwise go to S120;
[0220] S120, obtain the outer frame priority component allocation group number KJGroupNum = Round ((XMax - XMin) / TPDist + (YMax - YMin) / TPDist + 0.5 x (ZMax - ZMin) / TPDist) x 100; wherein Round is rounding;
[0221] Input three-dimensional point cloud list TDPList (see Table 1):
[0222] Table 1.
[0223]
[0224] Input three-dimensional space allocation scale value TPDist = 20;
[0225] Obtain the maximum value of X coordinate of the three-dimensional point cloud XMax=1200; obtain the minimum value of X coordinate of the three-dimensional point cloud XMin=1; obtain the maximum value of Y coordinate of the three-dimensional point cloud YMax=1000; obtain the minimum value of Y coordinate of the three-dimensional point cloud YMin=1; obtain the maximum value of Z coordinate of the three-dimensional point cloud ZMax=3000; obtain the minimum value of Z coordinate of the three-dimensional point cloud ZMin=1;
[0226] Obtain the number of three-dimensional points TDNum=100800;
[0227] Establish the shape framework priority space allocation table KJCap (see Table 2):
[0228] Table 2.
[0229]
[0230] Obtain the number of three-dimensional points TDNum=100800;
[0231] S2, establish the shape framework priority operator KJPrjOpt, the input of KJPrjOpt is the shape framework priority operator position variable KOPos, and the return is the shape framework priority operator calculation result variable KOResult;
[0232] S201, establish the shape framework priority operator KJPrjOpt, the input of KJPrjOpt is the shape framework priority operator position variable KOPos;
[0233] S202, establish the shape framework priority operator calculation result variable KOResult=-100000;
[0234] S203, if the value of KJCap[KOPos].KJPtNum is 0, turn to S215;
[0235] S204, set the shape framework expansion first selected coordinate KOEx1=KJCap[KOPos].KJIndex1; set the shape framework expansion second selected coordinate KOEx2=KJCap[KOPos].KJIndex2; set the shape framework expansion third selected coordinate KOEx3=KJCap[KOPos].KJIndex3;
[0236] S205, Establishing the expanded selection sub-space region variable KOSubSpace = Establishing a cuboid region whose X coordinate ranges from [KOEx1-0.5xTPDist, KOEx1+1.5xTPDist], whose Y coordinate ranges from [KOEx2-0.5xTPDist, KOEx2+1.5xTPDist], and whose Z coordinate ranges from [KOEx3-0.5xTPDist, KOEx3+1.5xTPDist];
[0237] S206, Selected outer shape frame table entry KOSubList = Selecting all table entries in KJCap whose KJSubSpace attribute intersects with KOSubSpace;
[0238] S207, Selected outer shape frame table entry quantity KOSubListNum = The quantity of table entries contained in KOSubList;
[0239] S208, If the value of KOSubListNum <= 1, then KOResult = 1 and go to S215; otherwise go to S209;
[0240] S209, Outer shape frame priority degree operator counter KOCounter = 1; KOResult = 1;
[0241] S210, If KOSubList[KOCounter].KJPtNum is equal to 0, then go to S212, otherwise go to S211;
[0242] S211, KOResult = KOResult-1 / 27;
[0243] S212, KOCounter = KOCounter+1;
[0244] S213, If KOCounter < KOSubListNum, then go to S210, otherwise go to S214;
[0245] S214, KOResult = tanh(KOResult+0.1); Wherein tanh is the calculation of hyperbolic tangent value;
[0246] S215, Returning KOResult as the result of KJPrjOpt operator;
[0247] S3, Establishing the frame priority selection operator SelectOpt, the input of SelectOpt is the frame priority selection quantity SONum, and the output is the frame priority selection output point list variable SOList;
[0248] S301, establish a framework priority selection operator SelectOpt; the input of SelectOpt is the framework priority selection number SONum;
[0249] S302, establish a framework priority selection output point list variable SOList = empty list;
[0250] S303, framework priority selection operator counter SOCounter = 1;
[0251] S304, framework priority selection highest value table entry variable SOPos = obtain the position of the table entry with the highest KJPri value in KJCap in KJCap;
[0252] S305, set KJCap[SOPos].KJPri = KJCap[SOPos].KJPri-1 / KJGroupNum;
[0253] S306, if KJCap[SOPos].KJPtNum is equal to 0, go to S311, otherwise go to S307;
[0254] S307, add KJCap[SOPos].KJSubPtList[1] to SOList;
[0255] S308, delete the first element of KJCap[SOPos].KJSubPtList;
[0256] S309, KJCap[SOPos].KJPtNum = KJCap[SOPos].KJPtNum-1;
[0257] S310, SOCounter = SOCounter + 1;
[0258] S311, if SOCounter < SONum, go to S304, otherwise go to S312;
[0259] S312, return SOList as the result of SelectOpt;
[0260] S4, establish a table analysis operator AnalysisOpt, which processes the entire KJCap using KJPrjOpt;
[0261] S401, establish a table analysis operator AnalysisOpt;
[0262] S402, the number of table entries to be analyzed AONum = the number of table entries contained in KJCap;
[0263] S403, Analysis counter AOCounter = 1;
[0264] S404, Call KJPrjOpt operator, KJPrjOpt input KOPos = AOCounter, KJPrjOpt output KOResult stored in temporary shape frame priority variable AOTemp;
[0265] S405, KJCap [AOCounter].KJPri = AOTemp;
[0266] S406, AOCounter = AOCounter + 1;
[0267] S407, If AOCounter < AONum, go to S404, otherwise go to S408;
[0268] S408, AnalysisOpt process ends;
[0269] S5, Input storage path SPath, output three-dimensional point cloud storage result by using AnalysisOpt operator and SelectOpt operator;
[0270] S501, Input storage path SPath, SPath is a string expressing computer storage path;
[0271] S502, Storage number counter SNumCounter = 0; Storage step counter SStepCounter = 1;
[0272] S503, Call AnalysisOpt operator;
[0273] S504, To-be-taken-out point number variable SGetNum = TDNum - SNumCounter;
[0274] S505, If SGetNum > KJGroupNum, SGetNum = KJGroupNum;
[0275] S506, SNumCounter = SNumCounter + SGetNum;
[0276] S507, Call SelectOpt operator, operator input SONum = SGetNum, calculate output SOList and store in to-be-stored three-dimensional point list variable SGetPoints;
[0277] S508, a variable SFileName is established to store the file name, SFileName = concat(SPath, str(SStepCounter)); where concat is to combine two strings, and str is to convert a numerical variable into a string;
[0278] S509, all data of SGetPoints is stored into a file with the file name SFileName;
[0279] S510, SStepCounter = SStepCounter + 1;
[0280] S511, if SNumCounter < TDNum, go to S503, otherwise go to S512;
[0281] S512, the S5 step ends;
[0282] An input storage path SPath = "D:\temp";
[0283] Six files are outputted, and the file names and the number of three-dimensional points contained are as follows (see Table 3):
[0284] Table 3.
[0285]
[0286] Verification Example 1
[0287] The present application introduces three scenes of three-dimensional point clouds, and compares whether the user can see the scene content when the data is loaded at 10%, 20%, 30%, and 40% (see Table 4):
[0288] Table 4.
[0289]
[0290] Conclusion: From the table, it can be seen that for the original order loading method, loading a part of the data cannot make the user see the overall appearance of the scene, and a large amount of data (40%) needs to be loaded to make the user clearly see the overall appearance of the scene; for the method of the present application, for the two scenes of the campus and the scenic area containing trees, only 10% of the data is needed to achieve the goal of clearly seeing the overall appearance of the scene; in the more complex urban area, only 20% of the data is needed to achieve the goal of clearly seeing the overall appearance of the scene. Therefore, by using the present application, the outer frame part of the scene can be prioritized, so that the user can observe the scene described by the three-dimensional point cloud using less data, and this feature has good practical value for the visualization and data distribution of three-dimensional point cloud data based on Web.
Claims
1. A method for storing three-dimensional point cloud data based on an outer shape frame priority, characterized by The method comprises the following steps: S1, inputting a three-dimensional point cloud list TDPList; inputting a three-dimensional space allocation scale value TPDist; obtaining a maximum value XMax of X coordinates of the three-dimensional point cloud; obtaining a minimum value XMin of the X coordinates of the three-dimensional point cloud; obtaining a maximum value YMax of Y coordinates of the three-dimensional point cloud; obtaining a minimum value YMin of the Y coordinates of the three-dimensional point cloud; obtaining a maximum value ZMax of Z coordinates of the three-dimensional point cloud; obtaining a minimum value ZMin of the Z coordinates of the three-dimensional point cloud; obtaining a number TDNum of three-dimensional points; and establishing a shape framework priority space allocation table KJCap; S101, inputting a three-dimensional point cloud list TDPList; TDPList is a list, each table item in the list being a three-dimensional point, which comprises three attributes: PX: an X coordinate of the three-dimensional point; PY: a Y coordinate of the three-dimensional point; PZ: a Z coordinate of the three-dimensional point; S102, inputting a three-dimensional space allocation scale value TPDist, TPDist being an integer; S103, obtaining a maximum value XMax of X coordinates of all table items in TDPList; obtaining a minimum value XMin of the X coordinates of all table items in TDPList; obtaining a maximum value YMax of Y coordinates of all table items in TDPList; obtaining a minimum value YMin of the Y coordinates of all table items in TDPList; obtaining a maximum value ZMax of Z coordinates of all table items in TDPList; and obtaining a minimum value ZMin of the Z coordinates of all table items in TDPList; S104, obtaining a number TDNum of table items in TDPList; S105, establishing a shape framework priority space allocation table KJCap=an empty list; S106, establishing a first counter InitCounter1=XMin for initialization; S107, establishing a second counter InitCounter2=YMin for initialization; S108, establishing a third counter InitCounter3=ZMin for initialization; S109, establishing a subspace region variable InitSubSpace=establishing a cubic region: the X coordinate range of the cubic region being [InitCounter1, InitCounter1+TPDist], the Y coordinate range of the cubic region being [InitCounter2, InitCounter2+TPDist], and the Z coordinate range of the cubic region being [InitCounter3, InitCounter3+TPDist]; S110, obtaining a three-dimensional point list variable InitSubPtList=selecting all three-dimensional points in TDPList within the space region range of InitSubSpace; and S111, establishing a first group variable KJGroup1=InitSubPtList. S111, delete all three-dimensional points listed in InitSubPtList from TDPList; S112, create a KJItem variable for the bounding frame table entry; KJItem contains the following attributes: KJSubSpace: the space region variable corresponding to the bounding frame table entry variable, the value of which is InitSubSpace; KJSubPtList: the three-dimensional point list variable contained in the bounding frame table entry variable, the value of which is InitSubPtList; KJPtNum: the number of three-dimensional points contained in the bounding frame table entry variable, the value of which is the number of three-dimensional points in InitSubPtList; KJPri: the priority variable of the bounding frame table entry variable, the default value of which is 0; KJIndex1: the first index variable of the bounding frame table entry variable, the value of which is InitCounter1; KJIndex2: the second index variable of the bounding frame table entry variable, the value of which is InitCounter2; KJIndex3: the third index variable of the bounding frame table entry variable, the value of which is InitCounter3; S113, add KJItem to KJCap; S114, InitCounter3 = InitCounter3 + TPDist; S115, if InitCounter3 < ZMax, go to S109, otherwise go to S116; S116, InitCounter2 = InitCounter2 + TPDist; S117, if InitCounter2 < YMax, go to S108, otherwise go to S118; S118, InitCounter1 = InitCounter1 + TPDist; S119, if InitCounter1 < XMax, go to S107, otherwise go to S120; S120, obtain the number of bounding frame priority component allocation groups KJGroupNum = Round((XMax-XMin) / TPDist+(YMax-YMin) / TPDist+0.5×(ZMax-ZMin) / TPDist)×100; where Round is rounding; S2, create a bounding frame priority operator KJPrjOpt, the input of which is a bounding frame priority operator position variable KOPos, and the return value is a bounding frame priority operator calculation result variable KOResult; S201, create a bounding frame priority operator KJPrjOpt, the input of which is a bounding frame priority operator position variable KOPos; S202, create a bounding frame priority operator calculation result variable KOResult = -100000; S203, if the value of KJCap[KOPos].KJPtNum is 0, go to S215; S204, set the first selected coordinate of the expanded shape frame KOEx1 = KJCap[KOPos].KJIndex1; set the second selected coordinate of the expanded shape frame KOEx2 = KJCap[KOPos].KJIndex2; set the third selected coordinate of the expanded shape frame KOEx3 = KJCap[KOPos].KJIndex3; S205, establish the expanded selected subspace region variable KOSubSpace = establish a cuboid region: whose X coordinate range is [KOEx1-0.5xTPDist, KOEx1+1.5xTPDist], whose Y coordinate range is [KOEx2-0.5xTPDist, KOEx2+1.5xTPDist], whose Z coordinate range is [KOEx3-0.5xTPDist, KOEx3+1.5xTPDist]; S206, the selected shape frame table KOsublist = select all table items in KJCap whose KJSubSpace attribute intersects with KOSubSpace; S207, the number of selected shape frame table items KOSubListNum = the number of table items contained in KOSubList; S208, if the value of KOSubListNum <= 1, then KOResult = 1 and go to S215; otherwise go to S209; S209, the shape frame priority operator counter KOCounter = 1; KOResult = 1; S210, if KOSubList[KOCounter].KJPtNum is equal to 0, go to S212, otherwise go to S211; S211, KOResult = KOResult-1 / 27; S212, KOCounter = KOCounter + 1; S213, if KOCounter < KOSubListNum, go to S210, otherwise go to S214; S214, KOResult = tanh(KOResult + 0.1); where tanh is the calculated hyperbolic tangent value; S215, return KOResult as the result of the KJPrjOpt operator; S3, establish the frame priority selection operator SelectOpt, the input of SelectOpt is the frame priority selection number SONum, and the output is the frame priority selection output point list variable SOList; S301, establish the frame priority selection operator SelectOpt; the input of SelectOpt is the frame priority selection number SONum; S302, establish the frame priority selection output point list variable SOList = empty list; S303, the frame priority selection operator counter SOCounter = 1; S304, the frame priority selection highest value table item variable SOPos = obtain the position of the table item with the highest KJPri value in KJCap; S305, set KJCap[SOPos].KJPri=KJCap[SOPos].KJPri-1 / KJGroupNum; S306, if KJCap[SOPos].KJPtNum equals 0, go to S311, otherwise go to S307; S307, add KJCap[SOPos].KJSubPtList[1] to SOList; S308, delete the first element of KJCap[SOPos].KJSubPtList; S309, KJCap[SOPos].KJPtNum=KJCap[SOPos].KJPtNum-1; S310, SOCounter=SOCounter+1; S311, if SOCounter<SONum, go to S304, otherwise go to S312; S312, return SOList as the result of SelectOpt; S4, build the table analysis operator AnalysisOpt, which processes the whole KJCap using KJPrjOpt; S401, build the table analysis operator AnalysisOpt; S402, AONum=the number of table entries in KJCap; S403, AOCounter=1; S404, call KJPrjOpt, KOPos=AOCounter, KOResult is stored in AOTemp; S405, KJCap[AOCounter].KJPri=AOTemp; S406, AOCounter=AOCounter+1; S407, if AOCounter<AONum, go to S404, otherwise go to S408; S408, end of AnalysisOpt; S5, input storage path SPath, output 3D point cloud using AnalysisOpt and SelectOpt; S501, input storage path SPath, SPath is a string representing the computer storage path; S502, SNumCounter=0; SStepCounter=1; S503, call AnalysisOpt; S504, SGetNum=TDNum-SNumCounter; S505, if SGetNum>KJGroupNum, SGetNum=KJGroupNum; S506, SNumCounter=SNumCounter+SGetNum; S507, call SelectOpt operator, operator input SO Num=SGetNum, calculate output SO List and store into the variable SGetPoints which is a list of 3D points to be stored; S508, establish the variable SFileName=concat(SPath, str(SStepCounter)); where concat is to combine two strings, str is to convert a number variable into a string; S509, store all data of SGetPoints into a file whose name is SFileName; S510, SStepCounter=SStepCounter+1; S511, if SNumCounter<TDNum, go to S503, otherwise go to S512; S512, end of S5.
Citation Information
Patent Citations
Methods and systems relating to network based storage
US20190034295A1
Three-dimensional scanning viewpoint planning method, device, and computer readable storage medium
WO2020168685A1