Method and terminal device for generating three-dimensional model

Through an image format file containing multiple file data, the problems of inconvenience in file management and data analysis errors in existing three-dimensional modeling technology are solved, and the accurate analysis and management of the three-dimensional model is realized, and the authenticity of the model is improved.

CN113177998BActive Publication Date: 2024-11-29HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110293729.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-02-23
Publication Date
2024-11-29
Estimated Expiration
2037-02-23

AI Technical Summary

Technical Problem

The existing three-dimensional modeling technology requires multiple files in different file formats to describe, which leads to inconvenient file management and easily leads to data parsing errors.

Method used

By a file in an image format, the file data of multiple files required to generate a three-dimensional model, the terminal device can directly obtain and parse the required data from the file to generate a three-dimensional model, and optional parameters and two-dimensional image information are used. Generate thumbnails and improve model authenticity.

Benefits of technology

It realizes accurate analysis and management of three-dimensional model data information, facilitates terminal equipment processing, and improves the convenience of file management and the authenticity of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113177998B_ABST
    Figure CN113177998B_ABST
Patent Text Reader

Abstract

A method for generating a three-dimensional model and a terminal device, the method comprising: obtaining a first file in a picture format, the extended data segment of the first file comprising at least one first data segment, the first data segment comprising file data of multiple files required for generating a first three-dimensional model in the three-dimensional model (210); obtaining file data of multiple files from the first data segment (220); and generating a first three-dimensional model according to the file data of the multiple files (230). By including the file data of multiple files required for generating a three-dimensional model in one file, the problem of requiring multiple files to describe a three-dimensional model is avoided, the accuracy of the data information analysis of the three-dimensional model is ensured, and the terminal device is convenient for managing the file containing the three-dimensional model data information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of three-dimensional modeling, and more specifically, to a method and terminal device for generating a three-dimensional model. Background Art

[0002] In the field of 3D modeling, multiple files in different file formats are required to describe a 3D model. As a result, a large number of 3D model files are required, making it inconvenient for terminal devices to manage the numerous files.

[0003] For example, a 3D model file with textures can be composed of an OBJ file, a Material Library File (MTL file), and multiple JPG or PNG files. Among them, the OBJ file is a standard 3D model file format, which is suitable for the conversion between models of most 3D software and mainly supports polygonal models. The MTL file describes the material information of the object. An MTL file can contain one or more material definitions. For each material, there is a description of its color, texture, reflection map and other characteristics. Therefore, in general, the number of files required to generate a 3D model is large, and there is no unified file format among the numerous files, which makes it inconvenient for the terminal device to manage the files. Once a file is missing, the 3D model data may not be correctly parsed. Summary of the invention

[0004] The embodiments of the present invention provide a method and a terminal device for generating a three-dimensional model, which can include file data of multiple files required for generating a three-dimensional model in one file, thereby avoiding the problem that a three-dimensional model needs to be described by multiple files, ensuring the accuracy of data information analysis of the three-dimensional model, and facilitating the terminal device to manage files containing three-dimensional model data information.

[0005] On the one hand, a method for generating a three-dimensional model is provided, comprising: obtaining a first file in a picture format, wherein an extended data segment of the first file includes at least one first data segment, and the first data segment includes file data of multiple files required to generate a first three-dimensional model in the three-dimensional model; obtaining the file data of the multiple files from the first data segment; and generating the first three-dimensional model based on the file data of the multiple files.

[0006] The method for generating a three-dimensional model in an embodiment of the present invention avoids the problem that a three-dimensional model requires multiple files to describe by including file data of multiple files for generating the three-dimensional model in one file, ensures the accuracy of data information analysis of the three-dimensional model, and facilitates terminal devices to manage files containing three-dimensional model data information.

[0007] In combination with the first aspect, in a first possible implementation of the first aspect, the first file also includes a basic data segment, and the basic data segment contains two-dimensional image information of the three-dimensional model; the method also includes: obtaining the two-dimensional image information from the basic data segment; and generating a thumbnail of the three-dimensional model based on the two-dimensional image information.

[0008] In an embodiment of the present invention, through the two-dimensional image information contained in the basic data segment of the first file, the terminal device can intuitively know which three-dimensional model's model information is stored in the first file, which facilitates the terminal device to manage the first file.

[0009] In combination with the first aspect and the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the extended data segment further includes a second data segment, and the second data segment contains optional parameters for generating the three-dimensional model.

[0010] In the embodiment of the present invention, the generated three-dimensional model can be made more realistic through the optional parameters in the second data segment.

[0011] In combination with the first aspect, the first implementation manner or the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the first data segment includes a segment header field and a data field, and the segment header field is used to indicate the position of the file data of each file among the multiple files in the first data segment.

[0012] In an embodiment of the present invention, through the segment header field, the terminal device can quickly determine the position of the file data of each file in the multiple files required to generate the three-dimensional model in the first data segment, so that the file data can be accurately parsed.

[0013] In combination with the first aspect, the first implementation to the third implementation of the first aspect, in a fourth implementation of the first aspect, the extended data segment also includes a third data segment, and the third data segment is used to indicate a source of the first file.

[0014] In combination with the first aspect, the first to fourth implementations of the first aspect, in the fifth implementation of the first aspect, the file format of the first file is JPEG format or PNG format or other picture format.

[0015] In a second aspect, a terminal device is provided, comprising one or more modules for executing the method in the first aspect.

[0016] In a third aspect, a terminal device is provided, comprising a memory and a processor, the memory being used to store program code, the processor being used to obtain a first file in a picture format, the first file comprising a basic data segment and an extended data segment, the basic data segment comprising two-dimensional image information of the three-dimensional model, the extended data segment comprising at least one first data segment, the first data segment comprising file data of multiple files required to generate a first three-dimensional model in the three-dimensional model; the processor is also used to obtain the file data of the multiple files from the first data segment; the processor is also used to generate the first three-dimensional model based on the file data of the multiple files.

[0017] In combination with the third aspect, in a first implementation of the third aspect, the processor is further used to obtain the two-dimensional image information from the basic data segment; the processor is further used to generate a thumbnail of the three-dimensional model based on the two-dimensional image information.

[0018] In combination with the third aspect, the first implementation method of the third aspect, in the second implementation method of the third aspect, the extended data segment also includes at least one second data segment, the second data segment contains optional parameters for generating the three-dimensional model, and the optional parameters are determined according to different three-dimensional models.

[0019] In combination with the third aspect, the first and second implementations of the third aspect, in the third implementation of the third aspect, the first data segment includes a segment header field and a data field, the segment header field is used to indicate the position of the file data of each of the multiple files in the first data segment, and the data field is used to store the file data of multiple files required to generate the first three-dimensional model in the three-dimensional model.

[0020] In combination with the third aspect, the first to third implementations of the third aspect, in a fourth implementation of the third aspect, the extended data segment further includes at least one third data segment, and the third data segment is used to indicate a source of the first file.

[0021] In combination with the third aspect, the first to fourth implementations of the third aspect, in a fifth implementation of the third aspect, the file format of the first file is JPEG format.

[0022] In a fourth aspect, a computer-readable medium is provided, wherein the computer-readable medium is used to store program code that can be executed by the device for processing a fault of a terminal device, and the program code includes instructions for executing the method in the above-mentioned first aspect and each implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1It is a schematic diagram of the files required to generate a textured three-dimensional model according to an embodiment of the present invention.

[0024] Figure 2 It is a schematic flow chart of a method for generating a three-dimensional model according to an embodiment of the present invention.

[0025] Figure 3 It is a schematic diagram of a first file in a picture format according to an embodiment of the present invention.

[0026] Figure 4 is another schematic diagram of the first file in the picture format according to an embodiment of the present invention.

[0027] Figure 5 is another schematic diagram of the first file in the picture format according to an embodiment of the present invention.

[0028] Figure 6 It is a schematic diagram of a first file for storing human body three-dimensional model information according to an embodiment of the present invention.

[0029] Figure 7 It is a schematic framework diagram of a terminal device according to an embodiment of the present invention.

[0030] Figure 8 It is another schematic framework diagram of a terminal device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0032] In the field of 3D modeling, there are many 3D file formats, such as STL file format, PLY file format, OBJ file format, ZPR file format, FBX file format, VRML file and 3DS file format, etc. Table 1 shows the introduction of each 3D file format.

[0033] Table 1 Introduction to 3D file formats

[0034]

[0035]

[0036] As shown in Table 1, most 3D file formats have problems such as not supporting thumbnails, no expansion space, not supporting 3D printers, and multiple files are required to describe a 3D model.

[0037] For example, Figure 1 The following is a schematic diagram of the files required to generate a textured 3D model. Figure 1As shown, generating a textured 3D model requires a material library file (MTL file), which may contain one or more material definitions, each of which also includes a description of its color, texture, and reflection map. An OBJ file is also required, which is used to describe the geometric features of the 3D model. Multiple PNG files are also required, which contain image information of the reflection map required to generate the 3D model. It can be seen that the number of files required to generate a textured 3D model is already very large. If any of the files is lost, the data in the 3D model may not be parsed, that is, the 3D model cannot be generated.

[0038] It should be understood that the embodiments of the present invention are only Figure 1 The number of files for generating a three-dimensional model shown is taken as an example to illustrate that there are many files for generating a three-dimensional model in the prior art. However, an actual three-dimensional model may be more complex and sophisticated, and the types and numbers of model files required are correspondingly more.

[0039] An embodiment of the present invention proposes a method for generating a three-dimensional model. The method uses a file in a picture format, which contains file data of multiple files required to generate the three-dimensional model. A terminal device can generate the three-dimensional model through the data information contained in the file in the picture format, thereby avoiding the problem that a three-dimensional model requires multiple files to describe, ensuring the accuracy of three-dimensional model data analysis, and facilitating the terminal device to manage files containing three-dimensional model information.

[0040] Combine the following Figure 2 The method is described in detail.

[0041] Figure 2 The schematic flow chart of the method 200 for generating a three-dimensional model according to an embodiment of the present invention is shown. The method 200 can be executed by a terminal device, and the terminal device 200 can be, for example, a personal computer (PC) product, a smart phone, etc., which is not limited in the embodiment of the present invention. Figure 2 As shown, the method 200 includes:

[0042] 210, obtaining a first file in a picture format, wherein an extended data segment of the first file includes at least one first data segment, and the first data segment includes file data of multiple files required to generate a first three-dimensional model in the three-dimensional model;

[0043] 220, obtaining file data of multiple files from the first data segment;

[0044] 230 , generating a first three-dimensional model according to the file data of the plurality of files.

[0045] Specifically, the terminal device obtains a first file in the image format, and the extended data segment of the first file includes at least one first data segment, and the first data segment includes file data of multiple files required to generate a first three-dimensional model in the three-dimensional model. After obtaining the first file, the terminal device can obtain file data of multiple files from the first data segment of the first file, and generate the first three-dimensional model based on the file data of the multiple files. The first three-dimensional model can be a part of the three-dimensional model or the entire three-dimensional model.

[0046] In an embodiment of the present invention, by having one file contain file data of multiple files required to generate a three-dimensional model, the problem of requiring multiple files to describe a three-dimensional model is avoided, the accuracy of the data information analysis of the three-dimensional model can be ensured, and it is convenient for the terminal device to manage the files containing the data information of the three-dimensional model.

[0047] Optionally, in some embodiments, the first file also includes a basic data segment, which contains two-dimensional image information of the three-dimensional model. For example, the two-dimensional image information may be front view information of the three-dimensional model, or information of a view that best reflects the main features of the three-dimensional model.

[0048] Optionally, in some embodiments, the terminal device can obtain the two-dimensional image information from the basic data segment, and generate a thumbnail of the three-dimensional model based on the two-dimensional image information. The thumbnail can be a thumbnail of a front view of the three-dimensional model, or can be a thumbnail of another view that best reflects the main features of the three-dimensional model. Thus, the terminal device can intuitively identify what kind of three-dimensional model information is contained in the first file based on the thumbnail.

[0049] It should be understood that the first three-dimensional model can be the entire three-dimensional model or a part of the three-dimensional model. When the first three-dimensional model is the entire three-dimensional model, the file data of the multiple files are all the data information required to generate the entire three-dimensional model. In this case, the first file can include only one first data segment, which stores the file data of the multiple files required to generate the entire three-dimensional model; when the first three-dimensional model is a part of the three-dimensional model, the file data of the multiple files are all the data information required to generate a part of the three-dimensional model. In this case, the first file includes multiple first data segments, which respectively store the file data of the multiple files required to generate each part of the three-dimensional model.

[0050] For example, the three-dimensional model is a three-dimensional model of the human body, and the first three-dimensional model can be the three-dimensional model of the entire human body. In this case, the first file may include only one first data segment, and the first data segment includes file data of multiple files required to generate the three-dimensional model of the human body. The file data of the multiple files are all the model information required to generate the three-dimensional model of the human body. However, since the three-dimensional model of the human body is relatively complex, the model information required to generate each part of the three-dimensional model of the human body can be stored in one first data segment. For example, the model information of the head part of the three-dimensional model of the human body can be stored in one first data segment, the model information of the body part of the three-dimensional model of the human body can be stored in another first data segment, the model information of the clothing part of the three-dimensional model of the human body can be stored in another first data segment, and so on. Each first data segment includes file data of multiple files required to generate the part, and the file data of the multiple files are all the data information required to generate the part. In this case, the first file can include multiple first data segments.

[0051] Optionally, in some embodiments, the first data segment includes a segment header field and a data field, and the segment header field is mainly used to indicate the position of file data of each file among multiple files required to generate a first three-dimensional model in the first data segment. The first three-dimensional model can be the entire three-dimensional model or a part of the three-dimensional model.

[0052] Optionally, in some embodiments, the segment header field is also used to indicate the type of the first data segment.

[0053] For example, when the three-dimensional model is a three-dimensional model of the human body, and the first data segment stores file data of multiple files required to generate a head of the three-dimensional model of the human body, the type indicated by the segment header in the first data segment is a head model; when the first data segment stores file data of multiple files required to generate a body of the three-dimensional model of the human body, the type indicated by the segment header in the first data segment is a body model, and so on.

[0054] Optionally, in some embodiments, the segment header field is also used to indicate the length of the first data segment.

[0055] Optionally, in some embodiments, the segment header field is also used to indicate the file name or number of each file in the multiple files.

[0056] Optionally, in some embodiments, the segment header field is also used to indicate the length of the file name or number of each file in the multiple files.

[0057] Optionally, in some embodiments, the segment header field is also used to indicate the number of the multiple files.

[0058] For example, when the first data segment stores human head model information, the file types of the multiple files required to generate the human head model are OBJ format, MTL format, and JPEG format, and there are 3 files in the JPEG format. In this case, the number of the multiple files is 6.

[0059] It should be understood that the embodiment of the present invention only takes the case where the file types are OBJ format, MTL format, and JPEG format, and there are three files in the JPEG format as an example, but the embodiment of the present invention is not limited to this.

[0060] Optionally, in some embodiments, the data field is used to store file data of multiple files required to generate a first three-dimensional model, and the first three-dimensional model may be the entire three-dimensional model or a portion of the three-dimensional model.

[0061] Optionally, in some embodiments, the file formats of the multiple files stored in the data field may be OBJ format, MTL format, JPG format, etc.

[0062] It should be understood that the embodiment of the present invention only takes the above three file formats as examples to illustrate the file formats of multiple files stored in the data field, but the embodiment of the present invention is not limited thereto.

[0063] It should also be understood that the size of the space occupied by the first data segment is determined based on the size of the space occupied by the file data of multiple files required to generate the three-dimensional model stored in the first data segment, that is, the space of the first data segment can change dynamically based on the size of the space occupied by the information stored in the first data segment.

[0064] Optionally, in some embodiments, the extended data segment also includes a second data segment, and the second data segment includes optional parameters for generating the three-dimensional model.

[0065] For example, when the three-dimensional model is a three-dimensional model of the human body, the optional parameters may be parameters such as bone data, and the optional parameters may also be parameters such as algorithm deformation parameters and configuration information. For example, the algorithm deformation parameters may be some parameters about the algorithm, or some parameters developed and used by a third party, and the configuration information may be configuration information or parameters required by the third party, etc.

[0066] In the embodiment of the present invention, the optional parameters included in the second data segment can make the three-dimensional model more complete and look more realistic from a visual perspective.

[0067] In an embodiment of the present invention, the extended data segment of the first file may include only at least one first data segment, or may include at least one first data segment and at least one second data segment. Such a design of the extended data segment allows the terminal device to generate the three-dimensional model only based on the information in the first data segment without obtaining the information included in the second data segment when the configuration is low. Although the three-dimensional model is simpler than the three-dimensional model generated based on the information in the first data segment and the second data segment, the three-dimensional model also has all the features that the original three-dimensional model should have, which does not affect the analysis of the three-dimensional model. When the configuration of the terminal device is high, it can obtain both the information included in the first data segment and the information included in the second data segment without affecting the speed of the terminal device analyzing data. In this case, the generated three-dimensional model is more complete and looks more realistic.

[0068] It should be understood that the size of the space occupied by the second data segment is determined according to the size of the space occupied by the optional parameters stored in the second data segment, that is, the size of the space of the second data segment can change dynamically according to the size of the space occupied by the parameters stored in the second data segment.

[0069] Optionally, in some embodiments, the extended data segment also includes a third data segment, and the third data segment is used to indicate the file source of the first file.

[0070] Optionally, in some embodiments, the third data segment is also used to indicate the category of the first file. The category indication of the first file can enable the terminal device to determine whether the first file is a file containing information of a three-dimensional model to distinguish it from a general image format file.

[0071] Optionally, in some embodiments, the third data segment is also used to indicate the number of first data segments and second data segments included in the first file, and the value range of the number can theoretically be 0 to 255.

[0072] Optionally, in some embodiments, the third data segment is also used to indicate the position of the first data segment or the second data segment in the first file, that is, the third data segment contains the segment offsets of the first data segment and the second data segment.

[0073] Optionally, in some embodiments, the file format of the first file may be a JPEG format.

[0074] It should be understood that the first file can be a file in any image format, for example, it can also be a file in PNG format. The embodiment of the present invention only takes the first file as a file in JPEG format as an example for explanation, but the embodiment of the present invention is not limited to this.

[0075] It should be understood that the space size of the extended data segment can be determined according to the number of first data segments and / or second data segments stored in the extended data segment, or can also be determined according to the space size occupied by the information contained in the first data segment and / or the second data segment, that is, the space size of the extended data segment can be changed dynamically.

[0076] Figure 3 A schematic diagram showing a first file in a picture format according to an embodiment of the present invention.

[0077] like Figure 3 The first file shown includes a basic data segment and at least one first data segment. The basic data includes two-dimensional image information of the three-dimensional model. The terminal device can generate a thumbnail of the three-dimensional model based on the two-dimensional image information.

[0078] It should be understood that the space size of the basic data segment is determined according to the space size occupied by the two-dimensional image information stored in the basic data segment.

[0079] like Figure 3 As shown, the first data segment includes a segment header field and a data field.

[0080] Optionally, in some embodiments, the segment header field includes a segment type field, and the segment type field is used to indicate the type of the first data segment. For example, when the three-dimensional model is a three-dimensional model of a human body, the type of the first data segment can be a human head model, or a body model, or the entire three-dimensional model of a human body or the model of any part of the three-dimensional model of a human body. The segment type field can clearly indicate which part of the three-dimensional model's model information is stored in the first data segment, and the length of the segment type field is 1 byte.

[0081] Optionally, in some embodiments, the segment header field also includes a segment length field, which is used to indicate the length of the first data segment, and the length of the segment length field is 4 bytes.

[0082] Optionally, in some embodiments, the segment header field also includes a name length field, which is used to indicate the file name or number of each file in multiple files required to generate a first three-dimensional model in the three-dimensional model. The first three-dimensional model can be the entire three-dimensional model or a part of the three-dimensional model. The length of the name length field is 4 bytes.

[0083] Optionally, in some embodiments, the segment header field also includes a name or number field, which is used to indicate the length of the file name or number of each file in multiple files required to generate a first three-dimensional model in the three-dimensional model. The first three-dimensional model can be the entire three-dimensional model or a part of the three-dimensional model. The length of the name or number field is 4 bytes.

[0084] Optionally, in some embodiments, the segment header field also includes a file quantity field, which is used to indicate the number of multiple files required to generate a first three-dimensional model in the three-dimensional model. The first three-dimensional model can be the entire three-dimensional model or a part of the three-dimensional model. The length of the file quantity field is 1 byte.

[0085] Optionally, in some embodiments, the segment header field also includes a file offset field, which is used to indicate the position of each file in the first data segment of multiple files required to generate a first three-dimensional model in the three-dimensional model. The position of each file in the first data segment can be quickly located based on the file offset field. The first three-dimensional model can be the entire three-dimensional model or a part of the three-dimensional model. The length of the file offset field is 4 bytes.

[0086] It should be understood that the number of the file offset fields can be determined according to how many files there are in the first data segment, that is, can be determined according to the value in the file number field.

[0087] The data field is used to store file data of multiple files for generating a three-dimensional model or a portion of a three-dimensional model. The file types of the multiple files may be, for example, OBJ format, MTL format, JPG format, etc.

[0088] It should be understood that the embodiment of the present invention only takes the above three file formats as examples to illustrate the file formats of multiple files stored in the data field, but the embodiment of the present invention is not limited thereto.

[0089] The length of the data field is determined according to the size of the space occupied by the data stored in the data field, that is, according to the file sizes of the multiple files contained in the data field.

[0090] Figure 4 Another schematic diagram of a first file in a picture format according to an embodiment of the present invention is shown.

[0091] like Figure 4 As shown, the first file may include a basic data segment, at least one first data segment and at least one second data segment, wherein the information stored in the basic data segment and the first data segment is the same as Figure 3 The basic data segment in the example stores the same information as the first data segment, which will not be described in detail herein. The second data segment includes optional parameter information for generating a three-dimensional model.

[0092] For example, when the three-dimensional model is a three-dimensional model of a human body, the optional parameters may include parameters related to the human body such as bone data, and the optional parameters may also be algorithm deformation parameters, configuration information, and the like.

[0093] The second data segment also includes a segment header field and a data field. The fields included in the segment header field of the second data segment are the same as the fields included in the segment header field of the first data segment, and will not be repeated here.

[0094] Figure 5 Another schematic diagram of a first file in a picture format according to an embodiment of the present invention is shown.

[0095] like Figure 5 As shown, the first file may include a basic data segment, at least one first data segment, at least one second data segment and a third data segment, wherein the basic data segment, the first data segment and the second data segment are stored in Figure 3 or Figure 4 The basic data segment in the first data segment and the second data segment store the same information, which will not be repeated here. The third data segment is mainly used to indicate the file source of the first file.

[0096] Optionally, in some embodiments, the third data segment includes a flag field, which is mainly used to indicate the category of the first file. The category indication of the first file can enable the terminal device to determine whether the first file is a file containing data information of a three-dimensional model to distinguish it from a general image format file.

[0097] Optionally, in some embodiments, the third data segment also includes a file source field, and the file source field is used to indicate the file source of the first file.

[0098] Optionally, in some embodiments, the third data segment also includes a segment number field, which is used to indicate the number of first data segments and second data segments in the extended data segment of the first file. Based on the segment number field, it can be determined how many first data segments and second data segments there are in total in the extended data segment.

[0099] Optionally, in some embodiments, the third data segment also includes a segment offset field, which is used to indicate the position of each first data segment or each second data segment in the extended data segment. The position of the first data segment or the second data segment can be quickly determined through the segment offset field.

[0100] It should be understood that the number of the segment offset fields can be determined according to the total number of first data segments and second data segments in the extended data segment, that is, can be determined according to the value in the segment number field.

[0101] It should be understood that the space size of the extended data segment can be determined according to the number of the first data segment and the second data segment in the extended data segment, or can be determined according to the size of the space occupied by the information stored in the first data segment and / or the second data segment in the extended data segment. Figure 3 , Figure 4 , Figure 5 The size of the space occupied by the first file shown is determined according to the size of the extended data segment of the first file.

[0102] It should also be understood that Figure 3 , Figure 4 , Figure 5 The positions of the first data segment, the second data segment, and the third data segment shown in the figure can be arbitrarily exchanged. The embodiment of the present invention only takes the first data segment in front, the second data segment after the first data segment, and the third data segment after the second data segment as an example to illustrate the data segments included in the extended data segment of the first file, but the embodiment of the present invention is not limited to this.

[0103] Figure 6 A schematic diagram of a first file for storing human body three-dimensional model information according to an embodiment of the present invention is shown.

[0104] like Figure 6 As shown, the first data segment of the first file is a basic data segment, which stores the two-dimensional image information of the three-dimensional human body model. The terminal device can generate a thumbnail of the three-dimensional human body model based on the two-dimensional image information of the three-dimensional human body model. The thumbnail can be a thumbnail in JPEG format. The size of the thumbnail is not limited. The thumbnail can be a thumbnail of the front view of the three-dimensional human body model, or a thumbnail of a view of any side that can reflect the main features of the three-dimensional human body model.

[0105] It should be understood that the thumbnail may also be a thumbnail in other picture formats, for example, a thumbnail in PNG format or a thumbnail in BMP format, etc., and the embodiments of the present invention are not limited thereto.

[0106] The second data segment of the first file is used to store head model information of the human three-dimensional model. The data segment storing the head model information is the first data segment in the extended data segment of the first file. The file types of the multiple files required to generate the head model can be OBJ format, MTL format and JPEG format respectively, where there can be more than one file in JPEG format.

[0107] Similarly, after the head model information, the hair model information is stored, and the data segment stored in the hair model information is another first data segment in the extended data segment. The file types of the multiple files required to generate the hair model can also be OBJ format, MTL format and JPEG format respectively, where there can be more than one JPEG format file.

[0108] After the hair model information, the body model information is stored. The data segment storing the body model information is another first data segment in the extended data segment. The file types of the multiple files required to generate the body model can also be OBJ format, MTL format and JPEG format respectively, where there can be more than one JPEG format file.

[0109] It should be understood that the embodiment of the present invention only takes the file types of multiple files required to generate a certain part of the human body three-dimensional model as OBJ format, MTL format and JPEG format as an example to illustrate the file types of multiple files required to generate a three-dimensional model, but the embodiment of the present invention is not limited to this.

[0110] After the body model information, the algorithm deformation parameters are stored. The algorithm deformation parameters are stored in the second data segment of the extended data segment of the first file. The algorithm deformation parameters are optional parameters for generating the three-dimensional model of the human body. The data type of the algorithm deformation parameters is in binary format.

[0111] After the algorithm deformation parameter, the hairstyle number information is stored. The hairstyle number information is stored in another second data segment of the extended data segment. The hairstyle number is also an optional parameter for generating the three-dimensional human body model.

[0112] After the hairstyle number, there is a male or female flag, which stores male or female flag information. The male or female flag information is stored in another second data segment of the extended data segment. The male or female flag information is an optional parameter for generating the three-dimensional model of the human body.

[0113] After the male and female flags, a third head model information is stored. The third-party head model information is stored in another first data segment in the extended data segment. The file types of the multiple files required to generate the third-party head model can be OBJ format, MTL format and JPEG format respectively, and there can be more than one JPEG format file.

[0114] Similarly, after the third-party head model information, the third-party body model information is stored. The third-party body model information is stored in another first data segment of the extended data segment. The file types of the multiple files required to generate the third-party body model can be OBJ format, MTL format and JPEG format respectively, and there can be more than one JPEG format file.

[0115] After the third party's body model information, the third party's accessory model information is stored. The third party's accessory model information is stored in another first data segment of the extended data segment. The file types of the multiple files required to generate the third party's accessory model can be OBJ format, MTL format and JPEG format respectively, and there can be more than one JPEG format file.

[0116] It should be understood that the embodiment of the present invention only uses the OBJ format, MTL format and JPEG format as examples to illustrate the file formats of multiple files required to generate a three-dimensional model, but the embodiment of the present invention is not limited to this.

[0117] After the third-party body model information, third-party configuration information is stored. The third-party configuration information is stored in another second data segment of the extended data segment. The third-party configuration information is an optional parameter for generating the three-dimensional model of the human body.

[0118] After the third-party configuration information, file source information is stored. The file source information is stored in the third data segment of the extended data segment. The file source information is used to indicate the source of the first file storing the human body three-dimensional model information.

[0119] After the file source information, the algorithm debugging data is stored. The algorithm debugging data is stored in another second data segment of the extended data segment. The algorithm debugging data is an optional parameter for generating the three-dimensional model of the human body. The data type of the algorithm debugging data is in binary format.

[0120] After the algorithm debugging data, a data segment is reserved for storing subsequent extended data. It can be the first data segment of the extended data segment or the second data segment of the extended data segment. For example, the reserved data segment can be used to store bone data, or can be used to store other model information or parameters, or can be used to store relevant parameters of third-party configuration information.

[0121] It should be understood that Figure 6 The arrangement order of the data segments in the first file storing the human body three-dimensional model information is not a real order. The embodiment of the present invention only describes the data segments in the first file in this arrangement order, but the embodiment of the present invention is not limited to this.

[0122] Optionally, in some embodiments, a first file may contain multiple pieces of model information of the same type, for example, Figure 6 The first file shown may include a human head model and a third-party human head model. The terminal device may choose to read the human head model or the third-party head model based on the difference in segment types of the segment header fields of the data segments where the human head model and the third-party head model are located, without causing confusion in the information read by the terminal device.

[0123] It should be understood that the embodiments of the present invention are only Figure 6 The first file in the picture format is described by taking the data segments included in the first file as an example, but the embodiment of the present invention is not limited thereto, and the first file in the picture format may also include more or fewer data segments.

[0124] Combination of the above Figures 2 to 6 , describes in detail the method embodiment of the present invention, and will be combined with Figure 7 and Figure 8 , an embodiment of the terminal device of an embodiment of the present invention is described in detail. It should be understood that the terminal device embodiment and the method embodiment correspond to each other, and similar descriptions can refer to the method embodiment.

[0125] Figure 7 is a schematic block diagram of a terminal device 700 according to an embodiment of the present invention. Figure 7 As shown, the terminal device 700 includes:

[0126] An acquisition module 710 is used to acquire a first file in a picture format, wherein the extended data segment of the first file includes at least one first data segment, and the first data segment includes file data of multiple files required to generate a first three-dimensional model in the three-dimensional model;

[0127] The acquisition module 710 is also used to acquire the file data of the multiple files from the first data segment;

[0128] The processing module 720 is used to generate a first three-dimensional model according to the file data of multiple files.

[0129] It should be understood that the first three-dimensional model may be the three-dimensional model or a part of the three-dimensional model.

[0130] Optionally, in some embodiments, the file format of the first file may be a JPEG format.

[0131] It should be understood that the first file may be a file in any picture format. The embodiment of the present invention is only described by taking the first file being a file in JPEG format as an example, but the embodiment of the present invention is not limited thereto.

[0132] Optionally, in some embodiments, the first file further includes a basic data segment, and the basic data segment includes two-dimensional image information of the three-dimensional model.

[0133] Optionally, in some embodiments, the acquisition module 710 is further used to acquire the two-dimensional image information from the basic data segment.

[0134] Optionally, in some embodiments, the processing module 720 is further configured to generate a thumbnail of the three-dimensional model based on the two-dimensional image information.

[0135] In an embodiment of the present invention, by having one file contain file data of multiple files required to generate a three-dimensional model, the problem of requiring multiple files to describe a three-dimensional model is avoided, the accuracy of the data information analysis of the three-dimensional model can be ensured, and it is convenient for the terminal device to manage the files containing the data information of the three-dimensional model.

[0136] Optionally, in some embodiments, the extended data segment also includes a second data segment, and the second data segment includes optional parameters for generating the three-dimensional model.

[0137] In the embodiment of the present invention, the optional parameters included in the second data segment can make the three-dimensional model more complete and look more realistic from a visual perspective.

[0138] Optionally, in some embodiments, the first data segment includes a segment header field and a data field, and the segment header field is mainly used to indicate the position of file data of each file among multiple files required to generate a first three-dimensional model in the first data segment. The first three-dimensional model can be the entire three-dimensional model or a part of the three-dimensional model.

[0139] Optionally, in some embodiments, the segment header field is also used to indicate the type of the first data segment.

[0140] Optionally, in some embodiments, the segment header field is also used to indicate the length of the first data segment.

[0141] Optionally, in some embodiments, the segment header field is also used to indicate the file name or number of each file in the multiple files.

[0142] Optionally, in some embodiments, the segment header field is also used to indicate the length of the file name or number of each file in the multiple files.

[0143] Optionally, in some embodiments, the segment header field is also used to indicate the number of the multiple files.

[0144] Optionally, in some embodiments, the extended data segment also includes a third data segment, and the third data segment is used to indicate the file source of the first file.

[0145] Optionally, in some embodiments, the third data segment is also used to indicate the category of the first file. The category indication of the first file can enable the terminal device to determine whether the first file is a file containing information of a three-dimensional model to distinguish it from a general image format file.

[0146] Optionally, in some embodiments, the third data segment is also used to indicate the number of first data segments and second data segments included in the first file, and the value range of the number can theoretically be 0 to 255.

[0147] Optionally, in some embodiments, the third data segment is also used to indicate the position of the first data segment or the second data segment in the first file, that is, the third data segment contains the segment offsets of the first data segment and the second data segment.

[0148] It should be understood that the terminal device 700 according to the embodiment of the present invention may correspond to the terminal device in the embodiment of the present invention, and the above and other operations and / or functions of each module in the terminal device 700 are respectively implemented. Figure 2 For the sake of brevity, the corresponding processes of each method in are not repeated here.

[0149] Figure 8 is a schematic structural diagram of a terminal device 800 according to an embodiment of the present invention.

[0150] like Figure 8 As shown, the terminal device 800 includes a memory 810 and a processor 820. The memory 810 and the processor 820 communicate with each other through an internal connection path to transmit control and / or data signals.

[0151] The memory 810 is used to store program codes;

[0152] The processor 820 is configured to call the program code to implement the methods in the above embodiments of the present invention.

[0153] In the embodiment of the present invention, the processor 820 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP. The processor may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.

[0154] The embodiment of the present invention provides a computer readable medium for storing computer program code, the computer program including a computer program for executing the above Figure 2 The readable medium may be a read-only memory (ROM) or a random access memory (RAM), which is not limited in the embodiment of the present invention.

[0155] In the embodiment of the present invention, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can 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 the computer program instructions are loaded and executed on a computer, they are all or partly in accordance with the process or function described in the embodiment of the present invention. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disk (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)), etc.

[0156] It should be understood that the terminal device 800 according to the embodiment of the present invention may correspond to the terminal device in the embodiment of the present invention, and the above and other operations and / or functions of the various components in the terminal device 800 are respectively implemented. Figure 2 For the sake of brevity, the corresponding processes of each method in are not repeated here.

[0157] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0158] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0159] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for generating a three-dimensional model, characterized in that: The method comprises: Acquire a first file in a picture format, the first file comprising a basic data segment and an extended data segment, the basic data segment comprising two-dimensional image information of the three-dimensional model, the extended data segment comprising at least one first data segment, the first data segment comprising file data of multiple files required to generate a first three-dimensional model of the three-dimensional models, the first data segment comprising a segment header field and a data field, the segment header field being used to indicate a position of file data of each file of the multiple files in the first data segment, and the data field being used to store file data of multiple files required to generate the first three-dimensional model of the three-dimensional model; Acquire file data of the plurality of files from the first data segment; The first three-dimensional model is generated according to the file data of the plurality of files.

2. The method according to claim 1, characterized in that The method further comprises: Acquire the two-dimensional image information from the basic data segment; A thumbnail of the three-dimensional model is generated according to the two-dimensional image information.

3. The method according to claim 1, characterized in that: The extended data segment also includes at least one third data segment, and the third data segment is used to indicate the source of the first file.

4. The method according to any one of claims 1 to 3, characterized in that The file format of the first file is JPEG format.

5. A terminal device, characterized in that: The terminal device comprises: an acquisition module, configured to acquire a first file in a picture format, wherein an extended data segment of the first file includes at least one first data segment, wherein the first data segment includes file data of multiple files required to generate a first three-dimensional model in the three-dimensional model, wherein the first data segment includes a segment header field and a data field, wherein the segment header field is used to indicate a position of file data of each file in the multiple files in the first data segment, and the data field is used to store file data of multiple files required to generate the first three-dimensional model in the three-dimensional model; The acquisition module is further used to acquire the file data of the multiple files from the first data segment; A processing module is used to generate the first three-dimensional model according to the file data of the multiple files.

6. The terminal device according to claim 5, characterized in that: The first file also includes a basic data segment, and the basic data segment includes two-dimensional image information of the three-dimensional model; The acquisition module is also used to acquire the two-dimensional image information from the basic data segment; The processing module is also used to generate a thumbnail of the three-dimensional model according to the two-dimensional image information.

7. The terminal device according to claim 5, characterized in that: The extended data segment also includes a third data segment, and the third data segment is used to indicate the source of the first file.

8. The terminal device according to any one of claims 5 to 7, characterized in that: The file format of the first file is JPEG format.

9. A terminal device, characterized in that: The terminal device comprises a memory and a processor, wherein the memory is used to store program codes, and the processor is used to call the program codes to implement the method according to any one of claims 1 to 4.

10. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image processing device, information recording medium, image processing method, and program

    CN102742281A

  • Method and terminal for displaying vector graphics

    CN102831635A