CN112785710A - Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building - Google Patents
Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building Download PDFInfo
- Publication number
- CN112785710A CN112785710A CN202110118885.5A CN202110118885A CN112785710A CN 112785710 A CN112785710 A CN 112785710A CN 202110118885 A CN202110118885 A CN 202110118885A CN 112785710 A CN112785710 A CN 112785710A
- Authority
- CN
- China
- Prior art keywords
- mask
- building
- osgb
- dimensional model
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 230000015654 memory Effects 0.000 title claims abstract description 24
- 230000011218 segmentation Effects 0.000 claims abstract description 44
- 238000000605 extraction Methods 0.000 claims abstract description 32
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 23
- 230000007797 corrosion Effects 0.000 claims abstract description 23
- 238000005260 corrosion Methods 0.000 claims abstract description 23
- 230000000877 morphologic effect Effects 0.000 claims description 16
- 230000009466 transformation Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012805 post-processing Methods 0.000 claims description 8
- 230000003628 erosive effect Effects 0.000 claims description 7
- 239000000178 monomer Substances 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000009877 rendering Methods 0.000 claims description 4
- 238000000638 solvent extraction Methods 0.000 claims description 4
- 238000012937 correction Methods 0.000 claims description 3
- 239000013598 vector Substances 0.000 abstract description 9
- 238000010586 diagram Methods 0.000 description 9
- 230000010339 dilation Effects 0.000 description 4
- 239000000284 extract Substances 0.000 description 4
- 238000002474 experimental method Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013075 data extraction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005530 etching Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/10—Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/04—Indexing scheme for image data processing or generation, in general involving 3D image data
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Computer Graphics (AREA)
- Software Systems (AREA)
- Image Generation (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a rapid unitization method, a system, a memory and equipment of an OSGB three-dimensional model building, wherein the method comprises the steps of firstly extracting DSM information and DOM information from an OSGB three-dimensional model, then utilizing OTSU to carry out automatic threshold segmentation on DSM to obtain an initial mask, using distance interpolation and thresholding again to obtain a foreground mask, carrying out phase reversal on the initial mask and carrying out corrosion reconstruction to obtain a background mask, and using a watershed algorithm to carry out building boundary extraction according to the extracted background and foreground and DOM; the technical scheme is that the extracted building boundary is simplified and squared after vectorization, the final building vector boundary is obtained, and the building simplex segmentation is completed. The invention solves the problems of more manual intervention, low data utilization efficiency and the like of the existing building singleization.
Description
Technical Field
The invention relates to the field of photogrammetry and computer graphics, in particular to a rapid unitization method, a rapid unitization system, a rapid unitization memory and rapid unitization equipment for an OSGB three-dimensional model building.
Background
The osgb (open Scene Graph binary) format is the mainstream format of outcome data of the oblique photography three-dimensional model. The OSGB format stores three-dimensional planar frames, vertex data, and corresponding texture image data. The unitization of three-dimensional buildings is particularly important in the construction of smart cities, and the single buildings can be endowed with corresponding attribute information to meet different requirements of users. How to realize the singleization of the building in oblique photogrammetry is a crucial research content, and the independent building has significance to the application of model library management, building attribute editing, three-dimensional visualization and the like.
Currently, mainstream building simplex algorithms mainly include methods for realizing singleization, ID singleization and the like based on building point clouds, but the problems of huge number of point clouds, complex network formation and the like existing when building three-dimensional modeling is carried out based on the current point clouds are solved, the processing algorithm has high requirements on the performance of equipment, ID models cannot be rendered, and the later-stage management is not facilitated. China with publication number CN111009034A specially favorable for 2020, 4 and 14 discloses a three-dimensional model singulation method, which comprises the steps of decomposing each edge of a polygonal plot for each plot, constructing external expansion parallel lines with different external expansion distances according to the actual condition of each edge, constructing an irregular buffer polygon by obtaining the intersection points of adjacent parallel lines, and constructing a buffer area by flexible buffer distances to provide a more suitable extraction range for the singulation extraction of osgb three-dimensional data. The method mainly solves the problems of three-dimensional achievement data loss or excess, and does not consider the problems of much single manual intervention and low data utilization rate.
Therefore, the invention provides a rapid building unitization method based on an OSGB three-dimensional model, which can fully utilize elevation information of three-dimensional data, automatically extract a building foreground and a non-building background according to DSM data, and obtain an accurate building vector boundary by combining a watershed algorithm.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method, a system, a memory and equipment for quickly unitizing an OSGB three-dimensional model building, and solves the problems of more manual intervention, low data utilization efficiency and the like in the existing building unitization.
According to an aspect of the present disclosure, there is provided a method for rapid unitization of an OSGB three-dimensional model building, including:
extracting DSM information and DOM information based on an OSGB three-dimensional model;
performing threshold segmentation and opening operation based on the extracted DSM information to obtain an initial mask;
the initial mask is subjected to phase reversal and corrosion denoising to obtain a background mask on one hand, and is subjected to distance transformation, OTSU binary segmentation and corrosion denoising to obtain a foreground mask on the other hand;
based on the background mask, the foreground mask and the DOM information, extracting the boundary of the building by using a watershed algorithm;
and sequentially carrying out vectorization, simplification and squaring treatment on the extracted building boundary to finish the singleization of the building.
According to the technical scheme, firstly, DSM information and DOM information are extracted from an OSGB three-dimensional model, then OTSU is used for carrying out automatic threshold segmentation on DSM to obtain an initial mask, distance interpolation and thresholding are used for obtaining a foreground mask, the initial mask is subjected to phase inversion and corrosion reconstruction to obtain a background mask, and a watershed algorithm is used for extracting the boundary of a building according to the extracted background and foreground and DOM; the technical scheme is that the extracted building boundary is simplified and squared after vectorization, the final building vector boundary is obtained, and the building simplex segmentation is completed.
As a further technical solution, the method further comprises: the method comprises the steps of partitioning a large-scene OSGB three-dimensional model, rapidly generating initial DSM and DOM information of relative elevations of blocks by adopting a partitioning OpenGL elevation rendering + RTT mode for each block, and performing relative elevation correction and data splicing by utilizing overlapped areas among the blocks to obtain final global DSM and DOM information. According to the technical scheme, rendering acceleration is performed on the basis of an OpenGL display card, DSM (digital document format) rapid extraction is performed on large-scene OSGB (open source markup language) data, and the problems of low computational efficiency and high redundant data of the conventional DSM data extraction method are solved.
Further, when a large-scene OSGB three-dimensional model is partitioned, the partition size needs to be moderate, too large results in too high memory occupation, and too small results in increased thread quantity and increased thread consumption. Experiments in the present technical solution have shown that the size of each block is about 100 × resolution is more suitable.
In the technical scheme, the DSM and the DOM of each block are extracted in a multithreading mode, and the operation capacity of the GPU and the CPU is fully utilized.
As a further technical solution, the method further comprises: in the data splicing process, because linear stretching exists between adjacent blocks, the upper left corner is selected as a datum point, and the elevations of the rest blocks are unified to a set elevation reference in a linear transformation mode.
Furthermore, in the stitching process, it is necessary to pay attention to the existence of linear stretching between adjacent blocks, generally, the upper left corner is selected as a reference point, and the elevations of the remaining blocks are unified to a unified elevation reference in a linear transformation manner. The linear transformation has the parameter calculation mode: let the data of adjacent rows or columns in two adjacent blocks of DSM be x, y, and calculate a, b using the least squares method so that y ═ ax + b is satisfied as much as possible.
As a further technical solution, the method further comprises: utilizing an OTSU threshold segmentation algorithm to perform threshold segmentation on the extracted DSM information, wherein the segmentation principle is as follows: based on the one-dimensional histogram of the image, the image is segmented according to the gray feature of the target image, and when the variance of the gray value between the target and the background reaches the maximum, the threshold is the optimal segmentation threshold, and at the moment, the difference between the target and the background is maximum, and the segmentation is most effective.
As a further technical solution, performing a morphological open operation on DSM data after threshold segmentation to obtain an initial mask, specifically: using a 5 x 5 square operator as a morphological operator, erosion and then expansion are performed on the DSM data after threshold segmentation.
Further, a mask a is obtained after DSM division, and a classical morphological opening operation, i.e. a process of erosion first and then dilation, is performed on the mask a to obtain an initial mask.
Erosion is a process of eliminating boundary points, shrinking the boundaries inward, and can be used to eliminate small, meaningless objects. The specific process is as follows: scanning each pixel of the image by using n x n structural elements, and performing AND operation on the structural elements and the binary image covered by the structural elements, wherein if the structural elements and the binary image are all 1, the pixel of the image is 1; otherwise it is 0. The morphological operator used in the method is a square operator of 5 x 5.
Dilation is the process of merging all background points in contact with an object into the object, expanding the boundary outward, and can be used to fill up holes in the object. The specific process is as follows: scanning each pixel of the image by using the n-x-n structural elements, and performing OR operation by using the structural elements and the binary image covered by the structural elements; if both are 0, the pixel of the resulting image is 0; otherwise it is 1.
The purpose of the first-corroding and second-swelling is to remove interference caused by trees, telegraph poles and other objects.
As a further technical solution, the method further comprises: performing distance transformation on the initial mask, and calculating the distance from a non-0 pixel region to a 0 pixel region, wherein the type of the calculated distance is Euclidean distance; carrying out OSTU binary segmentation on the result of the distance transformation to eliminate small interference areas; and (5) using a square operator of 5 x 5 as a morphological operator to carry out corrosion denoising on the binarization result.
According to another aspect of the present specification, there is provided an OSGB three-dimensional model building rapid unitization system, including:
the information extraction module is used for extracting DSM information and DOM information based on the OSGB three-dimensional model;
the initial mask obtaining module is used for carrying out threshold segmentation and opening operation based on the extracted DSM information to obtain an initial mask;
the background mask acquisition module is used for carrying out reverse phase and corrosion denoising on the initial mask to obtain a background mask;
the foreground mask acquisition module is used for carrying out distance conversion, OTSU binary segmentation and corrosion denoising on the initial mask to obtain a foreground mask;
the building boundary extraction module is used for extracting the building boundary by utilizing a watershed algorithm according to the DOM information extracted by the information extraction module, the background mask acquired by the background mask module and the foreground mask acquired by the foreground mask acquisition module;
and the post-processing module is used for sequentially carrying out vectorization, simplification and squaring treatment on the extracted building boundary to finish the singularization of the building.
In the technical scheme, the information extraction module is used for extracting DSM information and DOM information of the OSGB three-dimensional model; the extracted DSM information is transmitted to an initial mask module, and the DOM information is transmitted to a building boundary extraction module; the initial mask module performs threshold segmentation and opening operation on the extracted DSM information to obtain an initial mask and transmits the initial mask to a background mask acquisition module and a foreground mask acquisition module respectively; the background mask acquisition module carries out phase reversal and corrosion denoising on the initial mask to obtain a background mask, and transmits the background mask to the building boundary extraction module; the foreground mask acquisition module carries out distance conversion, OTSU binary segmentation and corrosion denoising on the initial mask to obtain a foreground mask, and transmits the foreground mask to the building boundary extraction module; the building boundary extraction module extracts the building boundary by using a watershed algorithm according to DOM information transmitted by the information extraction module, a background mask transmitted by the background mask module and a foreground mask transmitted by the foreground mask acquisition module, and transmits a boundary extraction result to the post-processing module; and the post-processing module sequentially performs vectorization, simplification and squaring treatment on the extracted building boundary to finish the building singleization.
According to an aspect of the present specification, there is also provided a memory having stored thereon a computer program which, when executed by a processor, implements the steps of the method for rapid unitization of an OSGB three-dimensional model building as described.
According to an aspect of the present specification, there is also provided a computer device, including a memory, a processor and a computer program stored in the memory and executable by the processor, the processor implementing the steps of the OSGB three-dimensional model building rapid unitization method as described when executing the computer program.
Compared with the prior art, the invention has the beneficial effects that: firstly, extracting DSM information and DOM information from an OSGB three-dimensional model, then carrying out automatic threshold segmentation on DSM by using OTSU to obtain an initial mask, obtaining a foreground mask by using distance interpolation and thresholding again, inverting the initial mask and carrying out corrosion reconstruction to obtain a background mask, and extracting the boundary of a building by using a watershed algorithm according to the extracted background and foreground and the DOM; carrying out vectorization on the extracted building boundary, and then simplifying and squaring to obtain a final building vector boundary so as to finish the simplex segmentation of the building; compared with the traditional method, the method needs less manual intervention, improves the production efficiency and the utilization rate of three-dimensional data, and solves the problems of more manual intervention, low data utilization efficiency and the like of the existing building monomers.
Drawings
FIG. 1 is a flow chart of a method for rapid unitization of an OSGB three-dimensional model building according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a rapid building singleization system for an OSGB three-dimensional model according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of OSGB data blocking and splicing according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of DSM data extracted by a rapid unitization method for an OSGB three-dimensional model building according to an embodiment of the invention;
FIG. 5 is a schematic diagram of DOM data extracted by the method for rapidly unitizing the OSGB three-dimensional model building according to the embodiment of the invention;
FIG. 6 is a schematic diagram of an initial mask obtained by a fast unitization method for an OSGB three-dimensional model building according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a mask obtained after watershed algorithm processing is performed by an OSGB three-dimensional model building rapid singulation method according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a building plane vector extraction result extracted by the fast unitization method for the OSGB three-dimensional model building according to the embodiment of the invention;
fig. 9 is a schematic diagram of a building three-dimensional model unitization result extracted by an OSGB three-dimensional model building rapid unitization method according to an embodiment of the present invention.
Detailed Description
The technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without any inventive step, are within the scope of the present invention.
According to one aspect of the description of the invention, as shown in fig. 1, a method for quickly unitizing an OSGB three-dimensional model building is provided, the method comprises the steps of firstly extracting DSM information and DOM information from an OSGB three-dimensional model, then utilizing OTSU to perform automatic threshold segmentation on DSM to obtain an initial mask, using distance interpolation and thresholding again to obtain a foreground mask, inverting the initial mask and performing corrosion reconstruction to obtain a background mask, and using a watershed algorithm to extract a building boundary according to the extracted background and foreground and DOM; the technical scheme is that the extracted building boundary is simplified and squared after vectorization, the final building vector boundary is obtained, and the building simplex segmentation is completed. Compared with the traditional method, the method needs less manual intervention, improves the production efficiency and the utilization rate of three-dimensional data, and solves the problems of more manual intervention, low data utilization efficiency and the like of the existing building monomers.
As an implementation mode, the method for rapidly unitizing the OSGB three-dimensional model building includes the following specific steps:
and step 1, extracting DSMs and DOM based on OSGB.
As shown in fig. 3, firstly, the large-scene OSGB three-dimensional model is partitioned, initial DSM and DOM data of a block relative elevation are quickly generated by adopting an OpenGL elevation rendering + RTT mode for each block, and relative elevation correction and data splicing are performed by using an overlapping area between blocks, so as to obtain final global DSM and DOM data. The steps adopt a multithreading mode to extract DSM and DOM of each block, and fully utilize the operation capacity of the GPU and the CPU.
The size of the block needs to be moderate, the memory occupation is too high due to the too large block size, the number of threads is increased due to the too small block size, and the thread consumption is increased. Experiments in this step have shown that the size of each block is preferably about 100 resolution.
In the splicing process, linear stretching exists between adjacent blocks, the upper left corner is generally selected as a reference point, and the elevations of the rest blocks are unified to a unified elevation reference in a linear transformation mode. The linear transformation has the parameter calculation mode: let the data of adjacent rows or columns in two adjacent blocks of DSM be x, y, and calculate a, b using the least squares method so that y ═ ax + b is satisfied as much as possible.
Step 2, DSM threshold segmentation (OTSU)
And (3) according to the DSM result in the step 1, based on a classic OSTU threshold segmentation algorithm, segmenting the DSM according to the following segmentation principle: based on the one-dimensional histogram of the image, the image is segmented according to the gray feature of the target image, and when the variance of the gray value between the target and the background reaches the maximum, the threshold is the optimal segmentation threshold, and at the moment, the difference between the target and the background is maximum, and the segmentation is most effective. Assuming that the gray level of an image is L, the total number of pixel points of the image is N, NiNumber of pixel points representing a gray level of i, i.e.
PiRepresenting the probability of the occurrence of a pixel of gray level i, i.e.
Pi=ni/N,i=0,1,2,3……L-1
if the image is divided into objects alpha by a threshold value x1And background alpha2Two parts, α 1 is defined by the gray value of [0, x]Alpha 2 is composed of gray values [ x +1, L-1 ]]Pixel composition in between; then the probability of these two types of occurrences is:
thus these two classes α1,α2The mean gray levels of (a) are respectively:
wherein
In summary, the following results can be obtained:
μT=w1μ1+w2μ2
suppose to use
Let alpha be1、α2In [0, L-1 ]]Within the range, when taking values in sequenceThe maximum x value is the optimal threshold value obtained by the segmentation algorithm.
After the DSM is segmented, a mask a is obtained, and a classical morphological opening operation, i.e. a process of erosion first and then dilation, is performed on the mask a to obtain an initial mask. Erosion is a process of eliminating boundary points, shrinking the boundaries inward, and can be used to eliminate small, meaningless objects. The specific process is as follows: scanning each pixel of the image by using n x n structural elements, and performing AND operation on the structural elements and the binary image covered by the structural elements, wherein if the structural elements and the binary image are all 1, the pixel of the image is 1; otherwise it is 0. The morphological operator used in the method is a square operator of 5 x 5. Dilation is the process of merging all background points in contact with an object into the object, expanding the boundary outward, and can be used to fill up holes in the object. The specific process is as follows: scanning each pixel of the image by using the n-x-n structural elements, and performing OR operation by using the structural elements and the binary image covered by the structural elements; if both are 0, the pixel of the resulting image is 0; otherwise it is 1.
The morphological operator used in this step is a square operator of 5 x 5. The purpose of this step is to remove interference from trees, utility poles, and the like.
Step 3, extracting a background mask and a foreground mask
Step 3.1, background mask extraction
And (3) carrying out inverse operation on the initial mask extracted in the step (2) and carrying out classical morphological corrosion to obtain a background mask B of the building.
Wherein the purpose of inverting the initial mask is to obtain the lower elevation regions.
Among them, the purpose of morphological erosion is also to remove interference from objects such as trees, utility poles, and the like. The morphological operator used for etching was a 5 x 5 square operator.
Step 3.2, foreground mask extraction
And (3) according to the initial mask extracted in the step (2), performing distance conversion and normalization on the initial mask, and performing OTSU binary segmentation and morphological corrosion to obtain a foreground mask F.
In the distance transformation, the distance from a non-0 pixel region to a 0 pixel region is calculated, and the type of the calculated distance is the euclidean distance (L2 distance). After OTSU binarization is performed on the result of the distance transformation, many small interference areas will disappear. And carrying out corrosion operation on the binarization result to further remove interference to obtain a more accurate foreground area. The morphological operator in this operation is a 5 x 5 square operator.
Step 4, watershed algorithm
And (3) inputting the background mask B and the foreground mask F extracted in the step (3) and the DOM extracted in the step (1) into a watershed algorithm, and automatically calculating to obtain a more accurate building area based on an initial background area and an initial foreground area by the algorithm.
Step 5, grid vectorization and post-processing
And (4) firstly extracting boundary vectors from the building areas extracted in the step (4), simplifying and squaring the boundary lines, and outputting the final result.
In the process of extracting the boundary vector, parameters need to be set to retrieve all contours and construct a hierarchical tree. The purpose of this parameter is to take into account the presence of a ring building, whose inner area is non-building, and therefore a nesting situation. In addition, only the inflection point information of the contour is reserved when the contour is searched for simplifying the point number setting.
During the border line simplification, a reservation parameter of the set point is required. In this step, since there is a change in area of the building area and there is a certain correlation between the number of points and the area, the filtering parameter is set to 1/6 for the area of the polygon by experiment.
According to another aspect of the present specification, as shown in fig. 2, there is provided an OSGB three-dimensional model building rapid unitization system, including:
the information extraction module is used for extracting DSM information and DOM information based on the OSGB three-dimensional model;
the initial mask obtaining module is used for carrying out threshold segmentation and opening operation based on the extracted DSM information to obtain an initial mask;
the background mask acquisition module is used for carrying out reverse phase and corrosion denoising on the initial mask to obtain a background mask;
the foreground mask acquisition module is used for carrying out distance conversion, OTSU binary segmentation and corrosion denoising on the initial mask to obtain a foreground mask;
the building boundary extraction module is used for extracting the building boundary by utilizing a watershed algorithm according to the DOM information extracted by the information extraction module, the background mask acquired by the background mask module and the foreground mask acquired by the foreground mask acquisition module;
and the post-processing module is used for sequentially carrying out vectorization, simplification and squaring treatment on the extracted building boundary to finish the singularization of the building.
The system extracts DSM information and DOM information of the OSGB three-dimensional model by using an information extraction module; the extracted DSM information is transmitted to an initial mask module, and the DOM information is transmitted to a building boundary extraction module; the initial mask module performs threshold segmentation and opening operation on the extracted DSM information to obtain an initial mask and transmits the initial mask to a background mask acquisition module and a foreground mask acquisition module respectively; the background mask acquisition module carries out phase reversal and corrosion denoising on the initial mask to obtain a background mask, and transmits the background mask to the building boundary extraction module; the foreground mask acquisition module carries out distance conversion, OTSU binary segmentation and corrosion denoising on the initial mask to obtain a foreground mask, and transmits the foreground mask to the building boundary extraction module; the building boundary extraction module extracts the building boundary by using a watershed algorithm according to DOM information transmitted by the information extraction module, a background mask transmitted by the background mask module and a foreground mask transmitted by the foreground mask acquisition module, and transmits a boundary extraction result to the post-processing module; and the post-processing module sequentially performs vectorization, simplification and squaring treatment on the extracted building boundary to finish the building singleization.
According to an aspect of the present specification, there is also provided a memory having stored thereon a computer program which, when executed by a processor, implements the steps of the method for rapid unitization of an OSGB three-dimensional model building as described.
The present invention may take the form of a computer program product embodied on one or more memories (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer readable storage media, which include both non-transitory and non-transitory, removable and non-removable media, may implement any method or technology for storage of information. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the memory of the computer include, but are not limited to: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of random access memory (rram), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
According to an aspect of the present specification, there is also provided a computer device, including a memory, a processor and a computer program stored in the memory and executable by the processor, the processor implementing the steps of the OSGB three-dimensional model building rapid unitization method as described when executing the computer program.
Fig. 4 to 5 are schematic diagrams of DSM data and DOM data extracted by using the OSGB three-dimensional model building rapid prototyping method of the present invention, fig. 6 is an initial mask obtained by using the OSGB three-dimensional model building rapid prototyping method of the present invention, fig. 7 is a mask obtained by using the OSGB three-dimensional model building rapid prototyping method of the present invention to perform watershed algorithm processing, fig. 8 is a building vector extraction result obtained by using the OSGB three-dimensional model building rapid prototyping method of the present invention, and fig. 9 is a building three-dimensional model prototyping result obtained by using the OSGB three-dimensional model building rapid prototyping method of the present invention, as can be seen from the drawings, complete monomer extraction can be performed for a building in a selected area, and the boundary of the building can be clearly displayed.
In the description herein, references to the description of the terms "one embodiment," "certain embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention.
Claims (9)
1. A rapid unitization method of an OSGB three-dimensional model building is characterized by comprising the following steps:
extracting DSM information and DOM information based on an OSGB three-dimensional model;
performing threshold segmentation and opening operation based on the extracted DSM information to obtain an initial mask;
the initial mask is subjected to phase reversal and corrosion denoising to obtain a background mask on one hand, and is subjected to distance transformation, OTSU binary segmentation and corrosion denoising to obtain a foreground mask on the other hand;
based on the background mask, the foreground mask and the DOM information, extracting the boundary of the building by using a watershed algorithm;
and sequentially carrying out vectorization, simplification and squaring treatment on the extracted building boundary to finish the singleization of the building.
2. The OSGB three-dimensional model building rapid monomer method according to claim 1, characterized in that the method further comprises the following steps: the method comprises the steps of partitioning a large-scene OSGB three-dimensional model, rapidly generating initial DSM and DOM information of relative elevations of blocks by adopting a partitioning OpenGL elevation rendering + RTT mode for each block, and performing relative elevation correction and data splicing by utilizing overlapped areas among the blocks to obtain final global DSM and DOM information.
3. The OSGB three-dimensional model building rapid monomer method according to claim 2, characterized in that the method further comprises the following steps: in the data splicing process, because linear stretching exists between adjacent blocks, the upper left corner is selected as a datum point, and the elevations of the rest blocks are unified to a set elevation reference in a linear transformation mode.
4. The OSGB three-dimensional model building rapid monomer method according to claim 1, characterized in that the method further comprises the following steps: utilizing an OTSU threshold segmentation algorithm to perform threshold segmentation on the extracted DSM information, wherein the segmentation principle is as follows: and based on the one-dimensional histogram of the image, segmenting the image according to the gray feature of the target image, wherein the threshold value when the variance of the gray value between the target and the background reaches the maximum is the optimal segmentation threshold value.
5. The OSGB three-dimensional model building rapid unitization method according to claim 4, wherein the DSM data after threshold segmentation is subjected to morphological open operation to obtain an initial mask, specifically: using a 5 x 5 square operator as a morphological operator, erosion and then expansion are performed on the DSM data after threshold segmentation.
6. The OSGB three-dimensional model building rapid monomer method according to claim 1, characterized in that the method further comprises the following steps: performing distance transformation on the initial mask, and calculating the distance from a non-0 pixel region to a 0 pixel region, wherein the type of the calculated distance is Euclidean distance; carrying out OSTU binary segmentation on the result of the distance transformation to eliminate small interference areas; and (5) using a square operator of 5 x 5 as a morphological operator to carry out corrosion denoising on the binarization result.
7. An OSGB three-dimensional model building rapid singulation system, which is characterized by comprising:
the information extraction module is used for extracting DSM information and DOM information based on the OSGB three-dimensional model;
the initial mask obtaining module is used for carrying out threshold segmentation and opening operation based on the extracted DSM information to obtain an initial mask;
the background mask acquisition module is used for carrying out reverse phase and corrosion denoising on the initial mask to obtain a background mask;
the foreground mask acquisition module is used for carrying out distance conversion, OTSU binary segmentation and corrosion denoising on the initial mask to obtain a foreground mask;
the building boundary extraction module is used for extracting the building boundary by utilizing a watershed algorithm according to the DOM information extracted by the information extraction module, the background mask acquired by the background mask module and the foreground mask acquired by the foreground mask acquisition module;
and the post-processing module is used for sequentially carrying out vectorization, simplification and squaring treatment on the extracted building boundary to finish the singularization of the building.
8. A memory having stored thereon a computer program, wherein the computer program, when executed by a processor, performs the steps of the method for rapid unitization of an OSGB three dimensional model building as claimed in any one of claims 1 to 6.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable by the processor, the processor implementing the steps of the OSGB three-dimensional model building rapid singulation method according to any one of claims 1 to 6 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110118885.5A CN112785710B (en) | 2021-01-28 | 2021-01-28 | Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110118885.5A CN112785710B (en) | 2021-01-28 | 2021-01-28 | Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112785710A true CN112785710A (en) | 2021-05-11 |
CN112785710B CN112785710B (en) | 2021-12-21 |
Family
ID=75759444
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110118885.5A Active CN112785710B (en) | 2021-01-28 | 2021-01-28 | Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112785710B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113362359A (en) * | 2021-06-18 | 2021-09-07 | 天津市勘察设计院集团有限公司 | Building automatic extraction method of oblique photography data fused with height and spectrum information |
CN114202704A (en) * | 2022-02-15 | 2022-03-18 | 中国测绘科学研究院 | Man-machine interaction water body semi-automatic extraction method and system |
CN114926602A (en) * | 2022-04-13 | 2022-08-19 | 湖北省国土测绘院 | Building single-body method and system based on three-dimensional point cloud |
CN115186347A (en) * | 2022-07-18 | 2022-10-14 | 北京星天地信息科技有限公司 | Building CityGML modeling method combining house type plan and inclined model |
CN115546455A (en) * | 2022-09-22 | 2022-12-30 | 广东国地规划科技股份有限公司 | Three-dimensional building model monomer method, device and storage medium |
CN116342783A (en) * | 2023-05-25 | 2023-06-27 | 吉奥时空信息技术股份有限公司 | Live-action three-dimensional model data rendering optimization method and system |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130321392A1 (en) * | 2012-06-05 | 2013-12-05 | Rudolph van der Merwe | Identifying and Parameterizing Roof Types in Map Data |
CN104517024A (en) * | 2014-08-05 | 2015-04-15 | 中国科学院遥感与数字地球研究所 | Urban green degree space evaluation modeling method based on construction dimension |
CN107038755A (en) * | 2017-05-09 | 2017-08-11 | 北京四维空间数码科技有限公司 | The method that vector data superposition DSM automatic batch generates threedimensional model |
US20190019324A1 (en) * | 2017-07-11 | 2019-01-17 | Here Global B.V. | Method and apparatus for generating an abstract texture for a building facade or model |
CN110570428A (en) * | 2019-08-09 | 2019-12-13 | 浙江合信地理信息技术有限公司 | method and system for segmenting roof surface patch of building from large-scale image dense matching point cloud |
CN110674735A (en) * | 2019-09-23 | 2020-01-10 | 中国科学院地理科学与资源研究所 | Agricultural facility remote sensing extraction method and device based on fine classification |
CN111009034A (en) * | 2019-11-11 | 2020-04-14 | 广州地理研究所 | Three-dimensional model monomer method, system, storage medium and equipment |
CN111340822A (en) * | 2020-02-24 | 2020-06-26 | 武汉大学 | Multi-scale self-adaptive airborne LiDAR point cloud building single segmentation method |
CN112149543A (en) * | 2020-09-16 | 2020-12-29 | 北京工业大学 | Building raise dust identification system and method based on computer vision |
CN112163251A (en) * | 2020-08-24 | 2021-01-01 | 北京航空航天大学 | Building model unitization method and device, storage medium and electronic equipment |
-
2021
- 2021-01-28 CN CN202110118885.5A patent/CN112785710B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130321392A1 (en) * | 2012-06-05 | 2013-12-05 | Rudolph van der Merwe | Identifying and Parameterizing Roof Types in Map Data |
CN104517024A (en) * | 2014-08-05 | 2015-04-15 | 中国科学院遥感与数字地球研究所 | Urban green degree space evaluation modeling method based on construction dimension |
CN107038755A (en) * | 2017-05-09 | 2017-08-11 | 北京四维空间数码科技有限公司 | The method that vector data superposition DSM automatic batch generates threedimensional model |
US20190019324A1 (en) * | 2017-07-11 | 2019-01-17 | Here Global B.V. | Method and apparatus for generating an abstract texture for a building facade or model |
CN110570428A (en) * | 2019-08-09 | 2019-12-13 | 浙江合信地理信息技术有限公司 | method and system for segmenting roof surface patch of building from large-scale image dense matching point cloud |
CN110674735A (en) * | 2019-09-23 | 2020-01-10 | 中国科学院地理科学与资源研究所 | Agricultural facility remote sensing extraction method and device based on fine classification |
CN111009034A (en) * | 2019-11-11 | 2020-04-14 | 广州地理研究所 | Three-dimensional model monomer method, system, storage medium and equipment |
CN111340822A (en) * | 2020-02-24 | 2020-06-26 | 武汉大学 | Multi-scale self-adaptive airborne LiDAR point cloud building single segmentation method |
CN112163251A (en) * | 2020-08-24 | 2021-01-01 | 北京航空航天大学 | Building model unitization method and device, storage medium and electronic equipment |
CN112149543A (en) * | 2020-09-16 | 2020-12-29 | 北京工业大学 | Building raise dust identification system and method based on computer vision |
Non-Patent Citations (2)
Title |
---|
RONGJUN QIN AND WEI FANG: "A Hierarchical Building Detection Method for Very High Resolution Remotely Sensed Images Combined with DSM Using Graph Cut Optimization", 《PHOTOGRAMMETRIC ENGINEERING & REMOTE SENSING》 * |
闫利,等: "利用密集匹配点云的建筑单体提取算法研究", 《中国激光》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113362359A (en) * | 2021-06-18 | 2021-09-07 | 天津市勘察设计院集团有限公司 | Building automatic extraction method of oblique photography data fused with height and spectrum information |
CN114202704A (en) * | 2022-02-15 | 2022-03-18 | 中国测绘科学研究院 | Man-machine interaction water body semi-automatic extraction method and system |
CN114926602A (en) * | 2022-04-13 | 2022-08-19 | 湖北省国土测绘院 | Building single-body method and system based on three-dimensional point cloud |
CN114926602B (en) * | 2022-04-13 | 2023-03-31 | 湖北省国土测绘院 | Building singleization method and system based on three-dimensional point cloud |
CN115186347A (en) * | 2022-07-18 | 2022-10-14 | 北京星天地信息科技有限公司 | Building CityGML modeling method combining house type plan and inclined model |
CN115186347B (en) * | 2022-07-18 | 2023-08-08 | 北京星天地信息科技有限公司 | Building CityGML modeling method combining house type plan view and inclination model |
CN115546455A (en) * | 2022-09-22 | 2022-12-30 | 广东国地规划科技股份有限公司 | Three-dimensional building model monomer method, device and storage medium |
CN115546455B (en) * | 2022-09-22 | 2023-06-30 | 广东国地规划科技股份有限公司 | Three-dimensional building model singulation method, device and storage medium |
CN116342783A (en) * | 2023-05-25 | 2023-06-27 | 吉奥时空信息技术股份有限公司 | Live-action three-dimensional model data rendering optimization method and system |
CN116342783B (en) * | 2023-05-25 | 2023-08-08 | 吉奥时空信息技术股份有限公司 | Live-action three-dimensional model data rendering optimization method and system |
Also Published As
Publication number | Publication date |
---|---|
CN112785710B (en) | 2021-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112785710B (en) | Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building | |
US7561156B2 (en) | Adaptive quadtree-based scalable surface rendering | |
JP7029283B2 (en) | Image complement | |
CN109934110B (en) | Method for identifying illegal buildings near river channel | |
CN113781667B (en) | Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium | |
CN109712143B (en) | Rapid image segmentation method based on superpixel multi-feature fusion | |
CN109118588B (en) | Automatic color LOD model generation method based on block decomposition | |
CN115018992B (en) | Method and device for generating hair style model, electronic equipment and storage medium | |
CN111325684A (en) | Semi-automatic high-spatial-resolution remote sensing image extraction method for buildings with different shapes | |
US10937236B1 (en) | Mesh smoothing for visual quality and analysis improvement | |
CN110046623B (en) | Image feature point extraction method and camera | |
Chen et al. | Binary orientation trees for volume and surface reconstruction from unoriented point clouds | |
Horvat et al. | Ray-casting point-in-polyhedron test | |
Jeong et al. | Neural meshes: Statistical learning based on normals | |
CN115311418A (en) | Multi-detail-level tree model single reconstruction method and device | |
Dimiccoli et al. | Hierarchical region-based representation for segmentation and filtering with depth in single images | |
CN108376390B (en) | Dynamic perception smoothing filtering algorithm | |
CN108985306B (en) | Method for extracting intersected polygons based on improved boundary algebra | |
CN111815532A (en) | Depth map repairing method and related device thereof | |
Shen et al. | Structure Preserving Large Imagery Reconstruction | |
CN112215951B (en) | Out-of-core multi-resolution point cloud representation method and point cloud display method | |
Abderrahim et al. | Interactive multiresolution visualization of 3D Mesh | |
CN117058300B (en) | Method for calculating intersection point of acceleration ray and uncut curved surface based on KD tree | |
CN116502303B (en) | BIM model visualization method based on scene hierarchy instance information enhancement | |
CN117237503B (en) | Geographic element data accelerated rendering and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |