CN113963369B - Method for extracting skeleton line of space contour of plan view - Google Patents

Method for extracting skeleton line of space contour of plan view Download PDF

Info

Publication number
CN113963369B
CN113963369B CN202111245143.5A CN202111245143A CN113963369B CN 113963369 B CN113963369 B CN 113963369B CN 202111245143 A CN202111245143 A CN 202111245143A CN 113963369 B CN113963369 B CN 113963369B
Authority
CN
China
Prior art keywords
space
skeleton
cad
outline
algorithm
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.)
Active
Application number
CN202111245143.5A
Other languages
Chinese (zh)
Other versions
CN113963369A (en
Inventor
张璐
李一帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pinlan Data Technology Co ltd
Original Assignee
Shanghai Pinlan Data Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Pinlan Data Technology Co ltd filed Critical Shanghai Pinlan Data Technology Co ltd
Priority to CN202111245143.5A priority Critical patent/CN113963369B/en
Publication of CN113963369A publication Critical patent/CN113963369A/en
Application granted granted Critical
Publication of CN113963369B publication Critical patent/CN113963369B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of image processing, and discloses a method for extracting space contour skeleton lines of a plan view, which comprises the following specific steps of: s1, obtaining wall lines, doors, windows and other graphic elements on a CAD building plane drawing by docking CAD analysis service; s2, scaling the CAD frame to a picture with a fixed proportion, recording the scaling proportion, recording the primitives obtained in S1 and drawing the primitives on the picture according to the same proportion, and then obtaining the outline of each enclosed space by using an image processing method. According to the invention, through the binarization image conversion, guo-Hall refinement algorithm, hough straight line detection algorithm and minimum spanning tree algorithm, a main skeleton line can be rapidly extracted from a space outline on a building drawing, and the extracted skeleton line consists of a plurality of line segments, so that accurate placement of other specialized structures can be assisted, and intelligent drawing can be conveniently assisted by other specialized structures after the binary image conversion, guo-Hall refinement algorithm, hough straight line detection algorithm and minimum spanning tree algorithm.

Description

Method for extracting skeleton line of space contour of plan view
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a plane map space contour skeleton line extraction method.
Background
The construction drawing examination institutions needing to be identified by construction authorities before construction projects are started at present examine the contents of the construction drawings related to public interests, public safety and mandatory standards of engineering construction according to related laws and regulations; the following points need to be ensured:
Building stability, security scrutiny, including whether foundation foundations and body structure systems are safe and reliable,
(II) whether the fire-fighting, energy-saving, environment-friendly, anti-seismic, sanitary, civil air defense and other related mandatory standards and specifications are met,
(III) whether the construction drawing reaches the specified depth requirement,
(IV) whether the public benefit is compromised;
The construction of one building engineering project is completed by combining construction drawings of various professions such as building, electricity, water supply and drainage, strong and weak electricity, heating ventilation and the like, the design of the drawings is carried out by a special design institute, and as the national standard is customized in advance, other professional drawings only need to be designed and arranged on the basis of the national standard in the space where the building base map is designed, and the repeated designs are relatively more included; with the rise of artificial intelligence, a large wave can be replaced by artificial intelligence by a project in which artificial participation is performed, wherein the drawing of CAD non-building professions is a time-consuming and labor-consuming repetitive work; in order to provide a CAD construction drawing which accords with national specifications more quickly and efficiently, the invention provides a method for extracting space outline skeleton lines in a CAD construction plane drawing, which can automatically identify the building space outline skeleton lines in the CAD construction drawing and provide a technical auxiliary scheme for subsequent intelligent drawing, such as automatically arranging electric components on the space outline skeleton lines; the CAD construction drawing which is in line with the national specifications can be quickly and efficiently provided for assisting other professions through the extracted space contour skeleton line.
At present, no mature technology exists for extracting space outline skeleton lines in CAD building plane drawings, an algorithm for refining files in a picture format can obtain skeleton lines in a fixed image area in the field of image recognition, but a plurality of messy branches exist in skeleton lines extracted by special outline figures, and a main skeleton line is not obtained for assisting in intelligent drawing of other specialized drawings, so that improvement is needed.
In order to solve the problems, the application provides a plan view space contour skeleton line extraction method.
Disclosure of Invention
The invention aims to provide a plan view space contour skeleton line extraction method which has the advantages of rapid extraction and convenience in accurate placement of components.
In order to achieve the above object, the present invention provides the following technical solutions: the method for extracting the space contour skeleton line of the plan view comprises the following specific steps of:
S1, obtaining wall lines, doors, windows and other graphic elements on a CAD building plane drawing by docking CAD analysis service;
S2, scaling the CAD frame to a picture with a fixed proportion, recording the scaling proportion, recording the primitives obtained in the S1 and drawing the primitives on the picture according to the same proportion, and then obtaining the outline of each closed space by using an image processing method;
S3, acquiring an external rectangle of the space outline of S2, creating a picture which is the same as the external rectangle in width and height and has a black background, carrying out translation transformation on the coordinates of the space outline, drawing the picture on the black background picture, and filling the picture with a white pixel block;
s4, converting the picture obtained in the S3 into a binary image, and extracting a skeleton of the binary image by using a Guo-Hall refinement algorithm to obtain a binary image of a black background white skeleton;
S5, extracting straight lines on the skeleton diagram by using only a Hough straight line detection algorithm from the spatial outline skeleton diagram obtained in the S4, and recording and storing all endpoints of the extracted straight lines;
S6, connecting the straight lines obtained in the S5 through the endpoints by using a graph algorithm of the minimum spanning tree, generating a skeleton line set in a line segment form, namely obtaining bifurcation nodes in the minimum spanning tree graph, and finally searching the number of the nodes connected on each crotch by using a recursion algorithm;
S7, setting a threshold value for filtering the tiny branches, connecting the nodes on each crotch to calculate the addition result of all sides of the branches, and directly filtering and removing if the addition result is smaller than the threshold value, and reserving backbone branches;
And S8, ordering the nodes of the backbone branches obtained in the S7 according to a connection sequence, and obtaining the approximate straight line of each backbone branch by using a straight line approximate contour algorithm to obtain a final space contour skeleton line.
As a preferred technical scheme of the invention, the graphic elements in S1 specifically refer to basic elements of the graph such as points, lines, bars, arcs and the like when drawing a CAD drawing, and the building outline is usually formed by combining walls, doors, windows, columns and the like to form a specific closed space, and the graphic elements of the walls, the doors, the windows and the columns are obtained by statistics, so that the graphic elements can be marked in the follow-up procedure, and the system can automatically recognize the graphic elements and perform different and required operations.
As a preferred embodiment of the present invention, the binarized image in S4 is obtained by setting the gray level of the pixel point on the image to 0 or 255, that is, the whole image is processed and is in a distinct black-and-white state, and the binarized processing can simplify the structure of the image, so that the system can recognize the content of the image more quickly, which often occurs in the digital image processing as an image mask or in the results of image segmentation, binarization and dithering, and the image processed by the binarizing technology can be used in a laser printer, a facsimile machine, a monochrome computer display, and the like.
As a preferred technical solution of the present invention, the hough straight line detection algorithm in S5 is a feature extraction technology in image processing, and the process obtains a set conforming to the specific shape in a parameter space by calculating a local maximum value of the accumulated result as a result of hough transformation, and the hough transformation has a plurality of kinds, such as accumulated probability transformation, hough circle transformation and hough gradient method, so that a user can select according to structures of different images, and further, the processing of images with different complexity can be completed rapidly.
As a preferable technical scheme of the invention, the minimum spanning tree in S6 is a spanning tree with the minimum weight in a pair of connected weighted undirected graphs, namely a connected graph possibly has a plurality of spanning trees; when the edges in the graph have weights, the sum of the weights of the edges of one spanning tree is smaller than or equal to the sum of the weights of the edges of other spanning trees, and one or more minimum spanning trees exist at the moment.
As a preferred embodiment of the present invention, the weight is defined as that in a given undirected graph g= (V, E), (u, V) represents an edge (i.e., connecting the vertex u and the vertex V), and w (u, V) represents the weight of the edge.
As a preferable technical scheme of the invention, the extracted space outline skeleton line is restored to the CAD drawing to obtain the building outline skeleton line on the original CAD drawing, and finally the skeleton line can be used for assisting other professional intelligent pictures in the follow-up process, the obtained skeleton line is converted into CAD, and the obtained skeleton line can be stored so as to be used repeatedly in the later stage, and meanwhile, the skeleton line can be applied to the wider technical field through CAD conversion, so that the skeleton line is convenient for other procedures to use.
The beneficial effects of the invention are as follows:
1. According to the invention, through the binarization image conversion, guo-Hall refinement algorithm, hough straight line detection algorithm and minimum spanning tree algorithm, a main skeleton line can be rapidly extracted from a space outline on a building drawing, and the extracted skeleton line consists of a plurality of line segments, so that accurate placement of other specialized structures can be assisted, and intelligent drawing can be conveniently assisted by other specialized structures after the binary image conversion, guo-Hall refinement algorithm, hough straight line detection algorithm and minimum spanning tree algorithm.
Drawings
FIG. 1 is a schematic diagram of the overall workflow of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, in an embodiment of the present invention, a method for extracting a spatial contour skeleton line of a plan view, where the specific steps of extracting the spatial contour skeleton line in a CAD building plan drawing are as follows:
S1, obtaining wall lines, doors, windows and other graphic elements on a CAD building plane drawing by docking CAD analysis service;
S2, scaling the CAD frame to a picture with a fixed proportion, recording the scaling proportion, recording the primitives obtained in the S1 and drawing the primitives on the picture according to the same proportion, and then obtaining the outline of each closed space by using an image processing method;
S3, acquiring an external rectangle of the space outline of S2, creating a picture which is the same as the external rectangle in width and height and has a black background, carrying out translation transformation on the coordinates of the space outline, drawing the picture on the black background picture, and filling the picture with a white pixel block;
s4, converting the picture obtained in the S3 into a binary image, and extracting a skeleton of the binary image by using a Guo-Hall refinement algorithm to obtain a binary image of a black background white skeleton;
S5, extracting straight lines on the skeleton diagram by using only a Hough straight line detection algorithm from the spatial outline skeleton diagram obtained in the S4, and recording and storing all endpoints of the extracted straight lines;
S6, connecting the straight lines obtained in the S5 through the endpoints by using a graph algorithm of the minimum spanning tree, generating a skeleton line set in a line segment form, namely obtaining bifurcation nodes in the minimum spanning tree graph, and finally searching the number of the nodes connected on each crotch by using a recursion algorithm;
S7, setting a threshold value for filtering the tiny branches, connecting the nodes on each crotch to calculate the addition result of all sides of the branches, and directly filtering and removing if the addition result is smaller than the threshold value, and reserving backbone branches;
And S8, ordering the nodes of the backbone branches obtained in the S7 according to a connection sequence, and obtaining the approximate straight line of each backbone branch by using a straight line approximate contour algorithm to obtain a final space contour skeleton line.
The graphic elements in S1 specifically refer to basic elements of the graph such as points, lines, bars and arcs when the CAD drawing is drawn, and a building outline is usually formed by combining walls, doors, windows, columns and the like to form a specific closed space, and the graphic elements of the walls, the doors, the windows and the columns are counted and acquired, so that the graphic elements can be marked in the follow-up procedure, and the system can automatically identify the graphic elements and perform different and required operations.
The binarized image in S4 is to set the gray value of the pixel point on the image to 0 or 255, that is, the whole image is processed and is in a distinct black-and-white state, the binarized processing can simplify the structure of the image, so that the system can recognize the image content more quickly, which often occurs in the digital image processing as an image mask or in the results of image segmentation, binarization and dithering, and the image processed by the binarizing technology can be used in a laser printer, a fax machine, a single-color computer display, etc.
The hough straight line detection algorithm in S5 is a feature extraction technology in image processing, and the process obtains a set conforming to the specific shape in a parameter space by calculating a local maximum value of the accumulated result as a result of hough transformation, for example, the accumulated probability transformation, the hough circle transformation and the hough gradient method, which are more kinds of hough transformation, and are convenient for a user to select according to structures of different images, so that the processing of images with different complexity can be completed rapidly.
The minimum spanning tree in S6 is a spanning tree with the smallest weight in a pair of connectivity weighted undirected graphs, that is, one connectivity graph may have multiple spanning trees; when the edges in the graph have weights, the sum of the weights of the edges of one spanning tree is smaller than or equal to the sum of the weights of the edges of other spanning trees, and one or more minimum spanning trees exist at the moment.
Wherein, the weight is defined as that in a given undirected graph g= (V, E), (u, V) represents an edge (i.e., connecting vertex u and vertex V), and w (u, V) represents the weight of the edge.
And S8, restoring the extracted space contour skeleton line to the CAD drawing to obtain the building contour skeleton line on the original CAD drawing, and finally, converting the obtained skeleton line into the CAD to store the obtained skeleton line piece so as to facilitate the later repeated use, and simultaneously, also being applicable to the wider technical field through CAD conversion so as to facilitate the use of other procedures.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (5)

1. A method for extracting skeleton lines of space outlines of plan views is characterized by comprising the following steps: the specific steps of extracting the space contour skeleton line in the CAD building plane drawing are as follows:
S1, obtaining wall lines, doors and window primitives on a CAD building plane drawing by docking CAD analysis service;
S2, scaling the CAD frame to a picture with a fixed proportion, recording the scaling proportion, recording the primitives obtained in the S1 and drawing the primitives on the picture according to the same proportion, and then obtaining the outline of each closed space by using an image processing method;
S3, acquiring an external rectangle of the space outline of S2, creating a picture which is the same as the external rectangle in width and height and has a black background, carrying out translation transformation on the coordinates of the space outline, drawing the picture on the black background picture, and filling the picture with a white pixel block;
s4, converting the picture obtained in the S3 into a binary image, and extracting a skeleton of the binary image by using a Guo-Hall refinement algorithm to obtain a binary image of a black background white skeleton;
S5, extracting straight lines on the skeleton diagram by using only a Hough straight line detection algorithm from the spatial outline skeleton diagram obtained in the S4, and recording and storing all endpoints of the extracted straight lines;
S6, connecting the straight lines obtained in the S5 through the endpoints by using a graph algorithm of the minimum spanning tree, generating a skeleton line set in a line segment form, namely obtaining bifurcation nodes in the minimum spanning tree graph, and finally searching the number of the nodes connected on each crotch by using a recursion algorithm;
S7, setting a threshold value for filtering the tiny branches, connecting the nodes on each crotch to calculate the addition result of all sides of the branches, and directly filtering and removing if the addition result is smaller than the threshold value, and reserving backbone branches;
s8, ordering the nodes of the backbone branches obtained in the S7 according to a connection sequence, and obtaining the approximate straight line of each backbone branch by using a straight line approximate contour algorithm to obtain a final space contour skeleton line;
S6, the minimum spanning tree is a spanning tree with the minimum weight in a pair of connected weighted undirected graphs, namely, one connected graph possibly has a plurality of spanning trees; when edges in the graph have weights, there will always be one spanning tree with a sum of the weights of the edges less than or equal to the sum of the weights of the edges of the other spanning trees, at which point there are one or more minimum spanning trees.
2. The method for extracting the skeleton line of the space outline of the plan view according to claim 1, wherein the method comprises the following steps: the graphic element in S1 specifically refers to the basic elements of points, lines, bars and arc figures when drawing CAD drawings, and the building outline is defined by a wall, a door, a window and a column to form a specific closed space.
3. The method for extracting the skeleton line of the space outline of the plan view according to claim 1, wherein the method comprises the following steps: the binarized image in S4 is to set the gray value of the pixel point on the image to 0 or 255, that is, the whole image is processed and made to show a distinct black-and-white state.
4. The method for extracting the skeleton line of the space outline of the plan view according to claim 1, wherein the method comprises the following steps: the hough straight line detection algorithm in S5 is a feature extraction technique in image processing, and a set conforming to the specific shape is obtained as a result of hough transformation by calculating a local maximum value of the accumulated result in a parameter space.
5. The method for extracting the skeleton line of the space outline of the plan view according to claim 1, wherein the method comprises the following steps: and S8, restoring the extracted space contour skeleton line to the CAD drawing to obtain the building contour skeleton line on the original CAD drawing, and finally, being used for assisting other professional intelligent pictures.
CN202111245143.5A 2021-10-26 2021-10-26 Method for extracting skeleton line of space contour of plan view Active CN113963369B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111245143.5A CN113963369B (en) 2021-10-26 2021-10-26 Method for extracting skeleton line of space contour of plan view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111245143.5A CN113963369B (en) 2021-10-26 2021-10-26 Method for extracting skeleton line of space contour of plan view

Publications (2)

Publication Number Publication Date
CN113963369A CN113963369A (en) 2022-01-21
CN113963369B true CN113963369B (en) 2024-05-14

Family

ID=79466945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111245143.5A Active CN113963369B (en) 2021-10-26 2021-10-26 Method for extracting skeleton line of space contour of plan view

Country Status (1)

Country Link
CN (1) CN113963369B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241509B (en) * 2022-02-24 2022-07-08 江西少科智能建造科技有限公司 Space segmentation method, system, storage medium and equipment based on construction drawing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941016B1 (en) * 2001-12-31 2005-09-06 Cognex Technology And Investment Method for finding contours in an image of an object
FR2910992A1 (en) * 2007-01-03 2008-07-04 Airbus France Sas Mechanical part section's bi-dimensional shape recognizing method, involves pruning skeleton by suppression of segments of each skeleton branch, and comparing topological descriptor to respective topological descriptors of reference shapes
CN111814575A (en) * 2020-06-12 2020-10-23 上海品览数据科技有限公司 Household pattern recognition method based on deep learning and image processing
CN112883799A (en) * 2021-01-20 2021-06-01 上海品览智造科技有限公司 Method for accurately identifying slope in CAD (computer-aided design) slope big sample graph

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4636146B2 (en) * 2008-09-05 2011-02-23 ソニー株式会社 Image processing method, image processing apparatus, program, and image processing system
CN105678310B (en) * 2016-02-03 2019-08-06 北京京东方多媒体科技有限公司 Thermal-induced imagery contour extraction method and device
US10096154B2 (en) * 2016-04-04 2018-10-09 University Of Cincinnati Localized contour tree method for deriving geometric and topological properties of complex surface depressions based on high resolution topographical data
US20200027266A1 (en) * 2018-07-17 2020-01-23 Uti Limited Partnership Building contour generation from point clouds

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941016B1 (en) * 2001-12-31 2005-09-06 Cognex Technology And Investment Method for finding contours in an image of an object
FR2910992A1 (en) * 2007-01-03 2008-07-04 Airbus France Sas Mechanical part section's bi-dimensional shape recognizing method, involves pruning skeleton by suppression of segments of each skeleton branch, and comparing topological descriptor to respective topological descriptors of reference shapes
CN111814575A (en) * 2020-06-12 2020-10-23 上海品览数据科技有限公司 Household pattern recognition method based on deep learning and image processing
CN112883799A (en) * 2021-01-20 2021-06-01 上海品览智造科技有限公司 Method for accurately identifying slope in CAD (computer-aided design) slope big sample graph

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种快速剔除伪分枝的作物行骨架提取算法;刁智华;吴贝贝;魏玉泉;毋媛媛;;农机化研究;20160901(09);全文 *
基于向量内积的新型骨架提取方法;胡斯淼;任洪娥;于鸣;姜士辉;齐红;;液晶与显示;20151015(05);全文 *

Also Published As

Publication number Publication date
CN113963369A (en) 2022-01-21

Similar Documents

Publication Publication Date Title
Liasis et al. Satellite images analysis for shadow detection and building height estimation
CN112883799B (en) Method for accurately identifying ramp in CAD ramp large-scale sample graph
CN111179232A (en) Steel bar size detection system and method based on image processing
CN110346699B (en) Insulator discharge information extraction method and device based on ultraviolet image processing technology
CN102184534B (en) Method for image fusion by using multi-scale top-hat selective transform
CN111259878A (en) Method and equipment for detecting text
CN112989995B (en) Text detection method and device and electronic equipment
CN109961416B (en) Business license information extraction method based on morphological gradient multi-scale fusion
CN110400362B (en) ABAQUS two-dimensional crack modeling method and system based on image and computer readable storage medium
CN113963369B (en) Method for extracting skeleton line of space contour of plan view
CN111832504A (en) Space information intelligent integrated generation method for satellite in-orbit application
CN115147555A (en) Building object frame model fine three-dimensional modeling method and system
CN115641415A (en) Method, device, equipment and medium for generating three-dimensional scene based on satellite image
Koutaki et al. Automatic road extraction based on cross detection in suburb
CN111179289B (en) Image segmentation method suitable for webpage length graph and width graph
JP2003141567A (en) Three-dimensional city model generating device and method of generating three-dimensional city model
CN112001336A (en) Pedestrian boundary crossing alarm method, device, equipment and system
CN116011061A (en) Three-dimensional reconstruction model monomer segmentation method, system and terminal for multi-target building
CN112884074B (en) Image design method, equipment, storage medium and device based on decision tree
CN115937492A (en) Transformer equipment infrared image identification method based on feature identification
CN113658195B (en) Image segmentation method and device and electronic equipment
CN115116083A (en) Method, system and storage medium for automatically identifying and correcting electric power graphics primitives of monitoring picture
CN115049628A (en) Method and system for automatically generating house type structure
CN114862889A (en) Road edge extraction method and device based on remote sensing image
CN112861860A (en) Natural scene lower word detection method based on upper and lower boundary extraction

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