CN110413964B - Method for converting die lettering into editable text and computer-readable storage medium - Google Patents

Method for converting die lettering into editable text and computer-readable storage medium Download PDF

Info

Publication number
CN110413964B
CN110413964B CN201910662106.0A CN201910662106A CN110413964B CN 110413964 B CN110413964 B CN 110413964B CN 201910662106 A CN201910662106 A CN 201910662106A CN 110413964 B CN110413964 B CN 110413964B
Authority
CN
China
Prior art keywords
character
lettering
characters
editable text
underline
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
CN201910662106.0A
Other languages
Chinese (zh)
Other versions
CN110413964A (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.)
Guangdong Zhongtai Industrial Technology Co ltd
Original Assignee
Guangdong Zhongtai Industrial 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 Guangdong Zhongtai Industrial Technology Co ltd filed Critical Guangdong Zhongtai Industrial Technology Co ltd
Priority to CN201910662106.0A priority Critical patent/CN110413964B/en
Publication of CN110413964A publication Critical patent/CN110413964A/en
Application granted granted Critical
Publication of CN110413964B publication Critical patent/CN110413964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Preparing Plates And Mask In Photomechanical Process (AREA)

Abstract

The invention provides a method for converting a mould character carving into an editable text, which comprises the following steps: the method comprises the steps of character face extraction, unique character identification, character direction determination and editable text output, wherein in the process of converting a mold character into an editable text, the unique character is identified, an underline is firstly identified, then a coordinate axis is established on the basis of the underline, the character direction of the character is determined according to the coordinate axis, similarity comparison is sequentially carried out on contour characteristic data of each character and contour characteristic data of standard characters in a character model library, and finally the standard characters with the highest similarity to the characters are respectively extracted from the character model library and are used as the editable text to be output, so that the accuracy rate of converting the character into the editable text is high.

Description

Method for converting die lettering into editable text and computer-readable storage medium
Technical Field
The invention relates to the technical field of character mold design, in particular to a method for converting mold characters into editable texts and a computer readable storage medium.
Background
In the mold design, each part of the mold entity is marked with some visual part information to distinguish each part during the mold design, the part information comprises a plurality of lettering characters, different lettering combinations can represent different part information, such as the type, the size and the like of the part, different lettering combinations on the same part are separated by unique lettering characters (such as underlines), and all the lettering characters on the part are coated with identification colors to avoid confusion with other geometric topological information. The NX software of SIEMENS is one of the software widely used in the die design, processing and simulation work in the die manufacturing industry, and the secondary development is carried out based on the API (application program interface) of the NX software, so that all geometric topology information of parts including characters can be conveniently extracted, and the geometric topology information is converted into editable texts and then recorded. However, since the directions of the engraved characters on the mold are not uniform, if the engraved characters are extracted and then directly converted into editable texts, the recognition is prone to be inaccurate due to different directions in the conversion process, and the conversion accuracy is low.
Disclosure of Invention
The invention aims to provide a method for improving the conversion of characters engraved by a die into editable texts.
In order to solve the above technical problem, the present invention provides a method for converting a mold character into an editable text, comprising:
extracting the lettering surface: traversing all faces on the mold entity, taking the face with the engraved character identification color as a lettering face, and extracting the lettering face;
and (3) identifying the unique characters: traversing on the lettering surface to obtain all lettering characters, and identifying the unique lettering character of underline;
character carving direction determining step: arbitrarily determining a direction based on the two endpoints of the underline, establishing a coordinate axis along the direction, and determining the character direction of the lettering characters according to the relative position relationship between the coordinate axis and other lettering characters;
and an editable text output step: extracting the outline characteristic data of each engraved character, sequentially comparing the similarity of the outline characteristic data of each engraved character with the outline characteristic data of standard characters in a character model library, then respectively extracting the standard characters with the highest similarity with each engraved character from the character model library to serve as editable texts, and finally outputting the corresponding editable texts according to the character direction of the engraved characters.
Preferably, after the determining step of the character-carving direction and before the outputting step of the editable text, a determining step of a character-carving compression ratio is provided: calculating the length of an underline on the lettering surface through the coordinate axis, comparing the length data of the underline with the length data of a standard underline in a character matrix library, and determining the length-width compression ratio between the lettering character on the die and the standard character in the character matrix library according to the comparison result;
in the editable text extracting step, the lettering characters are firstly scaled according to the length-width compression ratio so that the size of the lettering characters is the same as that of the standard characters in the character model library, and then the scaled outline characteristic data of each lettering character is extracted.
Preferably, in the unique character recognition step, if the unique character of underline is not recognized, the character direction determination step is skipped and the editable text output step is directly performed.
Preferably, in the lettering face extraction step, all faces on the mold entity are obtained by traversal using an application program interface provided by SIEMENS NX software.
Preferably, in the unique nicking character recognition step, if it is recognized that a certain unknown nicking character is a line segment, and the virtual extension lines at both ends of the line segment and all virtual vertical lines perpendicular to the line segment do not pass through other nicking characters, it is determined that the unknown nicking character is a unique nicking character, i.e., an underline.
Preferably, in the unique inscription identification step, all inscriptions on the inscription face are obtained by traversal using an application program interface provided by the SIEMENS NX software.
Preferably, in the step of determining the character-carving direction, the vertical direction of the character-carving is determined according to the relative position relationship between the coordinate axis and other characters-carving, and then the horizontal direction is determined according to the vertical direction.
Preferably, in the editable text outputting step, the font size of the editable text may be arbitrarily adjusted when the editable text is output.
The invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The invention has the following beneficial effects: in the process of converting the mould character carving into the editable text, the unique character carving, namely underline, is firstly identified, then a coordinate axis is established on the basis of underlining, the character direction of the character carving is determined according to the coordinate axis, the contour characteristic data of each character carving and the contour characteristic data of standard characters in a character model library are sequentially subjected to similarity comparison, and finally the standard characters with the highest similarity with each character carving are respectively extracted from the character model library and are output as the editable text, so that the accuracy of converting the character carving into the editable text is high.
Drawings
FIG. 1 is a schematic flow chart of a work flow of converting a mold character into an editable text;
fig. 2 is a schematic illustration of a lettering surface on a mold.
Description of the reference numerals: 1-underlined.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
When an engineer uses industrial design software to simulate and design a mold entity, visual part information is engraved on parts of the mold entity to distinguish the parts, the part information comprises a plurality of engraved characters, different combinations of engraved characters can represent different part information, such as the type, the size and the like of the part, different combinations of engraved characters on the same part are separated by unique engraved characters, namely underlines, and all engraved characters on the part are coated with identification colors to avoid confusion with other geometric topological information.
This embodiment provides a method for converting the above-mentioned character into an editable text, as shown in fig. 1, the method includes the following steps:
extracting the lettering surface: firstly, traversing and acquiring all faces on a mould entity by using an application program interface provided by SIEMENS NX software, taking the face with engraved character identification colors as an engraved face, and extracting the engraved face; the SIEMENS NX software is an interactive CAD/CAM (computer aided design and manufacturing) software of SIEMENS, which can be used to implement the construction of various complex mold entities and mold shapes, and can be used to extract all geometric topological information on the parts of the mold entities;
and (3) identifying the unique characters: using an application program interface provided by SIEMENS NX software to traverse to obtain all characters engraved on the lettering face, and then determining the unique character engraved by underline, as shown in fig. 2, wherein underline 1 is a line segment, virtual extension lines at two ends of the line segment, and all virtual vertical lines perpendicular to the underline 1 do not pass through other characters engraved, so that if a certain unknown character is recognized as a line segment, and the virtual extension lines at two ends of the line segment and all virtual vertical lines perpendicular to the line segment do not pass through other characters engraved, it is determined that the unknown character is the unique character engraved, namely underline;
character carving direction determining step: arbitrarily determining a direction based on two end points of the underline 1, and establishing a coordinate axis along the direction, wherein the coordinate axis is necessarily positioned below other characters, so that the up-down direction of the character is determined according to the relative position relationship between the coordinate axis and other characters, and the left-right direction is determined according to the up-down direction, namely the character direction of the character is determined according to the relative position relationship between the coordinate axis and other characters;
determining the character compression ratio: calculating the length of an underline 1 on the lettering surface through the coordinate axes, comparing the length data of the underline 1 with the length data of a standard underline in a character matrix library, and determining the length-width compression ratio between the lettering characters on the die and the standard characters in the character matrix library according to the comparison result;
and an editable text output step: firstly, the scale characters are scaled according to the compression ratio so that the size of the scale characters is the same as that of the standard characters in the character model base, then the outline characteristic data of each scaled scale character is extracted, the outline characteristic data of each scale character and the outline characteristic data of the standard characters in the character model base are compared in sequence in similarity, then the standard characters with the highest similarity with each scale character are respectively extracted from the character model base to be used as editable texts, and finally the corresponding editable texts are output according to the character direction of the scale characters, so that the process of converting the mold scale characters into the editable texts is completed. In the process of outputting the editable text, the font size of the editable text can be adjusted to meet different requirements.
And if the underline is not recognized in the unique lettering character recognition step, skipping a lettering character direction determination step, and directly executing a lettering character compression ratio determination step and an editable text output step, wherein in the lettering character compression ratio determination step, the length and width data of any lettering character is extracted, and the length and width data of the any lettering character is compared with the length and width data of the standard character in the character die library, so that the length and width compression ratio is determined.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the protection scope of the present application, and although the present application is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application.

Claims (8)

1. A method for converting a die lettering into an editable text, comprising:
extracting the lettering surface: traversing all the faces on the mold entity, taking the face with the engraved character identification color as the lettering face, and extracting the lettering face;
and (3) identifying the unique characters: traversing on the lettering surface to obtain all lettering characters, and identifying the unique lettering character of underline according to underline characteristics;
character carving direction determining step: arbitrarily determining a direction based on the two endpoints of the underline, establishing a coordinate axis along the direction, and determining the character direction of the lettering characters according to the relative position relationship between the coordinate axis and other lettering characters;
and an editable text output step: extracting contour characteristic data of each engraved character, sequentially comparing the similarity of the contour characteristic data of each engraved character with contour characteristic data of standard characters in a character model library, then respectively extracting the standard characters with the highest similarity with each engraved character from the character model library to serve as editable texts, and finally outputting the corresponding editable texts according to the character direction of the engraved characters;
in the unique nicking character recognition step, if a certain unknown nicking character is recognized to be a line segment, and the virtual extension lines at the two ends of the line segment and all virtual vertical lines perpendicular to the line segment do not pass through other nicking characters, the unknown nicking character is determined to be a unique nicking character, namely an underline.
2. The method of claim 1, wherein after said character orientation determining step and before said editable text outputting step, a character compression ratio determining step is provided for: calculating the length of an underline on the lettering surface through the coordinate axis, comparing the length data of the underline with the length data of a standard underline in a word matrix library, and determining the length-width compression ratio between the lettering character on the mold and the standard character in the word matrix library according to the comparison result;
in the editable text output step, the lettering characters are firstly scaled according to the length-width compression ratio, so that the size of the lettering characters is the same as that of the standard characters in the character die library, and then the scaled outline characteristic data of each lettering character is extracted.
3. The method of converting a die character into editable text according to claim 1, wherein: in the unique character recognition step, if the unique character of underline is not recognized, the character direction determination step is skipped and the editable text output step is directly performed.
4. The method of converting a die lettering into editable text as in claim 1, wherein: in the lettering face extraction step, all faces on the die entity are obtained by traversal using an application program interface provided by SIEMENS NX software.
5. The method of converting a die character into editable text according to claim 1, wherein: in the unique inscription identification step, all inscriptions on the inscription face are traversed using the application program interface provided by the SIEMENS NX software.
6. The method of converting a die character into editable text according to claim 1, wherein: in the step of determining the direction of the character, the vertical direction of the character is determined according to the relative position relationship between the coordinate axis and other characters, and then the horizontal direction is determined according to the vertical direction.
7. The method of converting a die character into editable text according to claim 1, wherein: in the editable text outputting step, the font size of the editable text is arbitrarily adjusted when the editable text is output.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201910662106.0A 2019-07-22 2019-07-22 Method for converting die lettering into editable text and computer-readable storage medium Active CN110413964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910662106.0A CN110413964B (en) 2019-07-22 2019-07-22 Method for converting die lettering into editable text and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910662106.0A CN110413964B (en) 2019-07-22 2019-07-22 Method for converting die lettering into editable text and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN110413964A CN110413964A (en) 2019-11-05
CN110413964B true CN110413964B (en) 2023-04-18

Family

ID=68362384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910662106.0A Active CN110413964B (en) 2019-07-22 2019-07-22 Method for converting die lettering into editable text and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN110413964B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100259558A1 (en) * 2009-04-13 2010-10-14 Hitachi Software Engineering Co., Ltd. Underline removal apparatus
CN102446274A (en) * 2010-09-30 2012-05-09 汉王科技股份有限公司 Underlined text image preprocessing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100259558A1 (en) * 2009-04-13 2010-10-14 Hitachi Software Engineering Co., Ltd. Underline removal apparatus
CN102446274A (en) * 2010-09-30 2012-05-09 汉王科技股份有限公司 Underlined text image preprocessing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于主线段的签名下划线去除与笔画修复方法;丁惠洋 等;《应用科技》;20190131;第46卷(第1期);第117-122页 *

Also Published As

Publication number Publication date
CN110413964A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110188150B (en) Modeling method of distribution network line diagram and computer readable storage medium
CN111368695A (en) Table structure extraction method
CN101697234A (en) Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method
CN103631996A (en) Product structure and process parallel design method based on model maturity
CN100595751C (en) Scalable stroke font system and method
CN112037224B (en) Method for generating axis according to marking line, electronic equipment and storage medium
CN110413964B (en) Method for converting die lettering into editable text and computer-readable storage medium
CN106650091B (en) Method for extracting device connection relation in indoor distribution drawing based on AutoCAD platform
CN101452368B (en) Hand-written character input method
CN104281727A (en) Method for designing tire die on basis of Excel and CAD (computer aided design) platform
CN103489268B (en) A kind of Arabic display packing for POS platform
CN111008429B (en) Heterogeneous CAD geometric consistency comparison method based on point cloud
CN109784236B (en) Method for identifying table contents in railway drawing
CN117058157A (en) CAD drawing cutting and labeling method
CN116541912A (en) Method and device for generating wiring diagram based on CAD image recognition
Li et al. A human-computer interactive dynamic description method for Jiaguwen Characters
CN111382749B (en) Bronze ware inscription image automatic identification method based on two-dimensional structural features
CN114511863A (en) Table structure extraction method and device, electronic equipment and storage medium
TW202331654A (en) Method and system for interpreting the content of engineering drawing
CN109800478B (en) Method for identifying signal machine in railway drawing
CN110276051B (en) Method and device for splitting font part
CN107633543B (en) Line shape corresponding method considering local topological structure
CN113192195B (en) Method for repairing damaged terrain coordinate data
JPS5835674A (en) Extracting method for feature of online hand-written character
CN115544327A (en) PMI data display method and device, electronic equipment and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523000 Taozi Industrial Park, cuntou village, Hengli Town, Dongguan City, Guangdong Province

Applicant after: Guangdong Zhongtai Industrial Technology Co.,Ltd.

Address before: 523475 Taozi Industrial Park, cuntou village, Hengli Town, Dongguan City, Guangdong Province

Applicant before: Dongguan Zhongtai Mould Co.,Ltd.

GR01 Patent grant
GR01 Patent grant