A three-dimensional texture processing method and terminal for electric power GIS
By identifying and downsampling non-text information in the power GIS 3D texture and converting its format, the problem of excessive texture file data volume in traditional methods is solved, and data compression is achieved without affecting information clarity. It is suitable for online 3D presentation of power grid GIS.
Patent Information
- Application Number
- CN202111302794.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-11-05
AI Technical Summary
Traditional power GIS 3D texture processing methods cannot effectively compress texture files without distorting the information, resulting in excessive data volume and occupying transmission bandwidth.
By identifying non-text information in texture files, downsampling is performed at a preset texture density based on the original model, and the texture file format is converted to DDS format. Only the non-text information is reduced, while the clarity of the text information is retained.
While compressing the texture file dataset, it ensures that the text information is not distorted, improves performance utilization, and can clearly display information such as text logos and road signs, reducing network transmission pressure.
Smart Images

Figure CN114185846B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional image processing, and in particular to a three-dimensional texture processing method and terminal for electric power GIS. Background Art
[0002] Currently, in the online 3D rendering of power grid GIS (Geographic Information System), the data volume of model texture maps has always occupied a large proportion of the transmission bandwidth. Therefore, the compression optimization of model texture maps has always been a key step in the transmission and rendering process.
[0003] However, traditional optimization solutions simply perform a unified compression operation on related texture files, such as reducing the size of the texture files and compressing them into PNG or JPEG formats. However, not all texture files are suitable for processing with this unified compression method. For example, information with special meaning, such as fine patterns, indicative icons, and text, is not suitable for compression by reducing the size. Forcibly compressing this information may cause distortion of the compressed information. Therefore, traditional optimization solutions cannot effectively compress texture files while ensuring that the information is not distorted. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a three-dimensional texture processing method for electric power GIS, which can reduce the compressed data volume of texture files without distorting the information.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A three-dimensional texture processing method for electric power GIS includes the following steps:
[0007] Obtaining a texture graphic in a texture file and an original model corresponding to the texture graphic;
[0008] identifying non-text information in the texture graphic;
[0009] Downsampling the non-text information at a preset texture density according to the original model;
[0010] The texture file containing the non-text information after the downsampling is format converted.
[0011] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0012] A three-dimensional texture processing terminal for electric GIS includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step of the above-mentioned three-dimensional texture processing method for electric GIS is implemented.
[0013] The beneficial effects of the present invention are as follows: by obtaining the texture graphics in the texture file and the original model corresponding to the texture graphics, and identifying the non-text information in the texture file, the non-text information is reduced according to the original model and with a preset texture density, and then the texture file is formatted, thereby filtering the text information in the texture file and only reducing the non-text information. While reducing the size of the texture file data set, it is also ensured that the text information in the final presented texture information is not distorted, and different preset texture densities can be set according to different texture types, so that on the basis of achieving data compression, the identification patterns or road signs and other information containing text in the texture information can be clearly seen, while improving performance utilization without affecting the normal use of the GIS system. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flowchart of the steps of a three-dimensional texture processing method for electric GIS according to an embodiment of the present invention;
[0015] Figure 2 This is a schematic structural diagram of a three-dimensional texture processing terminal for electric GIS according to an embodiment of the present invention;
[0016] Figure 3 This is a schematic flow chart of the steps of a three-dimensional texture processing method for electric GIS according to an embodiment of the present invention;
[0017] Figure 4 This is a flowchart of another step of a three-dimensional texture processing method for electric GIS according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following description is given in conjunction with the embodiments and accompanying drawings.
[0019] Please refer to Figure 1 , a three-dimensional texture processing method for electric power GIS, comprising the steps of:
[0020] Obtaining a texture graphic in a texture file and an original model corresponding to the texture graphic;
[0021] identifying non-text information in the texture graphic;
[0022] Downsampling the non-text information at a preset texture density according to the original model;
[0023] The format of the texture file containing the non-text information after the downsampling is converted.
[0024] From the above description, it can be seen that the beneficial effect of the present invention is: by obtaining the texture graphics in the texture file and the original model corresponding to the texture graphics, and identifying the non-text information in the texture file, and then reducing the non-text information according to the original model and with a preset texture density, and then converting the texture file format, the text information in the texture file is filtered, and only the non-text information is reduced. While reducing the size of the texture file data set, it also ensures that the text information in the final presented texture information is not distorted, and different preset texture densities can be set according to different texture types. Therefore, on the basis of realizing data compression, the identification patterns or road signs and other information containing text in the texture information can be clearly seen, while improving performance utilization without affecting the normal use of the GIS system.
[0025] Furthermore, before downsampling the non-text information with a preset texture density according to the original model, the method includes the following steps:
[0026] parsing the original model and the texture graph to obtain parsed data;
[0027] Performing texture density processing according to the analytical data to obtain corresponding texture density;
[0028] Determine whether the texture density is less than a preset texture density index; if not, downsample the non-text information and return to the step of parsing the original model and the texture graphic to obtain parsed data; if so, execute the step of formatting the texture file containing the non-text information after the downsampling.
[0029] From the above description, it can be seen that by parsing the original model and texture graphics, the corresponding parsing data is obtained, and the corresponding texture density is obtained based on the parsing data. It is then determined whether the texture density is less than a preset texture density index, so that the texture density of the texture file can be reduced to a preset size according to the preset texture density index, thereby reducing the data volume of the texture file.
[0030] Furthermore, the parsing of the original model and the texture graph to obtain parsed data includes:
[0031] Traversing the texture coordinates of the texture graphics in the original model to obtain the texture area;
[0032] Analyze the original model to obtain the corresponding total number of texture pixels;
[0033] Analyzing the original model to obtain a corresponding model surface area;
[0034] The performing texture density processing according to the parsed data to obtain the corresponding texture density includes:
[0035] Calculating the effective number of texture pixels according to the total number of texture pixels and the texture area;
[0036] The texture density is calculated based on the surface area of the original model and the number of effective pixels of the texture.
[0037] From the above description, it can be seen that by traversing the texture coordinates of the texture graphics in the original model, the area occupied by the texture coordinates can be accurately calculated, and then the corresponding total number of texture pixels and the model surface area can be obtained by parsing the texture file. During the calculation, the number of effective texture pixels is obtained by the total number of texture pixels and the texture area, avoiding the calculation of invalid texture pixels to increase the texture density value, causing texture density judgment errors and multiple downsampling, which causes texture file distortion.
[0038] Furthermore, after converting the format of the texture file containing the non-text information after the downsampling, the method further includes:
[0039] Acquire corresponding spatial geometric data according to the texture graphic and the original model;
[0040] Performing spatial division on the texture graphic and the original model, and allocating spatial nodes according to the spatial geometric data;
[0041] The spatial nodes are processed and corresponding data sets are generated.
[0042] As can be seen from the above description, an accurate data set is generated by obtaining the spatial geometric data corresponding to the texture graphics and the original model, and performing processing such as space division and allocation of spatial nodes.
[0043] Furthermore, processing the spatial nodes and generating corresponding data sets includes:
[0044] Loading model data according to metadata and simplifying the original model;
[0045] The simplified original model is merged with the text information in the texture graphic to generate a corresponding data set.
[0046] By simplifying the original model of non-text data and merging the simplified original model with the texture containing text data, the non-text texture is simplified while the texture containing text information is retained, thereby ensuring the clarity of the final imaging and compressing the data set.
[0047] Furthermore, the step of merging the simplified original model with the text information in the texture graphic to generate a corresponding data set includes:
[0048] Merging the simplified original model with the text information in the texture graphic to generate a 3D Tiles file;
[0049] Generate a corresponding dataset based on the 3D Tiles file.
[0050] As can be seen from the above description, by generating a 3D Tiles file from the merged file, the corresponding texture file can present a better 3D effect.
[0051] Furthermore, the identifying non-text information in the texture graphic includes:
[0052] Non-text information in the texture graphic is filtered out through OCR text recognition.
[0053] From the above description, it can be seen that OCR text recognition can quickly and accurately filter out textures containing text information, thereby retaining texture data containing text information.
[0054] Furthermore, converting the format of the texture file containing the non-text information after the downsampling includes:
[0055] Convert the texture file into DDS format.
[0056] As can be seen from the above description, by converting the texture file into a DDS format file, the data volume of the texture file is further compressed.
[0057] Furthermore, downsampling the non-text information at a preset texture density according to the original model includes:
[0058] The non-text information is down-sampled by reducing the preset texture density by 1 / 4.
[0059] From the above description, it can be seen that by downsampling the non-text information with a preset texture density of 1 / 4, texture distortion caused by excessive compression is avoided while ensuring that the number of compressed textures is significantly reduced.
[0060] Please refer to Figure 2 Another embodiment of the present invention provides a three-dimensional texture processing terminal for electric GIS, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step in the above-mentioned three-dimensional texture processing method for electric GIS is implemented.
[0061] The above-mentioned power GIS 3D texture processing method and terminal device of the present invention can be applied to the realization of online 3D presentation of power grid GIS. The following is an explanation through specific implementation methods:
[0062] Example 1
[0063] Please refer to Figure 1 and Figure 3 , a three-dimensional texture processing method for electric power GIS, comprising the steps of:
[0064] S1, obtaining a texture graphic in a texture file and an original model corresponding to the texture graphic;
[0065] S2, identifying non-text information in the texture graphic;
[0066] Filtering non-text information in the texture pattern through OCR text recognition; for example, using a Tesseract OCR tool to determine whether the non-text information in the texture pattern contains text; distinguishing textures containing text information from textures not containing text information; calculating texture density for textures not containing text information, while skipping the corresponding processing steps for textures containing text information;
[0067] S3, downsampling the non-text information according to the original model with a preset texture density;
[0068] Downsampling the non-text information by reducing the preset texture density by 1 / 4;
[0069] The following steps are included between step S2 and step S3:
[0070] S301, calculating texture density: parsing the original model and the texture graphics to obtain parsed data, the parsed data including model parsed data and graphics parsed data; performing texture density processing according to the parsed data to obtain corresponding texture density; simultaneously, performing coordinate conversion and model data preprocessing on the model parsed data and the texture parsed data; when parsing the original model and the texture graphics, traversing the texture coordinates of the texture graphics in the triangles of the original model to obtain texture area, wherein the size of the texture area is 0-1; parsing the original model to obtain the corresponding total number of texture pixels; parsing the original model to obtain the corresponding model surface area; calculating the number of texture effective pixels based on the total number of texture pixels and the texture area; and calculating the texture density based on the surface area of the original model and the number of texture effective pixels.
[0071] Assume that the texture area is UVArea, the total number of texture pixels is TotalPixels, the model surface area is S, the number of effective texture pixels is AavailPixels, and the texture density is PixelDentist;
[0072] Then AavailPixels=UVArea*TotalPixels;
[0073] PixelDentist=AavailPixels / S;
[0074] S302, determining whether the texture density is less than a preset texture density index; if not, executing step S3 and returning to step S301; if yes, executing step S4;
[0075] S4. Convert the format of the texture file containing the non-text information after the downsampling; convert the texture file into DDS format; that is, merge the downsampled texture containing no text information with the unprocessed texture containing text information, and convert them into DDS format.
[0076] Example 2
[0077] This embodiment differs from the first embodiment in that the specific texture processing method is limited:
[0078] Please refer to Figure 4 , before step S4, the steps include:
[0079] S401: Acquire corresponding spatial geometric data based on the texture graphic and the original model, the spatial geometric data including triangular faces and polygonal faces; spatially partition the texture graphic and the original model, and assign spatial nodes based on the spatial geometric data; spatially partition the original model using a spatial quadtree, wherein the spatial nodes are combinations of the model and texture to be processed within the partitioned spatial regions, and corresponding processing logic is attached to the spatial nodes;
[0080] S402, processing the spatial node; storing the spatial node in a tree structure, and then traversing from the root node, continuously recursively to the child nodes, and preprocessing the texture and model simultaneously during the recursive process;
[0081] S403, loading model data according to metadata; the metadata is latitude, longitude and altitude data corresponding to the texture and model;
[0082] S404, simplifying the original model; performing model thinning on the original model and reducing the number of polygons in the model;
[0083] S405, merging the simplified original model with the text information in the texture graphic;
[0084] S406, generating a 3D Tiles file;
[0085] S407, generating a corresponding data set according to the 3D Tiles file;
[0086] Application Scenario 1: Backend Production of Online Data from Substation A:
[0087] Without setting the corresponding texture density index and without using text OCR recognition, the data size generated in the original state is 3.98GB. However, when the texture density is set to 10,000 pixels / square meter and text OCR recognition is enabled to ensure the clarity of texture text information, the final data size is 2.81GB, which is 29% smaller than the original data size.
[0088] Application scenario 2: Backend production of online data from the B-site substation:
[0089] Without setting the texture density index, the final data size is 484MB; after setting the texture density index to 10,000 pixels / square meter, the final data size is 226MB, which is 53% smaller than the original data size.
[0090] Example 3
[0091] Please refer to Figure 2 , a three-dimensional texture processing terminal for electric power GIS, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, each step in a three-dimensional texture processing method for electric power GIS as described in Example 1 or Example 2 is implemented.
[0092] In summary, the present invention provides a three-dimensional texture processing method and terminal for electric power GIS, which obtains texture graphics and the original model corresponding to the texture graphics in the texture file, filters out textures containing text through OCR text recognition, processes only textures that do not contain text information, and then merges the corresponding textures and converts them into DDS format, thereby greatly reducing the size of the final data set, alleviating the pressure of network transmission, and providing consistent texture quality effects; at the same time, through the target texture density size set by the user, it can meet the data set size in different browsing scenarios, and ultimately provide an acceptable data set size for 3D data presentation on mobile platforms; although the size of the final data set increases after filtering out textures containing text through OCR text recognition, the logo patterns and road signs containing text in the final 3D presented texture are clearly visible; thereby, on the basis of achieving data compression, it can ensure that the texture of the text information is clear and visible, while improving performance utilization without affecting the normal use of the GIS system.
[0093] 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 transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A three-dimensional texture processing method for electric power GIS, characterized in that: Including steps: Obtaining a texture graphic in a texture file and an original model corresponding to the texture graphic; identifying non-text information in the texture graphic; Downsampling the non-text information at a preset texture density according to the original model; Converting the format of the texture file containing the non-text information after the downsampling; Before downsampling the non-text information according to the original model with a preset texture density, the method includes the following steps: parsing the original model and the texture graph to obtain parsed data; Performing texture density processing according to the analytical data to obtain corresponding texture density; Determining whether the texture density is less than a preset texture density index, and if not, downsampling the non-text information, and returning to the step of parsing the original model and the texture graphic to obtain parsed data; If so, the step of converting the format of the texture file containing the non-text information after the downsampling is performed.
2. A three-dimensional texture processing method for electric GIS according to claim 1, characterized in that: The parsing of the original model and the texture graph to obtain parsed data includes: Traversing the texture coordinates of the texture graphics in the original model to obtain the texture area; Analyze the original model to obtain the corresponding total number of texture pixels; Analyzing the original model to obtain a corresponding model surface area; The performing texture density processing according to the parsed data to obtain the corresponding texture density includes: Calculating the effective number of texture pixels according to the total number of texture pixels and the texture area; The texture density is calculated based on the surface area of the original model and the number of effective pixels of the texture.
3. The method for processing three-dimensional texture of electric GIS according to claim 1, characterized in that: Before converting the format of the texture file containing the non-text information after the downsampling, the method further includes: Acquire corresponding spatial geometric data according to the texture graphic and the original model; Performing spatial division on the texture graphic and the original model, and allocating spatial nodes according to the spatial geometric data; The spatial nodes are processed and corresponding data sets are generated.
4. The method for processing three-dimensional texture of electric GIS according to claim 3, characterized in that: The processing of the spatial nodes and generating corresponding data sets includes: Loading model data according to metadata and simplifying the original model; The simplified original model is merged with the text information in the texture graphic to generate a corresponding data set.
5. The method for processing three-dimensional texture of electric GIS according to claim 4, characterized in that: The merging of the simplified original model with the text information in the texture graphic to generate a corresponding data set includes: Merging the simplified original model with the text information in the texture graphic to generate a 3D Tiles file; Generate a corresponding dataset based on the 3D Tiles file.
6. The method for processing three-dimensional texture of electric GIS according to claim 1, characterized in that: The identifying of non-text information in the texture graphic comprises: Non-text information in the texture graphic is filtered out through OCR text recognition.
7. The method for processing three-dimensional texture of electric power GIS according to claim 1, characterized in that: The format conversion of the texture file containing the non-text information after the downsampling comprises: Convert the texture file into DDS format.
8. The method for processing three-dimensional texture of electric power GIS according to claim 1, characterized in that: The downsampling of the non-text information at a preset texture density according to the original model includes: The non-text information is down-sampled by reducing the preset texture density by 1 / 4.
9. A three-dimensional texture processing terminal for electric power GIS, 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 computer program, the processor implements the various steps of the three-dimensional texture processing method for electric GIS as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Demonstration document realization method based on three-dimensional information in three-dimensional scene
CN101178817A
Integrated data display and simulation platform
CN111986306A