CN114491741A - Wall line extraction method and device, electronic equipment and storage medium - Google Patents

Wall line extraction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114491741A
CN114491741A CN202111672186.1A CN202111672186A CN114491741A CN 114491741 A CN114491741 A CN 114491741A CN 202111672186 A CN202111672186 A CN 202111672186A CN 114491741 A CN114491741 A CN 114491741A
Authority
CN
China
Prior art keywords
target
line segment
layer
line
wall
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.)
Pending
Application number
CN202111672186.1A
Other languages
Chinese (zh)
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.)
Wanyi Technology Co Ltd
Original Assignee
Wanyi 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 Wanyi Technology Co Ltd filed Critical Wanyi Technology Co Ltd
Priority to CN202111672186.1A priority Critical patent/CN114491741A/en
Publication of CN114491741A publication Critical patent/CN114491741A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Architecture (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to a wall line extraction method, a wall line extraction device, electronic equipment and a storage medium, wherein the wall line extraction method comprises the following steps: acquiring a target characteristic parameter corresponding to a first layer in a building drawing, wherein the target characteristic parameter is a characteristic parameter which is satisfied by a line segment positioned between wall corners of the building drawing in the first layer; extracting a target line segment meeting the target characteristic parameter from the first image layer based on the target characteristic parameter corresponding to the first image layer; and extracting wall lines from the target line segments. In the application, because the line segments between the corners are wall lines with high probability, and the characteristic parameters of the line segments of the same type are the same in the process of drawing the layers, the target line segments meeting the target characteristic parameters are extracted from the first layer based on the characteristic parameters, namely the target characteristic parameters, met by the line segments between the corners corresponding to the first layer, and the wall lines are extracted from the target line segments, so that the wall lines in all the layers in the building drawing are obtained more accurately.

Description

Wall line extraction method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of surveying and mapping technologies, and in particular, to a wall line extraction method and apparatus, an electronic device, and a storage medium.
Background
In the prior art, after the drawing of the building drawing is completed, a wall line is usually extracted based on the name of the layer in the building drawing. For example, a line in a layer whose layer name is "wall line" in the construction drawing is extracted as a wall line. However, the naming rule of the layer name in the building drawing is not necessarily fixed, and there may be no layer name in the building drawing such as "wall line", or there may be other types of lines in the layer whose name is related to the wall line. Therefore, the accuracy of extracting the wall line according to the layer name is poor, and even the wall line cannot be extracted.
Disclosure of Invention
The application provides a wall line extraction method, a wall line extraction device, electronic equipment and a storage medium, and aims to solve the problems that the accuracy of wall line extraction according to the layer name is poor, and even the wall line cannot be extracted.
In a first aspect, the present application provides a wall line extraction method, including:
acquiring a target characteristic parameter corresponding to a first layer in a building drawing, wherein the target characteristic parameter is a characteristic parameter which is satisfied by a line segment positioned between wall corners of the building drawing in the first layer;
extracting a target line segment meeting the target characteristic parameter from the first image layer based on the target characteristic parameter corresponding to the first image layer;
and extracting wall lines from the target line segments.
Optionally, the obtaining of the target characteristic parameter corresponding to the first layer in the building drawing includes:
identifying the position of each corner in the construction drawing;
determining a line segment between two adjacent wall corners in the first layer, counting the characteristics of the line segment, and determining the characteristic parameters of the line segment as the target characteristic parameters; the characteristic parameters include line type and/or color.
Optionally, after the obtaining of the target characteristic parameter corresponding to the first layer in the construction drawing, the method further includes:
judging whether the second layer is associated with a wall line or not according to the name of the second layer to obtain a judgment result;
if the judgment result is that the second layer is associated with a wall line, determining the target characteristic parameter corresponding to the first layer as the target characteristic parameter corresponding to the second layer; the second layer is a layer outside the first layer in the construction drawing.
Optionally, before the extracting, from the first image layer, a target line segment that satisfies the target feature parameter, the method further includes:
extracting a first line segment meeting the target characteristic parameter from all line segments of the first layer based on the classification of the graphic primitives in the first layer;
acquiring a second line segment which is positioned between the corners of the building drawing and meets the target characteristic parameter in the first layer;
and determining that the ratio of the number of the second line segments to the number of the first line segments is greater than a preset threshold value, and executing the step of extracting the target line segments meeting the target characteristic parameters from the first layer based on the target characteristic parameters corresponding to the first layer.
Optionally, before the extracting, from all line segments of the first layer, a first line segment that satisfies the target feature parameter, the method further includes:
and classifying the primitives in the first layer according to a preset classification rule to obtain the classification of the primitives in the first layer.
The extracting wall lines from the target line segments includes:
if the length of the target line segment is greater than a first preset length and less than a second preset length, determining the target line segment as a wall line;
and/or the presence of a gas in the gas,
if the target line segment has a parallel line segment within a preset distance, determining the target line segment as a wall line;
and/or the presence of a gas in the gas,
if the distance between the target line segment and the parallel line segment of the target line segment is greater than a first preset distance threshold and smaller than a second preset distance threshold, determining the target line segment as a wall line;
and/or the presence of a gas in the gas,
and if the target line segment is self-closed, determining the target line segment as a wall line.
Optionally, before the determining the target line segment as a wall line if the target line segment is self-closed, the method further includes:
if the target line segment is connected with the second end of the target line segment from the first end through a first preset number of line segments, determining that the target line segment is self-closed;
or,
if the target line segment falls on any line segment from the first end through a second preset number of line segments, determining that the target line segment is self-closed;
or,
if the target line segment passes through a third preset number of line segments from the first end, and the last line segment in the third preset number is connected with any line segment, determining that the target line segment is self-closed;
or,
and if the target line segment passes through a third preset number of line segments from the first end, the last line segment in the third preset number is connected with the ray, and the parallel distance between the ray and the target line segment is greater than a first preset distance threshold and smaller than a second preset distance threshold, determining that the target line segment is self-closed.
In a second aspect, the present application provides a wall line extraction device, comprising:
the acquisition module is used for acquiring a target characteristic parameter corresponding to a first layer in a building drawing, wherein the target characteristic parameter is a characteristic parameter which is satisfied by a line segment between corners in the first layer;
the extracting module is used for extracting a target line segment meeting the target characteristic parameter from the first image layer based on the target characteristic parameter corresponding to the first image layer;
the extracting module is further used for extracting a wall line from the target line segment.
In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the wall line extraction method according to any one of the embodiments of the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the wall line extraction method according to any one of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
according to the wall line extraction method provided by the embodiment of the application, the line segments between the corners are wall lines with high probability, the characteristic parameters of the line segments of the same type are the same in the process of drawing the layers, the target line segments meeting the target characteristic parameters are extracted from the first layer based on the characteristic parameters, namely the target characteristic parameters, met by the line segments between the corners corresponding to the first layer, and the wall lines are extracted from the target line segments, so that the wall lines in all the layers in the building drawing are accurately obtained.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a wall line extraction method according to an embodiment of the present disclosure;
FIG. 2 is a schematic view of a corner of the type provided by an embodiment of the present application;
fig. 3 is a schematic view of a wall line extraction device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to solve the problem that the accuracy of extracting a wall line according to a layer name is poor, and even the wall line cannot be extracted, the embodiment of the application provides a wall line extraction method which is applied to a processor, and the processor can be located on any equipment. As shown in fig. 1, the wall line extraction method includes steps 101 to 103:
step 101: and acquiring a target characteristic parameter corresponding to a first layer in the building drawing.
And the target characteristic parameters are the characteristic parameters met by the line segments positioned between the corners of the building drawing in the corresponding first map layer.
In addition, the first layer referred to in the embodiment of the present application is any layer in the construction drawing, and is not described in detail below.
Optionally, positions of the corners in the building drawing are identified, and the target characteristic parameter corresponding to the first map layer is determined based on the identified positions of the corners in the building drawing.
In one possible implementation, based on the corner recognition model, the construction drawing is printed as a picture and input into the corner recognition model, so that the position of each corner in the construction drawing is recognized.
The corner recognition model can be obtained by performing model training by using a large amount of sample data. The sample data is the construction drawing marked with the corner data. It should be noted that the corner recognition model may be a conventional detection model in the prior art, and is not described herein again.
Wherein, from the primitive data analysis state, the characteristics of the wall data include closed, parallel, and fixed equidistant. Based on these characteristics, the wall lines must have inflection points and intersection points, that is, the part where multiple groups of wall lines are collected is the wall corner understood by the business. Due to the parallel characteristic of the wall lines, the converged wall line data has parallel line pairs within the preset range of the connection. If all the corners can be extracted, the connecting line between any two adjacent corners is necessarily a wall line. A corner may be understood as a junction or termination of a wall line.
Illustratively, as shown in FIG. 2, there are a variety of types of corners. Wherein, the part circled by the circle is the corner. The first type of corner only has one pair of parallel line pairs in the preset range, the second type of corner has two pairs of parallel line pairs in the preset range, the third type of corner has three pairs of parallel line pairs in the preset range, and the fourth type of corner has four pairs of parallel line pairs in the preset range.
In one possible implementation, the target characteristic parameters include a line type and/or a color. That is, the target feature parameter includes a line type, or the target feature parameter includes a color, or the target feature parameter includes a line type and a color.
Illustratively, the line type may be a solid line, a broken line, a curved line, a straight line, a thickness of a line, or the like. The color may be black, white, green, yellow, etc.
In a possible implementation manner, after the position of each corner in the building drawing is identified, based on the position of each corner, a line segment between two adjacent corners in a first layer is determined, the features of the line segment between two adjacent corners in the first layer are counted, and feature parameters of the line segment between the corners corresponding to the first layer are determined and used as target feature parameters corresponding to the first layer.
Specifically, in a line segment corresponding to the first image layer and located between adjacent corners, if the ratio of the number of line segments of a certain feature or feature combination to the total number of line segments exceeds a preset ratio, it is determined that the feature or feature combination is the target feature parameter corresponding to the first image layer. The preset ratio may be predetermined or determined according to actual conditions.
For example, the first layer is taken as layer 1 in the construction drawing. And if the layer 1 contains the corner, determining line segments between adjacent corners in the layer 1, including line segments 1-20. The line segments 1 to 18 are yellow solid lines, and the line segments 19 to 20 are yellow dotted lines. And taking the preset ratio as 4/5, and taking the ratio of the occurrence frequency of the yellow solid lines to the total number of the line segments between the corners as 9/10, namely, the ratio of the number of the yellow solid lines in the line segments between the corners to the total number of the line segments between the corners exceeds the preset ratio, and determining that the target characteristic parameters corresponding to the layer 1 are yellow and the solid lines.
In another possible implementation manner, after the target feature parameter corresponding to the layer is determined by performing statistics on the line segment features located between adjacent corners in the layer, for a second layer for which the corresponding target feature parameter cannot be determined in the above manner, the corresponding target feature parameter may be determined in the following manner: and judging whether the second layer is associated with the wall line according to the name of the second layer to obtain a judgment result, and determining whether the second layer corresponds to the target characteristic parameter based on the judgment result.
And if the judgment result is that the second layer is associated with the wall line, determining the target characteristic parameter corresponding to the first layer as the target characteristic parameter corresponding to the second layer. It should be noted that the second drawing layer is a drawing layer outside the first drawing layer in the construction drawing.
That is to say, when the determination result is that the second layer is not associated with the wall line, it is determined that the second layer does not have the corresponding target feature parameter, and the extraction of the target line segment does not need to be performed on the second layer.
Illustratively, the building drawing includes a first layer, i.e., layer 1, and a second layer, i.e., layer 2, and the target characteristic parameter corresponding to the layer 1 is determined by the characteristics of a line segment between adjacent corners, but the target characteristic parameter corresponding to the layer 2 cannot be determined. The layer name of layer 2 is, for example, "house outer wall", and it can be seen that the layer name of this layer 2 is associated with a wall, that is, layer 2 is associated with a wall line. At this time, the target feature parameter corresponding to the layer 1 may be determined as the target feature parameter corresponding to the layer 2.
It should be noted that the number of the first image layers is at least one. Illustratively, the building drawing comprises a layer 1, a layer 2 and a layer 3. And determining the target characteristic parameters corresponding to the layer 1 through the characteristics of the line segments between the adjacent corners, but not determining the target characteristic parameters corresponding to the layer 2. Taking the layer 1 as a second layer, the layer 2 and the layer 3 are first layers. At this time, if layer 1 is associated with a wall line. The target characteristic parameters corresponding to the first layer, i.e., layer 2 and layer 3, may be determined as the target characteristic parameters corresponding to layer 1.
In addition, after the target characteristic parameters corresponding to the second layer are determined in the above manner, all layers in the building drawing are used as the first layer, and the subsequent operation is executed.
In a possible implementation manner, before a target line segment meeting a target characteristic parameter is extracted from a first layer, based on classification of primitives in the first layer, a first line segment meeting the target characteristic parameter is extracted from all line segments in the first layer, and a second line segment meeting the target characteristic parameter between corners of a building drawing in the first layer is obtained. And then, determining that the ratio of the number of the second line segments to the number of the first line segments is greater than a preset threshold value, and executing the step of obtaining the target characteristic parameters corresponding to the first layer in the building drawing. The preset threshold may be predetermined or determined according to actual conditions.
For example, the classification of at least one primitive is obtained by classifying the primitives in the layer based on color. Taking the first layer as an example, if the first layer includes black and yellow primitives, the primitives in the first layer are classified based on colors to obtain two categories of primitives, that is, a black primitive and a yellow primitive.
For example, the classification of the primitives in the first layer includes primitives of a black class and primitives of a yellow class. Determining that the target characteristic parameters corresponding to the first image layer in the building drawing comprise colors and line types, wherein the colors are yellow, and the line types are solid lines. Based on the classification of the primitives in the first layer, the line segments meeting the linear type of the solid line are searched in the yellow primitives to obtain first line segments meeting the target characteristic parameters, and based on the wall corners in the first layer determined before, second line segments meeting the target characteristic parameters between the wall corners of the building drawing in the first layer are determined, namely the line segments of the yellow solid line between all the wall corners in the first layer. Taking the preset threshold value of 0.8 as an example, if the number of the first line segments is 30 and the number of the second line segments is 26, it is determined that the ratio of the number of the second line segments to the number of the first line segments is greater than 0.8, and at this time, step 101 is executed.
On the other hand, if the ratio of the number of the first line segments to the number of the second line segments is smaller than or equal to the preset threshold, it is determined that the first layer has no corresponding target feature parameter, that is, the originally determined target feature parameter corresponding to the first layer is removed.
Illustratively, if the number of the first line segments is 30, the number of the second line segments is 21, and the preset threshold is 0.8, the ratio of the number of the first line segments to the number of the second line segments is smaller than the preset threshold, the originally determined target feature parameter corresponding to the first layer is removed, and it is determined that the first layer does not have the corresponding target feature parameter.
At this time, the target feature parameter corresponding to the first layer may be re-determined based on whether the name of the first layer is associated with a wall and other target feature parameters corresponding to the first layer in a similar manner as described above.
In a possible implementation manner, before the first line segment meeting the target characteristic parameter is extracted from all line segments of the first layer, the primitives in the first layer are classified according to a preset classification rule, so that the classification of the primitives in the first layer is obtained. The preset classification rule may be predetermined or determined according to an actual working condition.
For example, the preset classification rule may classify the primitives in the layer based on colors, may classify the primitives in the layer based on line types, and may even classify the primitives in the layer based on rendering time. Of course, the preset classification rule may also be to classify the primitives in the layer based on other parameters besides color, line type, or drawing time.
Step 102: and extracting a target line segment meeting the target characteristic parameter from the first image layer based on the target characteristic parameter corresponding to the first image layer.
In a possible implementation manner, for a first layer with a corresponding target feature parameter, a line segment that satisfies the target feature parameter corresponding to the first layer, that is, a target line segment, is extracted from the first layer.
Illustratively, a layer 1 and a layer 2 exist in a building drawing, a target characteristic parameter corresponding to the layer 1 is a yellow solid line, and a target characteristic parameter corresponding to the layer 2 is a yellow dotted line. Taking the layer 1 as a first layer, and extracting a yellow solid line in the layer 1 as a target line segment. Taking the layer 2 as a first layer, and extracting a yellow dotted line in the layer 2 as a target line segment.
Illustratively, a layer 1 and a layer 2 exist in a building drawing, target characteristic parameters corresponding to the layer 1 are yellow solid lines, and target characteristic parameters corresponding to the layer 2 are yellow dotted lines and yellow dotted lines. Taking the layer 1 as a first layer, and extracting a yellow solid line in the layer 1 as a target line segment. Taking the layer 2 as a first layer, and extracting a yellow dotted line and a yellow solid line in the layer 2 as target line segments.
Step 103: and extracting wall lines from the target line segments.
Optionally, determining whether the target line segment is a wall line based on at least one of whether the length of the target line segment meets a preset length, whether the target line segment has a parallel line segment within a preset distance of the target line segment, whether the distance between the target line segment and the parallel line segment meets the preset distance, and whether the target line segment is self-closed, that is, further extracting the target line segment to obtain the wall line.
Next, a case of determining whether the target line segment is a wall line based on one of whether the length of the target line segment meets a preset length, whether the target line segment has a parallel line segment within a preset distance thereof, whether the distance between the target line segment and the parallel line segment meets a preset distance threshold, and whether the target line segment is self-closed is described.
Case 1: and determining the target line segment as a wall line based on whether the length of the target line segment meets the preset length.
The preset length comprises a first preset length and a second preset length. The preset length can be predetermined or determined according to actual working conditions.
In one possible implementation manner, if the length of the target line segment is greater than the first preset length and less than the second preset length, the target line segment is determined as the wall line.
Correspondingly, if the length of the target line segment is smaller than or equal to a first preset length, or the length of the target line segment is larger than or equal to a second preset length, the target line segment is determined not to be a wall line. At this point, the target line segment may be culled.
For example, for a line segment in the layer of the construction drawing, the first preset length may be, for example, 200mm, and the second preset length may be, for example, 3/4 of the width of the construction drawing.
Case 2: and determining the target line segment as the wall line based on whether the target line segment has a parallel line segment within the preset distance of the target line segment.
The preset distance may be predetermined or determined according to an actual working condition.
In one possible implementation, if there is a parallel line segment in the target line segment within the preset distance, the target line segment is determined as a wall line.
Correspondingly, if the target line segment does not have a parallel line segment within the preset distance, the target line segment is determined not to be a wall line. At this point, the target line segment may be culled.
Illustratively, the predetermined distance may be determined based on the thickness of the wall, e.g., 200mm to 400 mm.
Case 3: and determining the target line segment as a wall line based on whether the distance between the target line segment and the parallel line segment meets the preset distance.
The preset distance threshold comprises a first preset distance threshold and a second preset distance threshold.
In one possible implementation manner, if a distance between a target line segment and a parallel line segment of the target line segment is greater than a first preset distance threshold and smaller than a second preset distance threshold, the target line segment is determined as a wall line.
Correspondingly, if the distance between the target line segment and the parallel line segment of the target line segment is less than or equal to a first preset distance threshold value and greater than or equal to a second preset distance threshold value, the target line segment is determined as the wall line.
The distance between the target line segment and the parallel line segment is the distance between the end points of the target line segment and the parallel line segment. That is, if the distance between the first end of the target line segment and the first end of the parallel line segment is greater than the first preset distance threshold and less than the second preset distance threshold, and the distance between the second end of the target line segment and the second end of the parallel line segment is greater than the first preset distance threshold and less than the second preset distance threshold, the target line segment is determined to be a wall line.
Correspondingly, if the distance between the first end of the target line segment and the first end of the parallel line segment is less than or equal to a first preset distance threshold, or the distance between the first end of the target line segment and the first end of the parallel line segment is greater than or equal to a second preset distance threshold, or the distance between the second end of the target line segment and the second end of the parallel line segment is less than or equal to the first preset distance threshold, or the distance between the second end of the target line segment and the second end of the parallel line segment is greater than or equal to the second preset distance threshold, it is determined that the target line segment is not a wall line. At this point, the target line segment may be culled.
Through the process, the target line segment which cannot be superposed with the vertical projection of the parallel line segment can be removed, and the accuracy of the wall line extracted from the target line segment is ensured.
Case 4: and determining the target line segment as the wall line based on whether the target line segment is self-closed.
In one possible implementation, if the target line segment is self-closed, the target line segment is determined to be a wall line.
Correspondingly, if the target line segment cannot be self-closed, the target line segment is determined not to be a wall line. At this point, the target line segment may be culled.
Specifically, if the target line segment is connected with the second end of the target line segment from the first end through a first preset number of line segments, the target line segment is determined to be self-closed. At this time, the target line segment and the first preset number of line segments form a cylindrical wall line, and at this time, the wall corner corresponding to the target line segment and the first preset number of line segments may be the first type of wall corner given in the example of fig. 2.
Or determining that the target line segment is self-closed if the target line segment falls on any line segment from the first end through a second preset number of line segments. At this time, the target line segment, the second preset number of line segments, and the corner corresponding to any one of the line segments are the second type of corner, the third type of corner, or the fourth type of corner given in the example of fig. 2.
Or, after the target line segment passes through a third preset number of line segments from the first end, and the last line segment in the third preset number is connected with any line segment, determining that the target line segment is self-closed.
Or, if the target line segment passes through a third preset number of line segments from the first end, the last line segment in the third preset number is connected with the ray, and the parallel distance between the ray and the target line segment is greater than the first preset distance threshold and smaller than the second preset distance threshold, determining that the target line segment is self-closed.
That is, if the target line segment satisfies one of the four self-closing conditions described above, the target line segment may be determined to be self-closing. And if the target line segment cannot meet any one of the four self-closing conditions, determining that the target line segment cannot be self-closed.
In one possible implementation manner, the wall line in the target line segment may be extracted based on one of whether the length of the target line segment meets a preset length, whether the target line segment has a parallel line segment within a preset distance of the target line segment, whether the distance between the target line segment and the parallel line segment meets a preset distance threshold, and whether the target line segment is self-closed.
In another possible implementation manner, the wall line in the target line segment is extracted based on multiple items of whether the length of the target line segment meets a preset length, whether the target line segment has a parallel line segment within a preset distance of the target line segment, whether the distance between the target line segment and the parallel line segment meets a preset distance threshold, and whether the target line segment is self-closed.
For example, the wall line in the target line segment is extracted based on whether the length of the target line segment meets a preset length, whether the target line segment has a parallel line segment within a preset distance of the target line segment, whether the distance between the target line segment and the parallel line segment meets a preset distance threshold, and whether the target line segment is self-closed. If the target line segment is determined to be a wall line through any of the above cases 1 to 4, the target line segment is extracted as a wall line. If the target line segment is determined not to be a wall line through the above cases 1 to 4, the target line segment is determined not to be a wall line. The target line segment may be culled when it is determined that the target line segment is not a wall line.
It should be noted that, by further judging and screening the target line segments that meet the target characteristic parameters, line segments that better meet the wall line characteristics in the target line segments can be extracted, so that the line segments are used as wall lines, and the accuracy of the extracted wall lines is improved.
Through the process, because the line segments between the corners are wall lines with high probability, and the characteristic parameters of the line segments of the same type are the same in the process of drawing the layers, the target line segments meeting the target characteristic parameters are extracted from the first layer based on the characteristic parameters, namely the target characteristic parameters, met by the line segments between the corners corresponding to the first layer, and the wall lines are extracted from the target line segments, so that the wall lines in all the layers in the building drawing are accurately obtained.
As shown in fig. 3, an embodiment of the present application provides a wall line extraction apparatus, which includes an acquisition module 301 and an extraction module 302.
The obtaining module 301 is configured to obtain a target characteristic parameter corresponding to a first layer in a building drawing, where the target characteristic parameter is a characteristic parameter that is satisfied by a line segment located between corners in the building drawing in the first layer.
An extracting module 302, configured to extract, based on the target feature parameter corresponding to the first image layer, a target line segment that meets the target feature parameter from the first image layer.
The extracting module 302 is further configured to extract a wall line from the target line segment.
As shown in fig. 4, the embodiment of the present application provides an electronic device, which includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication via the communication bus 404,
a memory 403 for storing a computer program;
in an embodiment of the present application, the processor 401 is configured to implement the steps of the wall line extracting method provided in any one of the foregoing method embodiments when executing the program stored in the memory 403.
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the wall line extraction method provided in any one of the foregoing method embodiments.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be 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. Also, 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. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A wall line extraction method, the method comprising:
acquiring a target characteristic parameter corresponding to a first layer in a building drawing, wherein the target characteristic parameter is a characteristic parameter which is satisfied by a line segment positioned between wall corners of the building drawing in the first layer;
extracting a target line segment meeting the target characteristic parameter from the first image layer based on the target characteristic parameter corresponding to the first image layer;
and extracting wall lines from the target line segments.
2. The wall line extraction method according to claim 1, wherein the obtaining of the target characteristic parameter corresponding to the first layer in the construction drawing includes:
identifying the position of each corner in the construction drawing;
determining a line segment between two adjacent wall corners in the first layer, counting the characteristics of the line segment, and determining the characteristic parameters of the line segment as the target characteristic parameters; the characteristic parameters include line type and/or color.
3. The wall line extraction method according to claim 1, wherein after the obtaining of the target feature parameter corresponding to the first layer in the construction drawing, the method further comprises:
judging whether the second layer is associated with a wall line or not according to the name of the second layer to obtain a judgment result;
if the judgment result is that the second layer is associated with a wall line, determining the target characteristic parameter corresponding to the first layer as the target characteristic parameter corresponding to the second layer; the second layer is a layer outside the first layer in the construction drawing.
4. The wall line extraction method according to claim 1, wherein before the extracting, from the first image layer, a target line segment that satisfies the target feature parameter, the method further includes:
extracting a first line segment meeting the target characteristic parameter from all line segments of the first layer based on the classification of the graphic primitives in the first layer;
acquiring a second line segment which is positioned between the corners of the building drawing and meets the target characteristic parameter in the first layer;
and determining that the ratio of the number of the second line segments to the number of the first line segments is greater than a preset threshold value, and executing the step of extracting the target line segments meeting the target characteristic parameters from the first layer based on the target characteristic parameters corresponding to the first layer.
5. The wall line extraction method according to claim 4,
before the extracting, from all line segments of the first layer, a first line segment that satisfies the target feature parameter, the method further includes:
and classifying the primitives in the first layer according to a preset classification rule to obtain the classification of the primitives in the first layer.
6. The wall line extraction method according to any one of claims 1 to 5, wherein extracting the wall line in the target line segment includes:
if the length of the target line segment is greater than a first preset length and less than a second preset length, determining the target line segment as a wall line;
and/or the presence of a gas in the gas,
if the target line segment has a parallel line segment within a preset distance, determining the target line segment as a wall line;
and/or the presence of a gas in the gas,
if the distance between the target line segment and the parallel line segment of the target line segment is greater than a first preset distance threshold and smaller than a second preset distance threshold, determining the target line segment as a wall line;
and/or the presence of a gas in the gas,
and if the target line segment is self-closed, determining the target line segment as a wall line.
7. The wall line extraction method according to claim 6, wherein before the determining the target line segment as a wall line if the target line segment is self-closed, the method further comprises:
if the target line segment is connected with the second end of the target line segment from the first end through a first preset number of line segments, determining that the target line segment is self-closed;
or,
if the target line segment falls on any line segment from the first end through a second preset number of line segments, determining that the target line segment is self-closed;
or,
if the target line segment passes through a third preset number of line segments from the first end, and the last line segment in the third preset number is connected with any line segment, determining that the target line segment is self-closed;
or,
and if the target line segment passes through a third preset number of line segments from the first end, the last line segment in the third preset number is connected with the ray, and the parallel distance between the ray and the target line segment is greater than a first preset distance threshold and smaller than a second preset distance threshold, determining that the target line segment is self-closed.
8. A wall wire extraction device, characterized in that the wall wire extraction device comprises:
the acquisition module is used for acquiring a target characteristic parameter corresponding to a first layer in a building drawing, wherein the target characteristic parameter is a characteristic parameter which is satisfied by a line segment positioned between wall corners of the building drawing in the first layer;
the extraction module is used for extracting a target line segment meeting the target characteristic parameter from the first image layer based on the target characteristic parameter corresponding to the first image layer;
the extracting module is further used for extracting a wall line from the target line segment.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the wall line extraction method according to any one of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the wall line extraction method according to any one of claims 1 to 7.
CN202111672186.1A 2021-12-31 2021-12-31 Wall line extraction method and device, electronic equipment and storage medium Pending CN114491741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111672186.1A CN114491741A (en) 2021-12-31 2021-12-31 Wall line extraction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111672186.1A CN114491741A (en) 2021-12-31 2021-12-31 Wall line extraction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114491741A true CN114491741A (en) 2022-05-13

Family

ID=81508712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111672186.1A Pending CN114491741A (en) 2021-12-31 2021-12-31 Wall line extraction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114491741A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750553A (en) * 2012-06-28 2012-10-24 北京中科广视科技有限公司 Recognizing method of wall plane profile
CN108268743A (en) * 2018-02-09 2018-07-10 广州大学 Well automatic identifying method and system based on architectural drawing
CN108763813A (en) * 2018-06-08 2018-11-06 杭州群核信息技术有限公司 It is a kind of to identify the method and apparatus for copying wall in figure based on deep learning
CN109308386A (en) * 2018-09-11 2019-02-05 深圳市彬讯科技有限公司 The recognition methods of engineering drawing wall, device and electronic equipment
US20200111251A1 (en) * 2018-10-08 2020-04-09 The Hong Kong Polytechnic University 3d indoor modeling method, system and device based on point cloud data
CN111859503A (en) * 2020-07-09 2020-10-30 万翼科技有限公司 Drawing review method, electronic equipment and graphic server
CN112712584A (en) * 2019-10-25 2021-04-27 阿里巴巴集团控股有限公司 Wall line determining method, space modeling method, device and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750553A (en) * 2012-06-28 2012-10-24 北京中科广视科技有限公司 Recognizing method of wall plane profile
CN108268743A (en) * 2018-02-09 2018-07-10 广州大学 Well automatic identifying method and system based on architectural drawing
CN108763813A (en) * 2018-06-08 2018-11-06 杭州群核信息技术有限公司 It is a kind of to identify the method and apparatus for copying wall in figure based on deep learning
CN109308386A (en) * 2018-09-11 2019-02-05 深圳市彬讯科技有限公司 The recognition methods of engineering drawing wall, device and electronic equipment
US20200111251A1 (en) * 2018-10-08 2020-04-09 The Hong Kong Polytechnic University 3d indoor modeling method, system and device based on point cloud data
CN112712584A (en) * 2019-10-25 2021-04-27 阿里巴巴集团控股有限公司 Wall line determining method, space modeling method, device and equipment
CN111859503A (en) * 2020-07-09 2020-10-30 万翼科技有限公司 Drawing review method, electronic equipment and graphic server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张维锦;龙飞宇;张倞忆;: "基于Revit的地下连续墙识别算法研究", 华东交通大学学报, no. 03, 13 June 2018 (2018-06-13), pages 101 - 107 *

Similar Documents

Publication Publication Date Title
CN110084095B (en) Lane line detection method, lane line detection apparatus, and computer storage medium
US11455805B2 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
EP2779094A2 (en) Segmentation of an image based on color and color differences
CN107590447A (en) A kind of caption recognition methods and device
CN108537286B (en) Complex target accurate identification method based on key area detection
CN111563495A (en) Method and device for recognizing characters in image and electronic equipment
WO2000045337A1 (en) Representative color designating method using reliability
CN111583180A (en) Image tampering identification method and device, computer equipment and storage medium
JP2007235953A (en) Method and system for detecting digital image region
CN109389110A (en) A kind of area determination method and device
CN107563986B (en) Image area judgment method and system
CN110111311B (en) Image quality evaluation method and device
CN109919164B (en) User interface object identification method and device
CN113076961B (en) Image feature library updating method, image detection method and device
CN108647570B (en) Zebra crossing detection method and device and computer readable storage medium
CN113435289A (en) Space division method, device, equipment and storage medium
JP4967045B2 (en) Background discriminating apparatus, method and program
CN114491741A (en) Wall line extraction method and device, electronic equipment and storage medium
CN116386048A (en) Seal removing method, device, equipment and storage medium
CN110147765A (en) A kind of image processing method and device
CN114821617A (en) Door and window hole identification method, device, equipment and readable storage medium
CN110059572B (en) Document image Chinese keyword detection method and system based on single character matching
CN110837789B (en) Method and device for detecting object, electronic equipment and medium
CN108664626A (en) A kind of title consistency detecting method, device and electronic equipment
CN111724426A (en) Background modeling method and camera for background modeling

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