CN112464903A - Primitive identification method and device of municipal construction drawing and electronic equipment - Google Patents
Primitive identification method and device of municipal construction drawing and electronic equipment Download PDFInfo
- Publication number
- CN112464903A CN112464903A CN202011487727.9A CN202011487727A CN112464903A CN 112464903 A CN112464903 A CN 112464903A CN 202011487727 A CN202011487727 A CN 202011487727A CN 112464903 A CN112464903 A CN 112464903A
- Authority
- CN
- China
- Prior art keywords
- pipeline
- primitive
- candidate
- seed
- well
- 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
- 238000010276 construction Methods 0.000 title claims abstract description 96
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000015654 memory Effects 0.000 claims description 31
- 238000012545 processing Methods 0.000 claims description 29
- 238000012216 screening Methods 0.000 claims description 11
- 238000004891 communication Methods 0.000 claims description 10
- 238000000605 extraction Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000001788 irregular Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- WABPQHHGFIMREM-UHFFFAOYSA-N lead(0) Chemical compound [Pb] WABPQHHGFIMREM-UHFFFAOYSA-N 0.000 description 3
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 3
- 101000755816 Homo sapiens Inactive rhomboid protein 1 Proteins 0.000 description 2
- 102100022420 Inactive rhomboid protein 1 Human genes 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
- G06V30/42—Document-oriented image-based pattern recognition based on the type of document
- G06V30/422—Technical drawings; Geographical maps
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of municipal engineering, in particular to a method and a device for identifying primitives of a municipal construction drawing and electronic equipment, wherein the method comprises the steps of obtaining seed primitives in a target municipal construction drawing; extracting the characteristics of the seed primitive, and determining a primitive candidate item corresponding to the seed primitive in the target municipal construction drawing based on the extracted characteristics; and determining the matching relation of the primitives in the primitive candidate items according to the position relation between the primitives in the primitive candidate items. The corresponding primitives are automatically identified in the target municipal construction drawing by utilizing the characteristics of the seed primitives, and then the corresponding matching relation is determined by utilizing the position relation between the identified primitives, so that the automatic identification and matching of the primitives are realized, and the primitive identification efficiency is improved.
Description
Technical Field
The invention relates to the technical field of municipal engineering, in particular to a method and a device for identifying a primitive of a municipal construction drawing and electronic equipment.
Background
For drainage engineering specialties in municipalities, it is mainly the engineering quantity of the well/pipe that is calculated. Wherein, the side of the well is provided with a hole connected with a drainage pipeline, and the bottom of the well is provided with a water seepage pipe extending downwards, so that water can be drained away through the drainage pipeline; the pipe is connected to the well and takes care of the transport and discharge of water. When designing municipal construction drawings, a design institute can draw well/pipe and accessory information in the drawings.
Corresponding to each primitive in the municipal construction drawing, the well corresponds to the well legend, the pipe corresponds to the pipeline, and the ancillary information corresponds to the pipe leads and pipe labels. Wherein, there is corresponding relation between the pipe lead, the pipe label and the pipeline. Specifically, well legends generally represent wells in rectangular or circular legends, pipelines represent wells in straight lines, pipe guides are used to indicate the relationship between the pipelines and pipe labels, pipe labels are used to label the pipe diameter size of the pipes and the straight length of the run.
When the drainage engineering construction is carried out, the construction is generally carried out according to designed municipal construction drawings, the engineering quantity calculation is required before the construction, and the engineering quantity calculation is generally carried out by hand. During manual calculation, a user needs to find well legends, pipelines, pipe labels and pipe leads in a drawing and manually match the relationship between the pipelines, the pipe leads and the pipe labels, so that the recognition efficiency of each primitive is low.
Disclosure of Invention
In view of this, the embodiment of the invention provides a method and a device for identifying a primitive of a municipal construction drawing, and an electronic device, so as to solve the problem of low primitive identification efficiency.
According to a first aspect, an embodiment of the present invention provides a method for identifying a primitive of a municipal construction drawing, including:
acquiring a seed primitive in a target municipal construction drawing;
extracting the characteristics of the seed primitive, and determining a primitive candidate item corresponding to the seed primitive in the target municipal construction drawing based on the extracted characteristics;
and determining the matching relation of the primitives in the primitive candidate items according to the position relation between the primitives in the primitive candidate items.
According to the method for identifying the primitives of the municipal construction drawing, provided by the embodiment of the invention, the corresponding primitives are automatically identified in the target municipal construction drawing by utilizing the characteristics of the seed primitives, and then the corresponding matching relation is determined by utilizing the position relation between the identified primitives, so that the automatic identification and matching of the primitives are realized, and the efficiency of primitive identification is improved.
With reference to the first aspect, in a first implementation manner of the first aspect, the extracting features of the seed primitive and determining a primitive candidate corresponding to the seed primitive in the target municipal construction drawing based on the extracted features includes:
performing primitive search in the target municipal construction drawing by using the layer where the seed primitive is located, and determining an initial primitive candidate item corresponding to the seed primitive;
and correspondingly processing the initial primitive candidate item based on the geometric characteristics of the seed primitive or the geometric characteristics of the primitives in the initial primitive candidate item, and determining the primitive candidate item corresponding to the seed primitive.
According to the method for identifying the primitive of the municipal construction drawing, provided by the embodiment of the invention, the primitive search is carried out in the layer where the seed primitive is located to obtain the initial primitive candidate item, and then the geometric characteristics of the seed primitive or the primitive in the initial primitive candidate item are utilized to carry out corresponding processing on the primitive in the initial primitive candidate item, so that the accuracy of the primitive in the processed primitive candidate item can be ensured, and convenience is provided for the processing of the subsequent matching relation.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the processing the initial primitive candidate item based on the geometric features of the seed primitive or the geometric features of the primitives in the initial primitive candidate item to determine the primitive candidate item corresponding to the seed primitive includes:
extracting geometric lines in the well legend seed graphic primitives, and constructing a closed polygon corresponding to the well legend seed graphic primitives based on the extracted geometric lines;
calculating geometric features of the closed polygon based on the shape of the closed polygon;
and screening the initial well legend candidate items by using the geometric characteristics of the closed polygons, and determining the well legend candidate items corresponding to the well legend seed primitives.
According to the method for identifying the primitives of the municipal construction drawing, provided by the embodiment of the invention, the closed polygon is constructed by using the geometric lines of the well legend seed primitives, and the initial well legend candidate items are screened by using the geometric characteristics of the closed polygon.
With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the extracting geometric lines in the well legend seed primitive and constructing a closed polygon corresponding to the well legend seed primitive based on the extracted geometric lines includes:
extracting geometric lines in the well legend seed primitive;
and determining the maximum external outline polygon of the well legend seed primitive by using the extracted geometric lines so as to obtain the closed polygon.
With reference to the second implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the processing the initial primitive candidate item based on the geometric features of the seed primitive or the geometric features of primitives in the initial primitive candidate item to determine the primitive candidate item corresponding to the seed primitive includes:
and processing pipelines in the initial pipeline candidate items based on the position relation between each pipeline in the initial pipeline candidate items and the corresponding well legend in the well legend candidate items, and determining the pipeline candidate items corresponding to the pipeline seed primitives.
According to the method for identifying the primitive of the municipal construction drawing, provided by the embodiment of the invention, the municipal construction drawing is possibly drawn in an irregular manner, and the drawing is not standardized, so that the identification is possibly difficult, and therefore, the pipeline candidate items are determined after the pipeline in the initial pipeline candidate items is subjected to standardized processing, and the accuracy of the pipeline candidate items is improved.
With reference to the fourth implementation manner of the first aspect, in the fifth implementation manner of the first aspect, the processing the pipelines in the initial pipeline candidate based on the position relationship between each pipeline in the initial pipeline candidate and the corresponding well legend in the well legend candidate to determine the pipeline candidate corresponding to the pipeline seed primitive includes:
determining, in the preliminary tubing line candidates, a preliminary tubing line that intersects a well legend in the well legend candidates;
extending the end points of the initial pipelines to the central points of the corresponding well legends based on the distances of the end points of the initial pipelines from the corresponding well legends to obtain first pipeline candidates;
determining, in the first pipeline candidate, a first pipeline that intersects a well legend in the well legend candidate;
breaking the corresponding first pipeline along a center point of each of the intersecting well legends to arrive at a second pipeline candidate;
traversing the second pipeline candidate item, and determining a second pipeline of which only one end point is coincident with the central point of the well legend;
merging the second pipeline and the corresponding other pipelines based on the position relation of the second pipeline and other pipelines in the second pipeline candidate item to determine the pipeline candidate item.
The method for identifying the primitives of the municipal construction drawing, provided by the embodiment of the invention, sequentially extends, breaks and combines pipelines in the initial pipeline candidate items, and processes the irregular pipelines into the regular pipelines so as to ensure the accuracy of determining the pipeline candidate items.
With reference to the fifth implementation manner of the first aspect, in the sixth implementation manner of the first aspect, the merging the second pipeline and the corresponding other pipelines based on the position relationship between the second pipeline and the other pipelines in the second pipeline candidate to determine the pipeline candidate includes:
searching for a third pipeline which is parallel to and closest to the second pipeline from the other pipelines;
combining the second pipeline with the third pipeline to obtain a fourth pipeline;
judging whether two end points of the fourth pipeline are coincided with the central point of the well legend or not;
when only one end point of the fourth pipeline coincides with the central point of the well legend, merging the fourth pipeline and the corresponding other pipelines based on the position relationship of the fourth pipeline and the other pipelines to determine the pipeline candidates.
With reference to the fourth implementation manner of the first aspect, in the eighth implementation manner of the first aspect, the processing the initial primitive candidate item based on the geometric features of the seed primitive or the geometric features of primitives in the initial primitive candidate item to determine the primitive candidate item corresponding to the seed primitive includes:
and determining the initial tube lead candidate as a tube lead candidate and the initial tube marking candidate as a tube marking candidate.
With reference to the seventh implementation manner of the first aspect, in an eighth implementation manner of the first aspect, the determining, according to a position relationship between primitives in each of the primitive candidates, a matching relationship between primitives in each of the primitive candidates includes:
sequentially extracting pipelines in the pipeline candidate items to obtain a current pipeline;
searching an initial pipe lead in the pipe lead candidate items, and determining an initial pipe lead intersected with the current pipeline to obtain an initial pipe lead of the current pipeline;
searching a connecting pipe lead in the pipe lead candidate item, and determining a connecting pipe lead intersected with the initial pipe lead of the current pipeline to obtain the connecting pipe lead of the current pipeline;
recording the matching relation between the current pipeline and the initial pipe lead of the current pipeline and the connecting pipe lead of the current pipeline so as to determine the relation between the pipeline in the pipeline candidate item and the pipe lead in the pipe lead candidate item.
According to the primitive identification method of the municipal construction drawing, provided by the embodiment of the invention, the pipe lead corresponding to the pipeline can be determined by utilizing the intersection relationship between the pipeline and the initial pipe lead in the pipe leads and the intersection relationship between the initial pipe lead and the connecting pipe lead, so that the efficiency of determining the matching relationship between the pipeline and the pipe lead is improved.
With reference to the eighth implementation manner of the first aspect, in the ninth implementation manner of the first aspect, the determining, according to a position relationship between primitives in each of the primitive candidates, a matching relationship between the primitives in each of the primitive candidates further includes:
determining the types of the pipelines in the pipeline candidates based on the relation between the pipelines in the pipeline candidates and the pipeline in the pipeline candidates, wherein the types of the pipelines comprise pipelines with pipeline leads and pipelines without pipeline leads;
calculating the distance between the pipe label seed primitive and the central point of the pipeline seed primitive to obtain a pipe label search range;
determining at least one candidate label corresponding to each pipeline in the pipe label candidate items based on the type of the pipeline in the pipeline candidate items and the pipe label search range;
screening the at least one candidate label by using the geometric parameters of the pipeline to determine a target label corresponding to the pipeline;
and recording the matching relation between the pipeline in the pipeline candidate item and the label in the pipe label candidate item.
According to the method for identifying the primitive of the municipal construction drawing, provided by the embodiment of the invention, after the candidate label is obtained, the candidate label is screened by using the geometric parameters of the pipeline, so that the processing amount of data screening can be reduced, and the identification efficiency is improved.
With reference to the ninth implementation manner of the first aspect, in a tenth implementation manner of the first aspect, the screening the at least one candidate label by using the geometric parameters of the pipeline to determine a target label corresponding to each pipeline includes:
extracting pipeline length information in at least one candidate label corresponding to each pipeline;
determining the length of the pipeline by using the coordinates of the two end points of the pipeline;
and determining the target label by using the length of the pipeline and the pipeline length information in the at least one candidate label.
According to the method for identifying the primitive of the municipal construction drawing, provided by the embodiment of the invention, the pipeline length information in the candidate labels is compared with the actual length of the pipeline, and the candidate labels are screened to determine the target labels, so that the accuracy of the determined target labels is improved.
According to a second aspect, an embodiment of the present invention further provides a device for identifying a primitive of a municipal construction drawing, including:
the acquisition module is used for acquiring the seed primitive in the target municipal construction drawing;
the extraction module is used for extracting the characteristics of the seed graphic primitive and determining a graphic primitive candidate item corresponding to the seed graphic primitive in the target municipal construction drawing based on the extracted characteristics;
and the matching module is used for determining the matching relation of the primitives in the primitive candidate items according to the position relation between the primitives in the primitive candidate items.
According to the primitive recognition device for the municipal construction drawing, provided by the embodiment of the invention, the corresponding primitives are automatically recognized in the target municipal construction drawing by utilizing the characteristics of the seed primitives, and then the corresponding matching relation is determined by utilizing the position relation between the recognized primitives, so that the automatic recognition and matching of the primitives are realized, and the primitive recognition efficiency is improved.
According to a third aspect, an embodiment of the present invention provides an electronic device, including: the municipal construction drawing primitive identification method comprises a memory and a processor, wherein the memory and the processor are mutually connected in a communication mode, computer instructions are stored in the memory, and the processor executes the computer instructions so as to execute the municipal construction drawing primitive identification method in the first aspect or any one of the implementation modes of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the method for identifying primitives of a municipal construction drawing described in the first aspect or any one of the embodiments of the first aspect.
Drawings
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 that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for identifying graphical elements of a municipal construction drawing according to an embodiment of the invention;
FIG. 2 is a flow chart of a method for identifying graphical elements of a municipal construction drawing according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a well legend seed primitive and its corresponding closed polygon, according to an embodiment of the present invention;
4 a-4 b are schematic illustrations of a pipeline before and after a break in accordance with an embodiment of the present invention;
FIGS. 5 a-5 b are schematic illustrations of a pipeline before and after merging according to an embodiment of the invention;
FIGS. 6 a-6 b are schematic illustrations of a pipeline before and after being extended according to an embodiment of the invention;
FIG. 7 is a flow chart of a method for identifying graphical elements of a municipal construction drawing according to an embodiment of the invention;
FIG. 8 is a schematic tube lead according to an embodiment of the invention;
FIG. 9 is a schematic tube labeling diagram according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a candidate annotation according to an embodiment of the invention;
FIG. 11 is a block diagram of a primitive recognition apparatus for municipal construction drawings according to an embodiment of the present invention;
fig. 12 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 invention.
In accordance with an embodiment of the present invention, there is provided a graphical element identification embodiment of a municipal construction drawing, it being noted that the steps illustrated in the flow chart of the drawings may be performed in a computer system such as a set of computer executable instructions and that while a logical order is illustrated in the flow chart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
The embodiment provides a method for identifying a primitive of a municipal construction drawing, which can be used for electronic equipment such as a computer, a mobile phone, a tablet personal computer and the like, and fig. 1 is a flow chart of the method for identifying the primitive of the municipal construction drawing according to the embodiment of the invention, and as shown in fig. 1, the flow chart comprises the following steps:
and S11, acquiring the seed graphic primitive in the target municipal construction drawing.
The seed graphic elements in the target municipal construction drawing can be input to the electronic equipment by a user in an interactive mode, or can be acquired by the electronic equipment from other places, and the like. For example, the electronic device provides a human-computer interaction interface, a target municipal construction drawing is displayed on the interface, a user selects a seed primitive on the interface, and accordingly the electronic device responds to selection operation of the user to acquire the seed primitive in the target municipal construction drawing.
The graphic elements in the target municipal construction drawing comprise a well legend, a pipeline, a pipe lead and a pipe label, wherein the pipeline is used for connecting the two well legends, and the pipe lead and the pipe label correspond to the pipeline. Accordingly, the seed primitives retrieved by the electronic device may include well legend seed primitives, pipeline seed primitives, pipe lead seed primitives, and pipe legend seed primitives.
And S12, extracting the characteristics of each seed primitive, and determining a primitive candidate item corresponding to each seed primitive in the target municipal construction drawing based on the extracted characteristics.
After the electronic equipment acquires each seed primitive, the electronic equipment performs feature extraction on each seed primitive. For example, the layer in which the seed primitive is located, the geometric features of the length or area of the seed primitive, and so on may be extracted.
After the characteristics of each seed primitive are extracted, searching corresponding primitives in the target municipal construction drawing by using the characteristics of each seed primitive to obtain primitive candidates. For example, using the well legend seed primitive, searching to obtain well legend candidate items; searching to obtain pipeline candidate items by utilizing the pipeline seed graphic elements; searching to obtain a tube lead candidate item by using the tube lead seed primitive; and utilizing the pipe mark seed primitive to search and obtain pipe mark candidate items.
Each primitive candidate includes a plurality of corresponding primitives. For example, well legend candidates include multiple well legends, pipeline candidates include multiple pipelines, and so on.
Specifically, when the electronic device performs feature extraction and determines the corresponding primitive candidate, a network model trained in advance may be used for processing, or processing may be performed in a primitive traversal search manner, and so on. This is not limited in this embodiment, and may be set according to actual situations.
Details about this step will be described later.
And S13, determining the matching relation of the primitives in each primitive candidate item according to the position relation among the primitives in each primitive candidate item.
As described above, there is a matching relationship between the pipe leads and pipe labels and the pipeline. Specifically, the pipe lead is connected to the pipeline, and the pipe label is disposed near the pipe lead or the pipeline. Based on the above, the electronic device can determine the matching relationship of the primitives in each primitive candidate item by using the position relationship between the primitives in each primitive candidate item. Specifically, the matching relationship between the pipeline in the pipeline candidate item and the pipe lead in the pipe lead candidate item and the pipe label in the pipe label candidate item is determined.
Details about this step will be described later.
According to the method for identifying the primitives of the municipal construction drawing, the corresponding primitives are automatically identified in the target municipal construction drawing by utilizing the characteristics of the seed primitives, and then the corresponding matching relation is determined by utilizing the position relation between the identified primitives, so that the automatic identification and matching of the primitives are realized, and the efficiency of primitive identification is improved.
The embodiment provides a method for identifying a primitive of a municipal construction drawing, which can be used for electronic equipment such as a computer, a mobile phone, a tablet personal computer and the like, and fig. 2 is a flow chart of the method for identifying the primitive of the municipal construction drawing according to the embodiment of the invention, and as shown in fig. 2, the flow chart comprises the following steps:
and S21, acquiring the seed graphic primitive in the target municipal construction drawing.
The seed primitives comprise well legend seed primitives, pipeline seed primitives, pipe lead seed primitives and pipe annotation seed primitives.
Please refer to S11 in fig. 1, which is not described herein again.
And S22, extracting the characteristics of each seed primitive, and determining a primitive candidate item corresponding to each seed primitive in the target municipal construction drawing based on the extracted characteristics.
Specifically, the above S22 may include the following steps:
s221, performing primitive search in the target municipal construction drawing by using the layer where the seed primitive is located, and determining an initial primitive candidate item corresponding to the seed primitive.
The initial primitive candidates include an initial well legend candidate, an initial pipeline candidate, an initial pipe lead candidate, and an initial pipe annotation candidate.
The same graphic elements in the target municipal construction drawing are generally drawn in the same layer, and only one kind of graphic element is included in the layer. Based on this, the electronic device may determine the layer in which each seed primitive is located, and perform a search for a corresponding primitive in the corresponding layer, that is, determine an initial primitive candidate.
For example, the candidate item of the initial well legend can be determined by searching the well legend in the layer where the well legend seed primitive is located;
searching pipelines in the layer where the pipeline seed primitive is located, and determining an initial pipeline candidate item;
searching the tube leads in the layer where the tube lead seed primitives are located, so that initial tube lead candidates can be determined;
and performing search of the pipe label in the layer where the pipe label seed graphic element is positioned, so as to determine an initial pipe label candidate item.
S222, the initial primitive candidate items are correspondingly processed based on the geometric characteristics of the seed primitive or the geometric characteristics of the primitive in the initial primitive candidate items, and the primitive candidate items corresponding to the seed primitive are determined.
After determining the initial primitive candidate items corresponding to the seed primitives, the electronic device may filter the primitives in the initial primitive candidate items by combining geometric features of the seed primitives, such as areas, sizes, and the like; the geometric features of the primitives in the preliminary primitive candidates, such as the positional relationship between a primitive in one preliminary primitive candidate and another preliminary primitive candidate, may also be used to process primitives in the preliminary primitive candidates, and so on.
The following description will be made in detail with respect to the initial well illustration candidate, the initial pipeline candidate, the initial pipe lead candidate, and the initial pipe marking candidate, respectively.
(1) When the primitive in the target municipal construction drawing is a well legend primitive, that is, the seed primitive is a well legend seed primitive, and the initial primitive candidate is an initial well legend candidate, the step S222 may include the following steps:
(1.1) extracting geometric lines in the well legend seed primitive, and constructing a closed polygon corresponding to the well legend seed primitive based on the extracted geometric lines.
Due to drawing habits of drawings, for a well legend seed primitive, it is composed of at least one geometric line, some of which are redundant geometric lines of the well legend seed primitive. Based on this, the well legend seed primitive needs to be determined as a closed polygon, so as to ensure that the well legend seed primitive corresponds to a closed polygon.
For the structure of the closed polygon, all geometric lines can be traversed, and the closed polygon which can be formed by the geometric lines is determined; and then, screening the closed polygons to determine a closed polygon corresponding to the well legend seed primitive.
As an alternative implementation manner of this embodiment, as shown in fig. 3, the step (1.1) may include the following steps:
a) geometric lines in the well legend seed primitives are extracted.
The legend to the left of the arrows in fig. 3 is well legend seed primitives, which, as shown in fig. 3, include redundant geometric lines that make up the well legend seed primitives that need to be screened.
b) And determining the maximum external outline polygon of the well legend seed primitive by using the extracted geometric lines to obtain a closed polygon.
As shown in the legend on the right side of fig. 3, which is the maximum bounding outline polygon corresponding to the well legend seed primitive. The maximum external outline polygon can be a convex polygon of a geometric line member, and then the convex polygon is processed to obtain the maximum external outline polygon.
Of course, the closed polygon may be configured in other manners, and the specific configuration manner is not limited herein, and may be set according to actual situations.
And (1.2) calculating the geometrical characteristics of the closed polygon based on the shape of the closed polygon.
The shape of the closed polygon determined by the electronic device may be a circle, a rectangle, or the like, for example, when the closed polygon is a circle, the geometric characteristic of the closed polygon is a radius; when the closed polygon is a rectangle, the geometric characteristic of the closed polygon is width, height, or a ratio of width to height.
The geometric features of the closed polygon are not limited to those shown above, and may also be other features, and may be specifically set according to actual requirements.
And (1.3) screening the initial well legend candidate items by using the geometric characteristics of the closed polygons, and determining the well legend candidate items corresponding to the well legend seed primitive.
After the initial well legend candidates are obtained in the above steps, the geometric features of each primitive in the initial well legend candidates can be calculated. The calculation method of the geometric features of each primitive may be shown in the above step (1.1) -step (1.2), and is not described herein again.
After determining the geometric features of each primitive, the electronic device compares the features of the well legend seed primitives determined in the step (1.3) with the geometric features of each primitive to determine whether the features are the same. If the geometric characteristics of the primitive are the same as those of the well legend seed primitive, the primitive is the well legend corresponding to the well legend seed primitive. By sequentially comparing the features of the well legend seed primitives with the geometric features of each primitive, well legend candidates can be determined. Wherein, a plurality of well legends are included in the well legend candidate.
(2) When the primitive in the target municipal construction drawing is a pipeline primitive, that is, the seed primitive is a pipeline seed primitive, and the initial primitive candidate is an initial pipeline candidate, the step S222 may include the following steps:
and (2.1) processing the pipelines in the initial pipeline candidate items based on the position relation between each pipeline in the initial pipeline candidate items and the corresponding well legend in the well legend candidate items, and determining the pipeline candidate items corresponding to the pipeline seed primitives.
Wherein, in standard municipal construction drawings, the both ends of same pipeline are connected with two well legends respectively. However, due to the drawing norms, the pipelines in the target municipal construction drawings may have a situation where one pipeline runs through a plurality of well illustrations as shown in fig. 4a, the pipeline is disconnected as shown in fig. 5a, or the pipeline is not connected to the center of the well illustrations as shown in fig. 6a, and the like. However, these non-standard pipelines would make pipeline identification difficult.
Therefore, after obtaining the initial pipeline candidates, the electronic device needs to perform normalization processing on each pipeline of the initial pipeline candidates to determine the pipeline candidates corresponding to the pipeline seed primitive. Specifically, the pipeline shown in FIG. 4a needs to be broken to obtain the pipeline shown in FIG. 4 b; merging the pipelines shown in FIG. 5a to obtain the pipeline shown in FIG. 5 b; the pipeline shown in fig. 6a is subjected to an extension process, resulting in the pipeline shown in fig. 6 b.
As an optional implementation manner of this embodiment, the step (2.1) may include the following steps:
(a) an initial pipeline is determined in the initial pipeline candidates that intersects the well legend in the well legend candidates.
As shown in fig. 6a, the electronic device traverses the preliminary pipeline candidates, sifting out among the preliminary pipeline candidates the preliminary pipelines that intersect the well legend in the well legend candidates. The initial pipeline has two ends respectively intersected with the two well legends, but end points which are not coincident with the center point of the well legends exist in the initial pipeline. The number of the end points of the initial pipeline which are not coincident with the center point of the well legend can be one or two. And are not intended to be limiting in any way.
(b) The end points of the initial pipelines are extended to the center points of the corresponding well legends based on the distances of the end points of the initial pipelines from the corresponding well legends to obtain first pipeline candidates.
After the electronic equipment acquires an initial pipeline, firstly extracting central points of two well legends corresponding to the initial pipeline; then, calculating the distances between the two end points and the center points of the two corresponding well legends respectively by using the coordinates of the two end points of the initial pipeline; finally, the calculated distance is used to extend the end points of the initial pipeline to the center point of the corresponding well legend, resulting in the first pipeline. Wherein, the first pipeline is obtained after the initial pipeline is subjected to extension treatment.
For example, the two endpoints of the initial pipeline are referred to as the start point and the end point, respectively. The electronics calculate the distance Dist1 between the origin of the original pipeline and the center point of the intersecting well legend, extending the original pipeline in the opposite direction of the pipeline for a length of Dist1, ensuring that the origin of the extended original pipeline extends to the center of the well legend.
The electronics calculate the distance Dist2 between the end point of the original pipeline and the center point of the intersecting well legend, extending the original pipeline in the opposite direction of the pipeline for a length of Dist2, ensuring that the end point of the extended original pipeline extends to the center of the well legend.
After the electronic device performs the above-mentioned steps on the corresponding initial pipeline in the initial pipeline candidates, the corresponding first pipeline may be obtained, for example, as shown in fig. 6b, so as to update the initial pipeline candidates to obtain the first pipeline candidates.
(c) A first pipeline is determined in the first pipeline candidate that intersects the well legend in the well legend candidate.
The electronic equipment obtains a first pipeline candidate after performing extension processing on the initial pipeline in the initial pipeline candidates. Since there may be situations where one pipeline runs through multiple well legends, as shown in fig. 4a, for the first pipeline in the first pipeline candidate, the electronics need to break this type of first pipeline accordingly.
In particular, the electronic device traverses a first pipeline in the first pipeline candidate, and may determine the first pipeline that intersects a well legend in the well legend candidate using the positional relationship of the first pipeline to the respective well legends.
(d) The corresponding first pipeline is broken along the center point of each intersecting well legend to arrive at a second pipeline candidate.
The electronics, after identifying a first tubing line that extends through the plurality of well legends, break the corresponding second tubing line along a center point of the well legends.
Specifically, the electronic device may traverse the first pipeline candidates to obtain respective first pipelines. The detailed description will be given by taking a first pipeline as an example. For convenience of description, the first pipeline obtained is referred to as the current pipeline.
The electronic equipment filters out a well legend set intersected with the current pipeline geometric position from the well legend candidate items, and sorts the intersected well legend geometry from near to far according to the distance from the current pipeline starting point; the current pipeline is sequentially broken at the center point of the intersected well legend to obtain a plurality of pipelines, namely the second pipeline. For example, after the electronic device performs the breaking process on the first pipeline illustrated in fig. 4a, a second pipeline illustrated in fig. 4b is obtained.
(e) And traversing the second pipeline candidate items, and determining the second pipeline with only one end point of the second pipeline candidate items coinciding with the center point of the well legend.
There may be a second tubing line as shown in figure 5a for which a merging process is required so that the two well illustrations are connected by only one tubing line. Fig. 5a shows a second pipeline having only one end coinciding with the centre point of the well illustration and the other end being located between the two well illustrations. The electronic device may traverse the second pipeline candidates, and determine a second pipeline having only one end point of the second pipeline candidates coinciding with the center point of the well legend using the positional relationship of the end point coordinates of each second pipeline in the second pipeline candidates and the center point of the adjacent well legend.
(f) And merging the second pipeline and the corresponding other pipelines based on the position relation of the second pipeline and the other pipelines in the second pipeline candidate item to determine the pipeline candidate item.
After the electronic equipment determines the second pipeline, the electronic equipment performs merging processing by using the position relation between other pipelines in the second pipeline candidates and the second pipeline. Specifically, the electronic device may start from an end point of the second pipeline coinciding with the center point of the well legend, perform pipeline search along the extending direction of the second pipeline, and merge the pipeline in the extending direction with the second pipeline until both ends of the merged pipeline coincide with the center points of the two well legends, respectively.
And sequentially performing extension, interruption and merging processing on the pipelines in the initial pipeline candidate items, and processing the irregular pipelines into regular pipelines so as to ensure the accuracy of determining the pipeline candidate items.
In some optional implementations of this embodiment, the step (f) may include the following steps:
f.1) searching other pipelines for a third pipeline which is parallel to the second pipeline and is closest to the second pipeline.
For convenience of the following description, the second pipeline that needs to be merged is referred to as the current pipeline. Take the example where the start point of the current pipeline overlaps the center point of one well legend and the end point of the current pipeline does not overlap the center point of the well legend.
The electronic equipment screens out the pipeline parallel to the current pipeline from the second pipeline candidates, calculates the distance between the parallel pipeline and the current pipeline, and determines the pipeline closest to the current pipeline as a third pipeline.
f.2) combining the second pipeline with the third pipeline to obtain a fourth pipeline.
f.3) to determine whether both end points of the fourth line coincide with the center point of the well legend.
The electronic device determines two end points of the fourth line to determine whether both end points coincide with the center points of the two well legends, respectively.
f.4) when only one of the fourth pipelines coincides with the center point of the well legend, the fourth pipeline and the corresponding other pipelines are merged to determine pipeline candidates based on their positional relationships to the other pipelines.
If only one end point is coincident with the center point of the well legend, the intersecting pipelines are continuously searched along the pipeline direction until the intersecting pipelines cannot be found out, or the two end points of the combined pipelines are respectively coincident with the center points of the two well legends.
The electronics remove the pipe line whose starting and ending point does not intersect the well legend geometry location in the well legend candidate from the pipe line candidate after the merge process to remove the redundant pipe line.
Further, the electronic device may determine two well legends corresponding to the pipelines through the above steps. That is, the pipeline may be matched to the well legend.
(3) When the primitive in the target municipal construction drawing is a pipe lead primitive, that is, the seed primitive is a pipe lead seed primitive, and the initial primitive candidate is an initial pipe lead candidate, the step S222 may include the following steps: and determining the initial tubulation candidate as the tubulation candidate.
(4) When the primitive in the target municipal construction drawing is the pipe label primitive, that is, the seed primitive is the pipe label seed primitive, and the initial primitive candidate is the initial pipe label candidate, the step S222 may include the following steps: and determining the initial pipe annotation candidate as a pipe annotation candidate.
Similarly, the electronic device may determine the candidate of the pipe lead in the layer where the pipe lead seed primitive is located by using the layer information; and determining the pipe annotation candidate item in the graphic element where the pipe annotation seed graphic element is positioned. And finally, respectively determining the initial tube lead candidate items as tube lead candidate items, and determining the initial tube marking candidate items as tube marking candidate items.
And S23, determining the matching relation of the primitives in each primitive candidate item according to the position relation among the primitives in each primitive candidate item.
Please refer to S13 in fig. 1, which is not described herein again.
According to the primitive identification method of the municipal construction drawing, the closed polygon is constructed by using the geometric lines of the well legend seed primitives, the initial well legend candidate items are screened by using the geometric characteristics of the closed polygon, the closed polygon is carried out due to the diversity of the well legends brought by drawing habits in the municipal construction drawing, and the initial well legend candidate items are screened by using the geometric characteristics of the closed polygon, so that the accuracy of the well legend candidate items is improved. In addition, municipal construction drawings may have irregular drawing conditions, and recognition difficulty may be caused by irregular drawing, so that pipeline candidate items are determined after the pipeline in the initial pipeline candidate items is subjected to normalized processing, and the accuracy of the pipeline candidate items is improved.
In this embodiment, a method for identifying a primitive of a municipal construction drawing is provided, which can be used for electronic devices, such as a computer, a mobile phone, a tablet computer, and the like, fig. 7 is a flowchart of the method for identifying a primitive of a municipal construction drawing according to an embodiment of the present invention, and as shown in fig. 7, the flowchart includes the following steps:
and S31, acquiring the seed graphic primitive in the target municipal construction drawing.
Please refer to S21 in fig. 2 for details, which are not described herein.
And S32, extracting the characteristics of the seed graphic primitive, and determining a graphic primitive candidate item corresponding to the seed graphic primitive in the target municipal construction drawing based on the extracted characteristics.
Please refer to S22 in fig. 2 for details, which are not described herein.
And S33, determining the matching relation of the primitives in the primitive candidates according to the position relation among the primitives in the primitive candidates.
As shown in fig. 8, the pipe lead seed primitive includes an initial pipe lead and a connecting pipe lead; accordingly, each tube lead in the tube lead candidates also includes an initial tube lead and a connection tube lead. The connecting pipe lead may be a straight line or other geometric figures, and the shape of the connecting pipe lead is not limited at all.
The electronics, after the processing of S32 above, arrive at a well legend candidate, a tubing line candidate, a pipe lead candidate, and a pipe label candidate. Accordingly, it is necessary to establish a matching relationship between a pipeline in the pipeline candidates and the pipe lead of the pipe lead candidate and the pipe label of the pipe label candidate. The matching relationship between the pipeline and the tube lead wire can be determined by utilizing the intersection relationship between the pipeline and the tube lead wire and based on the intersection relationship between the pipeline and the tube lead wire; the matching relationship between the pipelines and the pipe labels can be used for searching the pipe labels within a first preset range away from the pipelines or searching the pipe labels within a second preset range away from the pipe leads, so that the pipe labels corresponding to the pipelines are determined.
Specifically, the above S33 may include the following steps:
s331, extracting pipelines in the pipeline candidates in sequence to obtain a current pipeline.
Since the pipe lead and the pipe label both correspond to the pipeline, the electronic device needs to match the pipelines in the pipeline candidates in sequence.
It should be noted that not all lines correspond to pigtails, and that there may be no pigtails present in some lines and pigtails present in some lines. Thus, at this time, the pipeline can be divided into two types, i.e., a pipeline with a pipe lead and a pipeline without a pipe lead, according to whether the pipe lead is present or not.
In the following description, the matching relationship between a pipeline, a pipe lead and a pipe label is described in detail as an example. The other pipelines are processed in a similar manner, and are not described in detail herein. Further, for convenience of description, the currently processed pipeline is referred to as the current pipeline.
S332, searching for an initial pipe lead in the pipe lead candidates, determining the initial pipe lead intersected with the current pipeline, and obtaining the initial pipe lead of the current pipeline.
The electronic equipment searches in the pipe lead candidates, and determines the initial pipe lead of the current pipeline by using the position relation between the initial pipe lead and the pipeline. That is, the electronic device finds the pipe lead that intersects the current pipeline among the pipe lead candidates as the initial pipe lead of the current pipeline.
S333, searching for the connecting pipe lead in the pipe lead candidate, determining the connecting pipe lead intersected with the initial pipe lead of the current pipeline, and obtaining the connecting pipe lead of the current pipeline.
And the electronic equipment searches the connecting pipe leads in the pipe lead candidates, finds the pipe lead intersected with the initial pipe lead of the current pipeline and uses the pipe lead as the connecting pipe lead of the current pipeline. To this end, the electronic device may determine the relationship of the current pipeline, the initial pipe lead of the current pipeline, and the connection pipe lead of the current pipeline.
And S334, recording the matching relation between the current pipeline and the initial pipe lead of the current pipeline and the connecting pipe lead of the current pipeline so as to determine the relation between the pipeline in the pipeline candidate item and the pipe lead in the pipe lead candidate item.
By repeating the above-described processes of S331-S333, the electronic device may determine the relationship of each of the pipeline candidates to the pipe lead in the pipe lead candidate.
Further, as shown in fig. 8, after determining the connection leads corresponding to the respective pipelines, the electronic device may determine the type of the connection leads according to the shape of the connection leads. For example:
the initial tube lead is a straight line, the connecting tube lead is a straight line and the two are intersected, and then the tube lead is an L-shaped tube lead; the initial tube lead is a straight line, the connecting tube lead is circular and the two are intersected, and then the tube lead is an IO type tube lead.
S335, determining the type of the pipeline in the pipeline candidate item based on the relation between the pipeline in the pipeline candidate item and the pipeline in the pipeline candidate item.
Wherein the types of pipelines include pipelines with pipe leads and pipelines without pipe leads.
After the electronic device is processed through the steps, the pipe leads corresponding to the pipes in the pipe candidate items can be obtained, wherein some pipes have no pipe leads and are called as pipes without pipe leads.
S336, calculating the distance between the pipe mark seed primitive and the central point of the pipeline seed primitive to obtain a pipe mark search range.
After determining the tube lead corresponding to the pipeline and the type of the pipeline, the electronic device may determine that the tube label corresponding to each pipeline is identified. Specifically, the pipe label is generally set within a preset range of the pipeline, or pipe lead, and the electronic device searches for the pipe label within a certain range of the pipeline or pipe lead. As shown in fig. 9, the pipeline without the pipe leads, with their corresponding pipe labels, is disposed adjacent the pipeline; a pipeline with a pipe lead, the corresponding pipe label of which is arranged near the pipe label.
The electronic device may calculate a distance between the pipe annotation seed primitive and a center point of the pipeline seed primitive, and use the distance as a pipe annotation search range.
S337, determining at least one candidate label corresponding to each pipeline in the pipe label candidate items based on the type of the pipeline in the pipeline candidate items and the pipe label search range.
For each pipeline in the pipeline candidates, the electronic device performs a search for the pipe label using the type of the pipeline and the pipe label search range, so that at least one candidate label corresponding to each pipeline can be determined.
Specifically, the electronic device may determine a reference line for a tube label corresponding to each pipeline. For the pipeline matched with the pipe lead, the connecting pipe lead is a reference line marked by the pipe; for a pipeline that is not matched to a pipe lead, the pipeline is the reference line for the pipe label.
And the electronic equipment calculates the distance between each pipe label in the pipe label candidate items and each pipe label reference line, and determines the pipe label with the distance within the search range as the candidate label of each pipeline.
For example, as shown in FIG. 10, after the pipeline has been searched, two candidate labels are determined.
S338, screening at least one candidate label by using the geometric parameters of the pipeline, and determining a target label corresponding to the pipeline.
Because the pipe label is used for labeling the information of the pipeline, after the electronic device obtains at least one candidate label, the electronic device can screen the candidate label by using the label information in the candidate label to determine the target label corresponding to the pipeline.
As an optional implementation manner of this embodiment, the step S338 may include the following steps:
(1) and extracting the pipeline length information in the at least one candidate label corresponding to each pipeline.
Corresponding to each pipeline, there is at least one candidate label. The electronic device can extract the length of jurisdiction information in at least one candidate annotation. The electronic device can extract the pipeline length information in the pipe label by traversing the regular expression. For example, the pipe length key: di. dN, de, d, A, L; pipe diameter key word: D.
for example, the tube labels: D300L 30, i.e. pipe diameter 300, pipe length 30.
(2) The length of the pipeline is determined using the coordinates of the two end points of the pipeline.
(3) And determining the target label by using the length of the pipeline and the pipeline length information in the at least one candidate label.
And the electronic equipment compares the calculated length of the pipeline with the pipeline length information in at least one candidate label, and determines the candidate label with the consistent length as the target label.
The pipeline length information in the candidate labels is compared with the actual length of the pipeline, the candidate labels are screened to determine the target labels, and the accuracy of the determined target labels is improved.
And S339, recording the matching relation between the pipelines in the pipeline candidate items and the labels in the pipe label candidate items.
The electronic device may determine the pipe lead and the pipe label corresponding to each pipe in the pipe candidate items, that is, may determine a matching relationship among the pipes, the pipe leads, and the pipe labels.
The subsequent electronic equipment can utilize the matching relations to automatically calculate the engineering quantity.
According to the primitive identification method of the municipal construction drawing, the pipe leads corresponding to the pipelines can be determined by utilizing the intersection relationship between the pipelines and the initial pipe leads in the pipe leads and the intersection relationship between the initial pipe leads and the connecting pipe leads, and the efficiency of determining the matching relationship between the pipelines and the pipe leads is improved; after the candidate labels are obtained, the candidate labels are screened by using the geometric parameters of the pipeline, so that the processing amount of data screening can be reduced, and the identification efficiency is improved.
The embodiment also provides a primitive recognition device for the municipal construction drawings, which is used for realizing the embodiment and the preferred embodiment, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The embodiment provides a primitive recognition device of municipal construction drawing, as shown in fig. 11, including:
the acquisition module 41 is used for acquiring a seed primitive in a target municipal construction drawing;
the extraction module 42 is configured to extract features of the seed primitive, and determine a primitive candidate item corresponding to the seed primitive in the target municipal construction drawing based on the extracted features;
and the matching module 43 is configured to determine a matching relationship between the primitives in the primitive candidate items according to a position relationship between the primitives in the primitive candidate items.
The primitive recognition device of municipal construction drawing that this embodiment provided utilizes the characteristic of seed primitive to carry out the discernment of corresponding primitive automatically in target municipal construction drawing, and the position relation between the reuse primitive of discerning confirms corresponding matching relation to realize the automatic identification and the matching of primitive, improved the efficiency of primitive discernment.
The element identifying means of the municipal construction drawing in this embodiment is in the form of a functional unit, where the unit is an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and/or other devices that provide the above-described functionality.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
The embodiment of the invention also provides electronic equipment which is provided with the primitive recognition device of the municipal construction drawing shown in the figure 11.
Referring to fig. 12, fig. 12 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 12, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, memory 54, at least one communication bus 52. Wherein a communication bus 52 is used to enable the connection communication between these components. The communication interface 53 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 53 may also include a standard wired interface and a standard wireless interface. The Memory 54 may be a high-speed RAM Memory (volatile Random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 54 may alternatively be at least one memory device located remotely from the processor 51. Wherein the processor 51 may be in connection with the apparatus described in fig. 11, the memory 54 stores an application program, and the processor 51 calls the program code stored in the memory 54 for performing any of the above-mentioned method steps.
The communication bus 52 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 52 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 12, but this is not intended to represent only one bus or type of bus.
The memory 54 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 54 may also comprise a combination of the above types of memories.
The processor 51 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 51 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 54 is also used to store program instructions. The processor 51 may call program instructions to implement the method for identifying graphical elements of municipal construction drawings as shown in the embodiments of fig. 1, 2 and 7 of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the primitive identification method of the municipal construction drawing in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims (14)
1. A primitive recognition method of municipal construction drawings is characterized by comprising the following steps:
acquiring a seed primitive in a target municipal construction drawing;
extracting the characteristics of the seed primitive, and determining a primitive candidate item corresponding to the seed primitive in the target municipal construction drawing based on the extracted characteristics;
and determining the matching relation of the primitives in the primitive candidate items according to the position relation between the primitives in the primitive candidate items.
2. The method of claim 1, wherein the extracting the features of the seed primitive and determining a primitive candidate corresponding to the seed primitive in the target municipal construction drawing based on the extracted features comprises:
performing primitive search in the target municipal construction drawing by using the layer where the seed primitive is located, and determining an initial primitive candidate item corresponding to the seed primitive;
and correspondingly processing the initial primitive candidate item based on the geometric characteristics of the seed primitive or the geometric characteristics of the primitives in the initial primitive candidate item, and determining the primitive candidate item corresponding to the seed primitive.
3. The method of claim 2, wherein the primitives of the target municipal construction drawing are well drawing primitives, and the determining the primitive candidates corresponding to the seed primitives by performing corresponding processing on the initial primitive candidates based on the geometric features of the seed primitives or the geometric features of the primitives in the initial primitive candidates comprises:
extracting geometric lines in the well legend seed graphic primitives, and constructing a closed polygon corresponding to the well legend seed graphic primitives based on the extracted geometric lines;
calculating geometric features of the closed polygon based on the shape of the closed polygon;
and screening the initial well legend candidate items by using the geometric characteristics of the closed polygons, and determining the well legend candidate items corresponding to the well legend seed primitives.
4. The method of claim 3, wherein extracting geometric lines in the well legend seed primitive and constructing a closed polygon corresponding to the well legend seed primitive based on the extracted geometric lines comprises:
extracting geometric lines in the well legend seed primitive;
and determining the maximum external outline polygon of the well legend seed primitive by using the extracted geometric lines so as to obtain the closed polygon.
5. The method of claim 3, wherein the primitive of the target municipal construction drawing is a pipeline primitive, and the processing the initial primitive candidate based on the geometric features of the seed primitive or the geometric features of the primitives in the initial primitive candidate determines the primitive candidate corresponding to the seed primitive comprises:
and processing pipelines in the initial pipeline candidate items based on the position relation between each pipeline in the initial pipeline candidate items and the corresponding well legend in the well legend candidate items, and determining the pipeline candidate items corresponding to the pipeline seed primitives.
6. The method of claim 5, wherein the processing the pipelines in the preliminary pipeline candidate based on their positional relationships to corresponding well legends in well legend candidates to determine pipeline candidates corresponding to the pipeline seed primitives comprises:
determining, in the preliminary tubing line candidates, a preliminary tubing line that intersects a well legend in the well legend candidates;
extending the end points of the initial pipelines to the central points of the corresponding well legends based on the distances of the end points of the initial pipelines from the corresponding well legends to obtain first pipeline candidates;
determining, in the first pipeline candidate, a first pipeline that intersects a well legend in the well legend candidate;
breaking the corresponding first pipeline along a center point of each of the intersecting well legends to arrive at a second pipeline candidate;
traversing the second pipeline candidate item, and determining a second pipeline of which only one end point is coincident with the central point of the well legend;
merging the second pipeline and the corresponding other pipelines based on the position relation of the second pipeline and other pipelines in the second pipeline candidate item to determine the pipeline candidate item.
7. The method of claim 6, wherein said merging the second pipeline and the respective other pipelines to determine the pipeline candidate based on the positional relationship of the second pipeline and the other pipelines in the second pipeline candidate comprises:
searching for a third pipeline which is parallel to and closest to the second pipeline from the other pipelines;
combining the second pipeline with the third pipeline to obtain a fourth pipeline;
judging whether two end points of the fourth pipeline are coincided with the central point of the well legend or not;
when only one end point of the fourth pipeline coincides with the central point of the well legend, merging the fourth pipeline and the corresponding other pipelines based on the position relationship of the fourth pipeline and the other pipelines to determine the pipeline candidates.
8. The method of claim 5, wherein the primitive of the target municipal construction drawing is a pipeline primitive, and the processing the initial primitive candidate based on the geometric features of the seed primitive or the geometric features of the primitives in the initial primitive candidate determines the primitive candidate corresponding to the seed primitive comprises:
and determining the initial tube lead candidate as a tube lead candidate and the initial tube marking candidate as a tube marking candidate.
9. The method of claim 8, wherein the pipe leader seed primitives comprise initial pipe leaders and connecting pipe leaders, and wherein determining a matching relationship for primitives in each of the primitive candidates based on positional relationships between primitives in each of the primitive candidates comprises:
sequentially extracting pipelines in the pipeline candidate items to obtain a current pipeline;
searching an initial pipe lead in the pipe lead candidate items, and determining an initial pipe lead intersected with the current pipeline to obtain an initial pipe lead of the current pipeline;
searching a connecting pipe lead in the pipe lead candidate item, and determining a connecting pipe lead intersected with the initial pipe lead of the current pipeline to obtain the connecting pipe lead of the current pipeline;
recording the matching relation between the current pipeline and the initial pipe lead of the current pipeline and the connecting pipe lead of the current pipeline so as to determine the relation between the pipeline in the pipeline candidate item and the pipe lead in the pipe lead candidate item.
10. The method of claim 9, wherein said determining a matching relationship between primitives in each of said primitive candidates according to a positional relationship between primitives in each of said primitive candidates further comprises:
determining the types of the pipelines in the pipeline candidates based on the relation between the pipelines in the pipeline candidates and the pipeline in the pipeline candidates, wherein the types of the pipelines comprise pipelines with pipeline leads and pipelines without pipeline leads;
calculating the distance between the pipe label seed primitive and the central point of the pipeline seed primitive to obtain a pipe label search range;
determining at least one candidate label corresponding to each pipeline in the pipe label candidate items based on the type of the pipeline in the pipeline candidate items and the pipe label search range;
screening the at least one candidate label by using the geometric parameters of the pipeline to determine a target label corresponding to the pipeline;
and recording the matching relation between the pipeline in the pipeline candidate item and the label in the pipe label candidate item.
11. The method of claim 10, wherein the screening the at least one candidate label using the geometric parameters of the pipeline to determine the target label corresponding to each pipeline comprises:
extracting pipeline length information in at least one candidate label corresponding to each pipeline;
determining the length of the pipeline by using the coordinates of the two end points of the pipeline;
and determining the target label by using the length of the pipeline and the pipeline length information in the at least one candidate label.
12. The utility model provides a primitive recognition device of municipal construction drawing which characterized in that includes:
the acquisition module is used for acquiring the seed primitive in the target municipal construction drawing;
the extraction module is used for extracting the characteristics of the seed graphic primitive and determining a graphic primitive candidate item corresponding to the seed graphic primitive in the target municipal construction drawing based on the extracted characteristics;
and the matching module is used for determining the matching relation of the primitives in the primitive candidate items according to the position relation between the primitives in the primitive candidate items.
13. An electronic device, comprising:
a memory and a processor, wherein the memory and the processor are connected with each other in a communication way, the memory stores computer instructions, and the processor executes the computer instructions to execute the method for identifying the graphic elements of the municipal construction drawing according to any one of claims 1 to 11.
14. A computer-readable storage medium storing computer instructions for causing a computer to execute the method for identifying a primitive in a municipal construction drawing according to any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011487727.9A CN112464903B (en) | 2020-12-16 | 2020-12-16 | Primitive identification method and device of municipal construction drawing and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011487727.9A CN112464903B (en) | 2020-12-16 | 2020-12-16 | Primitive identification method and device of municipal construction drawing and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112464903A true CN112464903A (en) | 2021-03-09 |
CN112464903B CN112464903B (en) | 2024-06-21 |
Family
ID=74804427
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011487727.9A Active CN112464903B (en) | 2020-12-16 | 2020-12-16 | Primitive identification method and device of municipal construction drawing and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112464903B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112966764A (en) * | 2021-03-17 | 2021-06-15 | 广联达科技股份有限公司 | Graph model comparison method and device |
CN114429639A (en) * | 2022-01-27 | 2022-05-03 | 广联达科技股份有限公司 | Pipeline marking identification method and device |
CN114444169A (en) * | 2021-12-28 | 2022-05-06 | 万翼科技有限公司 | Building outline recognition method, device, equipment and storage medium |
CN115048697A (en) * | 2022-06-14 | 2022-09-13 | 通号城市轨道交通技术有限公司 | Primitive link relation determining method and device, electronic equipment and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138711A (en) * | 2015-10-21 | 2015-12-09 | 北京中电普华信息技术有限公司 | Primitive indexing method, primitive detecting method, primitive indexing device and a primitive detecting device |
US20180082471A1 (en) * | 2016-09-22 | 2018-03-22 | Apple Inc. | Common geometric primitive associated with multiple geometric primitives |
US20180137676A1 (en) * | 2016-11-17 | 2018-05-17 | Advanced Micro Devices, Inc. | Identifying primitives in input index stream |
US10091542B1 (en) * | 2015-09-04 | 2018-10-02 | Adap.Tv, Inc. | Systems and methods of dynamic optimization of data element utilization according to objectives |
CN111062084A (en) * | 2019-12-30 | 2020-04-24 | 广东海外建设咨询有限公司 | Municipal bridge engineering construction supervision system |
CN111177445A (en) * | 2019-12-30 | 2020-05-19 | 湖南特能博世科技有限公司 | Standard primitive determining method, primitive identifying method and device and electronic equipment |
CN111177813A (en) * | 2019-12-31 | 2020-05-19 | 湖南特能博世科技有限公司 | Method, device and electronic system for identifying primitive |
CN111191006A (en) * | 2019-12-30 | 2020-05-22 | 湖南特能博世科技有限公司 | Method and device for determining connection relation between legends and electronic system |
CN111310254A (en) * | 2020-03-10 | 2020-06-19 | 广联达科技股份有限公司 | CAD legend recognition method, device, storage medium and electronic equipment |
CN111737800A (en) * | 2020-06-23 | 2020-10-02 | 广联达科技股份有限公司 | Primitive selection method and device and electronic equipment |
CN111881171A (en) * | 2020-07-17 | 2020-11-03 | 广联达科技股份有限公司 | Drawing identification recommendation method and system based on data analysis |
-
2020
- 2020-12-16 CN CN202011487727.9A patent/CN112464903B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10091542B1 (en) * | 2015-09-04 | 2018-10-02 | Adap.Tv, Inc. | Systems and methods of dynamic optimization of data element utilization according to objectives |
CN105138711A (en) * | 2015-10-21 | 2015-12-09 | 北京中电普华信息技术有限公司 | Primitive indexing method, primitive detecting method, primitive indexing device and a primitive detecting device |
US20180082471A1 (en) * | 2016-09-22 | 2018-03-22 | Apple Inc. | Common geometric primitive associated with multiple geometric primitives |
US20180137676A1 (en) * | 2016-11-17 | 2018-05-17 | Advanced Micro Devices, Inc. | Identifying primitives in input index stream |
CN111062084A (en) * | 2019-12-30 | 2020-04-24 | 广东海外建设咨询有限公司 | Municipal bridge engineering construction supervision system |
CN111177445A (en) * | 2019-12-30 | 2020-05-19 | 湖南特能博世科技有限公司 | Standard primitive determining method, primitive identifying method and device and electronic equipment |
CN111191006A (en) * | 2019-12-30 | 2020-05-22 | 湖南特能博世科技有限公司 | Method and device for determining connection relation between legends and electronic system |
CN111177813A (en) * | 2019-12-31 | 2020-05-19 | 湖南特能博世科技有限公司 | Method, device and electronic system for identifying primitive |
CN111310254A (en) * | 2020-03-10 | 2020-06-19 | 广联达科技股份有限公司 | CAD legend recognition method, device, storage medium and electronic equipment |
CN111737800A (en) * | 2020-06-23 | 2020-10-02 | 广联达科技股份有限公司 | Primitive selection method and device and electronic equipment |
CN111881171A (en) * | 2020-07-17 | 2020-11-03 | 广联达科技股份有限公司 | Drawing identification recommendation method and system based on data analysis |
Non-Patent Citations (3)
Title |
---|
孙伟: "地下管线探测数据处理及可视化技术研究", 中国博士学位论文全文数据库电子期刊工程科技Ⅱ辑, 15 June 2013 (2013-06-15) * |
张雨婷;舒莉琴;齐学军;魏亚军;: "Revit MEP软件在暖通管道设计中的应用", 科技经济导刊, no. 15, 25 May 2018 (2018-05-25) * |
王新新;: "基于特征的矢量图形符号渐进识别方法", 软件导刊, no. 05, 15 May 2020 (2020-05-15) * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112966764A (en) * | 2021-03-17 | 2021-06-15 | 广联达科技股份有限公司 | Graph model comparison method and device |
CN112966764B (en) * | 2021-03-17 | 2024-04-16 | 广联达科技股份有限公司 | Pattern comparison method and device |
CN114444169A (en) * | 2021-12-28 | 2022-05-06 | 万翼科技有限公司 | Building outline recognition method, device, equipment and storage medium |
CN114429639A (en) * | 2022-01-27 | 2022-05-03 | 广联达科技股份有限公司 | Pipeline marking identification method and device |
CN114429639B (en) * | 2022-01-27 | 2024-05-03 | 广联达科技股份有限公司 | Pipeline annotation recognition method and device |
CN115048697A (en) * | 2022-06-14 | 2022-09-13 | 通号城市轨道交通技术有限公司 | Primitive link relation determining method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112464903B (en) | 2024-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112464903A (en) | Primitive identification method and device of municipal construction drawing and electronic equipment | |
CN111753727B (en) | Method, apparatus, device and readable storage medium for extracting structured information | |
JP3282637B2 (en) | Handwritten input display device and method | |
CN108268743B (en) | Well automatic identification method and system based on building drawings | |
CN112560862B (en) | Text recognition method and device and electronic equipment | |
US8929664B2 (en) | Shape detection using chain code states | |
CN105302849A (en) | Annotation display assistance device and method of assisting annotation display | |
CN110765893A (en) | Drawing file identification method, electronic equipment and related product | |
CN110851896B (en) | CAD (computer-aided design) outer wall body identification method and device based on local neighborhood information | |
CN113269153B (en) | Form identification method and device | |
CN111291649A (en) | Image recognition method and device and electronic equipment | |
JP2005293042A (en) | Piping drawing recognition method, piping drawing recognition device, and program therefor | |
CN113780297A (en) | Image processing method, device, equipment and storage medium | |
CN112435274A (en) | Remote sensing image planar ground object extraction method based on object-oriented segmentation | |
CN112507938A (en) | Geometric feature calculation method, geometric feature recognition method and geometric feature recognition device for text primitives | |
CN115116084A (en) | Method, device and equipment for identifying quotation and storage medium | |
CN111857703A (en) | Matching method and device for layers in interface and electronic equipment | |
CN114386407B (en) | Word segmentation method and device for text | |
CN112613088B (en) | Pattern recognition method, pattern recognition device and computer equipment | |
CN114201164A (en) | Magnetic attraction method and device for graphical programming module, electronic equipment and medium | |
CN109101973A (en) | Character recognition method, electronic equipment, storage medium | |
CN114723792A (en) | Method and device for updating land parcel information, electronic equipment and storage medium | |
CN112766269A (en) | Picture text retrieval method, intelligent terminal and storage medium | |
CN111783180A (en) | Drawing splitting method and related device | |
CN117558039B (en) | Automatic artery naming model construction and naming method 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 |