A grid block matching method, device, electronic device and storage medium
In tilt photography image processing, using the balanced interface to divide the grid chunking set and establish a spatial binary tree, the problem of high time complexity of the adjacent grid chunking matching algorithm is solved, and the matching efficiency and reconstruction speed are improved.
Patent Information
- Application Number
- CN202210181976.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-26
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-02-26
AI Technical Summary
In the prior art, the matching algorithm for adjacent grid chunking has high time complexity, resulting in inefficient tilt photography image reconstruction process.
By dividing the grid chunking set under the spatial rectangular coordinate system, the balanced interface is determined, and it is divided into two subsets. When each subset contains only one element, it is determined to be adjacent grid chunking, and a spatial binary tree is established for quick matching.
The matching efficiency of adjacent grid chunking is improved and the reconstruction speed of tilted photography images is improved.
Smart Images

Figure CN114549786B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of oblique photography image processing, and in particular, to a grid block matching method, apparatus, electronic device, and storage medium. Background Art
[0002] With the increasing development of technology, the large-scale oblique photography technology has become increasingly mature. This technology makes up for the defect that the ordinary aerial photography technology cannot obtain the side texture information of ground objects, and can efficiently and quickly obtain the three-dimensional models of large-area objects. Therefore, its application is becoming more and more common. In large-scale oblique photography, the grid model of the scene is usually independently constructed in blocks, that is, it is composed of multiple grid blocks. In the process of reconstructing large-scale oblique photography images, it is necessary to match adjacent grid blocks and perform pairwise fusion on adjacent grid blocks in sequence, so as to integrate the above-mentioned multiple grid blocks into a whole grid. In the related art, the matching algorithm for adjacent grid blocks is complex and time-consuming. At present, for the problem of high time complexity of the matching algorithm for adjacent grid blocks in the related art, no effective solution has been proposed. Summary of the Invention
[0003] Embodiments of the present application provide a grid block matching method, apparatus, electronic device, and storage medium, so as to at least solve the problem of high time complexity of the matching algorithm for adjacent grid blocks in the related art.
[0004] In a first aspect, embodiments of the present application provide a grid block matching method.
[0005] In some embodiments, the method includes:
[0006] Obtain a grid block set, and determine a corresponding balanced interface according to the grid block set;
[0007] Divide the grid block set into a first grid block subset and a second grid block subset according to the balanced interface;
[0008] In the case where the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1, determine that the element in the first grid block subset and the element in the second grid block subset are adjacent grid blocks.
[0009] In some embodiments, the determining a corresponding balanced interface according to the grid block set includes:
[0010] According to the grid block set, respectively determine the grid interfaces in the X-axis, Y-axis, and Z-axis directions in a spatial rectangular coordinate system;
[0011] Determine a corresponding balanced interface according to the grid interfaces.
[0012] In some of these embodiments, determining the corresponding balance interface according to the grid interface includes:
[0013] Successively according to each of the grid interfaces, dividing the grid block set into corresponding third grid block subsets and fourth grid block subsets;
[0014] Respectively calculating the cardinality difference between the corresponding third grid block subset and the fourth grid block subset, and determining the grid interface corresponding to the smallest cardinality difference as the balance interface.
[0015] In some of these embodiments, determining the grid interfaces in the X-axis, Y-axis, and Z-axis directions respectively according to the grid block set in a spatial rectangular coordinate system includes:
[0016] Determining image segmentation slots according to the grid block set, and traversing adjacent first image segmentation slots and second image segmentation slots in the X-axis, Y-axis, and Z-axis directions respectively;
[0017] When there is an overlapping interval between the first image segmentation slot and the second image segmentation slot, merging the first image segmentation slot and the second image segmentation slot;
[0018] When there is no overlapping interval between the first image segmentation slot and the second image segmentation slot, determining the corresponding grid interface according to the first image segmentation slot and the second image segmentation slot.
[0019] In some of these embodiments, the method further includes:
[0020] In the case where the cardinality of the first grid block subset is greater than 1, setting the first grid block subset as the grid block set.
[0021] In some of these embodiments, the method further includes:
[0022] In the case where the cardinality of the second grid block subset is greater than 1, setting the second grid block subset as the grid block set.
[0023] In some of these embodiments, the method further includes:
[0024] According to a preset condition, determining whether the grid boundary corresponding to each grid block in the grid block set is regular, and when the grid boundary is irregular, deleting the corresponding grid block from the grid block set.
[0025] In a second aspect, an embodiment of the present application provides a grid block matching device.
[0026] In some of these embodiments, the device includes a balance interface determination module, a grid block subset division module, and an adjacent grid block matching module:
[0027] The balance interface determination module is configured to obtain a set of grid blocks and determine a corresponding balance interface according to the set of grid blocks;
[0028] The grid block subset division module is configured to divide the set of grid blocks into a first grid block subset and a second grid block subset according to the balance interface;
[0029] The adjacent grid block matching module is configured to determine that an element in the first grid block subset and an element in the second grid block subset are adjacent grid blocks when the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the grid block matching method described in the first aspect above is implemented.
[0031] In a fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored. When the program is executed by a processor, the grid block matching method described in the first aspect above is implemented.
[0032] Compared with the related art, a grid block matching method, device, electronic device, and storage medium provided by the embodiments of the present application establish a spatial binary tree by dividing a set of grid images, and quickly judge and match adjacent grid blocks based on the spatial binary tree, solving the problem of high time complexity of the matching algorithm for adjacent grid blocks in the related art, improving the matching efficiency of adjacent grid blocks, and thus improving the reconstruction speed of oblique photography images.
[0033] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0035] Figure 1 is a hardware structure block diagram of a terminal for the grid block matching method according to an embodiment of the present application;
[0036] Figure 2It is a flowchart of a grid block matching method according to an embodiment of the present application;
[0037] Figure 3 It is a structural block diagram of a grid block matching device according to an embodiment of the present application. Detailed implementation manners
[0038] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be described and explained below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without making creative efforts belong to the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes made based on the technical content disclosed in the present application are only conventional technical means and should not be understood as insufficient disclosure of the content of the present application.
[0039] Referring to "embodiment" in the present application means that the specific features, structures or characteristics described in combination with the embodiment may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0040] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those of ordinary skill in the technical field to which this application pertains. The words such as "a", "an", "one kind", "the" and the like involved in this application do not indicate a limitation in quantity and may represent a singular or plural number. The terms "include", "comprise", "have" and any variations thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may further include steps or units not listed, or may further include other steps or units inherent to these processes, methods, products or devices. The words such as "connect", "be connected", "couple" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means greater than or equal to two. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order of the objects.
[0041] The method embodiment provided in this embodiment can be executed on a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 1 is a hardware structure block diagram of the terminal of the grid block matching method according to the embodiment of the present invention. As Figure 1 shown, the terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above terminal. For example, the terminal may further include more or fewer components than those shown in Figure 1 the figure, or may have a different configuration from that shown in Figure 1 the figure.
[0042] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the grid block matching method in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include memories remotely disposed relative to the processor 102, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.
[0043] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] This embodiment provides a grid block matching method. Figure 2 It is a flowchart of the grid block matching method according to the embodiments of the present application, as Figure 2 shown, and this process includes the following steps:
[0045] Step S201, obtain a grid block set, and determine a corresponding balanced interface according to the grid block set.
[0046] In the oblique photography technology, a plurality of grid blocks can be obtained by a photography device (such as a drone, etc.) through shooting from multiple angles, and a grid block set can be constructed based on the above-mentioned plurality of grid blocks. Further, a corresponding balanced interface is determined through the grid block set, where the balanced interface refers to an interface that can divide the above-mentioned plurality of grid block sets into two most balanced subsets in space.
[0047] Step S202, divide the grid block set into a first grid block subset and a second grid block subset according to the balanced interface.
[0048] Further, after determining the balance interface in the embodiment of the present application, the grid block set is divided into two parts in space by the balance interface, namely the first grid block subset and the second grid block subset. The union of the first grid block subset and the second grid block subset is the grid block set.
[0049] Step S203, when the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1, determine that the element in the first grid block subset and the element in the second grid block subset are adjacent grid blocks.
[0050] In the embodiment of the present application, when the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1, it indicates that both the first grid block subset and the second grid block subset only include one element (i.e., one grid block) and cannot be further divided. Therefore, it is determined that the two corresponding grid blocks in the above two subsets are adjacent grid blocks.
[0051] Through the above steps, the present application divides the grid block set into two subset partitions according to the balance interface, and when each subset only includes one element, matches the adjacent grid blocks, solving the problem of high time complexity of the adjacent grid block matching algorithm in the related art, improving the matching efficiency of adjacent grid blocks, and thus improving the reconstruction speed of the oblique photography image.
[0052] In some of the embodiments, step S201 further includes:
[0053] Step S2011, respectively determine the grid interfaces in the X-axis, Y-axis, and Z-axis directions in the space rectangular coordinate system according to the grid block set.
[0054] Step S2012, determine the corresponding balance interface according to the grid interface.
[0055] In the embodiment of the present application, there are multiple grid interfaces corresponding to the multiple grid blocks. All the grid interfaces are respectively extracted in the X-axis, Y-axis, and Z-axis directions. Among all the grid interfaces, the interface that makes the first grid block subset and the second grid block subset the most balanced is selected as the balance interface.
[0056] In some of the embodiments, step S2012 further includes:
[0057] Step S20121, successively divide the grid block set into the corresponding third grid block subset and fourth grid block subset according to each grid interface.
[0058] In an embodiment of the present application, after extracting all grid interfaces, each grid interface is selected in turn, and the grid block set is divided according to the currently selected grid interface to obtain a third grid block subset and a fourth grid block subset corresponding to the currently selected grid interface.
[0059] Step S20122: Calculate the cardinality differences between the corresponding third grid block subset and the fourth grid block subset respectively, and determine the grid interface corresponding to the smallest cardinality difference as the balanced interface.
[0060] Continuing from step S20121, the cardinality differences between the corresponding third grid block subset and the fourth grid block subset are respectively calculated, and the obtained cardinality differences are further matched one-to-one with the grid interfaces. When the cardinality difference is the smallest, it is considered that the third grid block subset and the fourth grid block subset divided under the corresponding grid interface are the most balanced, and therefore the grid interface corresponding to the smallest cardinality difference is determined to be the balanced interface.
[0061] In some embodiments, step S2011 further includes:
[0062] Step S20111, determining an image segmentation slot according to the grid block set, and traversing adjacent first image segmentation slots and second image segmentation slots in the X-axis, Y-axis, and Z-axis directions respectively;
[0063] Step S20112: when there is an overlapping section between the first image segmentation slot and the second image segmentation slot, merge the first image segmentation slot and the second image segmentation slot;
[0064] Step S20113: When there is no overlapping section between the first image segmentation slot and the second image segmentation slot, a corresponding grid interface is determined according to the first image segmentation slot and the second image segmentation slot.
[0065] In some embodiments, the grid block matching method further includes:
[0066] Step S204: When the cardinality of the first grid block subset is greater than 1, the first grid block subset is set as a grid block set.
[0067] In an embodiment of the present application, when the cardinality of the first grid block subset is greater than 1, it indicates that the first grid block subset contains multiple grid blocks, and the first grid block subset is set as a grid block set, thereby further dividing the first grid block subset.
[0068] In some embodiments, the grid block matching method further includes:
[0069] Step S205, when the cardinality of the second grid block subset is greater than 1, set the second grid block subset as the grid block set.
[0070] Similar to step S204, this step further divides the second grid block subset. It is worth mentioning that in some embodiments of the present application, through continuous division of the subset, a spatial binary tree is finally formed where the leaf node elements are all single grid blocks, and the elements of two leaf nodes of the same parent node, that is, the matching adjacent grid blocks.
[0071] In some of these embodiments, the grid block matching method further includes:
[0072] Step S206, according to a preset condition, determine whether the grid boundary corresponding to each grid block in the grid block set is regular. When the grid boundary is irregular, delete the corresponding grid block from the grid block set.
[0073] In the embodiments of the present application, in order to avoid the interference of grid blocks with irregular boundaries on the determination of the grid interface, these interfering grid blocks can be deleted in advance, so that the matching of adjacent grid blocks is more accurate.
[0074] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0075] This embodiment also provides a grid block matching device, which is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0076] Figure 3 is a structural block diagram of the grid block matching device according to the embodiments of the present application, as Figure 3 shown, the device includes: a balanced interface determination module 10, a grid block subset division module 20, and an adjacent grid block matching module 30.
[0077] The balanced interface determination module 10 is used to obtain a grid block set and determine the corresponding balanced interface according to the grid block set;
[0078] The grid block subset partitioning module 20 is configured to partition the grid block set into a first grid block subset and a second grid block subset according to the balance interface;
[0079] The adjacent grid block matching module 30 is configured to determine that the element in the first grid block subset and the element in the second grid block subset are adjacent grid blocks when the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1.
[0080] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can also be located in different processors in any combined form.
[0081] This embodiment also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0082] Optionally, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0083] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0084] Obtain a grid block set, and determine a corresponding balance interface according to the grid block set;
[0085] According to the balance interface, partition the grid block set into a first grid block subset and a second grid block subset;
[0086] When the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1, determine that the element in the first grid block subset and the element in the second grid block subset are adjacent grid blocks.
[0087] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be repeated here.
[0088] In addition, in combination with the grid block matching method in the above embodiments, an embodiment of the present application can be implemented by providing a storage medium. A computer program is stored on the storage medium; when the computer program is executed by a processor, it implements any one of the grid block matching methods in the above embodiments.
[0089] Those skilled in the art should understand that the technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.
[0090] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A grid block matching method, characterized in that, It includes the following steps: Obtain a grid block set, and determine a corresponding equilibrium interface according to the grid block set; According to the equilibrium interface, divide the grid block set into a first grid block subset and a second grid block subset; When the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1, determine that the elements in the first grid block subset and the elements in the second grid block subset are adjacent grid blocks; When the cardinality of the first grid block subset is greater than 1, set the first grid block subset as the grid block set; When the cardinality of the second grid block subset is greater than 1, set the second grid block subset as the grid block set; The determining the corresponding equilibrium interface according to the grid block set includes: According to the grid block set, respectively determine the grid interfaces in the X-axis, Y-axis, and Z-axis directions in a three-dimensional rectangular coordinate system; According to the grid interfaces, determine the corresponding equilibrium interface; The determining the corresponding equilibrium interface according to the grid interfaces includes: Successively according to each of the grid interfaces, divide the grid block set into a corresponding third grid block subset and a fourth grid block subset; Respectively calculate the cardinality difference between the corresponding third grid block subset and the fourth grid block subset, and determine that the grid interface corresponding to the smallest cardinality difference is the equilibrium interface.
2. The grid block matching method according to claim 1, characterized in that The respectively determining the grid interfaces in the X-axis, Y-axis, and Z-axis directions according to the grid block set in a three-dimensional rectangular coordinate system includes: Determine image segmentation slots according to the grid block set, and respectively traverse adjacent first image segmentation slots and second image segmentation slots in the X-axis, Y-axis, and Z-axis directions; When there is an overlapping interval between the first image segmentation slot and the second image segmentation slot, merge the first image segmentation slot and the second image segmentation slot; When there is no overlapping interval between the first image segmentation slot and the second image segmentation slot, determine the corresponding grid interface according to the first image segmentation slot and the second image segmentation slot.
3. The grid block matching method according to any one of claims 1 to 2, characterized in that, The method further includes: According to a preset condition, judge whether the grid boundary corresponding to each grid block in the grid block set is regular, and when the grid boundary is irregular, delete the corresponding grid block from the grid block set.
4. A grid block matching device, characterized in that, It includes an equilibrium interface determination module, a grid block subset division module, and an adjacent grid block matching module: The equilibrium interface determination module is used to obtain a grid block set and determine a corresponding equilibrium interface according to the grid block set; The grid block subset division module is used to divide the grid block set into a first grid block subset and a second grid block subset according to the equilibrium interface; The adjacent grid block matching module is used to determine that the elements in the first grid block subset and the elements in the second grid block subset are adjacent grid blocks when the cardinality of the first grid block subset is 1 and the cardinality of the second grid block subset is 1; When the cardinality of the first grid block subset is greater than 1, set the first grid block subset as the grid block set; When the cardinality of the second grid block subset is greater than 1, set the second grid block subset as the grid block set; The determining the corresponding balance interface according to the grid block set includes: According to the grid block set, respectively determine the grid interfaces in the X-axis, Y-axis, and Z-axis directions in the space rectangular coordinate system; According to the grid interfaces, determine the corresponding balance interface; The determining the corresponding balance interface according to the grid interfaces includes: Successively according to each of the grid interfaces, divide the grid block set into corresponding third grid block subsets and fourth grid block subsets; Respectively calculate the cardinality difference between the corresponding third grid block subset and the fourth grid block subset, and determine the grid interface corresponding to the smallest cardinality difference as the balance interface.
5. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the grid block matching method according to any one of claims 1 to 3.
6. A storage medium, characterized in that, A computer program is stored in the storage medium, wherein the computer program is configured to execute the grid block matching method according to any one of claims 1 to 3 when running.
Citation Information
Patent Citations
Method and device for creating surface treatment data
CN103415851A
Grid mapping method and device
CN109150571A