3D model automatic labeling and rendering system based on GLTF format
By designing a 3D model automatic annotation and rendering system based on the GLTF format, the problem of low 3D model processing efficiency in the existing technology is solved, automatic annotation and rendering is realized, the processing efficiency and visualization effect of the model are improved, and texture rendering and lighting are used Illumination technology enhances the model's realism.
Patent Information
- Application Number
- CN202410795337.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-29
AI Technical Summary
Annotation and rendering in the existing 3D model processing process requires manual operations, which is inefficient and error-prone. It is difficult to achieve efficient automatic annotation and rendering of 3D models in GLTF format.
An automatic annotation and rendering system for 3D models based on the GLTF format is designed, including a GLTF format parsing module, annotation generation module, texture rendering module and lighting module. It generates annotation information by automatically parsing GLTF files, and uses texture rendering and lighting. Illumination techniques improve model visualization.
It realizes automatic processing of GLTF format 3D models, improves processing efficiency, and facilitates users to quickly understand model information by automatically generating annotation models. It also improves the model's fidelity and lighting effects through texture rendering and lighting technology.
Smart Images

Figure CN118864686A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a 3D model automatic annotation and rendering system based on GLTF format, belonging to the field of model annotation and rendering. Background Art
[0002] With the continuous development of 3D technology, GLTF format has been widely used as a universal 3D model format. However, in the existing 3D model processing process, annotation and rendering often require manual operation, which is inefficient and error-prone. Therefore, developing a system that can automatically annotate and render GLTF format 3D models is of great significance to improving the processing efficiency and visualization effect of 3D models.
[0003] Application (patent) number: CN201810797793.2 "A three-dimensional model annotation method based on multi-label propagation" mentions that users can calculate the classification results of the entire sample space by annotating a small number of samples and combining the sample association relationships in the sample space. Compared with this patent, the advantages of this patent are: it can automatically annotate and render GLTF format 3D models, which can improve the processing efficiency and visualization effect of 3D models; by automatically generating annotated models, users can quickly understand the size and position information of the model; and use texture rendering and lighting technology to make the model have a more realistic appearance and lighting effect. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention proposes a 3D model automatic annotation and rendering system based on the GLTF format.
[0005] The technical solution of the present invention is as follows:
[0006] On the one hand, the present invention provides a 3D model automatic annotation and rendering system based on the GLTF format, including: a GLTF format parsing module, an annotation generation module, a texture rendering module, a lighting irradiation module and an output module;
[0007] The GLTF format parsing module is used to read the 3D model file in the GLTF format, and parse out the geometric structure and texture of the corresponding model in the 3D model file; the annotation generation module is used to automatically calculate the annotation information according to the geometric structure of the model, annotate it into the model, and generate the corresponding 3D model; the texture rendering module is used to perform texture rendering on the 3D model according to the preset texture and color parameters; the lighting module is used to generate a virtual light source according to the preset light source and light intensity parameters, and simulate the lighting operation on the 3D model through the virtual light source; the output module is used to output the processed 3D model and annotation information into a specified format.
[0008] Preferably, the method for parsing a file by the GLTF format parsing module comprises the following steps:
[0009] The user selects and triggers the loading of a 3D model file in GLTF format, and the 3D model automatic annotation and rendering system calls the file loader to load the selected 3D model file; the file loader checks the file path and format, and reads the 3D model file from the specified location; the file loader reads the JSON part and the binary part of the 3D model file in GLTF format respectively; the file loader parses the read file content to obtain the data information of the model, material and lighting; the data information is extracted and converted into the data format used internally by the 3D model automatic annotation and rendering system.
[0010] Preferably, the specific steps of the file loader reading the file include: preferentially reading the .gltf file, the .gltf file contains metadata related to all objects in the scene, including material, lighting, and camera parameters; the file loader reads the .bin file, the .bin file stores the vertex coordinates, vertex normal coordinates, map texture coordinates, and basic data information of the map information model in the form of a binary stream; all data of the .glb file is output as a binary stream, and the file loader reads the entire .glb file at one time;
[0011] The specific steps of the file loader parsing the binary file include: the .bin file and the .glb file are binary data, and the loader parses them according to a predetermined data structure to extract the geometric data, texture, and animation data of the model;
[0012] The file loader parses metadata in the JSON file, including scene information, node information, and asset information; the metadata includes the structure, material, and lighting properties of the 3D model.
[0013] Preferably, if an error is encountered during file reading or parsing, the file loader captures the error and feeds back corresponding error prompt information, and the user performs corresponding processing according to the error prompt; otherwise, the file loader prepares data with the loaded file.
[0014] Preferably, the method for generating a 3D model by annotating the annotation generation module comprises the following steps:
[0015] The user selects a GLTF file, which includes a single 3D model or a complex of multiple 3D sub-models; the 3D model automatic annotation and rendering system instructs the GLTF loader to load the file selected by the user; the GLTF loader parses the GLTF file and returns the model data to the 3D model automatic annotation and rendering system; the 3D model automatic annotation and rendering system sends the model data to the geometry analyzer; the geometry analyzer processes the model data, extracts the geometric information, and sends the geometric information to the bounding box generator; the bounding box generator obtains the bounding box data through calculation; the texture analyzer analyzes the texture image, calculates the frequency of occurrence of each color in the image, generates a color histogram, and extracts the color with the highest frequency from the color histogram as the main color of the annotated model ; The annotation generator generates annotation information, uses a fitting algorithm to determine the geometric information of the model based on the size of the centroid and bounding box through the model generation algorithm, and the annotation file formatting encodes the geometric information and main color of the model into a standard format; the renderer renders the annotated 3D model, where the 3D rendering engine uses the graphics API to render the 3D model through the rendering pipeline; the lighting and material processing applies the Phong lighting model, combined with texture and material properties, to color the model; during the annotation overlay rendering process, the calculated model is overlaid on the corresponding 3D model so that the position and size of the annotation match the model; the 3D model automatic annotation and rendering system displays the rendered 3D model to the user, and provides options for the user to interact, view details and export the model.
[0016] Preferably, the GLTF loader uses a file parsing algorithm, and the specific steps include: extracting 3D scenes, meshes, materials, and textures by reading the structure of the GLTF file using a JSON parser;
[0017] The geometric analyzer uses mesh analysis and normal calculation, and the specific steps include: the mesh analysis extracts the vertex coordinates and index of each mesh by traversing the vertex data of the model; the normal calculation uses the model vertex coordinates and the index data of the face to calculate the normal vector of each face through the cross product, and then averages the normal vectors of adjacent faces to obtain the vertex normal;
[0018] The bounding box generator uses a centroid algorithm and an axis-aligned bounding box algorithm, and the specific steps include: the centroid algorithm calculates the arithmetic mean of all vertex coordinates of each mesh to obtain the centroid of the mesh; the axis-aligned bounding box algorithm constructs an axis-aligned bounding box by finding the minimum and maximum values of all vertices in the mesh on each coordinate axis, and calculates the center point of the bounding box.
[0019] Preferably, the method for rendering by the texture rendering module comprises the following steps:
[0020] The automatic annotation process generates files. The specific steps include:
[0021] Use geometric analysis and fitting techniques to generate a 3D model based on the bounding box of the target object; extract the texture of the model surface and generate a texture image file; analyze the texture image file, extract the main color, and generate a color index description file; simulate the effects of different light sources and generate a light and shadow description file;
[0022] Unify the annotation files. The specific steps include:
[0023] Integrate all generated files into a marked file, parse and process them in JSON or XML format; all generated files include 3D model attributes, models, textures, and color indicators;
[0024] Parameters of the 3D rendering output image tool. The specific steps include:
[0025] Use Blender or Three.js to render 3D models, and render 3D models under different viewing angles and lighting conditions according to the input parameters;
[0026] Create a mapped 3D file. The specific steps include:
[0027] Copy the model multiple times in memory to create a mapped 3D file, which is used for angle changes and slice generation;
[0028] Angle change and sectioning algorithm, the specific steps include:
[0029] Calculate the rotation of the 3D model based on the angle change; use the cutting algorithm in computational geometry to calculate the intersection of the plane and the polygon and generate the cross section of the model; fill the cross section of the cross section image with pure green and set the background to transparent;
[0030] Generate sample high-definition pictures. The specific steps include:
[0031] After rendering the 3D model in the rendering engine, use the screenshot tool to capture the current view and generate a sample high-definition picture;
[0032] Merge the map and sample HD image. The specific steps include:
[0033] Use the image processing library to overlay the map and sample image, making sure the model bounding box is correctly aligned to the edge of the 3D model;
[0034] Generate annotated images and annotation records. The specific steps include:
[0035] While merging the images, the current transformation parameters are recorded and saved together with the annotation information;
[0036] Complete a complete parameter change annotation picture and annotation record. The specific steps include:
[0037] Output the final annotated image and annotation record file;
[0038] Generate annotation materials cyclically. The specific steps include:
[0039] Loop through the rendering engine parameters to automatically generate a series of annotated images and records, and use Python scripts for batch processing.
[0040] On the other hand, the present invention also provides a 3D model automatic annotation and rendering method based on the GLTF format, characterized in that it includes the following steps:
[0041] Use the GLTF format parsing module to read and parse the 3D model file in GLTF format to extract the model's geometric structure and texture; use the annotation generation module to automatically calculate the annotation information based on the model's geometric structure and annotate it to the model; use the texture rendering module to render the 3D model according to the preset texture and color parameters; use the lighting module to illuminate the 3D model according to the preset light source and light intensity parameters to simulate the real lighting effect; use the output module to output the processed 3D model and its annotation information into the specified format.
[0042] On the other hand, the present invention further provides an electronic device having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements a method for automatic annotation and rendering of a 3D model based on the GLTF format as described in any embodiment of the present invention.
[0043] On the other hand, the present invention also provides a computer-readable medium for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a method for automatic annotation and rendering of 3D models based on the GLTF format as described in any embodiment of the present invention.
[0044] The present invention has the following beneficial effects:
[0045] 1. The present invention can automatically process 3D models in GLTF format and improve processing efficiency;
[0046] 2. The present invention automatically generates a marked model, which facilitates users to quickly understand the size and position information of the model;
[0047] 3. Use texture rendering and lighting technology to give the model a more realistic appearance and lighting effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the system flow of the present invention;
[0049] Figure 2 This is a schematic diagram of a GLTF format parsing module of the present invention;
[0050] Figure 3 This is a schematic diagram of the annotation generation module of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0053] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0054] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0055] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0056] Embodiment 1:
[0057] See also Figure 1-3 ,This embodiment provides a 3D model automatic annotation and rendering system based on the GLTF format, including: a GLTF format parsing module, an annotation generation module, a texture rendering module, a lighting irradiation module and an output module;
[0058] The GLTF format parsing module is used to read the 3D model file in the GLTF format, and parse out the geometric structure and texture of the corresponding model in the 3D model file; the annotation generation module is used to automatically calculate the annotation information according to the geometric structure of the model, annotate it into the model, and generate the corresponding 3D model; the texture rendering module is used to perform texture rendering on the 3D model according to the preset texture and color parameters; the lighting module is used to generate a virtual light source according to the preset light source and light intensity parameters, and simulate the lighting operation on the 3D model through the virtual light source; the output module is used to output the processed 3D model and annotation information into a specified format.
[0059] As a preferred implementation of this embodiment, the method for parsing a file by the GLTF format parsing module includes the following steps:
[0060] The user selects and triggers the loading of a 3D model file in GLTF format, and the 3D model automatic annotation and rendering system calls the file loader to load the selected 3D model file; the file loader checks the file path and format, and reads the 3D model file from the specified location; the file loader reads the JSON part and the binary part of the 3D model file in GLTF format respectively; the file loader parses the read file content to obtain the data information of the model, material and lighting; the data information is extracted and converted into the data format used internally by the 3D model automatic annotation and rendering system.
[0061] As a preferred implementation of this embodiment, the specific steps of the file loader reading the file include: preferentially reading the .gltf file, the .gltf file contains metadata related to all objects in the scene, including material, lighting, and camera parameters; the file loader reads the .bin file, the .bin file stores the vertex coordinates, vertex normal coordinates, map texture coordinates, and basic data information of the map information model in the form of a binary stream; all data of the .glb file is output as a binary stream, and the file loader reads the entire .glb file at one time;
[0062] The specific steps of the file loader parsing the binary file include: the .bin file and the .glb file are binary data, and the loader parses them according to a predetermined data structure to extract the geometric data, texture, and animation data of the model;
[0063] The file loader parses metadata in the JSON file, including scene information, node information, and asset information; the metadata includes the structure, material, and lighting properties of the 3D model.
[0064] Preferably, if an error is encountered during file reading or parsing, the file loader captures the error and feeds back corresponding error prompt information, and the user performs corresponding processing according to the error prompt; otherwise, the file loader prepares data with the loaded file.
[0065] As a preferred implementation of this embodiment, the method for generating a 3D model by annotating the annotation generation module comprises the following steps:
[0066] The user selects a GLTF file, which includes a single 3D model or a complex of multiple 3D sub-models; the 3D model automatic annotation and rendering system instructs the GLTF loader to load the file selected by the user; the GLTF loader parses the GLTF file and returns the model data to the 3D model automatic annotation and rendering system; the 3D model automatic annotation and rendering system sends the model data to the geometry analyzer; the geometry analyzer processes the model data, extracts the geometric information, and sends the geometric information to the bounding box generator; the bounding box generator obtains the bounding box data through calculation; the texture analyzer analyzes the texture image, calculates the frequency of occurrence of each color in the image, generates a color histogram, and extracts the color with the highest frequency from the color histogram as the main color of the annotated model ; The annotation generator generates annotation information, uses a fitting algorithm to determine the geometric information of the model based on the size of the centroid and bounding box through the model generation algorithm, and the annotation file formatting encodes the geometric information and main color of the model into a standard format; the renderer renders the annotated 3D model, where the 3D rendering engine uses the graphics API to render the 3D model through the rendering pipeline; the lighting and material processing applies the Phong lighting model, combined with texture and material properties, to color the model; during the annotation overlay rendering process, the calculated model is overlaid on the corresponding 3D model so that the position and size of the annotation match the model; the 3D model automatic annotation and rendering system displays the rendered 3D model to the user, and provides options for the user to interact, view details and export the model.
[0067] As a preferred implementation of this embodiment, the GLTF loader uses a file parsing algorithm, and the specific steps include: extracting 3D scenes, meshes, materials, and textures by reading the structure of the GLTF file using a JSON parser;
[0068] The geometric analyzer uses mesh analysis and normal calculation, and the specific steps include: the mesh analysis extracts the vertex coordinates and index of each mesh by traversing the vertex data of the model; the normal calculation uses the model vertex coordinates and the index data of the face to calculate the normal vector of each face through the cross product, and then averages the normal vectors of adjacent faces to obtain the vertex normal;
[0069] The bounding box generator uses a centroid algorithm and an axis-aligned bounding box algorithm, and the specific steps include: the centroid algorithm calculates the arithmetic mean of all vertex coordinates of each mesh to obtain the centroid of the mesh; the axis-aligned bounding box algorithm constructs an axis-aligned bounding box by finding the minimum and maximum values of all vertices in the mesh on each coordinate axis, and calculates the center point of the bounding box.
[0070] As a preferred implementation of this embodiment, the method for rendering by the texture rendering module includes the following steps:
[0071] The automatic annotation process generates files. The specific steps include:
[0072] Use geometric analysis and fitting techniques to generate a 3D model based on the bounding box of the target object; extract the texture of the model surface and generate a texture image file; analyze the texture image file, extract the main color, and generate a color index description file; simulate the effects of different light sources and generate a light and shadow description file;
[0073] Unify the annotation files. The specific steps include:
[0074] Integrate all generated files into a marked file, parse and process them in JSON or XML format; all generated files include 3D model attributes, models, textures, and color indicators;
[0075] Parameters of the 3D rendering output image tool. The specific steps include:
[0076] Use Blender or Three.js to render 3D models, and render 3D models under different viewing angles and lighting conditions according to the input parameters;
[0077] Create a mapped 3D file. The specific steps include:
[0078] Copy the model multiple times in memory to create a mapped 3D file, which is used for angle changes and slice generation;
[0079] Angle change and sectioning algorithm, the specific steps include:
[0080] Calculate the rotation of the 3D model based on the angle change; use the cutting algorithm in computational geometry to calculate the intersection of the plane and the polygon and generate the cross section of the model; fill the cross section of the cut image with pure green and set the background to transparent;
[0081] Generate sample high-definition pictures. The specific steps include:
[0082] After rendering the 3D model in the rendering engine, use the screenshot tool to capture the current view and generate a sample high-definition picture;
[0083] Merge the map and sample HD image. The specific steps include:
[0084] Use the image processing library to overlay the map and sample image, making sure the model bounding box is correctly aligned to the edge of the 3D model;
[0085] Generate annotated images and annotation records. The specific steps include:
[0086] While merging the images, the current transformation parameters are recorded and saved together with the annotation information;
[0087] Complete a complete parameter change annotation picture and annotation record. The specific steps include:
[0088] Output the final annotated image and annotation record file;
[0089] Generate annotation materials cyclically. The specific steps include:
[0090] Loop through the rendering engine parameters to automatically generate a series of annotated images and records, and use Python scripts for batch processing.
[0091] Embodiment 2:
[0092] A 3D model automatic annotation and rendering method based on GLTF format includes the following steps:
[0093] Use the GLTF format parsing module to read and parse the 3D model file in GLTF format to extract the model's geometric structure and texture; use the annotation generation module to automatically calculate the major axis, minor axis and center point of the annotation model according to the model's geometric structure; use the texture rendering module to render the 3D model according to the preset texture and color parameters; use the lighting module to illuminate the 3D model according to the preset light source and light intensity parameters to simulate the real lighting effect; use the output module to output the processed 3D model and its annotation information into the specified format.
[0094] Embodiment three:
[0095] This embodiment provides an electronic device having a computer program stored thereon, wherein when the computer program is executed by a processor, a method for automatically labeling and rendering a 3D model based on the GLTF format as described in any embodiment of the present invention is implemented.
[0096] Embodiment 4:
[0097] This embodiment provides a computer-readable medium for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a 3D model automatic annotation and rendering method based on the GLTF format as described in any embodiment of the present invention.
[0098] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0099] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, 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.
[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0101] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0102] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A 3D model automatic annotation and rendering system based on GLTF format, characterized in that: Includes: GLTF format parsing module, annotation generation module, texture rendering module, lighting module and output module; The GLTF format parsing module is used to read the 3D model file in GLTF format and parse the geometric structure and texture of the corresponding model in the 3D model file; The annotation generation module is used to automatically calculate the annotation information according to the geometric structure of the model, annotate it into the model, and generate a corresponding 3D model; the texture rendering module is used to perform texture rendering on the 3D model according to preset texture and color parameters; the lighting module is used to generate a virtual light source according to preset light source and light intensity parameters, and simulate the lighting operation on the 3D model through the virtual light source; the output module is used to output the processed 3D model and annotation information into a specified format.
2. The 3D model automatic annotation and rendering system based on GLTF format according to claim 1, characterized in that: The method for parsing a file by the GLTF format parsing module comprises the following steps: The user selects and triggers the loading of a 3D model file in GLTF format, and the 3D model automatic annotation and rendering system calls the file loader to load the selected 3D model file; the file loader checks the file path and format, and reads the 3D model file from the specified location; the file loader reads the JSON part and the binary part of the 3D model file in GLTF format respectively; the file loader parses the read file content to obtain the data information of the model, material and lighting; the data information is extracted and converted into the data format used internally by the 3D model automatic annotation and rendering system.
3. The 3D model automatic annotation and rendering system based on the GLTF format according to claim 2, characterized in that: The specific steps of the file loader reading the file include: first reading the .gltf file, which contains metadata related to all objects in the scene, including material, lighting, and camera parameters; the file loader reads the .bin file, which stores the vertex coordinates, vertex normal coordinates, map texture coordinates, and basic data information of the map information model in the form of a binary stream; all data of the .glb file is output as a binary stream, and the file loader reads the entire .glb file at one time; The specific steps of the file loader parsing the binary file include: the .bin file and the .glb file are binary data, and the loader parses them according to a predetermined data structure to extract the geometric data, texture, and animation data of the model; The file loader parses metadata in the JSON file, including scene information, node information, and asset information; the metadata includes the structure, material, and lighting properties of the 3D model.
4. The 3D model automatic annotation and rendering system based on GLTF format according to claim 2, characterized in that: If an error occurs during file reading or parsing, the file loader captures the error and provides corresponding error prompt information. The user can handle the error accordingly. Otherwise, the file loader will prepare the data using the loaded file.
5. The 3D model automatic annotation and rendering system based on GLTF format according to claim 1, characterized in that: The method for generating a 3D model by annotating the annotation generation module comprises the following steps: The user selects a GLTF file, which includes a single 3D model or a complex of multiple 3D sub-models; the 3D model automatic annotation and rendering system instructs the GLTF loader to load the file selected by the user; the GLTF loader parses the GLTF file and returns the model data to the 3D model automatic annotation and rendering system; the 3D model automatic annotation and rendering system sends the model data to the geometry analyzer; the geometry analyzer processes the model data, extracts the geometric information, and sends the geometric information to the bounding box generator; the bounding box generator obtains the bounding box data through calculation; the texture analyzer analyzes the texture image, calculates the frequency of occurrence of each color in the image, generates a color histogram, and extracts the color with the highest frequency from the color histogram as the main color of the annotated model ; The annotation generator generates annotation information, uses a fitting algorithm to determine the geometric information of the model based on the size of the centroid and bounding box through the model generation algorithm, and the annotation file formatting encodes the geometric information and main color of the model into a standard format; the renderer renders the annotated 3D model, where the 3D rendering engine uses the graphics API to render the 3D model through the rendering pipeline; the lighting and material processing applies the Phong lighting model, combined with texture and material properties, to color the model; during the annotation overlay rendering process, the calculated model is overlaid on the corresponding 3D model so that the position and size of the annotation match the model; the 3D model automatic annotation and rendering system displays the rendered 3D model to the user, and provides options for the user to interact, view details and export the model.
6. The 3D model automatic annotation and rendering system based on GLTF format according to claim 5, characterized in that: The GLTF loader uses a file parsing algorithm, and the specific steps include: extracting 3D scenes, meshes, materials, and textures by reading the structure of the GLTF file using a JSON parser; The geometric analyzer uses mesh analysis and normal calculation, and the specific steps include: the mesh analysis extracts the vertex coordinates and index of each mesh by traversing the vertex data of the model; the normal calculation uses the model vertex coordinates and the index data of the face to calculate the normal vector of each face through the cross product, and then averages the normal vectors of adjacent faces to obtain the vertex normal; The bounding box generator uses a centroid algorithm and an axis-aligned bounding box algorithm, and the specific steps include: the centroid algorithm calculates the arithmetic mean of all vertex coordinates of each mesh to obtain the centroid of the mesh; the axis-aligned bounding box algorithm constructs an axis-aligned bounding box by finding the minimum and maximum values of all vertices in the mesh on each coordinate axis, and calculates the center point of the bounding box.
7. The 3D model automatic annotation and rendering system based on GLTF format according to claim 1, characterized in that: The method for rendering by the texture rendering module comprises the following steps: The automatic annotation process generates files. The specific steps include: Use geometric analysis and fitting techniques to generate a 3D model based on the bounding box of the target object; extract the texture of the model surface and generate a texture image file; analyze the texture image file, extract the main color, and generate a color index description file; simulate the effects of different light sources and generate a light and shadow description file; Unify the annotation files. The specific steps include: Integrate all generated files into a marked file, parse and process them in JSON or XML format; all generated files include 3D model attributes, models, textures, and color indicators; Parameters of the 3D rendering output image tool. The specific steps include: Use Blender or Three.js to render 3D models, and render 3D models under different viewing angles and lighting conditions according to the input parameters; Create a mapped 3D file. The specific steps include: Copy the model multiple times in memory to create a mapped 3D file, which is used for angle changes and slice generation; Angle change and sectioning algorithm, the specific steps include: Calculate the rotation of the 3D model based on the angle change; use the cutting algorithm in computational geometry to calculate the intersection of the plane and the polygon and generate the cross section of the model; fill the cross section of the cross section image with pure green and set the background to transparent; Generate sample high-definition pictures. The specific steps include: After rendering the 3D model in the rendering engine, use the screenshot tool to capture the current view and generate a sample high-definition picture; Merge the map and sample HD image. The specific steps include: Use the image processing library to overlay the map and sample image, making sure the model bounding box is correctly aligned to the edge of the 3D model; Generate annotated images and annotation records. The specific steps include: While merging the images, the current transformation parameters are recorded and saved together with the annotation information; Complete a complete parameter change annotation picture and annotation record. The specific steps include: Output the final annotated image and annotation record file; Generate annotation materials cyclically. The specific steps include: Loop through the rendering engine parameters to automatically generate a series of annotated images and records, and use Python scripts for batch processing.
8. A method for automatic annotation and rendering of 3D models based on GLTF format, characterized in that: The steps include: Use the GLTF format parsing module to read and parse the 3D model file in GLTF format to extract the geometric structure and texture of the model; The annotation generation module is used to automatically calculate the annotation information according to the geometric structure of the model and annotate it into the model; the texture rendering module is used to render the texture of the 3D model according to the preset texture and color parameters; the lighting module is used to illuminate the 3D model according to the preset light source and light intensity parameters to simulate the real lighting effect; the output module is used to output the processed 3D model and its annotation information into the specified format.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the automatic annotation and rendering method of 3D models based on the GLTF format as described in claim 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for automatic annotation and rendering of 3D models based on the GLTF format as claimed in claim 8 is implemented.
