CN117373052B - CAD drawing frame information extraction method and system - Google Patents

CAD drawing frame information extraction method and system Download PDF

Info

Publication number
CN117373052B
CN117373052B CN202311650260.9A CN202311650260A CN117373052B CN 117373052 B CN117373052 B CN 117373052B CN 202311650260 A CN202311650260 A CN 202311650260A CN 117373052 B CN117373052 B CN 117373052B
Authority
CN
China
Prior art keywords
target
bounding box
rectangular bounding
contained
cad drawing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311650260.9A
Other languages
Chinese (zh)
Other versions
CN117373052A (en
Inventor
周自强
彭飞
李一华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Shaoke Intelligent Construction Technology Co ltd
Original Assignee
Jiangxi Shaoke Intelligent Construction 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 Jiangxi Shaoke Intelligent Construction Technology Co ltd filed Critical Jiangxi Shaoke Intelligent Construction Technology Co ltd
Priority to CN202311650260.9A priority Critical patent/CN117373052B/en
Publication of CN117373052A publication Critical patent/CN117373052A/en
Application granted granted Critical
Publication of CN117373052B publication Critical patent/CN117373052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a CAD drawing frame information extraction method and a system, wherein the method comprises the following steps: when the CAD drawing is obtained, decomposing the CAD drawing to obtain line segment data contained in the CAD drawing; generating a corresponding initial rectangular bounding box according to the line segment data, and screening the initial rectangular bounding box to obtain a target rectangular bounding box; detecting a target frame contained in the target rectangular bounding box based on a preset rule, and extracting a plurality of icons contained in the target frame; and detecting a target table respectively contained in each icon, and extracting frame information from the target table. The method and the device can omit manual checking operation, correspondingly improve the information extraction efficiency, and improve the use experience of users.

Description

CAD drawing frame information extraction method and system
Technical Field
The invention relates to the technical field of data processing, in particular to a CAD drawing frame information extraction method and system.
Background
With the advanced application of BIM (Building Information Model ) technology in the building field, nowadays, more and more building designs are beginning to be delivered in the form of BIM models, and existing BIM models visually describe information representing their physical structures and functions throughout the life cycle of building engineering and equipment.
In order to obtain an accurate BIM model, most of the existing building design industries use CAD software to draw drawings, and then information in the drawings is transmitted into BIM modeling software in a data form so as to correspondingly complete the construction of the model.
In the process of drawing the CAD drawing, the drawing frame enables one of the indispensable components of the CAD drawing, and the information such as the drawing name, the drawing number and the like contained in the drawing frame is commonly called as drawing frame information, however, a large number of CAD drawings can be generated in the construction process of each existing building project, and most of the prior art still identifies the drawing frame information in the CAD drawing in a manual mode, so that the information extraction efficiency is low, and a large amount of labor cost can be generated.
Disclosure of Invention
Based on the above, the invention aims to provide a CAD drawing frame information extraction method and system, so as to solve the problem of low extraction efficiency of image information in the prior art.
The first aspect of the embodiment of the invention provides:
a CAD drawing frame information extraction method, wherein the method comprises the following steps:
when a CAD drawing is obtained, decomposing the CAD drawing to obtain line segment data contained in the CAD drawing;
generating a corresponding initial rectangular bounding box according to the line segment data, and screening the initial rectangular bounding box to obtain a target rectangular bounding box;
detecting a target picture frame contained in the target rectangular bounding box based on a preset rule, and extracting a plurality of icons contained in the target picture frame;
and detecting a target table respectively contained in each icon, and extracting frame information from the target table.
The beneficial effects of the invention are as follows: the acquired CAD drawing is decomposed in real time, so that line segment data contained in the current CAD drawing can be acquired first, further, because the drawing frames are all composed of rectangular frames, a required target rectangular bounding box is generated according to the current line segment data, the required target drawing frames are further extracted from the target rectangular bounding box, on the basis, required drawing labels are finally extracted from the target drawing frames, required drawing frame information is further extracted from the drawing labels, manual checking operation is correspondingly omitted, drawing frame information extraction efficiency is correspondingly greatly improved, and user experience is improved.
Further, the step of generating a corresponding initial rectangular bounding box according to the line segment data includes:
when the line segment data are acquired, detecting a plurality of line segments contained in the line segment data one by one, and carrying out full-disk scanning on the line segments to detect target line segments used for end-to-end connection;
and adding a corresponding mark to the target line segment, and generating the initial rectangular bounding box according to the target line segment based on the mark and a preset rule, wherein the mark has uniqueness.
Further, the step of screening the initial rectangular bounding box includes:
when a plurality of initial rectangular bounding boxes are obtained, detecting the position relation between two adjacent initial rectangular bounding boxes one by one, wherein the position relation comprises complete disjoint, intersection and inclusion;
removing the initial rectangular bounding box with the position relation included, and calling out a standard rectangular bounding box with the standard size;
and judging whether the position relationship is completely disjoint and whether the size of the intersected initial rectangular bounding box is equal to the size of the standard rectangular bounding box in real time so as to finish screening processing of the initial rectangular bounding box.
Further, the step of extracting the plurality of icons included in the target frame includes:
when the target picture frame is obtained, detecting an outer frame and an inner frame respectively contained in the target picture frame, and searching corresponding text data in the inner frame by taking the edge of the inner frame as a boundary;
and detecting a plurality of keywords contained in the text data one by one, and correspondingly detecting a plurality of icons based on the keywords.
Further, the step of detecting a plurality of icons based on the correspondence of a plurality of keywords includes:
constructing a plurality of connecting lines between each keyword and the boundary one by one, setting the shortest connecting line as side collineation, and setting the edge collineation connected with the side as collineation side;
and detecting all line segments which are collinear with the edges and intersect with the collinear edges in the inner frame, and setting an area surrounded by all the line segments as the icon.
Further, the step of extracting frame information from the target table includes:
when the target table is obtained, splitting the target table into a plurality of corresponding cells, and sequentially sorting the cells based on the position relation among the cells to generate a corresponding sorting table;
and carrying out full-disk scanning on the sorting table to extract text information contained in the sorting table, and setting the text information as the frame information.
Further, the step of extracting text information contained in the ranking table includes:
when the sorting table is obtained, detecting a plurality of character units contained in the sorting table one by one, and performing splicing processing on the plurality of character units so as to correspondingly generate the text information.
A second aspect of an embodiment of the present invention proposes:
a CAD drawing frame information extraction system, wherein the system comprises:
the acquisition module is used for decomposing the CAD drawing when the CAD drawing is acquired so as to acquire line segment data contained in the CAD drawing;
the screening module is used for generating a corresponding initial rectangular bounding box according to the line segment data, and screening the initial rectangular bounding box to obtain a target rectangular bounding box;
the detection module is used for detecting a target picture frame contained in the target rectangular bounding box based on a preset rule and extracting a plurality of picture labels contained in the target picture frame;
and the extraction module is used for detecting the target table respectively contained in each icon and extracting the frame information from the target table.
Further, the screening module is specifically configured to:
when the line segment data are acquired, detecting a plurality of line segments contained in the line segment data one by one, and carrying out full-disk scanning on the line segments to detect target line segments used for end-to-end connection;
and adding a corresponding mark to the target line segment, and generating the initial rectangular bounding box according to the target line segment based on the mark and a preset rule, wherein the mark has uniqueness.
Further, the screening module is specifically configured to:
when a plurality of initial rectangular bounding boxes are obtained, detecting the position relation between two adjacent initial rectangular bounding boxes one by one, wherein the position relation comprises complete disjoint, intersection and inclusion;
removing the initial rectangular bounding box with the position relation included, and calling out a standard rectangular bounding box with the standard size;
and judging whether the position relationship is completely disjoint and whether the size of the intersected initial rectangular bounding box is equal to the size of the standard rectangular bounding box in real time so as to finish screening processing of the initial rectangular bounding box.
Further, the detection module is specifically configured to:
when the target picture frame is obtained, detecting an outer frame and an inner frame respectively contained in the target picture frame, and searching corresponding text data in the inner frame by taking the edge of the inner frame as a boundary;
and detecting a plurality of keywords contained in the text data one by one, and correspondingly detecting a plurality of icons based on the keywords.
Further, the detection module is specifically further configured to:
constructing a plurality of connecting lines between each keyword and the boundary one by one, setting the shortest connecting line as side collineation, and setting the edge collineation connected with the side as collineation side;
and detecting all line segments which are collinear with the edges and intersect with the collinear edges in the inner frame, and setting an area surrounded by all the line segments as the icon.
Further, the extraction module is specifically configured to:
when the target table is obtained, splitting the target table into a plurality of corresponding cells, and sequentially sorting the cells based on the position relation among the cells to generate a corresponding sorting table;
and carrying out full-disk scanning on the sorting table to extract text information contained in the sorting table, and setting the text information as the frame information.
Further, the extraction module is specifically further configured to:
when the sorting table is obtained, detecting a plurality of character units contained in the sorting table one by one, and performing splicing processing on the plurality of character units so as to correspondingly generate the text information.
A third aspect of an embodiment of the present invention proposes:
a computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the CAD drawing frame information extraction method as described above when the computer program is executed by the processor.
A fourth aspect of the embodiment of the present invention proposes:
a readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the CAD drawing frame information extraction method as described above.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a CAD drawing frame information extraction method according to a first embodiment of the present invention;
fig. 2 is a block diagram of a CAD drawing frame information extraction system according to a sixth embodiment of the present invention.
The invention will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "mounted" on another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a method for extracting CAD drawing frame information according to a first embodiment of the present invention is shown, where the method for extracting CAD drawing frame information according to the present embodiment can omit manual checking operation, and greatly improves the extraction efficiency of frame information, and improves the use experience of a user.
Specifically, the method for extracting the frame information of the CAD drawing provided by the embodiment specifically comprises the following steps:
step S10, when a CAD drawing is obtained, decomposing the CAD drawing to obtain line segment data contained in the CAD drawing;
step S20, generating a corresponding initial rectangular bounding box according to the line segment data, and screening the initial rectangular bounding box to obtain a target rectangular bounding box;
step S30, detecting a target frame contained in the target rectangular bounding box based on a preset rule, and extracting a plurality of icons contained in the target frame;
and S40, detecting a target table respectively contained in each icon, and extracting frame information from the target table.
Specifically, in this embodiment, it should be noted first that, in order to extract the required frame information from the CAD drawing quickly and effectively, each complete CAD drawing needs to be split into each individual, and then the required information is extracted from the individual. Based on the above, when the server arranged in the background receives the CAD drawing input by the user in real time, the current CAD drawing needs to be immediately decomposed at this time, so that the current complete CAD drawing is correspondingly split into line segments, that is, the line segment data. Furthermore, because each line segment has the corresponding position and the connection relation, based on the corresponding position and the connection relation, a plurality of corresponding initial rectangular bounding boxes can be generated in real time according to the acquired line segment data, and meanwhile, rectangular bounding boxes which do not meet the conditions are screened out from the current plurality of initial rectangular bounding boxes, and the required target rectangular bounding boxes are correspondingly reserved.
Furthermore, the needed target frames are further extracted from the screened target rectangular bounding boxes, specifically, each frame is composed of a plurality of icons, and each icon corresponds to a table. Based on the above, after the required icons are extracted from the target frames, the required frame information can be extracted from the target forms only by detecting the target forms respectively contained in each icon in real time.
Second embodiment
Specifically, in this embodiment, it should be noted that the step of generating the corresponding initial rectangular bounding box according to the line segment data includes:
when the line segment data are acquired, detecting a plurality of line segments contained in the line segment data one by one, and carrying out full-disk scanning on the line segments to detect target line segments used for end-to-end connection;
and adding a corresponding mark to the target line segment, and generating the initial rectangular bounding box according to the target line segment based on the mark and a preset rule, wherein the mark has uniqueness.
Specifically, in this embodiment, after the required line segment data is obtained through the above steps, in order to simply and effectively generate the required initial rectangular bounding box, it is necessary to first detect a plurality of line segments included in the current line segment data, where each line segment is unique, that is, has a specific positional relationship and a specific connection relationship. Based on this, the target line segment that can be connected end to end can be directly detected by performing the full-disk scan on the current line segments.
Further, in order to facilitate subsequent connection, corresponding identifiers are added to the current target line segments, and each identifier is unique in the same way. It should be noted that, since the bounding box is rectangular, four line segments that can be connected first can form an initial rectangular bounding box. Based on the above, according to the set marks and the connection relation between the marks, a plurality of required initial rectangular bounding boxes can be generated according to the obtained target line segments, so that subsequent processing is facilitated.
Specifically, in this embodiment, it should be further noted that the step of performing the screening process on the initial rectangular bounding box includes:
when a plurality of initial rectangular bounding boxes are obtained, detecting the position relation between two adjacent initial rectangular bounding boxes one by one, wherein the position relation comprises complete disjoint, intersection and inclusion;
removing the initial rectangular bounding box with the position relation included, and calling out a standard rectangular bounding box with the standard size;
and judging whether the position relationship is completely disjoint and whether the size of the intersected initial rectangular bounding box is equal to the size of the standard rectangular bounding box in real time so as to finish screening processing of the initial rectangular bounding box.
Specifically, in this embodiment, it should also be noted that, after a plurality of initial rectangular bounding boxes are obtained through the above steps, in order to effectively screen out a target rectangular bounding box that meets the subsequent extraction condition, a relative positional relationship between two adjacent initial rectangular bounding boxes needs to be detected one by one at this time, and specifically, the positional relationship may include complete disjoint, intersection and inclusion. Further, it is required to remove two initial rectangular bounding boxes with a position relationship as included, meanwhile, in order to facilitate further screening, a standard rectangular bounding box with a standard size is further called out in a preset database, further, whether the position relationship is completely disjoint and whether the size of the intersected initial rectangular bounding box is equal to the size of the standard rectangular bounding box is judged in real time according to the existing unified building and construction drawing standard GB/T50001-2017, specifically, if so, the subsequent information extraction condition is met, the initial rectangular bounding box with the same size is set as a required target rectangular bounding box, and if not, the subsequent information extraction condition is not met, and corresponding deletion processing is performed.
Third embodiment
In this embodiment, it should be noted that the step of extracting the plurality of icons included in the target frame includes:
when the target picture frame is obtained, detecting an outer frame and an inner frame respectively contained in the target picture frame, and searching corresponding text data in the inner frame by taking the edge of the inner frame as a boundary;
and detecting a plurality of keywords contained in the text data one by one, and correspondingly detecting a plurality of icons based on the keywords.
In the present embodiment, after the desired target frame is obtained by the above steps, the desired image information is finally included in the target frame, and thus further detection processing of the current target frame is required. Specifically, it is necessary to first detect the outer frame and the inner frame of the current target frame, wherein the required frame information is stored inside the inner frame. Based on the above, the edge of the current inner frame needs to be used as a boundary in real time, and the required text data is searched out from the current inner frame within a preset width.
Further, since the text data includes a large number of characters and words, it is necessary to further detect a plurality of required keywords in the current text data, and based on this, it is possible to further detect corresponding icons according to the current keywords, respectively.
In addition, in this embodiment, it should be further noted that the step of detecting a plurality of icons based on correspondence of a plurality of keywords includes:
constructing a plurality of connecting lines between each keyword and the boundary one by one, setting the shortest connecting line as side collineation, and setting the edge collineation connected with the side as collineation side;
and detecting all line segments which are collinear with the edges and intersect with the collinear edges in the inner frame, and setting an area surrounded by all the line segments as the icon.
In addition, in this embodiment, it should be further noted that, after the required keywords are obtained through the steps above, since each keyword is further inside the inner frame, in order to facilitate extraction of the current several keywords, at this time, it is necessary to construct a connecting line between each current keyword and the boundary, that is, a connecting line between the edge of the inner frame and the edge of each current keyword one by one, where the shortest connecting line between the two is set to be in a side collineation, and at the same time, the side where the inner frame and the current side are in a collineation is set to be the corresponding collineation side, based on which all line segments that are in a side collineation with the current side and intersect with the collineation side are detected in real time in the current inner frame, and then, an area where all current line segments are integrated is set as the tab.
Fourth embodiment
In this embodiment, it should be noted that the step of extracting the frame information from the target table includes:
when the target table is obtained, splitting the target table into a plurality of corresponding cells, and sequentially sorting the cells based on the position relation among the cells to generate a corresponding sorting table;
and carrying out full-disk scanning on the sorting table to extract text information contained in the sorting table, and setting the text information as the frame information.
In this embodiment, it should be noted that, after the required target table is further obtained through the above steps, it is understood that the existing table is composed of a plurality of cells, and each cell includes corresponding text information. Based on this, after the target table is obtained, in order to facilitate the subsequent recognition and extraction, the current target table may be split into a plurality of corresponding cells at this time, and because the position and the label of each cell are unique, based on this, the corresponding sorting process may be further performed according to the positional relationship between the current cells, and a corresponding sorting table may be generated. Furthermore, the current ranking table is immediately subjected to full-disc scanning, so that text information stored in the current ranking table can be directly extracted, the text information comprises characters and symbols, and finally, the current text information can be directly set as needed frame information.
Fifth embodiment
In this embodiment, it should be noted that the step of extracting text information included in the ranking table includes:
when the sorting table is obtained, detecting a plurality of character units contained in the sorting table one by one, and performing splicing processing on the plurality of character units so as to correspondingly generate the text information.
In this embodiment, it should be noted that, after the required sorting table is obtained through the above steps, a plurality of character units respectively included in the current sorting table may be detected one by one at this time, and meanwhile, the current plurality of character units may be directly spliced according to the positional relationship between the characters, so as to splice corresponding text information.
Further, the current text information is displayed on the display terminal of the user in real time, so that the user can intuitively observe the current text information.
Referring to fig. 2, a sixth embodiment of the present invention provides:
a CAD drawing frame information extraction system, wherein the system comprises:
the acquisition module is used for decomposing the CAD drawing when the CAD drawing is acquired so as to acquire line segment data contained in the CAD drawing;
the screening module is used for generating a corresponding initial rectangular bounding box according to the line segment data, and screening the initial rectangular bounding box to obtain a target rectangular bounding box;
the detection module is used for detecting a target picture frame contained in the target rectangular bounding box based on a preset rule and extracting a plurality of picture labels contained in the target picture frame;
and the extraction module is used for detecting the target table respectively contained in each icon and extracting the frame information from the target table.
In the CAD drawing frame information extraction system, the screening module is specifically configured to:
when the line segment data are acquired, detecting a plurality of line segments contained in the line segment data one by one, and carrying out full-disk scanning on the line segments to detect target line segments used for end-to-end connection;
and adding a corresponding mark to the target line segment, and generating the initial rectangular bounding box according to the target line segment based on the mark and a preset rule, wherein the mark has uniqueness.
In the CAD drawing frame information extraction system, the screening module is specifically configured to:
when a plurality of initial rectangular bounding boxes are obtained, detecting the position relation between two adjacent initial rectangular bounding boxes one by one, wherein the position relation comprises complete disjoint, intersection and inclusion;
removing the initial rectangular bounding box with the position relation included, and calling out a standard rectangular bounding box with the standard size;
and judging whether the position relationship is completely disjoint and whether the size of the intersected initial rectangular bounding box is equal to the size of the standard rectangular bounding box in real time so as to finish screening processing of the initial rectangular bounding box.
In the CAD drawing frame information extraction system, the detection module is specifically configured to:
when the target picture frame is obtained, detecting an outer frame and an inner frame respectively contained in the target picture frame, and searching corresponding text data in the inner frame by taking the edge of the inner frame as a boundary;
and detecting a plurality of keywords contained in the text data one by one, and correspondingly detecting a plurality of icons based on the keywords.
In the CAD drawing frame information extraction system, the detection module is further specifically configured to:
constructing a plurality of connecting lines between each keyword and the boundary one by one, setting the shortest connecting line as side collineation, and setting the edge collineation connected with the side as collineation side;
and detecting all line segments which are collinear with the edges and intersect with the collinear edges in the inner frame, and setting an area surrounded by all the line segments as the icon.
In the above CAD drawing frame information extraction system, the extraction module is specifically configured to:
when the target table is obtained, splitting the target table into a plurality of corresponding cells, and sequentially sorting the cells based on the position relation among the cells to generate a corresponding sorting table;
and carrying out full-disk scanning on the sorting table to extract text information contained in the sorting table, and setting the text information as the frame information.
In the above CAD drawing frame information extraction system, the extraction module is further specifically configured to:
when the sorting table is obtained, detecting a plurality of character units contained in the sorting table one by one, and performing splicing processing on the plurality of character units so as to correspondingly generate the text information.
A seventh embodiment of the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the CAD drawing frame information extraction method provided in the foregoing embodiment when executing the computer program.
An eighth embodiment of the present invention provides a readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the CAD drawing frame information extraction method provided in the above embodiments.
In summary, the method and the system for extracting the frame information of the CAD drawing provided by the embodiment of the invention can omit manual checking operation, correspondingly greatly improve the extraction efficiency of the frame information and improve the use experience of users.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (6)

1. The CAD drawing frame information extraction method is characterized by comprising the following steps:
when a CAD drawing is obtained, decomposing the CAD drawing to obtain line segment data contained in the CAD drawing;
generating a corresponding initial rectangular bounding box according to the line segment data, and screening the initial rectangular bounding box to obtain a target rectangular bounding box;
detecting a target picture frame contained in the target rectangular bounding box based on a preset rule, and extracting a plurality of icons contained in the target picture frame;
detecting a target table respectively contained in each icon, and extracting frame information from the target table;
the step of generating the corresponding initial rectangular bounding box according to the line segment data comprises the following steps:
when the line segment data are acquired, detecting a plurality of line segments contained in the line segment data one by one, and carrying out full-disk scanning on the line segments to detect target line segments used for end-to-end connection;
adding a corresponding mark to the target line segment, and generating the initial rectangular bounding box according to the target line segment based on the mark and a preset rule, wherein the mark has uniqueness;
the step of screening the initial rectangular bounding box comprises the following steps:
when a plurality of initial rectangular bounding boxes are obtained, detecting the position relation between two adjacent initial rectangular bounding boxes one by one, wherein the position relation comprises complete disjoint, intersection and inclusion;
removing the initial rectangular bounding box with the position relation included, and calling out a standard rectangular bounding box with the standard size;
judging whether the position relationship is completely disjoint and whether the size of the intersected initial rectangular bounding box is equal to the size of the standard rectangular bounding box in real time so as to finish screening treatment of the initial rectangular bounding box;
the step of extracting the plurality of icons contained in the target frame comprises the following steps:
when the target picture frame is obtained, detecting an outer frame and an inner frame respectively contained in the target picture frame, and searching corresponding text data in the inner frame by taking the edge of the inner frame as a boundary;
detecting a plurality of keywords contained in the text data one by one, and detecting a plurality of icons correspondingly based on the keywords;
the step of detecting the icons based on the keyword correspondence comprises the following steps:
constructing a plurality of connecting lines between each keyword and the boundary one by one, setting the shortest connecting line as side collineation, and setting the edge collineation connected with the side as collineation side;
and detecting all line segments which are collinear with the edges and intersect with the collinear edges in the inner frame, and setting an area surrounded by all the line segments as the icon.
2. The CAD drawing frame information extraction method according to claim 1, wherein: the step of extracting the frame information from the target table comprises the following steps:
when the target table is obtained, splitting the target table into a plurality of corresponding cells, and sequentially sorting the cells based on the position relation among the cells to generate a corresponding sorting table;
and carrying out full-disk scanning on the sorting table to extract text information contained in the sorting table, and setting the text information as the frame information.
3. The CAD drawing frame information extraction method according to claim 2, wherein: the step of extracting text information contained in the ranking table includes:
when the sorting table is obtained, detecting a plurality of character units contained in the sorting table one by one, and performing splicing processing on the plurality of character units so as to correspondingly generate the text information.
4. A CAD drawing frame information extraction system for implementing the CAD drawing frame information extraction method according to any one of claims 1 to 3, the system comprising:
the acquisition module is used for decomposing the CAD drawing when the CAD drawing is acquired so as to acquire line segment data contained in the CAD drawing;
the screening module is used for generating a corresponding initial rectangular bounding box according to the line segment data, and screening the initial rectangular bounding box to obtain a target rectangular bounding box;
the detection module is used for detecting a target picture frame contained in the target rectangular bounding box based on a preset rule and extracting a plurality of picture labels contained in the target picture frame;
and the extraction module is used for detecting the target table respectively contained in each icon and extracting the frame information from the target table.
5. A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the CAD drawing frame information extraction method of any one of claims 1 to 3 when the computer program is executed by the processor.
6. A readable storage medium having stored thereon a computer program, which when executed by a processor, implements the CAD drawing frame information extraction method according to any one of claims 1 to 3.
CN202311650260.9A 2023-12-05 2023-12-05 CAD drawing frame information extraction method and system Active CN117373052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311650260.9A CN117373052B (en) 2023-12-05 2023-12-05 CAD drawing frame information extraction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311650260.9A CN117373052B (en) 2023-12-05 2023-12-05 CAD drawing frame information extraction method and system

Publications (2)

Publication Number Publication Date
CN117373052A CN117373052A (en) 2024-01-09
CN117373052B true CN117373052B (en) 2024-02-23

Family

ID=89398769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311650260.9A Active CN117373052B (en) 2023-12-05 2023-12-05 CAD drawing frame information extraction method and system

Country Status (1)

Country Link
CN (1) CN117373052B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033875A (en) * 2006-07-03 2008-02-14 Bigvan Inc Layering program of cad drawing data, recording medium and device therefor, and layering system therefor, and cad drawing reference data checking device
CN104036060A (en) * 2013-03-07 2014-09-10 纬衡浩建科技(深圳)有限公司 Online auditing method and system for engineering drawing
CN107977620A (en) * 2017-11-29 2018-05-01 华中科技大学 A kind of multi-direction scene text single detection method based on full convolutional network
CN110096270A (en) * 2019-05-06 2019-08-06 浙江精工钢结构集团有限公司 A kind of design drawing method for splitting and system based on .NET plug-in unit
CN111611945A (en) * 2020-05-25 2020-09-01 江西金格科技股份有限公司 Universal AutoCAD picture frame identification method
CN114266800A (en) * 2021-12-24 2022-04-01 中设数字技术股份有限公司 Multi-rectangular bounding box algorithm and generation system for graphs
CN115841679A (en) * 2023-02-23 2023-03-24 江西中至科技有限公司 Drawing sheet extraction method, system, computer and readable storage medium
CN116682130A (en) * 2022-02-22 2023-09-01 广联达科技股份有限公司 Method, device and equipment for extracting icon information and readable storage medium
CN116935430A (en) * 2023-06-30 2023-10-24 深圳市万翼数字技术有限公司 Picture frame identification method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103377303A (en) * 2012-04-28 2013-10-30 鸿富锦精密工业(深圳)有限公司 Curve surface measurement system and method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033875A (en) * 2006-07-03 2008-02-14 Bigvan Inc Layering program of cad drawing data, recording medium and device therefor, and layering system therefor, and cad drawing reference data checking device
CN104036060A (en) * 2013-03-07 2014-09-10 纬衡浩建科技(深圳)有限公司 Online auditing method and system for engineering drawing
CN107977620A (en) * 2017-11-29 2018-05-01 华中科技大学 A kind of multi-direction scene text single detection method based on full convolutional network
CN110096270A (en) * 2019-05-06 2019-08-06 浙江精工钢结构集团有限公司 A kind of design drawing method for splitting and system based on .NET plug-in unit
CN111611945A (en) * 2020-05-25 2020-09-01 江西金格科技股份有限公司 Universal AutoCAD picture frame identification method
CN114266800A (en) * 2021-12-24 2022-04-01 中设数字技术股份有限公司 Multi-rectangular bounding box algorithm and generation system for graphs
CN116682130A (en) * 2022-02-22 2023-09-01 广联达科技股份有限公司 Method, device and equipment for extracting icon information and readable storage medium
CN115841679A (en) * 2023-02-23 2023-03-24 江西中至科技有限公司 Drawing sheet extraction method, system, computer and readable storage medium
CN116935430A (en) * 2023-06-30 2023-10-24 深圳市万翼数字技术有限公司 Picture frame identification method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
. NET实现管线图分幅自动化;李奕洁;《勘察科学技术》;20180228(第1期);17-20 *
Calibration based on part set-up measurement for on-machine inspection using vision;Dubreuil;《INTERNATIONAL JOURNAL OF INTERACTIVE DESIGN AND MANUFACTURING - IJIDEM》;20160324;第9卷(第4期);全文 *
CATIA软件应用――定制图幅、图框与标题栏;李凯旋;陈湘阳;;航空制造技术;20090201(03);104-105 *

Also Published As

Publication number Publication date
CN117373052A (en) 2024-01-09

Similar Documents

Publication Publication Date Title
CN111563509B (en) Tesseract-based substation terminal row identification method and system
CN107315682A (en) Test browser-safe method, device, storage medium and electronic equipment
CN110955590A (en) Interface detection method, image processing method, device, electronic equipment and storage medium
CN112988557B (en) Search box positioning method, data acquisition method, device and medium
CN113657361A (en) Page abnormity detection method and device and electronic equipment
CN116682130A (en) Method, device and equipment for extracting icon information and readable storage medium
CN113268188B (en) Task processing method, device, equipment and storage medium
CN117373052B (en) CAD drawing frame information extraction method and system
CN114462383B (en) Method, system, storage medium and equipment for obtaining design specification of building drawing
CN109389972B (en) Quality testing method and device for semantic cloud function, storage medium and equipment
CN115905016A (en) BIOS Setup search function test method and device, electronic equipment and storage medium
CN111914863A (en) Target detection method and device, terminal equipment and computer readable storage medium
CN116681792A (en) Subgraph generation method, device and equipment of vector drawing and readable storage medium
CN111530083B (en) Interface inspection method and device
CN117078708A (en) Training method, device, equipment, medium and product for image detection and model
CN114724170A (en) BOM generation method and device, electronic equipment and storage medium
CN114185707A (en) Vehicle fault diagnosis method and device, terminal equipment and storage medium
CN104243201B (en) Network equipment detection use-case corresponds to the storage method and system of topological diagram
CN113515280A (en) Page code generation method and device
CN118425167B (en) Defect detection method and system
CN113704650A (en) Information display method, device, system, equipment and storage medium
CN106406888B (en) Application program interface display method and device
CN112783750A (en) Code vulnerability storage method and device, electronic equipment and storage medium
EP2573694A1 (en) Conversion method and system
KR102595789B1 (en) Automatic recognition of electronic circuit diagram image and netlist conversion method

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