CN104298991A - Method for extracting information of corner stamp - Google Patents

Method for extracting information of corner stamp Download PDF

Info

Publication number
CN104298991A
CN104298991A CN201410524786.7A CN201410524786A CN104298991A CN 104298991 A CN104298991 A CN 104298991A CN 201410524786 A CN201410524786 A CN 201410524786A CN 104298991 A CN104298991 A CN 104298991A
Authority
CN
China
Prior art keywords
length
entity object
frame
width
outer rim
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
Application number
CN201410524786.7A
Other languages
Chinese (zh)
Other versions
CN104298991B (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.)
China National Petroleum Corp
China Petroleum Engineering and Construction Corp
Original Assignee
China National Petroleum Corp Engineering Design 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 China National Petroleum Corp Engineering Design Co Ltd filed Critical China National Petroleum Corp Engineering Design Co Ltd
Priority to CN201410524786.7A priority Critical patent/CN104298991B/en
Publication of CN104298991A publication Critical patent/CN104298991A/en
Application granted granted Critical
Publication of CN104298991B publication Critical patent/CN104298991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for extracting information of a corner stamp. The method includes the steps of preliminarily calculating the preliminary zoom scale M1 of an entity object by calculating the length and the width of a rectangular region where text contents of a template-set unique identity object contained by the entity object of a drawing exist, then calculating the length L1 and the width H1 of an inner frame of the entity object, further calculating the length L3 of an outer frame through the length L1 of the inner frame under the condition that the inner frame is effective, calculating the zoom scale M2 of the entity object according to the length L1 of the inner frame and the length L3 of the outer frame, and obtaining the information of the corner stamp if the zoom scale M1 and the zoom scale M2 are coincident. The method has the advantages that the zoom scales of a sheet are calculated, and then the information of the corner stamp is read with the coordinate positioning method; by means of the method, the information obtaining accuracy can be guaranteed, and it can be further guaranteed that the sheet can meet standard specification requirements.

Description

A kind of angle stamp information extracting method
Technical field
The present invention relates to a kind of angle stamp information extracting method.
Background technology
Key message in map file is all kept in the seal of angle, and angle seal includes the information such as designing unit, project name, file number, specialty, designer.Designer and archive office personnel, when submitting to drawing and filing, need manual examination (check) designing unit, project name, bullets, file number whether to fill out mistake.If do not made mistakes, archive office personnel also need the information such as specialty, designer to be manually input in system, greatly and easily make mistakes, whether size and the putting position of depositing text unit lattice meet normal place to workload simultaneously, be difficult to artificial visual check out.
Prior art mainly through the keyword search place cell location of template sets and region, then reads the data in this cell, although can get data, this mode still exists a lot of problem in actual use:
(1) cell of store data is not intended to be elongated or widen, although can obtain data content, whether cannot meet relevant criterion requirement by judging unit lattice putting position;
(2) if cell does not have the key word of key word or repetition just to there will be identification error, the data of designating unit lattice cannot absolutely successfully be obtained;
(3) complicated operation and need to make multiple template.
Summary of the invention
In order to overcome the shortcoming of prior art, the invention provides a kind of angle stamp information extracting method, not only can information in the seal of Obtaining Accurate angle, can also ensure that map sheet meets Specification requirement, with the workload reducing designer, archive office file personnel proofread drawing, increase work efficiency and effectively reach related request standard.
The technical solution adopted in the present invention is: a kind of angle stamp information extracting method, comprises the steps:
The template file of the first step, choice criteria, obtains the relevant information and data that will identify;
Second step, the DWG drawing file selecting needs to verify;
Entity object in 3rd step, traversal drawing file;
4th step, judge whether entity object comprises the unique identification object of template sets: if contained, then enter next step, otherwise return the 3rd step;
5th step, the length calculating the rectangular area at the word content place of this unique identification object and width;
6th step, tentatively judge whether this entity object has carried out qualified synchronous convergent-divergent:
If the width that the length of this unique identification region outer rim and the ratio of the outer figure frame length of the distinguished name of template sets equal this unique identification region outer rim is equal with the ratio of the outer figure width of frame of the distinguished name of template sets, then this entity object of preliminary proof has carried out qualified synchronous convergent-divergent, and this ratio is defined as preliminary scaling M1, then enter next step; Otherwise return the 3rd step;
7th step, the length L1 calculating the interior frame of this entity object and width H1;
8th step, judge that whether the interior frame of this entity object is effective:
Judge whether to meet L1=L2*M1 and H1=H2*M1 simultaneously, wherein: L2 is the interior figure frame length of template sets, outer figure frame length-n-m, the n of L2=template sets be template sets inside and outside picture frame on the left of distance; The inside and outside picture frame of template sets is right, upper and lower lateral extent is equal, is m; H2 is the outer figure width of frame of template sets, the outer figure width of frame-2m of H2=template sets; If so, then illustrate that this rectangular area, entity object place inner edge frame meets the requirements, then enter next step, otherwise return the 3rd step;
In 9th step, this entity object of being calculated by the 7th step, frame calculates the length L3 of outer rim;
Inside and outside tenth step, this entity object of calculating according to the 7th step and the 9th step, frame length calculates the scaling M2 of this entity object:
M2=(L3-L1-m)/n
11 step, judge that whether the scaling M2 that preliminary scaling M1 and the tenth step calculate is equal:
If equal, then illustrate that this entity object has carried out qualified convergent-divergent, and determine that scaling is M2, then enter next step; Otherwise return the 3rd step;
12 step, acquisition angle stamp information;
13 step, judge whether the process completing all entity objects, if completed, then enter the 13 step, otherwise return the 3rd step;
14 step, complete the verifying function of DWG file, generate directoryof.
Compared with prior art, good effect of the present invention is: by calculating the scaling of map sheet, read by the method diagonal angle stamp information of coordinate setting again, pass through the inventive method, not only can guarantee information obtain correctness, can also ensure that map sheet can meet standard criterion requirement, main efficacy results have following some:
1, the efficiency of drawing verification is improved: originally verifying 10 width drawings by manual type needs cost about 120 minutes, only needs 10 seconds now;
2, improve the accuracy of drawing verification: contrast desk checking mode, can human negligence be avoided, the fault rate of check and correction can be reduced; Contrast other computer check technology, the present invention, by coordinate setting mode, obtains the key message in the seal of angle, can further improve the accuracy obtaining angle stamp information.
Accompanying drawing explanation
Examples of the present invention will be described by way of reference to the accompanying drawings, wherein:
Fig. 1 is the process flow diagram of the inventive method.
Embodiment
A kind of angle stamp information extracting method, comprises the steps:
The template file of the first step, choice criteria, obtains the relevant information and data that will identify;
Second step, the DWG drawing file selecting needs to verify;
Entity object in 3rd step, traversal drawing file;
4th step, judge whether entity object comprises the unique identification object of template sets:
The entity type of the unique identification object of template sets can be single file text, multiline text or block, if entity object contains the word content of this unique identification object, then enters next step, otherwise returns the 3rd step;
5th step, calculate the rectangular area at the word content place of this unique identification object:
Search lower-left point A and the upper right point B of this rectangular area, uniquely identified word place outer rim, obtain the coordinate (Xa, Ya) of lower-left point and the coordinate (Xb, Yb) of upper right point; Then by calculating length and the width of this entity object outer rim, concrete computing method are as follows:
Length=the Xb-Xa of rectangular area outer rim;
Width=Y the b-Ya of rectangular area outer rim;
6th step, tentatively judge whether this entity object has carried out qualified synchronous convergent-divergent:
If the width that the length of this unique identification region outer rim and the ratio of the outer figure frame length of the distinguished name of template sets equal this unique identification region outer rim is equal with the ratio of the outer figure width of frame of the distinguished name of template sets, then this entity object of preliminary proof has carried out qualified synchronous convergent-divergent, and this ratio is defined as preliminary scaling M1, then enter next step; Otherwise return the 3rd step;
7th step, calculate the size of the interior frame of this entity object:
Search lower-left point C and the upper right point D of the interior frame of this entity object, obtain the coordinate (Xc, Yc) of lower-left point and the coordinate (Xd, Yd) of upper right point; Then by calculating length and the width of frame in this entity object, concrete computing method are as follows:
The length L1=Xd-Xc of interior frame;
The width H1=Y d-Yc of interior frame;
8th step, judge that whether the interior frame of this entity object is effective:
Judge whether to meet L1=L2*M1 and H1=H2*M1 simultaneously, wherein: L2 is the interior figure frame length of template, the outer figure frame length-n-m of L2=template sets, wherein: n be template sets inside and outside picture frame on the left of distance; The inside and outside picture frame of template sets is right, upper and lower lateral extent is equal, is m; H2 is the outer figure width of frame of template sets, the outer figure width of frame-2m of H2=template sets;
If so, then illustrate that this rectangular area, entity object place inner edge frame meets the requirements, then enter next step, otherwise return the 3rd step.
9th step, calculate the size of outer rim by obtaining frame in this entity object:
Search lower-left point E and the upper right point F of the outer rim of this entity object, obtain the lower-left point coordinate of outer rim for (Xe, Ye), the upper right point coordinate of outer rim is (Xf, Yf), then the length L3=Xf-Xe of outer rim, the width H3=Yf-Ye of outer rim.Then;
Tenth step, calculate the scaling M2 of this entity object according to housing in this entity object:
M2=(L3-L1-m)/n, wherein: L3 is the length of the outer rim of this entity object that the 9th step obtains, L1 is the length of the interior frame of this entity object that step 7 obtains, m be template sets distinguished name inside and outside distance on the right side of picture frame; N be template sets distinguished name inside and outside distance on the left of picture frame.
11 step, judge that whether preliminary scaling M1 is equal with the tenth step scaling M2:
If equal, then illustrate that this entity object has carried out qualified convergent-divergent, and determine that scaling is M2, then enter next step; Otherwise return the 3rd step;
12 step, acquisition angle stamp information, first read identified region lower-left point and the upper right point of template sets, coordinate figure of each point is multiplied with map sheet scaling M2, obtains new identified region lower-left point and upper right point.Just can obtain the value in this region of angle seal according to new identified region, then intercept word (comprise prefix, suffix, the comprise) value of setting, obtain the value that finally will obtain.
13 step, judge whether the process completing all entity objects, if completed, enter the 13 step, otherwise return the 3rd step.
14 step, complete the verifying function of DWG file, generate directoryof.

Claims (5)

1. an angle stamp information extracting method, is characterized in that: comprise the steps:
The template file of the first step, choice criteria, obtains the relevant information and data that will identify;
Second step, the DWG drawing file selecting needs to verify;
Entity object in 3rd step, traversal drawing file;
4th step, judge whether entity object comprises the unique identification object of template sets: if contained, then enter next step, otherwise return the 3rd step;
5th step, the length calculating the rectangular area at the word content place of this unique identification object and width;
6th step, tentatively judge whether this entity object has carried out qualified synchronous convergent-divergent:
If the width that the length of this unique identification region outer rim and the ratio of the outer figure frame length of the distinguished name of template sets equal this unique identification region outer rim is equal with the ratio of the outer figure width of frame of the distinguished name of template sets, then this entity object of preliminary proof has carried out qualified synchronous convergent-divergent, and this ratio is defined as preliminary scaling M1, then enter next step; Otherwise return the 3rd step;
7th step, the length L1 calculating the interior frame of this entity object and width H1;
8th step, judge that whether the interior frame of this entity object is effective:
Judge whether to meet L1=L2*M1 and H1=H2*M1 simultaneously, wherein: L2 is the interior figure frame length of template sets, outer figure frame length-n-m, the n of L2=template sets be template sets inside and outside picture frame on the left of distance; The inside and outside picture frame of template sets is right, upper and lower lateral extent is equal, is m; H2 is the outer figure width of frame of template sets, the outer figure width of frame-2m of H2=template sets; If so, then illustrate that this rectangular area, entity object place inner edge frame meets the requirements, then enter next step, otherwise return the 3rd step;
In 9th step, this entity object of being calculated by the 7th step, frame calculates the length L3 of outer rim;
Inside and outside tenth step, this entity object of calculating according to the 7th step and the 9th step, frame length calculates the scaling M2 of this entity object:
M2=(L3-L1-m)/n
11 step, judge that whether the scaling M2 that preliminary scaling M1 and the tenth step calculate is equal:
If equal, then illustrate that this entity object has carried out qualified convergent-divergent, and determine that scaling is M2, then enter next step; Otherwise return the 3rd step;
12 step, acquisition angle stamp information;
13 step, judge whether the process completing all entity objects, if completed, then enter the 13 step, otherwise return the 3rd step;
14 step, complete the verifying function of DWG file, generate directoryof.
2. a kind of angle according to claim 1 stamp information extracting method, it is characterized in that: the method for the length and width that calculate the rectangular area at the word content place of this unique identification object described in the 5th step is: the lower-left point A and the upper right point B that search rectangular area, the word place outer rim of this unique identification object, obtain the coordinate (Xa of lower-left point, and the coordinate (Xb, Yb) of upper right point Ya); Then be calculated as follows:
Length=the Xb-Xa of rectangular area outer rim;
Width=the Yb-Ya of rectangular area outer rim.
3. a kind of angle according to claim 1 stamp information extracting method, it is characterized in that: the method for the length L1 and width H1 that calculate the interior frame of this entity object described in the 7th step is: the lower-left point C and the upper right point D that search the interior frame of this entity object, obtain the coordinate (Xc of lower-left point, and the coordinate (Xd, Yd) of upper right point Yc); Then be calculated as follows:
The length L1=Xd-Xc of interior frame;
The width H1=Y d-Yc of interior frame.
4. a kind of angle according to claim 1 stamp information extracting method, it is characterized in that: the method calculating the length L3 of outer rim described in the 9th step is: the lower-left point E and the upper right point F that search the outer rim of this entity object, the lower-left point coordinate obtaining outer rim is (Xe, Ye), the upper right point coordinate of outer rim is (Xf, Yf), then the length L3=Xf-Xe of outer rim.
5. a kind of angle according to claim 1 stamp information extracting method, it is characterized in that: the method obtaining angle stamp information described in the 12 step is: the identified region lower-left point and the upper right point that first read template sets, then each coordinate figure put is multiplied with map sheet scaling M2, obtains new identified region lower-left point and upper right point; Intercept the literal value that new identified region is arranged again, obtain the value that finally will obtain.
CN201410524786.7A 2014-10-09 2014-10-09 A kind of angle stamp information extracting method Active CN104298991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410524786.7A CN104298991B (en) 2014-10-09 2014-10-09 A kind of angle stamp information extracting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410524786.7A CN104298991B (en) 2014-10-09 2014-10-09 A kind of angle stamp information extracting method

Publications (2)

Publication Number Publication Date
CN104298991A true CN104298991A (en) 2015-01-21
CN104298991B CN104298991B (en) 2017-08-25

Family

ID=52318712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410524786.7A Active CN104298991B (en) 2014-10-09 2014-10-09 A kind of angle stamp information extracting method

Country Status (1)

Country Link
CN (1) CN104298991B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861931A (en) * 2017-11-02 2018-03-30 金蝶软件(中国)有限公司 Template file processing method, device, computer equipment and storage medium
CN110866457A (en) * 2019-10-28 2020-03-06 世纪保众(北京)网络科技有限公司 Electronic insurance policy obtaining method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0786909A2 (en) * 1996-01-23 1997-07-30 International Business Machines Corporation Locating a frame position in an MPEG data stream
CN101093476A (en) * 2006-06-21 2007-12-26 北京书生国际信息技术有限公司 Method for positioning electronic stamper
CN101464951A (en) * 2007-12-21 2009-06-24 北大方正集团有限公司 Image recognition method and system
CN103500257A (en) * 2013-10-16 2014-01-08 苏州利驰电子商务有限公司 DWG-format drawing identification method and system
CN103793145A (en) * 2014-02-21 2014-05-14 湖南省交通规划勘察设计院 Drawing frame parameter identification and drawing output method based on autoCAD

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0786909A2 (en) * 1996-01-23 1997-07-30 International Business Machines Corporation Locating a frame position in an MPEG data stream
CN101093476A (en) * 2006-06-21 2007-12-26 北京书生国际信息技术有限公司 Method for positioning electronic stamper
CN101464951A (en) * 2007-12-21 2009-06-24 北大方正集团有限公司 Image recognition method and system
CN103500257A (en) * 2013-10-16 2014-01-08 苏州利驰电子商务有限公司 DWG-format drawing identification method and system
CN103793145A (en) * 2014-02-21 2014-05-14 湖南省交通规划勘察设计院 Drawing frame parameter identification and drawing output method based on autoCAD

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陶珊: "工程图纸管理系统设计与实现", 《信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861931A (en) * 2017-11-02 2018-03-30 金蝶软件(中国)有限公司 Template file processing method, device, computer equipment and storage medium
CN107861931B (en) * 2017-11-02 2021-07-30 金蝶软件(中国)有限公司 Template file processing method and device, computer equipment and storage medium
CN110866457A (en) * 2019-10-28 2020-03-06 世纪保众(北京)网络科技有限公司 Electronic insurance policy obtaining method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN104298991B (en) 2017-08-25

Similar Documents

Publication Publication Date Title
US9104439B2 (en) Providing context-aware input data
CN104360989B (en) A kind of conversion method and system from business paper to financial affairs receipt
CN106156279B (en) Address similarity identification method and system based on longitude and latitude and text comparison
KR101774878B1 (en) The method for errors detecting of digitalmap
US8660822B2 (en) System and method for generating three dimensional functional space reservation systems of a vehicle
EP2851818A3 (en) Methods and systems for processing building information modeling (BIM)-based data
EP2897401B1 (en) Method and device for guaranteeing consistency of planning data
WO2013116164A1 (en) Systems and methods for estimation of building wall area
CN104461901A (en) Method and system for automatically generating test case
CN105096678B (en) For assisting judging the method and device of mathematical problem answer quality
CN104298991A (en) Method for extracting information of corner stamp
US20180293661A1 (en) Method, device, terminal and storage medium for data verification
CN104268118A (en) Mathematical formula calculator including touch screen and method for identifying mathematical formulas
CN110555086A (en) Method and device for attributing resource points in grid
CN105204872A (en) Imputing page generating method and device
KR20230088332A (en) Data annotation methods, devices, systems, devices and storage media
JP2017091208A (en) Document inspection support device, document inspection support system, and program
Huang et al. An integrated GIS, BIM and facilities infrastructure information platform designed for city management
KR101485108B1 (en) Batch automatic method for coordinate transfer and apparatus for the same
CN107809345B (en) Gateway data checking tool, method and device for checking gateway data
CN113128168A (en) Pad parameter checking and correcting method and device, computer equipment and storage medium
CN106446125B (en) Method and device for improving data quality
CN104950696A (en) System and method for converting control logic design data into control logic simulation verification platform files
CN112906117B (en) Indoor equipment layout diagram generation method and device, electronic equipment and storage medium
CN109840609B (en) Goods picking point data verification method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20180115

Address after: 610041 Chengdu high tech Zone, Sichuan province sublimation Road No. 6

Patentee after: China Petroleum Engineering Construction Co Ltd

Address before: 610041 Chengdu high tech Zone, Sichuan province sublimation Road No. 6

Patentee before: Engineering Design Co., Ltd., China Petroleum Group

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210209

Address after: 100007 No. 9 North Main Street, Dongcheng District, Beijing, Dongzhimen

Patentee after: CHINA NATIONAL PETROLEUM Corp.

Patentee after: CHINA PETROLEUM ENGINEERING & CONSTRUCTION Corp.

Address before: No. 6, Sichuan hi tech Zone, sublime Road, Chengdu, Sichuan

Patentee before: CHINA PETROLEUM ENGINEERING & CONSTRUCTION Corp.

TR01 Transfer of patent right