CN112948332B - Point cloud file packaging and analyzing method and device - Google Patents

Point cloud file packaging and analyzing method and device Download PDF

Info

Publication number
CN112948332B
CN112948332B CN202110240492.1A CN202110240492A CN112948332B CN 112948332 B CN112948332 B CN 112948332B CN 202110240492 A CN202110240492 A CN 202110240492A CN 112948332 B CN112948332 B CN 112948332B
Authority
CN
China
Prior art keywords
file
point cloud
description information
information
length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110240492.1A
Other languages
Chinese (zh)
Other versions
CN112948332A (en
Inventor
娄志云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110240492.1A priority Critical patent/CN112948332B/en
Publication of CN112948332A publication Critical patent/CN112948332A/en
Application granted granted Critical
Publication of CN112948332B publication Critical patent/CN112948332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Library & Information Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention provides a method and a device for packaging and analyzing point cloud files, and relates to the technical field of data processing, wherein the method comprises the following steps: and obtaining the file length of each point cloud file of the target object. For each point cloud file, generating a file offset of the point cloud file according to the file length of a previous file of the point cloud file and the length of description information of each point cloud file, wherein the previous file is: the corresponding time is the point cloud file before the corresponding time of the point cloud file, and the file offset represents: and the offset of the file header of the point cloud file relative to the file header of the packaging file in the packaging file to be generated. And encapsulating the cloud files at each point by taking the description information of the cloud files at each point as the header information of the encapsulation file to obtain the encapsulation file. By applying the scheme provided by the embodiment of the invention to package the point cloud file, the complexity of storing the point cloud file can be reduced.

Description

Point cloud file packaging and analyzing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for packaging and parsing a point cloud file.
Background
With the development of 3D modeling technology, 3D models of various objects can be constructed, and the 3D models are increasingly widely applied in the fields of movies, televisions, animations and the like. When a 3D model of an object in a motion state is constructed, the 3D models are respectively constructed aiming at different moments of the object motion, so that three-dimensional information of the object in the motion state can be displayed to a user by sequentially rendering each constructed 3D model.
In addition, for each 3D model, it is generally described by point cloud data stored in a point cloud file, so that a plurality of 3D models corresponding to an object in a motion state need to be described by point cloud data stored in a plurality of point cloud files. Under the condition that the number of the point cloud files is large, the point cloud files are easy to be scattered and stored in the storage device, so that the complexity of the point cloud file storage is high, and the point cloud files are inconvenient to manage.
Disclosure of Invention
The embodiment of the invention aims to provide a point cloud file packaging and analyzing method and device so as to reduce the complexity of storing point cloud files. The specific technical scheme is as follows:
in a first aspect of the embodiment of the present invention, there is first provided a method for encapsulating a point cloud file, where the method includes:
Obtaining the file length of each point cloud file of the target object, wherein each point cloud file comprises: point cloud data for describing stereoscopic information of the target object at different times;
generating a file offset of each point cloud file according to the file length of the previous file of the point cloud file and the length of the description information of each point cloud file, wherein the previous file is: and the corresponding moment is a point cloud file positioned before the corresponding moment of the point cloud file, and the file offset represents: the offset of the file header of the point cloud file in the generated encapsulation file relative to the file header of the encapsulation file;
and encapsulating each point cloud file by taking the description information of each point cloud file as the header information of the encapsulation file to obtain the encapsulation file, wherein the description information comprises the following components: the file identification, the file length and the file offset of the point cloud files are described, and the point cloud files in the package file are arranged according to the time sequence of the corresponding time of the point cloud files.
In one embodiment of the present invention, before the generating, for each point cloud file, a file offset of the point cloud file according to a file length of a previous file of the point cloud file and a length of description information of each point cloud file, the method further includes:
Obtaining additional description information of the package file, wherein the additional description information comprises at least one of the following information: the length of the encapsulation file, the number of the point cloud files contained in the encapsulation file, version information of the encapsulation file and type information of the target object;
for each point cloud file, generating a file offset of the point cloud file according to a file length of a previous file of the point cloud file and a length of description information of each point cloud file, including:
generating a file offset of each point cloud file according to the file length of the previous file of the point cloud file, the length of the description information of each point cloud file and the length of the additional description information;
the step of encapsulating each point cloud file by using the description information of each point cloud file as the header information of the encapsulation file to obtain the encapsulation file comprises the following steps:
and taking the additional description information and the description information of each point cloud file as header information of the to-be-generated encapsulation file, and encapsulating each point cloud file to obtain the encapsulation file.
In one embodiment of the invention, the method further comprises:
generating a file offset of the point cloud file to be added according to the sum of the file lengths of the point cloud files in the package file and the length of the description information of the point cloud files;
Updating file offset in each piece of description information in the header information of the encapsulation file according to the length of the description information of the point cloud file to be added;
and adding the description information of the point cloud file to be added to the last description information tail in the header information, and adding the point cloud file to be added to the packaging file tail.
In one embodiment of the invention, the method further comprises:
receiving a point cloud file request aiming at the target object, which is sent by a request terminal;
and sending the encapsulated file to the request terminal.
In a second aspect of the embodiment of the present invention, a method for resolving a point cloud file is provided, where the method includes:
obtaining a file identifier of a point cloud file to be analyzed;
according to the determined file identification, analyzing file offset and file length contained in the description information corresponding to the point cloud file to be analyzed from the existing encapsulated file, wherein the encapsulated file is: and the description information of each point cloud file of the target object is used as header information, and the file obtained by packaging each point cloud file comprises the following description information: the described point cloud file includes file identification, file length, and file offset, each point cloud file including: the point cloud data are used for describing three-dimensional information of the target object at different moments, and the point cloud files in the packaging file are arranged according to the time sequence of the moment corresponding to the point cloud files;
And according to the file offset and the file length of the point cloud file to be analyzed, analyzing the point cloud file to be analyzed from the packaging file.
In one embodiment of the present invention, the header information of the encapsulated file further includes additional description information, and before the file offset and the file length included in the description information corresponding to the point cloud file to be resolved are resolved from the existing encapsulated file according to the determined file identifier, the method further includes:
obtaining additional description information of the target encapsulation file;
according to the determined file identifier, resolving the file offset and the file length contained in the description information corresponding to the point cloud file to be resolved from the existing encapsulation file, including:
determining the target encapsulation file from the existing encapsulation files according to the obtained additional description information;
and according to the determined file identification, analyzing the file offset and the file length contained in the description information corresponding to the point cloud file to be analyzed from the target encapsulation file.
In one embodiment of the invention, the additional description information includes at least one of the following information:
the method comprises the steps of packaging the length of a file, the number of point cloud files contained in the packaged file, version information of the packaged file and type information of a target object corresponding to the packaged file.
In a third aspect of the embodiment of the present invention, there is provided a point cloud file packaging apparatus, including:
the length obtaining module is used for obtaining the file length of each point cloud file of the target object, wherein each point cloud file comprises: point cloud data for describing stereoscopic information of the target object at different times;
the first offset generating module is configured to generate, for each point cloud file, a file offset of the point cloud file according to a file length of a previous file of the point cloud file and a length of description information of each point cloud file, where the previous file is: and the corresponding moment is a point cloud file positioned before the corresponding moment of the point cloud file, and the file offset represents: the offset of the file header of the point cloud file in the generated encapsulation file relative to the file header of the encapsulation file;
the file packaging module is used for packaging each point cloud file by taking the description information of each point cloud file as the header information of the packaging file to obtain the packaging file, wherein the description information comprises: the file identification, the file length and the file offset of the point cloud files are described, and the point cloud files in the package file are arranged according to the time sequence of the corresponding time of the point cloud files.
In one embodiment of the invention, the apparatus further comprises:
an additional description information obtaining module, configured to obtain additional description information of the package file, where the additional description information includes at least one of the following information: the length of the encapsulation file, the number of the point cloud files contained in the encapsulation file, version information of the encapsulation file and type information of the target object;
the first offset generating module is specifically configured to:
generating a file offset of each point cloud file according to the file length of the previous file of the point cloud file, the length of the description information of each point cloud file and the length of the additional description information;
the file packaging module is specifically configured to:
and taking the additional description information and the description information of each point cloud file as header information of the to-be-generated encapsulation file, and encapsulating each point cloud file to obtain the encapsulation file.
In one embodiment of the invention, the apparatus further comprises:
the second offset generating module is used for generating the file offset of the point cloud file to be added according to the sum of the file lengths of the point cloud files in the package file and the length of the description information of the point cloud files;
The offset updating module is used for updating the file offset in each piece of description information in the header information of the encapsulation file according to the length of the description information of the point cloud file to be added;
and the file adding module is used for adding the description information of the point cloud file to be added to the last description information tail in the header information and adding the point cloud file to be added to the packaging file tail.
In one embodiment of the invention, the apparatus further comprises:
the request receiving module is used for receiving a point cloud file request aiming at the target object, which is sent by a request end;
and the file sending module is used for sending the encapsulated file to the request terminal.
In a fourth aspect of the embodiment of the present invention, there is provided a point cloud file parsing apparatus, including:
the identification obtaining module is used for obtaining a file identification of the point cloud file to be analyzed;
the information analysis module is used for analyzing file offset and file length contained in the description information corresponding to the point cloud file to be analyzed from the existing encapsulation file according to the determined file identification, wherein the encapsulation file is: and the description information of each point cloud file of the target object is used as header information, and the file obtained by packaging each point cloud file comprises the following description information: the described point cloud file includes file identification, file length, and file offset, each point cloud file including: the point cloud data are used for describing three-dimensional information of the target object at different moments, and the point cloud files in the packaging file are arranged according to the time sequence of the moment corresponding to the point cloud files;
And the file analysis module is used for analyzing the point cloud file to be analyzed from the packaging file according to the file offset and the file length of the point cloud file to be analyzed.
In one embodiment of the present invention, the header information of the encapsulation file further includes additional description information, and the apparatus further includes:
the description obtaining module is used for obtaining additional description information of the target encapsulation file;
the information analysis module is specifically configured to:
determining the target encapsulation file from the existing encapsulation files according to the obtained additional description information;
and according to the determined file identification, analyzing the file offset and the file length contained in the description information corresponding to the point cloud file to be analyzed from the target encapsulation file.
In one embodiment of the invention, the additional description information includes at least one of the following information:
the method comprises the steps of packaging the length of a file, the number of point cloud files contained in the packaged file, version information of the packaged file and type information of a target object corresponding to the packaged file.
In a fifth aspect of the embodiments of the present invention, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory perform communication with each other through the communication bus;
A memory for storing a computer program;
a processor configured to implement the method steps of any one of the first or second aspects when executing a program stored on a memory.
In a further aspect of the present invention there is also provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method steps of any of the first or second aspects described above.
In a further aspect of the invention there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of any of the first or second aspects described above.
The point cloud file encapsulation method provided by the embodiment of the invention can obtain the file length of the point cloud file comprising the point cloud data for describing the three-dimensional information of the target object at different moments, and determine the file offset of the file header of the individual point cloud file relative to the file header of the encapsulation file to be generated. And encapsulating the point cloud files by taking the file identification containing the point cloud files, the file length and the description information of the file offset as header information of the encapsulated files to be generated, wherein the point cloud files in the encapsulated files are arranged according to the time sequence of the corresponding moments of the point cloud files.
As described above, since the package file includes the point cloud file of the target object, the package file is stored as the point cloud file of the target object. And each point cloud file is stored as a part of the packaging file respectively instead of each point cloud file, so that the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention. In addition, as the cloud files of each point in the packaging file are arranged according to the time sequence of the corresponding time, the complexity of arranging the cloud files of each point in the packaging file is also lower.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of a first point cloud file packaging method provided in an embodiment of the present invention;
fig. 2 is a schematic structural diagram of description information according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a package file according to an embodiment of the present invention;
fig. 4 is a flow chart of a second method for encapsulating a point cloud file according to an embodiment of the present invention;
Fig. 5 is a schematic structural diagram of header information in a package file according to an embodiment of the present invention;
fig. 6 is a flow chart of a third method for encapsulating a point cloud file according to an embodiment of the present invention;
fig. 7 is a flow chart of a fourth method for encapsulating a point cloud file according to an embodiment of the present invention;
fig. 8 is a flow chart of a first method for resolving a point cloud file according to an embodiment of the present invention;
fig. 9 is a flow chart of a second method for resolving a point cloud file according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a point cloud file packaging device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a point cloud file analysis device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
Because of the complexity of point cloud file storage in the prior art. In order to solve the problem, the embodiment of the invention provides a point cloud file packaging and analyzing method and device.
In one embodiment of the present invention, a method for encapsulating a point cloud file is provided, where the method includes:
obtaining the file length of each point cloud file of the target object, wherein each point cloud file comprises: and the point cloud data is used for describing the three-dimensional information of the target object at different moments.
Generating a file offset of each point cloud file according to the file length of the previous file of the point cloud file and the length of the description information of each point cloud file, wherein the previous file is: and the corresponding time is a point cloud file positioned before the corresponding time of the point cloud file, and the file offset represents: and the offset of the file header of the point cloud file in the generated encapsulation file relative to the file header of the encapsulation file.
And encapsulating each point cloud file by taking the description information of each point cloud file as the header information of the encapsulation file, so as to obtain the encapsulation file, wherein the description information comprises the following components: the described file identification, file length and file offset of the point cloud files are arranged according to the time sequence of the corresponding time of the point cloud files in the encapsulation files.
As described above, since the package file includes the point cloud file of the target object, the package file is stored as the point cloud file of the target object. And each point cloud file is stored as a part of the packaging file respectively instead of each point cloud file, so that the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention. In addition, as the cloud files of each point in the packaging file are arranged according to the time sequence of the corresponding time, the complexity of arranging the cloud files of each point in the packaging file is also lower.
In another embodiment of the present invention, a method for resolving a point cloud file is provided, where the method includes:
and obtaining the file identification of the point cloud file to be analyzed.
According to the determined file identification, analyzing file offset and file length contained in the description information corresponding to the point cloud file to be analyzed from the existing encapsulated file, wherein the encapsulated file is: and the description information of each point cloud file of the target object is used as header information, and the file obtained by packaging each point cloud file comprises the following description information: the described point cloud file includes file identification, file length, and file offset, each point cloud file including: and the point cloud files in the encapsulation files are arranged according to the time sequence of the corresponding time of the point cloud files.
And according to the file offset and the file length of the point cloud file to be analyzed, analyzing the point cloud file to be analyzed from the packaging file.
From the above, it can be seen that the point cloud file exists as a part of the encapsulated file, the encapsulated file includes description information of the point cloud file, and the description information includes file identification, file length and file offset of the point cloud file. According to the file identification of the point cloud file to be analyzed, the file length and the file offset in the description information of the point cloud file to be analyzed can be determined, the starting position of the point cloud file to be analyzed in the packaging file can be determined according to the file offset, and the data in the file length from the position corresponding to the file offset belong to the point cloud file to be analyzed, so that the point cloud file to be analyzed can be analyzed from the packaging file according to the determined file offset and the file length. In addition, because each point cloud file is stored as a part of the package file respectively, rather than each point cloud file being stored respectively, the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention.
The method and the device for packaging and analyzing the point cloud file provided by the embodiment of the invention are explained below through specific embodiments.
Referring to fig. 1, an embodiment of the present invention provides a flowchart of a first method for encapsulating a point cloud file, where the method includes the following steps S101 to S103.
S101: and obtaining the file length of each point cloud file of the target object.
Wherein, each point cloud file includes: and the point cloud data is used for describing the three-dimensional information of the target object at different moments.
Specifically, each point cloud file of the target object can be traversed, and the file length of each point cloud file is determined.
Each point cloud file contains point cloud data for describing stereoscopic information of the target object at one moment.
The target object may be an object included in a real scene, such as an animal, a person, a vehicle, or the like, or may be an object included in a virtual scene, such as a virtual cartoon character, or the like.
S102: and generating a file offset of each point cloud file according to the file length of the previous file of the point cloud file and the length of the description information of each point cloud file.
Wherein, the preceding file is: and the corresponding moment is the point cloud file before the corresponding moment of the point cloud file.
The file offset represents: and the offset of the file header of the point cloud file in the generated encapsulation file relative to the file header of the encapsulation file.
Specifically, for each point cloud file, the more other files or information located before the point cloud file in the to-be-generated encapsulation file, the larger the offset of the file header of the point cloud file relative to the file header of the encapsulation file, the larger the file offset. To determine the file offset of each point cloud file, the total length of other files or information located before the point cloud file needs to be determined. In the package file to be generated, the description information of each point cloud file is used as the header information of the package file and is positioned at the head of the point cloud file, and each point cloud file is positioned behind the header information. Therefore, for each point cloud file, in the package file to be generated, the description information of each point cloud file is located before the point cloud file, and besides, the previous file is also located before the point cloud file.
Therefore, when determining the file offset of the point cloud file, the total length of the description information of each point cloud file and the total length of the previous file need to be determined. Wherein the total length of the preceding files can be added up to the lengths of the respective preceding files obtained.
In addition, in the case that the lengths of the description information of the respective point cloud files are the same, for example, the length of the description information of each point cloud file may be 64 bits, the total number of the point cloud files may be determined, and the total length of the point cloud files may be obtained by multiplying the total number by the length of the description information of the respective point cloud files.
Under the condition that the lengths of the description information of the point cloud files are different, the length of the description information of each point cloud file can be determined respectively, and the lengths of the description information of the point cloud files are added to obtain the total length of the description information. The length of the description information of each point cloud file may be a preset length, or a correspondence between the length of the description information and the file length of the point cloud file may be preset, and the length of the description information is determined according to the file length of the point cloud file, for example, the length of the description information may be proportional to the file length of the point cloud file, and the larger the file length of the point cloud file, the larger the length of the description information. In addition, the length of the description information can also be related to the type of the target object, and the lengths of the description information of the point cloud files of different target objects are different.
S103: and encapsulating each point cloud file by taking the description information of each point cloud file as the header information of the encapsulation file to obtain the encapsulation file.
Wherein, the description information includes: file identification, file length, and file offset of the described point cloud file.
And arranging the point cloud files in the packaging file according to the time sequence of the corresponding time of the point cloud files.
Specifically, the file identifiers of different point cloud files are different, and the file identifiers can be the generation time of the point cloud files, the time of the corresponding time of the point cloud files, or other identifiers expressed in a digital or character form. The length of the file identifier may be 16 bits.
In addition, the storage space occupied by the file length in the above description information may be 16 bits, and the storage space occupied by the file offset may be 32 bits.
The corresponding time of the point cloud file is as follows: and the moment corresponding to the three-dimensional information of the target object described by the point cloud data contained in the point cloud file.
Referring to fig. 2, a schematic structural diagram of description information is provided in an embodiment of the present invention.
It can be seen from the figure that the description information includes the file identifier, the file length and the file offset, and the figure only represents one arrangement order of the file identifier, the file length and the file offset included in the description information, and the file identifier, the file length and the file offset may be arranged in other arrangement orders.
Furthermore, the description information of each point cloud file may be arranged in the package file according to the time sequence of the time corresponding to the point cloud file.
In one embodiment of the invention, the description information with the file identification, the file length and the file offset as the preset values and each point cloud file can be sequentially and physically spliced, and the description information of the point cloud file is updated according to the file identification, the file length and the file offset of each point cloud file to obtain the encapsulation file.
And the description information of each point cloud file can be generated according to the file identification, the file length and the file offset of each point cloud file, and then the generated description information and each point cloud file are subjected to physical splicing in sequence to obtain the encapsulation file.
Referring to fig. 3, a schematic structure diagram of an encapsulated file according to an embodiment of the present invention is provided.
As can be seen from the figure, the header information is located at the header of the package file, and each of the point cloud files 1-N is sequentially arranged after the header information according to the time sequence of the corresponding time.
In another embodiment of the present invention, after the encapsulated file is obtained, the encapsulated file may be stored in a storage device.
As described above, since the package file includes the point cloud file of the target object, the package file is stored as the point cloud file of the target object. And each point cloud file is stored as a part of the packaging file respectively instead of each point cloud file, so that the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention. In addition, as the cloud files of each point in the packaging file are arranged according to the time sequence of the corresponding time, the complexity of arranging the cloud files of each point in the packaging file is also lower.
Referring to fig. 4, an embodiment of the present invention provides a flowchart of a second method for encapsulating a point cloud file, and compared with the embodiment shown in fig. 1, the method further includes the following step S104 before the step S102, where the step S102 may be implemented by the following step S102A, and the step S103 may be implemented by the following step S103A.
S104: and obtaining the additional description information of the encapsulated file.
Wherein the additional description information includes at least one of the following information: the length of the encapsulation file, the number of the point cloud files contained in the encapsulation file, version information of the encapsulation file and type information of the target object.
Specifically, the length of the encapsulation file is the sum of the additional description information, the lengths of each description file and each point cloud file. The length of the additional description information may be a sum of information lengths of information included in the additional description information.
In addition, each time the package file changes, the version information of the package file changes, and the version information of the package file may be represented by a number, a character, or other forms, for example, the value of the version information of the package file is 1, which indicates that the package file is the first version package file, and the value of the version information of the package file is 3, which indicates that the package file is the third version package file.
The type information of the target object is as follows: the information indicating the type to which the target object belongs may be, for example, an animal, a vehicle, a person, etc., the type information of the target object may be determined according to a preset correspondence between the type to which the target object belongs and a value of the type information, and the type information of the target object may be represented in a number, a character, or other forms. For example, the type to which the target object belongs is 1, the type information to which the animal corresponds is 2, and the like.
For example, the information length of the package file may be 64 bits, the information length of the number of point cloud files included in the package file may be 8 bits, the information length of version information of the package file may be 4 bits, the information length of type information of the target object may be 4 bits, and the like.
S102A: and generating a file offset of each point cloud file according to the file length of the previous file of the point cloud file, the length of the description information of each point cloud file and the length of the additional description information of each point cloud file.
Specifically, since the additional description information is located in the header information of the to-be-generated package file, that is, in the front end of each point cloud file in the to-be-generated package file, the file offset of each point cloud file may be affected. For each point cloud file, when generating the file offset of the point cloud file, the length of the additional description information, the length of the description information of each point cloud file and the file length of the previous file are required to be summed to obtain the total length, and the total length obtained by summation is used as the file offset of the point cloud file.
S103A: and encapsulating each point cloud file by taking the additional description information and the description information of each point cloud file as header information of the encapsulation file to be generated, thereby obtaining the encapsulation file.
Specifically, the additional information may be located before the description information of each point cloud file in the header information, or may be located after the description information of each point cloud file. In addition, in the case where the plurality of pieces of information are included in the additional information, the arrangement order of the plurality of pieces of information may be any preset order, for example, the preset order may be: the type information of the target object, the version information of the encapsulation file, the number of point cloud files contained in the encapsulation file and the length of the encapsulation file are sequentially from front to back.
Referring to fig. 5, a schematic structural diagram of header information in a package file according to an embodiment of the present invention is provided.
As can be seen from the figure, the header information of the package file includes additional description information and n pieces of description information, and the additional description information includes various pieces of information, where each piece of information is arranged in order of version information of the package file, type information of the target object, the number of point cloud files included in the package file, and the length of the package file.
As can be seen from the above, the header information of the above-mentioned encapsulated file includes additional description information in addition to the description information of each point cloud file, where the additional description information includes at least one of a length of the encapsulated file, a number of point cloud files included in the encapsulated file, version information of the encapsulated file, and type information of the target object, and it is seen that the above-mentioned additional description information is mainly for description of the entire encapsulated file, and is different from the description information of each point cloud file. By encapsulating the additional description information, the entire information of the encapsulated file can be saved.
In addition, since after the point cloud file is encapsulated, after the encapsulated file is obtained, new point cloud data for describing the stereoscopic information of the target object may be obtained continuously, that is, a new point cloud file of the target object may be obtained, and in this case, the new point cloud file needs to be added to the encapsulated file.
Referring to fig. 6, an embodiment of the present invention provides a flowchart of a third method for encapsulating a point cloud file, and compared with the embodiment shown in fig. 1, the method further includes the following steps S105 to S107 after the step S103.
S105: and generating the file offset of the point cloud file to be added according to the sum of the file lengths of the point cloud files in the package file and the length of the description information of the point cloud files.
Specifically, since the point cloud file to be added is a newly generated point cloud file, the time corresponding to the point cloud file to be added is after the point cloud file already contained in the package file, and the point cloud file to be added needs to be arranged after the point cloud file already contained in the package file according to the time sequence of the time corresponding to each point cloud file. Therefore, the description information of each point cloud file and each point cloud file is before the file to be added, and therefore the sum of the file lengths of each point cloud file and the sum of the lengths of the description information of each point cloud file are required to be used as the file offset of the file to be added.
In addition, when the header information of the package file includes additional description information, it is necessary to add the length of the additional description information to the sum of the file lengths of the point cloud files and the sum of the lengths of the description information of the point cloud files, so as to obtain the file offset of the point cloud file to be added.
S106: and updating the file offset in each piece of description information in the header information of the encapsulation file according to the length of the description information of the point cloud file to be added.
Specifically, since the description information of the file to be added is added to the header information of the encapsulation file, the description information of the file to be added is located before each point cloud file already included in the encapsulation file after being added to the encapsulation file, and therefore, the file offset of each point cloud file is changed, and therefore, the file offset in each description information in the header information of the encapsulation file needs to be updated. The file offset of each point cloud file increases the length of the description information of the point cloud file to be added.
S107: and adding the description information of the point cloud file to be added to the last description information tail in the header information, and adding the point cloud file to be added to the packaging file tail.
Specifically, the last description information tail existing in the header information may be originally connected to the header of the first point cloud file existing in the package file, and the description information of the point cloud file to be added is added to the last description information tail, that is, the description information is inserted between the last description information and the first point cloud file.
The time corresponding to the point cloud file to be added is after the time corresponding to the existing point cloud file in the encapsulation file, so that the point cloud file to be added is required to be added to the existing point cloud file according to the time sequence, namely the encapsulation file tail. And physically splicing the point cloud file to be added at the tail of the packaging file, so that the point cloud file to be added is added into the packaging file.
Therefore, after the new point cloud file to be added is obtained, the point cloud file to be added can be packaged, so that the point cloud file of the same target object is packaged into one package file. When the point cloud file to be added is added into the packaging file, only new description data is needed to be added into the header information, file offset in description information of other point cloud files is updated, and then the point cloud file to be added and the description information of the point cloud file to be added are added into the packaging file, so that the operability and the expansibility of the packaging file are strong.
In addition, in the case where the header information of the package file contains additional description information, when the point cloud file to be added needs to be added to the package file, the additional description information in the header information needs to be updated.
In the case that the additional description information includes the length of the package file, the file length of the point cloud file to be added and the length of the description information of the point cloud file to be added need to be increased based on the length of the original package file.
In the case where the number of point cloud files included in the package file is included in the above-described additional description information, it is necessary to add 1 to the number of point cloud files.
In the case where the version information of the package file is included in the above-described additional description information, since the package file is changed, the version information of the package file needs to be updated.
Referring to fig. 7, a flow chart of a fourth method for encapsulating a point cloud file according to an embodiment of the present invention, compared with the embodiment shown in fig. 1, further includes the following steps S108 to S109 after the step S103.
S108: and receiving a point cloud file request aiming at the target object, which is sent by a request terminal.
The point cloud file request may include an identifier of the target object, where the identifier of the target object may be represented in a form of a number of the target object or a name of the target object. Therefore, after the request of the point cloud file is received, the target object corresponding to the point cloud file requested by the request end can be determined according to the identification of the target object.
S109: and sending the encapsulated file to the request end.
Specifically, since the encapsulation file includes the cloud files of the points of the target object, sending the encapsulation file to the request end is equivalent to sending the cloud files of the points to the request end, so that the request end can receive the cloud files of the points.
As described above, since the encapsulation file includes the point cloud file of the target object, sending one encapsulation file to the request terminal corresponds to sending a plurality of point cloud files to the request terminal. Therefore, when the point cloud file is sent to the request end, the point cloud files do not need to be sent to the request end for multiple times, and the point cloud file can be sent only by sending the encapsulated file once, so that the complexity of sending the point cloud file is reduced, and the efficiency of sending the point cloud file is improved.
Referring to fig. 8, an embodiment of the present invention provides a flowchart of a first method for resolving a point cloud file, where the method includes the following steps S801 to S803.
S801: and obtaining the file identification of the point cloud file to be analyzed.
Specifically, the file identifier may be a file identifier input by a user, or may be a preset file identifier.
S802: and according to the determined file identification, analyzing the file offset and the file length contained in the description information corresponding to the point cloud file to be analyzed from the existing encapsulation file.
Wherein, the above-mentioned encapsulation file is: and taking the description information of each point cloud file of the target object as header information, and encapsulating the each point cloud file to obtain the file.
The above description information includes: file identification, file length, and file offset of the described point cloud file.
Each point cloud file includes: and the point cloud data is used for describing the three-dimensional information of the target object at different moments.
And arranging the point cloud files in the packaging file according to the time sequence of the corresponding time of the point cloud files.
In one embodiment of the invention, because the file identifiers of different point cloud files are different, each existing encapsulation file can be traversed, and the description information of the contained file identifiers which are the same as the file identifiers of the point cloud files to be analyzed can be searched from the description information of each encapsulation file. And determining the file offset and the file length contained in the searched description information as the file offset and the file length of the point cloud file to be analyzed.
In addition, the above-mentioned package file is similar to the package file in the embodiment shown in fig. 1, and the description of this embodiment of the present invention is omitted.
S803: and according to the file offset and the file length of the point cloud file to be analyzed, analyzing the point cloud file to be analyzed from the packaging file.
Specifically, since the file offset represents the offset between the header of the point cloud file to be resolved and the header of the encapsulation file, the position of the header of the point cloud file to be resolved in the encapsulation file can be determined according to the file offset, and the data with the length of the file length is the point cloud file to be resolved from the position represented by the file offset. Therefore, the data with the length being the file length can be analyzed from the file offset in the package file, so that the point cloud file to be analyzed is analyzed.
From the above, it can be seen that the point cloud file exists as a part of the encapsulated file, the encapsulated file includes description information of the point cloud file, and the description information includes file identification, file length and file offset of the point cloud file. According to the file identification of the point cloud file to be analyzed, the file length and the file offset in the description information of the point cloud file to be analyzed can be determined, the starting position of the point cloud file to be analyzed in the packaging file can be determined according to the file offset, and the data in the file length from the position corresponding to the file offset belong to the point cloud file to be analyzed, so that the point cloud file to be analyzed can be analyzed from the packaging file according to the determined file offset and the file length. In addition, because each point cloud file is stored as a part of the package file respectively, rather than each point cloud file being stored respectively, the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention.
In addition, since the point cloud files included in the package file are arranged according to the time sequence of the corresponding time, if each point cloud file in the package file is to be analyzed, each point cloud file can be sequentially analyzed from the head of the package file according to the file analysis rule common to most operating systems, and the analyzed sequence of each point cloud file is the time sequence of the time corresponding to the point cloud data. The point cloud files with the front corresponding moment are analyzed preferentially, the point cloud files with the rear corresponding moment are analyzed later, the analysis sequence accords with the transmission rule of streaming media, after the point cloud files with the front corresponding moment are obtained through analysis, the 3D model can be rendered according to the point cloud data contained in the analyzed point cloud files, the point cloud files with the rear corresponding moment are analyzed continuously in parallel, and the analysis is performed in parallel between the point cloud files with the rear corresponding moment, so that the efficiency of rendering the 3D model can be improved.
Referring to fig. 9, a flow chart of a second method for resolving a point cloud file according to an embodiment of the present invention further includes additional description information in header information of the package file. In comparison with the embodiment shown in fig. 8, the following step S804 is further included before the step S802.
S804: additional description information of the target package file is obtained.
Specifically, the file identifier may be additional description information input by the user, or may be preset additional description information.
The above step S802 may be implemented by the following steps S802A-S802B.
S802A: and determining the target encapsulation file from the existing encapsulation files according to the obtained additional description information.
Wherein the additional description information includes at least one of the following information:
the method comprises the steps of packaging the length of a file, the number of point cloud files contained in the packaged file, version information of the packaged file and type information of a target object corresponding to the packaged file.
Specifically, the above additional description information is similar to the embodiment shown in fig. 4, and the embodiments of the present invention are not repeated here.
In addition, as can be seen from the embodiment shown in fig. 4, the additional description information is an overall description of the package file, so that the additional description information of different package files is often different, and different package files can be distinguished according to the additional description information. The header information of the existing encapsulation file can be traversed, and the encapsulation file with the additional description information being the same as the obtained additional description information contained in the header information is determined to be the target encapsulation file.
S802B: and according to the determined file identification, analyzing the file offset and the file length contained in the description information corresponding to the point cloud file to be analyzed from the target encapsulation file.
Specifically, the manner of resolving the file offset and the file length from the target encapsulated file is similar to the manner of resolving the file offset and the file length from the encapsulated file shown in the above step S802. Only the range of the resolved file offset and the file length is reduced from the existing encapsulated file to the target encapsulated file, which is not described herein.
From the above, the target package file in the existing package file can be determined by adding the description information, and the file offset and the file length of the point cloud file to be analyzed are analyzed in the target package file, so that the point cloud file to be analyzed is analyzed from the target package file. Because the target encapsulation file is only one file in the existing encapsulation files, only the file offset and the file length of the point cloud file to be analyzed are needed to be analyzed from one target encapsulation file, and each existing encapsulation file does not need to be traversed, the calculated amount needed by analyzing the point cloud file to be analyzed can be reduced, and the efficiency of analyzing the point cloud file to be analyzed is improved.
Corresponding to the foregoing point cloud file packaging method, referring to fig. 10, an embodiment of the present invention further provides a schematic structural diagram of a point cloud file packaging device, where the device includes:
the length obtaining module 1001 is configured to obtain a file length of each point cloud file of the target object, where each point cloud file includes: point cloud data for describing stereoscopic information of the target object at different times;
the first offset generating module 1002 is configured to generate, for each point cloud file, a file offset of the point cloud file according to a file length of a previous file of the point cloud file and a length of description information of the point cloud file, where the previous file is: and the corresponding moment is a point cloud file positioned before the corresponding moment of the point cloud file, and the file offset represents: the offset of the file header of the point cloud file in the generated encapsulation file relative to the file header of the encapsulation file;
the file packaging module 1003 is configured to package each point cloud file with description information of each point cloud file as header information of the package file, to obtain the package file, where the description information includes: the file identification, the file length and the file offset of the point cloud files are described, and the point cloud files in the package file are arranged according to the time sequence of the corresponding time of the point cloud files.
As described above, since the package file includes the point cloud file of the target object, the package file is stored as the point cloud file of the target object. And each point cloud file is stored as a part of the packaging file respectively instead of each point cloud file, so that the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention. In addition, as the cloud files of each point in the packaging file are arranged according to the time sequence of the corresponding time, the complexity of arranging the cloud files of each point in the packaging file is also lower.
In one embodiment of the invention, the apparatus further comprises:
an additional description information obtaining module, configured to obtain additional description information of the package file, where the additional description information includes at least one of the following information: the length of the encapsulation file, the number of the point cloud files contained in the encapsulation file, version information of the encapsulation file and type information of the target object;
the first offset generating module 1002 is specifically configured to:
generating a file offset of each point cloud file according to the file length of the previous file of the point cloud file, the length of the description information of each point cloud file and the length of the additional description information;
The file encapsulation module 1003 is specifically configured to:
and taking the additional description information and the description information of each point cloud file as header information of the to-be-generated encapsulation file, and encapsulating each point cloud file to obtain the encapsulation file.
As can be seen from the above, the header information of the above-mentioned encapsulated file includes additional description information in addition to the description information of each point cloud file, where the additional description information includes at least one of a length of the encapsulated file, a number of point cloud files included in the encapsulated file, version information of the encapsulated file, and type information of the target object, and it is seen that the above-mentioned additional description information is mainly for description of the entire encapsulated file, and is different from the description information of each point cloud file. By encapsulating the additional description information, the entire information of the encapsulated file can be saved.
In one embodiment of the invention, the apparatus further comprises:
the second offset generating module is used for generating the file offset of the point cloud file to be added according to the sum of the file lengths of the point cloud files in the package file and the length of the description information of the point cloud files;
the offset updating module is used for updating the file offset in each piece of description information in the header information of the encapsulation file according to the length of the description information of the point cloud file to be added;
And the file adding module is used for adding the description information of the point cloud file to be added to the last description information tail in the header information and adding the point cloud file to be added to the packaging file tail.
Therefore, after the new point cloud file to be added is obtained, the point cloud file to be added can be packaged, so that the point cloud file of the same target object is packaged into one package file. When the point cloud file to be added is added into the packaging file, only new description data is needed to be added into the header information, file offset in description information of other point cloud files is updated, and then the point cloud file to be added and the description information of the point cloud file to be added are added into the packaging file, so that the operability and the expansibility of the packaging file are strong.
In one embodiment of the invention, the apparatus further comprises:
the request receiving module is used for receiving a point cloud file request aiming at the target object, which is sent by a request end;
and the file sending module is used for sending the encapsulated file to the request terminal.
As described above, since the encapsulation file includes the point cloud file of the target object, sending one encapsulation file to the request terminal corresponds to sending a plurality of point cloud files to the request terminal. Therefore, when the point cloud file is sent to the request end, the point cloud files do not need to be sent to the request end for multiple times, and the point cloud file can be sent only by sending the encapsulated file once, so that the complexity of sending the point cloud file is reduced, and the efficiency of sending the point cloud file is improved.
Corresponding to the foregoing method for analyzing a point cloud file, referring to fig. 11, an embodiment of the present invention further provides a schematic structural diagram of a device for analyzing a point cloud file, where the device includes:
the identifier obtaining module 1101 is configured to obtain a file identifier of a point cloud file to be parsed;
the information parsing module 1102 is configured to parse, according to the determined file identifier, a file offset and a file length included in the description information corresponding to the point cloud file to be parsed from an existing encapsulated file, where the encapsulated file is: and the description information of each point cloud file of the target object is used as header information, and the file obtained by packaging each point cloud file comprises the following description information: the described point cloud file includes file identification, file length, and file offset, each point cloud file including: the point cloud data are used for describing three-dimensional information of the target object at different moments, and the point cloud files in the packaging file are arranged according to the time sequence of the moment corresponding to the point cloud files;
The file parsing module 1103 is configured to parse the point cloud file to be parsed from the package file according to the file offset and the file length of the point cloud file to be parsed.
From the above, it can be seen that the point cloud file exists as a part of the encapsulated file, the encapsulated file includes description information of the point cloud file, and the description information includes file identification, file length and file offset of the point cloud file. According to the file identification of the point cloud file to be analyzed, the file length and the file offset in the description information of the point cloud file to be analyzed can be determined, the starting position of the point cloud file to be analyzed in the packaging file can be determined according to the file offset, and the data in the file length from the position corresponding to the file offset belong to the point cloud file to be analyzed, so that the point cloud file to be analyzed can be analyzed from the packaging file according to the determined file offset and the file length. In addition, because each point cloud file is stored as a part of the package file respectively, rather than each point cloud file being stored respectively, the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention.
In one embodiment of the present invention, the header information of the encapsulation file further includes additional description information, and the apparatus further includes:
The description obtaining module is used for obtaining additional description information of the target encapsulation file;
the information parsing module 1102 is specifically configured to:
determining the target encapsulation file from the existing encapsulation files according to the obtained additional description information;
and according to the determined file identification, analyzing the file offset and the file length contained in the description information corresponding to the point cloud file to be analyzed from the target encapsulation file.
In one embodiment of the invention, the additional description information includes at least one of the following information:
the method comprises the steps of packaging the length of a file, the number of point cloud files contained in the packaged file, version information of the packaged file and type information of a target object corresponding to the packaged file.
From the above, the target package file in the existing package file can be determined by adding the description information, and the file offset and the file length of the point cloud file to be analyzed are analyzed in the target package file, so that the point cloud file to be analyzed is analyzed from the target package file. Because the target encapsulation file is only one file in the existing encapsulation files, only the file offset and the file length of the point cloud file to be analyzed are needed to be analyzed from one target encapsulation file, and each existing encapsulation file does not need to be traversed, the calculated amount needed by analyzing the point cloud file to be analyzed can be reduced, and the efficiency of analyzing the point cloud file to be analyzed is improved.
The embodiment of the invention also provides an electronic device, as shown in fig. 12, which comprises a processor 1201, a communication interface 1202, a memory 1203 and a communication bus 1204, wherein the processor 1201, the communication interface 1202 and the memory 1203 complete the communication with each other through the communication bus 1204,
a memory 1203 for storing a computer program;
the processor 1201 is configured to implement any of the method steps of the point cloud file packaging method when executing the program stored in the memory 1203.
When the electronic equipment provided by the embodiment of the invention is used for packaging the point cloud file, the point cloud file of the target object is contained in the packaging file, so that if the packaging file is stored, the point cloud file of the target object is stored. And each point cloud file is stored as a part of the packaging file respectively instead of each point cloud file, so that the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention. In addition, as the cloud files of each point in the packaging file are arranged according to the time sequence of the corresponding time, the complexity of arranging the cloud files of each point in the packaging file is also lower.
The embodiment of the present invention also provides another electronic device, as shown in fig. 13, including a processor 1301, a communication interface 1302, a memory 1303 and a communication bus 1304, where the processor 1301, the communication interface 1302, and the memory 1303 complete communication with each other through the communication bus 1304,
A memory 1303 for storing a computer program;
the processor 1301 is configured to implement any one of the method steps of the above-described point cloud file parsing method when executing the program stored in the memory 1303.
When the electronic equipment provided by the embodiment of the invention is applied to analyze the point cloud file, the point cloud file exists as a part of the encapsulation file, the encapsulation file contains the description information of the point cloud file, and the description information contains the file identification, the file length and the file offset of the point cloud file. According to the file identification of the point cloud file to be analyzed, the file length and the file offset in the description information of the point cloud file to be analyzed can be determined, the starting position of the point cloud file to be analyzed in the packaging file can be determined according to the file offset, and the data in the file length from the position corresponding to the file offset belong to the point cloud file to be analyzed, so that the point cloud file to be analyzed can be analyzed from the packaging file according to the determined file offset and the file length. In addition, because each point cloud file is stored as a part of the package file respectively, rather than each point cloud file being stored respectively, the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, where a computer program is stored, where the computer program, when executed by a processor, implements the method for encapsulating a point cloud file according to any of the foregoing embodiments.
When the computer program stored in the computer readable storage medium provided in this embodiment is applied to package a point cloud file, the package file contains the point cloud file of the target object, so that if the package file is stored, the point cloud file of the target object is stored. And each point cloud file is stored as a part of the packaging file respectively instead of each point cloud file, so that the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention. In addition, as the cloud files of each point in the packaging file are arranged according to the time sequence of the corresponding time, the complexity of arranging the cloud files of each point in the packaging file is also lower.
In still another embodiment of the present invention, a computer readable storage medium is provided, where a computer program is stored, where the computer program is executed by a processor to implement the method for resolving a point cloud file according to any one of the foregoing embodiments.
When the computer program stored in the computer readable storage medium provided by the embodiment is applied to analyze the point cloud file, the point cloud file exists as a part of the encapsulation file, the encapsulation file contains description information of the point cloud file, and the description information contains file identification, file length and file offset of the point cloud file. According to the file identification of the point cloud file to be analyzed, the file length and the file offset in the description information of the point cloud file to be analyzed can be determined, the starting position of the point cloud file to be analyzed in the packaging file can be determined according to the file offset, and the data in the file length from the position corresponding to the file offset belong to the point cloud file to be analyzed, so that the point cloud file to be analyzed can be analyzed from the packaging file according to the determined file offset and the file length. In addition, because each point cloud file is stored as a part of the package file respectively, rather than each point cloud file being stored respectively, the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention.
In yet another embodiment of the present invention, a computer program product containing instructions that, when run on a computer, cause the computer to perform the point cloud file packaging method according to any of the above embodiments is also provided.
When the computer program product provided in this embodiment is executed to package the point cloud file, the point cloud file of the target object is included in the package file, so that if the package file is stored, the point cloud file of the target object is stored. And each point cloud file is stored as a part of the packaging file respectively instead of each point cloud file, so that the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention. In addition, as the cloud files of each point in the packaging file are arranged according to the time sequence of the corresponding time, the complexity of arranging the cloud files of each point in the packaging file is also lower.
In yet another embodiment of the present invention, a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method for resolving a point cloud file according to any of the above embodiments is also provided.
When the computer program product provided by the embodiment is executed to analyze the point cloud file, the point cloud file exists as a part of the encapsulation file, the encapsulation file contains description information of the point cloud file, and the description information contains file identification, file length and file offset of the point cloud file. According to the file identification of the point cloud file to be analyzed, the file length and the file offset in the description information of the point cloud file to be analyzed can be determined, the starting position of the point cloud file to be analyzed in the packaging file can be determined according to the file offset, and the data in the file length from the position corresponding to the file offset belong to the point cloud file to be analyzed, so that the point cloud file to be analyzed can be analyzed from the packaging file according to the determined file offset and the file length. In addition, because each point cloud file is stored as a part of the package file respectively, rather than each point cloud file being stored respectively, the complexity of storing each point cloud file can be reduced by applying the scheme provided by the embodiment of the invention.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium and the computer program product, the description is relatively simple, as it is substantially similar to the method embodiments, and relevant points are found in the partial description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (12)

1. The method for packaging the point cloud file is characterized by comprising the following steps:
obtaining the file length of each point cloud file of the target object, wherein each point cloud file comprises: point cloud data for describing stereoscopic information of the target object at different times;
obtaining additional description information of the package file, wherein the additional description information comprises at least one of the following information: the length of the encapsulation file, the number of the point cloud files contained in the encapsulation file, version information of the encapsulation file and type information of the target object;
for each point cloud file, generating a file offset of the point cloud file according to the file length of a previous file of the point cloud file, the length of description information of each point cloud file and the length of additional description information, wherein the previous file is: and the corresponding moment is a point cloud file positioned before the corresponding moment of the point cloud file, and the file offset represents: the offset of the file header of the point cloud file in the generated encapsulation file relative to the file header of the encapsulation file;
And taking the additional description information and the description information of each point cloud file as header information of a file to be generated and packaging the each point cloud file to obtain the packaging file, wherein the description information comprises the following components: the file identification, the file length and the file offset of the point cloud files are described, and the point cloud files in the package file are arranged according to the time sequence of the corresponding time of the point cloud files.
2. The method according to claim 1, wherein the method further comprises:
generating a file offset of the point cloud file to be added according to the sum of the file lengths of the point cloud files in the package file and the length of the description information of the point cloud files;
updating file offset in each piece of description information in the header information of the encapsulation file according to the length of the description information of the point cloud file to be added;
and adding the description information of the point cloud file to be added to the last description information tail in the header information, and adding the point cloud file to be added to the packaging file tail.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a point cloud file request aiming at the target object, which is sent by a request terminal;
And sending the encapsulated file to the request terminal.
4. The method for analyzing the point cloud file is characterized by comprising the following steps:
obtaining a file identifier of a point cloud file to be analyzed;
obtaining additional description information of the target encapsulation file;
determining the target encapsulation file from the existing encapsulation file according to the obtained additional description information, wherein the encapsulation file is: and the description information of each point cloud file of the target object is used as header information, and the file obtained by packaging each point cloud file comprises the following description information: the described point cloud file includes file identification, file length, and file offset, each point cloud file including: the point cloud data are used for describing three-dimensional information of a target object at different moments, each point cloud file in the packaging file is arranged according to the time sequence of the moment corresponding to the point cloud file, and the header information of the packaging file also comprises additional description information;
according to the determined file identification, analyzing file offset and file length contained in the description information corresponding to the point cloud file to be analyzed from the target encapsulation file;
and according to the file offset and the file length of the point cloud file to be analyzed, analyzing the point cloud file to be analyzed from the packaging file.
5. The method of claim 4, wherein the additional description information includes at least one of the following information:
the method comprises the steps of packaging the length of a file, the number of point cloud files contained in the packaged file, version information of the packaged file and type information of a target object corresponding to the packaged file.
6. A point cloud file packaging apparatus, the apparatus comprising:
the length obtaining module is used for obtaining the file length of each point cloud file of the target object, wherein each point cloud file comprises: point cloud data for describing stereoscopic information of the target object at different times;
an additional description information obtaining module, configured to obtain additional description information of the package file, where the additional description information includes at least one of the following information: the length of the encapsulation file, the number of the point cloud files contained in the encapsulation file, version information of the encapsulation file and type information of the target object;
the first offset generating module is configured to generate, for each point cloud file, a file offset of the point cloud file according to a file length of a previous file of the point cloud file, a length of description information of the point cloud file, and a length of additional description information, where the previous file is: and the corresponding moment is a point cloud file positioned before the corresponding moment of the point cloud file, and the file offset represents: the offset of the file header of the point cloud file in the generated encapsulation file relative to the file header of the encapsulation file;
The file packaging module is configured to package each point cloud file by using the additional description information and the description information of each point cloud file as header information of the to-be-generated package file, so as to obtain the package file, where the description information includes: the file identification, the file length and the file offset of the point cloud files are described, and the point cloud files in the package file are arranged according to the time sequence of the corresponding time of the point cloud files.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the second offset generating module is used for generating the file offset of the point cloud file to be added according to the sum of the file lengths of the point cloud files in the package file and the length of the description information of the point cloud files;
the offset updating module is used for updating the file offset in each piece of description information in the header information of the encapsulation file according to the length of the description information of the point cloud file to be added;
and the file adding module is used for adding the description information of the point cloud file to be added to the last description information tail in the header information and adding the point cloud file to be added to the packaging file tail.
8. The apparatus according to claim 6 or 7, characterized in that the apparatus further comprises:
The request receiving module is used for receiving a point cloud file request aiming at the target object, which is sent by a request end;
and the file sending module is used for sending the encapsulated file to the request terminal.
9. A point cloud file parsing apparatus, the apparatus comprising:
the identification obtaining module is used for obtaining a file identification of the point cloud file to be analyzed;
the description obtaining module is used for obtaining additional description information of the target encapsulation file;
the information analysis module is used for determining the target encapsulation file from the existing encapsulation file according to the obtained additional description information, and analyzing file offset and file length contained in the description information corresponding to the point cloud file to be analyzed from the target encapsulation file according to the determined file identification, wherein the encapsulation file is: and the description information of each point cloud file of the target object is used as header information, and the file obtained by packaging each point cloud file comprises the following description information: the described point cloud file includes file identification, file length, and file offset, each point cloud file including: the point cloud data are used for describing three-dimensional information of a target object at different moments, each point cloud file in the packaging file is arranged according to the time sequence of the moment corresponding to the point cloud file, and the header information of the packaging file also comprises additional description information;
And the file analysis module is used for analyzing the point cloud file to be analyzed from the packaging file according to the file offset and the file length of the point cloud file to be analyzed.
10. The apparatus of claim 9, wherein the additional description information comprises at least one of:
the method comprises the steps of packaging the length of a file, the number of point cloud files contained in the packaged file, version information of the packaged file and type information of a target object corresponding to the packaged file.
11. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-3 or 4-5 when executing a program stored on a memory.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-3 or 4-5.
CN202110240492.1A 2021-03-04 2021-03-04 Point cloud file packaging and analyzing method and device Active CN112948332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110240492.1A CN112948332B (en) 2021-03-04 2021-03-04 Point cloud file packaging and analyzing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110240492.1A CN112948332B (en) 2021-03-04 2021-03-04 Point cloud file packaging and analyzing method and device

Publications (2)

Publication Number Publication Date
CN112948332A CN112948332A (en) 2021-06-11
CN112948332B true CN112948332B (en) 2023-07-21

Family

ID=76247656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110240492.1A Active CN112948332B (en) 2021-03-04 2021-03-04 Point cloud file packaging and analyzing method and device

Country Status (1)

Country Link
CN (1) CN112948332B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067810A (en) * 2006-05-05 2007-11-07 鸿富锦精密工业(深圳)有限公司 Point cloud format analysis system and method
US9503542B1 (en) * 2014-09-30 2016-11-22 Emc Corporation Writing back data to files tiered in cloud storage
CN107958482A (en) * 2016-10-17 2018-04-24 杭州海康威视数字技术股份有限公司 A kind of three-dimensional scene models construction method and device
CN107979621A (en) * 2016-10-24 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of storage of video file, positioning playing method and device
US10015173B1 (en) * 2015-03-10 2018-07-03 Symantec Corporation Systems and methods for location-aware access to cloud data stores
CN109582653A (en) * 2018-11-14 2019-04-05 网易(杭州)网络有限公司 Compression, decompression method and the equipment of file
CN111414339A (en) * 2020-03-13 2020-07-14 浙江大华技术股份有限公司 File processing method, system, device, equipment and medium
CN111771196A (en) * 2019-01-30 2020-10-13 深圳市大疆创新科技有限公司 Storage method, playback method and computer readable medium for point cloud data
CN112328594A (en) * 2020-10-23 2021-02-05 许继集团有限公司 Embedded device model data management method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8341363B2 (en) * 2010-05-03 2012-12-25 Panzura, Inc. Efficient cloud network attached storage
US10438092B2 (en) * 2018-01-31 2019-10-08 Analytical Graphics, Inc. Systems and methods for converting massive point cloud datasets to a hierarchical storage format
CN113615206B (en) * 2019-03-21 2024-06-14 Lg电子株式会社 Point cloud data transmitting device, point cloud data transmitting method, point cloud data receiving device and point cloud data receiving method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067810A (en) * 2006-05-05 2007-11-07 鸿富锦精密工业(深圳)有限公司 Point cloud format analysis system and method
US9503542B1 (en) * 2014-09-30 2016-11-22 Emc Corporation Writing back data to files tiered in cloud storage
US10015173B1 (en) * 2015-03-10 2018-07-03 Symantec Corporation Systems and methods for location-aware access to cloud data stores
CN107958482A (en) * 2016-10-17 2018-04-24 杭州海康威视数字技术股份有限公司 A kind of three-dimensional scene models construction method and device
CN107979621A (en) * 2016-10-24 2018-05-01 杭州海康威视数字技术股份有限公司 A kind of storage of video file, positioning playing method and device
CN109582653A (en) * 2018-11-14 2019-04-05 网易(杭州)网络有限公司 Compression, decompression method and the equipment of file
CN111771196A (en) * 2019-01-30 2020-10-13 深圳市大疆创新科技有限公司 Storage method, playback method and computer readable medium for point cloud data
CN111414339A (en) * 2020-03-13 2020-07-14 浙江大华技术股份有限公司 File processing method, system, device, equipment and medium
CN112328594A (en) * 2020-10-23 2021-02-05 许继集团有限公司 Embedded device model data management method and device

Also Published As

Publication number Publication date
CN112948332A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
CN110554958B (en) Graph database testing method, system, device and storage medium
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN111428462A (en) Communication protocol template construction method and terminal equipment
CN109614327B (en) Method and apparatus for outputting information
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN106992940B (en) Message processing method, device, system and terminal
CN104320312A (en) Network application safety test tool and fuzz test case generation method and system
CN112729868A (en) Vehicle diagnosis method, device, equipment and medium
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
CN112631649A (en) Intelligent contract management method, device, terminal equipment and medium
CN115756445A (en) Component generation method and device, electronic equipment and computer storage medium
CN105468412A (en) Dynamic packaging method and dynamic packaging device
CN112948332B (en) Point cloud file packaging and analyzing method and device
CN114625407A (en) Method, system, equipment and storage medium for implementing AB experiment
CN110020166B (en) Data analysis method and related equipment
CN116644250A (en) Page detection method, page detection device, computer equipment and storage medium
CN110795646A (en) Request processing method and device, electronic equipment and computer-readable storage medium
CN115396501B (en) Information processing method and device, electronic equipment and readable storage medium
CN115118583B (en) Log query method and device, electronic equipment and computer readable storage equipment
CN107451167B (en) Click data acquisition method, device and system for click bits in station
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN116208676A (en) Data back-source method, device, computer equipment, storage medium and program product
CN113434770B (en) Business portrait analysis method and system combining electronic commerce and big data
CN113342353B (en) Mock data generation method and device
CN112579428B (en) Interface testing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant