Layer indexing method, device and electronic equipment for real three-dimensional image
Patent Information
- Application Number
- CN202310861205.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-07-13
AI Technical Summary
[0003]目前,空间索引方法一般包括网格索引,网格索引的网格和对象之间为多对多关系,在空间对象数量多,大小不均时容易造成索引数据冗余,网格的大小难以确定,网格划分的越密,需要的存储空间越多,并且网格数据分布不均匀,导致网格索引时间较长,效率低
[0061] This application provides a method, apparatus, electronic device, and storage medium for layer indexing of real-scene 3D images. It analyzes the acquired 3D image to obtain a two-dimensional matrix of each layer; creates a corresponding layer index for each layer of the 3D image; determines the hierarchical relationship of nodes in each layer based on the geographic coordinates of each layer; determines the level of each pixel in each layer based on the original pixel data and preset pixel data, and scales the original pixel data according to the scaling parameters corresponding to the level, obtaining the target pixel data corresponding to the original pixel data; and outputs the target image requested by the query request based on the layer index, the hierarchical relationship of nodes, the target pixel data corresponding to the original pixel data, and the user-input query request. By establishing the hierarchical relationship of each layer and scaling the pixel data of each layer according to the level, the 3D image data can be displayed in layers, avoiding the problems of slow operation and low indexing efficiency caused by excessively large data volumes. It achieves unified management of each layer and the images within each layer through hierarchical indexing, realizing the purpose of fast indexing.
Smart Images

Figure CN116821385B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of layer indexing, and more specifically, to a method, apparatus, electronic device, and storage medium for layer indexing of real-world 3D images. Background Technology
[0002] Layer indexing is a technology based on digital image processing. In 3D image display, layer indexing can be used to quickly locate the layers that need to be displayed. The commonly used layer indexing mechanism is the spatial indexing method, which is a method of arranging objects in a certain order based on their relative positions and shapes or spatial relationships.
[0003] Currently, spatial indexing methods generally include grid indexing. In grid indexing, there is a many-to-many relationship between grids and objects. When there are many spatial objects of varying sizes, it is easy to cause redundancy in index data. The size of the grid is difficult to determine. The denser the grid is divided, the more storage space is required. Furthermore, the uneven distribution of grid data leads to long grid indexing time and low efficiency. Summary of the Invention
[0004] The purpose of this application is to address the shortcomings of the prior art by providing a layer indexing method, apparatus, electronic device, and storage medium for real-scene 3D images, thereby improving indexing efficiency.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, embodiments of this application provide a layer indexing method for real-scene 3D images, the method comprising:
[0007] The acquired 3D image is analyzed to obtain a 2D matrix of each layer. The 2D matrix records the geographic coordinates of each layer and the original pixel data of each pixel in each layer.
[0008] Create corresponding layer indexes for each layer of the 3D image;
[0009] Based on the geographic coordinates of each layer, the hierarchical relationship between nodes in each layer is determined, and the hierarchical relationship between nodes is used to indicate the hierarchical relationship between geographic coordinates in each layer.
[0010] Based on the original pixel data of each layer and the preset pixel data of each level, the level of each pixel in each layer is determined, and the original pixel data is scaled according to the pixel data scaling parameters corresponding to the level to obtain the target pixel data corresponding to the original pixel data; based on the layer index, the relationship between the upper and lower level nodes, the target pixel data corresponding to the original pixel data, and the query request input by the user, the target image requested by the query request is output.
[0011] Optionally, based on the geographic coordinates of each layer, the hierarchical relationships between nodes in each layer are determined, including:
[0012] Each geographic coordinate point of each layer is used as a geographic coordinate point in the lower-level node, and the geographic coordinate points of each layer in the lower-level node are proportionally reduced to generate the upper-level node of the lower-level node.
[0013] The extreme points of the geographic coordinates of each layer in the lower-level node are added to the geographic coordinates of each layer in the upper-level node, and the hierarchical relationship between the upper-level node and the lower-level node is established to obtain the hierarchical relationship between the nodes.
[0014] Optionally, based on the original pixel data of each layer and the preset pixel data of each level, the level of each pixel in each layer is determined, including:
[0015] If the original pixel data of the first pixel matches the pixel data of the preset first level, then the level where the first pixel is located is determined to be the first level.
[0016] Optionally, the acquired 3D image is parsed to obtain a 2D matrix of each layer, including:
[0017] Read the number of pixels in each layer, the geographic coordinates of each pixel, and the original pixel data of each pixel from the three-dimensional image;
[0018] Construct a two-dimensional matrix for each layer based on the number of pixels in each layer.
[0019] Optionally, create corresponding layer indexes for each layer of the 3D image, including:
[0020] Obtain the total number of layers in the 3D image;
[0021] The corresponding layer index is assigned to each layer based on the total number of layers in the 3D image.
[0022] Optionally, before acquiring the three-dimensional image, the method further includes:
[0023] Acquire initial 3D image information and load the initial 3D image information into the work area;
[0024] Obtain the range of the target area delineated by the user in the initial 3D image;
[0025] Create a new layer for the initial 3D image of the target area;
[0026] Calculate all pixels in each layer of the initial 3D image of the target region;
[0027] The calculated pixels of each layer are copied to the new layer to obtain the 3D image.
[0028] Optionally, calculate all pixels in each layer of the initial 3D image of the target region, including:
[0029] Based on the initial three-dimensional image of the target area, the coordinates of the vertices of the target area are obtained;
[0030] Based on the coordinates of the vertices within the target area and the pixel ratio of each layer, calculate all pixels of each layer within the target area.
[0031] Copy all pixels of each layer within the target area to the new layer.
[0032] Secondly, embodiments of this application also provide a layer indexing device for real-scene three-dimensional images, the device comprising:
[0033] The parsing module is used to parse the acquired 3D image to obtain a 2D matrix of each layer. The 2D matrix records the geographic coordinates of each layer and the original pixel data of each pixel in each layer.
[0034] A creation module is used to create corresponding layer indexes for each layer of the 3D image;
[0035] The determination module is used to determine the hierarchical relationship between nodes in each layer based on the geographic coordinates of each layer. The hierarchical relationship between nodes is used to indicate the hierarchical relationship between geographic coordinates in each layer.
[0036] The determination module is used to determine the layer where each pixel in each layer is located based on the original pixel data of each layer and the preset pixel data of each layer, and to scale the original pixel data according to the pixel data scaling parameters corresponding to the layer to obtain the target pixel data corresponding to the original pixel data; and to output the target image requested by the query request based on the layer index, the hierarchical node relationship, the target pixel data corresponding to the original pixel data and the query request input by the user.
[0037] Optionally, the determining module is specifically used for:
[0038] Each geographic coordinate point of each layer is used as a geographic coordinate point in the lower-level node, and the geographic coordinate points of each layer in the lower-level node are proportionally reduced to generate the upper-level node of the lower-level node.
[0039] The extreme points of the geographic coordinates of each layer in the lower-level node are added to the geographic coordinates of each layer in the upper-level node, and the hierarchical relationship between the upper-level node and the lower-level node is established to obtain the hierarchical relationship between the nodes.
[0040] Optionally, the determining module is specifically used for:
[0041] If the original pixel data of the first pixel matches the pixel data of the preset first level, then the level where the first pixel is located is determined to be the first level.
[0042] Optionally, the parsing module is specifically used for:
[0043] Read the number of pixels in each layer, the geographic coordinates of each pixel, and the original pixel data of each pixel from the three-dimensional image;
[0044] Construct a two-dimensional matrix for each layer based on the number of pixels in each layer.
[0045] Optionally, the creation module is specifically used for:
[0046] Obtain the total number of layers in the 3D image;
[0047] The corresponding layer index is assigned to each layer based on the total number of layers in the 3D image.
[0048] Optionally, the parsing module is specifically used for:
[0049] Acquire initial 3D image information and load the initial 3D image information into the work area;
[0050] Obtain the range of the target area delineated by the user in the initial 3D image;
[0051] Create a new layer for the initial 3D image of the target area;
[0052] Calculate all pixels in each layer of the initial 3D image of the target region;
[0053] The calculated pixels of each layer are copied to the new layer to obtain the 3D image.
[0054] Optionally, the parsing module is further specifically used for:
[0055] Based on the initial three-dimensional image of the target area, the coordinates of the vertices of the target area are obtained;
[0056] Based on the coordinates of the vertices within the target area and the pixel ratio of each layer, calculate all pixels of each layer within the target area.
[0057] Copy all pixels of each layer within the target area to the new layer.
[0058] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the application runs, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the layer indexing method for real-world three-dimensional images described in the first aspect.
[0059] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is read and executes the steps of the layer indexing method for real-world three-dimensional images described in the first aspect.
[0060] The beneficial effects of this application are:
[0061] This application provides a method, apparatus, electronic device, and storage medium for layer indexing of real-scene 3D images. It analyzes the acquired 3D image to obtain a two-dimensional matrix of each layer; creates a corresponding layer index for each layer of the 3D image; determines the hierarchical relationship of nodes in each layer based on the geographic coordinates of each layer; determines the level of each pixel in each layer based on the original pixel data and preset pixel data, and scales the original pixel data according to the scaling parameters corresponding to the level, obtaining the target pixel data corresponding to the original pixel data; and outputs the target image requested by the query request based on the layer index, the hierarchical relationship of nodes, the target pixel data corresponding to the original pixel data, and the user-input query request. By establishing the hierarchical relationship of each layer and scaling the pixel data of each layer according to the level, the 3D image data can be displayed in layers, avoiding the problems of slow operation and low indexing efficiency caused by excessively large data volumes. It achieves unified management of each layer and the images within each layer through hierarchical indexing, realizing the purpose of fast indexing. Attached Figure Description
[0062] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 A flowchart illustrating a layer indexing method for real-scene 3D images provided in an embodiment of this application;
[0064] Figure 2 A schematic diagram of an apparatus for a layer indexing method for real-scene 3D images provided in an embodiment of this application;
[0065] Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0067] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0068] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0069] Figure 1 This is a flowchart illustrating a layer indexing method for real-scene 3D images provided in an embodiment of this application. Figure 1 As shown, the method includes:
[0070] S101. Analyze the acquired 3D image to obtain the 2D matrix of each layer.
[0071] Optionally, a 3D image can be a stereoscopic image composed of multiple stacked layers, similar to a stack of building blocks. However, when displayed, the layers do not have height and are a two-dimensional image, with each layer containing the image.
[0072] Optionally, each layer can be parsed based on the number of image blocks contained in each layer to construct a two-dimensional matrix for each layer. Specifically, if a layer contains m×n image blocks, then the two-dimensional matrix of that layer is m×n. Each two-dimensional matrix can record the geographic coordinates of each layer and the original pixel data of each pixel in each layer. The geographic coordinates can be the pixels in each layer, and each geographic coordinate can include the specific location information of each geographic coordinate in geographic coordinates; the original pixel data of each pixel is the pixel size of each pixel in the three-dimensional image.
[0073] S102. Create corresponding layer indexes for each layer of the 3D image.
[0074] Optionally, a preset method can be used to create a corresponding layer index for each layer of the 3D image. The layer index can be a numerical identifier, and each layer can be matched one-to-one with the numerical identifier of each layer. The layer can be found by using the numerical identifier of the layer.
[0075] S103. Determine the hierarchical relationships between nodes in each layer based on the geographic coordinates of each layer.
[0076] The hierarchical node relationship is used to indicate the hierarchical relationship between geographic coordinate points in the layer. A preset method can be used to process the geographic coordinate points in a layer to obtain the hierarchical nodes. The hierarchical node can include some geographic coordinate points in the layer, and the hierarchical node can include all geographic coordinate points in the layer. The relationship between geographic coordinate points in the layer can be represented by the association between the hierarchical nodes and the hierarchical nodes.
[0077] S104. Based on the original pixel data and preset pixel data of each layer, determine the layer in which each pixel point in each layer is located, and scale the original pixel data according to the pixel data scaling parameters corresponding to the layer to obtain the target pixel data corresponding to the original pixel data.
[0078] Optionally, the preset pixel data can include multiple different pixel data, each of which can correspond to a level. If there are 9 different pixel data, each of which corresponds to a level, then there are a total of 9 levels.
[0079] Optionally, the pixel data scaling parameter can be the ratio by which the pixel data is enlarged or reduced. The pixel data scaling parameter corresponding to each layer can be the same or different. The original pixel data of each layer can be scaled according to the pixel data scaling parameter corresponding to each layer to obtain the target pixel data corresponding to the original pixel data. For example, the pixel data between each layer can be enlarged proportionally from small to large or reduced proportionally from small to large. The ratio can be a fixed ratio or an arbitrary ratio.
[0080] For example, if the original pixel data of the layer is 8×8, and the pixel data magnification parameter for each level is 2, then the layer with the original pixel data of 8×8 can be taken as the first level; then the pixel data corresponding to the second level is 16×16; the pixel data corresponding to the third level is 32×32; and so on, the pixel data is magnified.
[0081] For example, if the original pixel data of the layer is 8×8, and each layer and its corresponding pixel data scaling parameters are different, then the layer with the original pixel data of 8×8 can be regarded as the first layer; if the scaling parameter of the second layer is 2, then the pixel data corresponding to the second layer is 16×16; if the scaling parameter of the third layer is 3, then the pixel data corresponding to the third layer is 24×24; if the scaling parameter of the fourth layer is 4, then the pixel data corresponding to the fourth layer is 32×32.
[0082] S105. Based on the layer index, the relationship between upper and lower level nodes, the target pixel data corresponding to the original pixel data, and the query request input by the user, output the target image requested by the query request.
[0083] Optionally, the user-input query request may include the layer to be indexed, the nodes of the target image, and the pixel data of the target image. Then, the target image requested by the query request can be output based on the user-input query request, the indexes of each layer, the relationship between the upper and lower level nodes, and the target pixel data corresponding to the original pixels.
[0084] For example, if the target image requested by the user is a mountain, the layer corresponding to the mountain is layer a, the node corresponding to the mountain is child node 1, and the number of pixels of the mountain is 16, then the target image mountain can be output according to the layer index, the relationship between the upper and lower level nodes, and the target pixel data corresponding to the original pixels.
[0085] In this embodiment, the acquired 3D image is parsed to obtain a 2D matrix of each layer; a corresponding layer index is created for each layer of the 3D image; the hierarchical relationship between nodes in each layer is determined based on the geographic coordinates of each layer; the layer level of each pixel in each layer is determined based on the original pixel data and preset pixel data, and the original pixel data is scaled according to the pixel data scaling parameters corresponding to the layer level to obtain the target pixel data corresponding to the original pixel data; based on the layer index, the hierarchical relationship between nodes, the target pixel data corresponding to the original pixel data, and the user's query request, the target image requested by the query request is output. By establishing the hierarchical relationship between each layer and scaling the pixel data of each layer according to the layer, the 3D image data can be displayed in layers, avoiding the problems of slow operation and low indexing efficiency caused by excessively large data. It can achieve unified management of each layer and the images in each layer through hierarchical indexing, realizing the purpose of fast indexing.
[0086] Optionally, determining the hierarchical relationship between nodes in each layer based on their geographic coordinates in step S103 above may include:
[0087] Each geographic coordinate point in each layer is used as a geographic coordinate point in the lower-level node. The geographic coordinate points of each layer in the lower-level node are proportionally reduced to generate the upper-level node of the lower-level node.
[0088] Optionally, a downsampling method can be used to filter the geographic coordinate points in the lower-level nodes, selecting a preset proportion of geographic coordinate points as the geographic coordinate points in the upper-level nodes. Specifically, for example, if there are 500 geographic coordinate points in the lower-level nodes, then 50% of the geographic coordinate points in the lower-level nodes, that is, 250 geographic coordinate points, can be selected as the geographic coordinate points in the upper-level nodes. Alternatively, for the 500 geographic coordinate points, one coordinate point can be selected every two coordinate points as the geographic coordinate points in the upper-level nodes.
[0089] Optionally, the parent node obtained by proportionally reducing the geographic coordinate points in each layer can also be reduced in the same way to obtain the parent node of the parent node. In this way, the geographic coordinate points in the parent node and the geographic coordinate points in the lower node have a hierarchical relationship. Through the hierarchical relationship, the geographic coordinate points displayed by each node can be different, and the geographic coordinate points in each layer can be managed in a unified manner to achieve fast data display.
[0090] Optionally, the extreme points of the geographic coordinates in each layer of the lower-level node can be added to the geographic coordinates in each layer of the upper-level node, and the hierarchical relationship between the upper-level node and the lower-level node can be established to obtain the hierarchical relationship.
[0091] Optionally, the extreme points in the geographic coordinates of each layer can be necessary geographic coordinates that can reflect the image features, such as geographic coordinates on the edge contour of an image. If these feature points are removed, the image will be distorted. Therefore, it is necessary to retain the extreme points in the geographic coordinates of each layer and add them to the parent node of the lower node to ensure the authenticity of the image and the necessary features of the image.
[0092] Optionally, the extreme points of geographic coordinates in each layer can be filtered using preset methods. For example, the bisection method can be used to calculate the extreme points of geographic coordinates in each layer, and the calculated extreme points can be added to the parent node.
[0093] Optionally, if the geographic coordinates in the lower-level nodes are reduced proportionally to generate the upper-level nodes, and there are extreme points among the filtered geographic coordinates, then the filtered extreme points are also added to the upper-level nodes.
[0094] In this embodiment, by proportionally reducing the geographic coordinate points in the lower-level nodes to generate the upper-level nodes of the lower-level nodes, and adding the extreme points of the geographic coordinate points to the upper-level nodes, a relationship between the upper and lower-level nodes is established. This allows each node to display different geographic coordinate points, enables unified management of geographic coordinate points in each layer, achieves rapid data display, and ensures the authenticity of the images in each layer.
[0095] Optionally, step S104 above, which determines the layer of each pixel in each layer based on the original pixel data and preset pixel data, and scales the original pixel data according to the pixel data scaling parameters corresponding to the layer to obtain the target pixel data corresponding to the original pixel data, may include:
[0096] Optionally, if the original pixel data of the first pixel matches the pixel data of a preset first level, then the level where the first pixel is located is determined to be the first level. The first pixel can be any pixel in any level.
[0097] Optionally, the original pixel data in each layer can be scaled according to preset pixel data to obtain pixel data of multiple levels corresponding to the original pixel data. That is, the image in the layer can be scaled at different levels. For the original image of each layer, different pixel data can be corresponding to each layer. Each level can also include the corresponding pixels that are enlarged or reduced from the original pixels.
[0098] Optionally, the step S101 above, which involves parsing the acquired 3D image to obtain a 2D matrix of each layer, may include:
[0099] Optionally, the number of pixels in each layer, the geographic coordinates of each pixel, and the original pixel data of each pixel can be read from the 3D image, and a two-dimensional matrix of each layer can be constructed based on the number of pixels in each layer.
[0100] Optionally, if a layer has m×n pixels, an m×n two-dimensional matrix can be constructed for that layer. Each two-dimensional matrix can include the geographic coordinates of each pixel and the original pixel data of each pixel.
[0101] Optionally, creating corresponding layer indices for each layer of the 3D image in step S102 above may include:
[0102] Optionally, obtain the total number of layers in the 3D image, and assign a corresponding layer index to each layer based on the total number of layers in the 3D image.
[0103] Optionally, the 3D image may include multiple layers. The total number of layers in the 3D image is obtained. Based on the total number of layers, a corresponding identifier (ID number) can be assigned to each layer. Each layer corresponds to a unique ID number. Layers can be numbered sequentially from bottom to top, in ascending order. For example, the bottommost layer can be assigned ID number 1, the layer above it can be assigned ID number 2, and so on upwards. Alternatively, layers can be numbered sequentially from top to bottom, in ascending order. For example, the topmost layer of the 3D image can be assigned ID number 1, and so on downwards.
[0104] Optionally, before acquiring the 3D image in step S101 above, the following steps are also included:
[0105] Optionally, acquire initial 3D image information and load it into the workspace.
[0106] This workspace can be the image editing area on the user's image processing software. Users can load the acquired initial 3D image into this workspace and perform corresponding editing processes. The initial 3D image can contain all the metadata of the real-world 3D image. When it is necessary to quickly display the image within a defined area of the initial 3D image, it must first be loaded into the workspace.
[0107] Optionally, the target area range defined by the user in the initial 3D image can be obtained. The image within the target area range can be a sub-region image in the initial 3D image. The user can define a certain area range in the initial 3D image within the work area, and the initial 3D image of the area range defined by the user is used as the target area range.
[0108] Optionally, a new layer can be created for the initial 3D image of the target area. A new layer can be created within the workspace, with the total number of layers equal to the total number of layers in the initial 3D image. In this case, the new layer may not contain any image.
[0109] Optionally, to calculate all pixels in each layer of the initial 3D image within the target area, a preset method can be used. Since the user can define a different area within each layer, the number of pixels within the user-defined target area will also be different for each layer. Therefore, it is necessary to calculate all pixels within the target area of each layer.
[0110] Optionally, all pixels calculated from each layer are copied to a new layer to obtain a 3D image. Since the total number of pixels in the new layer is the same as the total number of pixels in the initial 3D image, all pixels in each layer can be calculated and copied to the corresponding new layer. When all pixels within the target area in all layers have been calculated and copied to the new layers, the new layer containing the pixels within the target area is then used as the 3D image.
[0111] Optionally, all pixels of each layer of the initial 3D image of the target region mentioned above may include:
[0112] Optionally, the coordinates of the vertices of the target area are obtained based on the initial 3D image of the target area. Specifically, the boundary points of the initial 3D image in each layer can be obtained from the target area. These boundary points are then used as the vertices of the target area in each layer, and the coordinates of the vertices of the target area in each layer are obtained.
[0113] Optionally, all pixels of each layer within the target area can be calculated based on the coordinates of the vertices of the target area and the pixel ratio of each layer. Since the pixel ratios of each layer in the initial 3D image can be different, for different layer pixel ratios, all pixels of each layer within the target area can be calculated based on the vertex coordinates of the corresponding target area.
[0114] Optionally, all pixels of each calculated layer within the target area can be copied to a new layer.
[0115] Figure 2 A schematic diagram of an apparatus for a layer indexing method for real-scene 3D images provided in an embodiment of this application is shown below. Figure 2 As shown, the device includes:
[0116] The parsing module 201 is used to parse the acquired three-dimensional image to obtain a two-dimensional matrix of each layer. The two-dimensional matrix records the geographic coordinates of each layer and the original pixel data of each pixel in each layer.
[0117] A creation module 202 is used to create corresponding layer indexes for each layer of the 3D image;
[0118] The determination module 203 is used to determine the hierarchical relationship between nodes in each layer based on the geographic coordinates of each layer. The hierarchical relationship between nodes is used to indicate the hierarchical relationship between geographic coordinates in each layer.
[0119] The determining module 203 is used to determine the layer where each pixel in each layer is located based on the original pixel data of each layer and the preset pixel data of each layer, and to scale the original pixel data according to the pixel data scaling parameters corresponding to the layer to obtain the target pixel data corresponding to the original pixel data; and to output the target image requested by the query request based on the layer index, the relationship between the upper and lower level nodes, the target pixel data corresponding to the original pixel data and the query request input by the user.
[0120] Optionally, module 203 is determined, specifically for:
[0121] Each geographic coordinate point of each layer is used as a geographic coordinate point in the lower-level node, and the geographic coordinate points of each layer in the lower-level node are proportionally reduced to generate the upper-level node of the lower-level node.
[0122] The extreme points of the geographic coordinates of each layer in the lower-level node are added to the geographic coordinates of each layer in the upper-level node, and the hierarchical relationship between the upper-level node and the lower-level node is established to obtain the hierarchical relationship between the nodes.
[0123] Optionally, module 203 is determined, specifically for:
[0124] If the original pixel data of the first pixel matches the pixel data of the preset first level, then the level where the first pixel is located is determined to be the first level.
[0125] Optional, parsing module 201, specifically used for:
[0126] Read the number of pixels in each layer, the geographic coordinates of each pixel, and the original pixel data of each pixel from the three-dimensional image;
[0127] Construct a two-dimensional matrix for each layer based on the number of pixels in each layer.
[0128] Optionally, create module 202, specifically for:
[0129] Obtain the total number of layers in the 3D image;
[0130] The corresponding layer index is assigned to each layer based on the total number of layers in the 3D image.
[0131] Optional, parsing module 201, specifically used for:
[0132] Acquire initial 3D image information and load the initial 3D image information into the work area;
[0133] Obtain the range of the target area delineated by the user in the initial 3D image;
[0134] Create a new layer for the initial 3D image of the target area;
[0135] Calculate all pixels in each layer of the initial 3D image of the target region;
[0136] The calculated pixels of each layer are copied to the new layer to obtain the 3D image.
[0137] Optionally, parsing module 201 is also specifically used for:
[0138] Based on the initial three-dimensional image of the target area, the coordinates of the vertices of the target area are obtained;
[0139] Based on the coordinates of the vertices within the target area and the pixel ratio of each layer, calculate all pixels of each layer within the target area.
[0140] Copy all pixels of each layer within the target area to the new layer.
[0141] Figure 3 This is a structural block diagram of an electronic device 300 provided in an embodiment of this application. The electronic device may include: a processor 301 and a memory 302.
[0142] Optionally, a bus 303 may also be included, wherein the memory 302 is used to store machine-readable instructions executable by the processor 301. When the electronic device 300 is running, the processor 301 and the memory 302 communicate via the bus 303. When the machine-readable instructions are executed by the processor 301, the method steps in the above method embodiments are performed.
[0143] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method steps described in the above-described embodiment of the layer indexing method for real-world 3D images.
[0144] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0145] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0146] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A layer indexing method for real-scene 3D images, characterized in that, The method includes: The acquired 3D image is analyzed to obtain a 2D matrix of each layer. The 2D matrix records the geographic coordinates of each layer and the original pixel data of each pixel in each layer. Create corresponding layer indexes for each layer of the 3D image; Based on the geographic coordinates of each layer, the hierarchical relationship between nodes in each layer is determined, and the hierarchical relationship between nodes is used to indicate the hierarchical relationship between geographic coordinates in each layer. Based on the original pixel data of each layer and the preset pixel data of each level, the level of each pixel in each layer is determined, and the original pixel data is scaled according to the pixel data scaling parameters corresponding to the level to obtain the target pixel data corresponding to the original pixel data; based on the layer index, the relationship between the upper and lower level nodes, the target pixel data corresponding to the original pixel data and the query request input by the user, the target image requested by the query request is output. Determining the hierarchical relationships between nodes in each layer based on their geographic coordinates includes: Each geographic coordinate point of each layer is used as a geographic coordinate point in the lower-level node, and the geographic coordinate points of each layer in the lower-level node are proportionally reduced to generate the upper-level node of the lower-level node. The extreme points of the geographic coordinates of each layer in the lower-level node are added to the geographic coordinates of each layer in the upper-level node, and the hierarchical relationship between the upper-level node and the lower-level node is established to obtain the hierarchical relationship between the nodes.
2. The layer indexing method for real-scene 3D images according to claim 1, characterized in that, Based on the original pixel data of each layer and the preset pixel data of each level, the level of each pixel in each layer is determined, including: If the original pixel data of the first pixel matches the pixel data of the preset first level, then the level where the first pixel is located is determined to be the first level.
3. The layer indexing method for real-scene 3D images according to claim 1, characterized in that, The acquired 3D image is analyzed to obtain a 2D matrix of each layer, including: Read the number of pixels in each layer, the geographic coordinates of each pixel, and the original pixel data of each pixel from the three-dimensional image; Construct a two-dimensional matrix for each layer based on the number of pixels in each layer.
4. The layer indexing method for real-scene 3D images according to claim 1, characterized in that, Create corresponding layer indexes for each layer of the 3D image, including: Obtain the total number of layers in the 3D image; The corresponding layer index is assigned to each layer based on the total number of layers in the 3D image.
5. The layer indexing method for real-scene 3D images according to claim 1, characterized in that, Before acquiring 3D images, the following steps are also required: Acquire initial 3D image information and load the initial 3D image information into the work area; Obtain the range of the target area delineated by the user in the initial 3D image; Create a new layer for the initial 3D image of the target area; Calculate all pixels in each layer of the initial 3D image of the target region; The calculated pixels of each layer are copied to the new layer to obtain the 3D image.
6. The layer indexing method for real-scene 3D images according to claim 5, characterized in that, Calculate all pixels in each layer of the initial 3D image of the target region, including: Based on the initial three-dimensional image of the target area, the coordinates of the vertices of the target area are obtained; Based on the coordinates of the vertices within the target area and the pixel ratio of each layer, calculate all pixels of each layer within the target area. Copy all pixels of each layer within the target area to the new layer.
7. A layer indexing device for real-scene three-dimensional images, characterized in that, include: The parsing module is used to parse the acquired 3D image to obtain a 2D matrix of each layer. The 2D matrix records the geographic coordinates of each layer and the original pixel data of each pixel in each layer. A creation module is used to create corresponding layer indexes for each layer of the 3D image; The determination module is used to determine the hierarchical relationship between nodes in each layer based on the geographic coordinates of each layer. The hierarchical relationship between nodes is used to indicate the hierarchical relationship between geographic coordinates in each layer. The determination module is used to determine the layer where each pixel in each layer is located based on the original pixel data of each layer and the preset pixel data of each layer, and to scale the original pixel data according to the pixel data scaling parameters corresponding to the layer to obtain the target pixel data corresponding to the original pixel data. Based on the layer index, the hierarchical node relationship, the target pixel data corresponding to the original pixel data, and the query request input by the user, the target image requested by the query request is output. The determining module is specifically used for: Each geographic coordinate point of each layer is used as a geographic coordinate point in the lower-level node, and the geographic coordinate points of each layer in the lower-level node are proportionally reduced to generate the upper-level node of the lower-level node. The extreme points of the geographic coordinates of each layer in the lower-level node are added to the geographic coordinates of each layer in the upper-level node, and the hierarchical relationship between the upper-level node and the lower-level node is established to obtain the hierarchical relationship between the nodes.
8. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor executes the computer program to implement the steps of the layer indexing method for real-scene three-dimensional images as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the layer indexing method for real-world 3D images as described in any one of claims 1-6.
Citation Information
Patent Citations
Remote sensing image data processing method and system and storage medium
CN112966134A