CN110502990B - Method and system for data acquisition by image processing - Google Patents

Method and system for data acquisition by image processing Download PDF

Info

Publication number
CN110502990B
CN110502990B CN201910645911.2A CN201910645911A CN110502990B CN 110502990 B CN110502990 B CN 110502990B CN 201910645911 A CN201910645911 A CN 201910645911A CN 110502990 B CN110502990 B CN 110502990B
Authority
CN
China
Prior art keywords
frame
character
characters
fonts
recognition
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
CN201910645911.2A
Other languages
Chinese (zh)
Other versions
CN110502990A (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.)
Shanghai Zhanwan Information Science & Technology Co ltd
Original Assignee
Shanghai Zhanwan Information Science & 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 Shanghai Zhanwan Information Science & Technology Co ltd filed Critical Shanghai Zhanwan Information Science & Technology Co ltd
Priority to CN201910645911.2A priority Critical patent/CN110502990B/en
Publication of CN110502990A publication Critical patent/CN110502990A/en
Application granted granted Critical
Publication of CN110502990B publication Critical patent/CN110502990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/4183Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by data acquisition, e.g. workpiece identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • 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/158Segmentation of character regions using character size, text spacings or pitch estimation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • 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
    • 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/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Automation & Control Theory (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Manufacturing & Machinery (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method and a system for data acquisition by image processing, which comprises the following steps: s1, marking a recognition frame of a numerical value corresponding to each parameter to be read in the collected image; s2, performing matrixing processing and contrast sharpening processing on the recognition frame to highlight characters in the recognition frame; s3, recognizing a character area in the recognition frame, segmenting the character area according to spaces among characters to obtain block characters, and comparing the shape of each character in each block character with the shape in a corresponding database to recognize each character in a matching manner; and S4, storing the identification result in a database of the edge computing gateway. According to the invention, through screen capture of the control system HMI, image processing is carried out on the screen captured picture, data such as characters, numbers and characters in the picture are identified, and the identification result is analyzed and output and stored in the database of the edge computing gateway.

Description

Method and system for data acquisition by image processing
Technical Field
The invention relates to the technical field of data acquisition, in particular to a method and a system for acquiring data by utilizing image processing.
Background
In the field of industrial internet, in the face of various industrial devices, especially older control devices such as a numerical control cutting machine, a numerical control bending machine and the like, data of a device controller cannot be acquired through a standard communication protocol. The industrial field control system is usually based on operating system platforms such as Windows and Linux, part of the system is based on an embedded special control system, relevant parameters of equipment, such as coordinate values, alarm information and other contents, are generally displayed in real time on an HMI (human machine interface) of the control system, and the data are data which have important value on the industrial internet and need to be acquired.
Disclosure of Invention
Aiming at the problems and the defects in the prior art, the invention provides a method and a system for acquiring data by utilizing image processing.
The invention solves the technical problems through the following technical scheme:
the invention provides a method for data acquisition by utilizing image processing, which is characterized by comprising the following steps of:
s1, marking a recognition frame of a numerical value corresponding to each parameter to be read in the collected image;
s2, performing matrixing processing and contrast sharpening processing on the recognition frame to highlight characters in the recognition frame;
s3, recognizing a character area in the recognition frame, segmenting the character area according to spaces among characters to obtain block characters, and comparing the shape of each character in each block character with the shape in a corresponding database to recognize each character in a matching manner;
and S4, analyzing and outputting the identification result and storing the analysis result in a database of the edge computing gateway.
Preferably, in step S1, the top border, the bottom border, the left border or the right border of the recognition box is fine-tuned so that the recognition box is not doped with the background interference element.
Preferably, in step S3, for the part of the masked font in the block character, the character represented by the masked font is identified by comparing the shape of the masked font with the shape in the corresponding database.
Preferably, an example picture for covering fonts is collected, the content of a recognition frame of the covered fonts in the example picture is extracted, background denoising and contrast sharpening are adopted, the processed covered text is re-labeled by means of a jTessBoxEditor tool, re-training is carried out on re-labeled data, a new text library is generated, and the new text library is used for recognizing and predicting the future partial covered fonts.
The invention also provides a system for acquiring data by utilizing image processing, which is characterized by comprising a calibration module, a processing module, an identification module and a storage module;
the calibration module is used for calibrating an identification frame of a numerical value corresponding to each parameter to be read in the acquired image;
the processing module is used for performing matrixing processing and contrast sharpening processing on the identification frame so as to highlight characters in the identification frame;
the recognition module is used for recognizing a character area in the recognition frame, segmenting the character area according to spaces among characters to obtain block characters, and comparing the shape of each character in each block character with the shape in a corresponding database to recognize each character in a matching manner;
and the storage module is used for analyzing and outputting the identification result and storing the analysis result in a database of the edge computing gateway.
Preferably, the calibration module is used for fine tuning the upper frame, the lower frame, the left frame or the right frame of the recognition frame, so that background interference elements are not doped in the recognition frame.
Preferably, for a part of the masked font in the block character, the identification module is configured to identify the character represented by the masked font by comparing the shape of the masked font with the shape in the corresponding database.
Preferably, the system further comprises a sample acquisition module, wherein the sample acquisition module is used for collecting an example picture for covering fonts, extracting the content of a recognition frame of the covered fonts in the example picture, performing background denoising and contrast sharpening, re-labeling the processed covered text by using a jTessBoxEditor tool, re-training re-labeled data to generate a new text library, and performing recognition prediction on a future part of the covered fonts by using the new text library.
On the basis of the common knowledge in the field, the above preferred conditions can be combined randomly to obtain the preferred embodiments of the invention.
The positive progress effects of the invention are as follows:
according to the invention, through screen capture of the control system HMI and image processing of the screen captured picture, data such as characters, numbers and characters in the picture are identified, and the identification result is analyzed and output and stored in the database of the edge computing gateway.
Drawings
FIG. 1 is a flow chart of a method for data acquisition using image processing according to a preferred embodiment of the present invention.
FIG. 2 is a diagram illustrating the positioning of an image processing parameter identification box according to a preferred embodiment of the present invention.
FIG. 3 is a block diagram of a system for data acquisition using image processing according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, the present embodiment provides a method for data acquisition by image processing, which includes the following steps:
step 101, marking an identification frame of a numerical value corresponding to each parameter to be read in the acquired image, and finely adjusting an upper frame, a lower frame, a left frame or a right frame of the identification frame so as to ensure that background interference elements are not doped in the identification frame, as shown in fig. 2.
For each parameter, four pixel positions, up, down, left, right, and left, are required to include all the parameter contents into an identification box (base line) as much as possible on the basis of not doping other background interference elements (such as interference backgrounds like borders and horizontal lines), as far as possible.
And 102, performing matrixing processing and contrast sharpening processing on the identification frame to highlight characters in the identification frame.
The background noise is processed by first correctly intercepting the bounding box of the parameter content. Ensure that the bounding box contains various background noises as little as possible. Such as borders, interference lines, etc. Meanwhile, the situation of double backgrounds is also avoided, and the denoising method is to perform matrixing processing on pixels of intercepted parameter contents. And searching the distribution rule of the pixels on the basis, and then sharpening the chrominance values.
And 103, recognizing a character area in the recognition frame, segmenting the character area according to spaces among characters to obtain block characters, and comparing the shape of each character in each block character with the shape in a corresponding database to recognize each character in a matching manner.
Wherein, for part of the covering fonts in the block characters, the characters represented by the covering fonts are identified by comparing the shapes of the covering fonts with the shapes in the corresponding database in a matching way.
Collecting an example picture for covering fonts, extracting the content of a recognition frame of the covered fonts in the example picture, carrying out background denoising and contrast sharpening, carrying out re-labeling on the processed covered text by a jTessBoxEditor tool, retraining re-labeled data to generate a new text library, and carrying out recognition prediction on future partial covered fonts by using the new text library.
And 104, analyzing and outputting the identification result and storing the analysis result in a database of the edge computing gateway.
As shown in fig. 3, the embodiment further provides a system for acquiring data by using image processing, which includes a calibration module 1, a processing module 2, an identification module 3, and a storage module 4.
The calibration module 1 is used for calibrating a recognition frame of a numerical value corresponding to each parameter to be read in the acquired image, and finely adjusting an upper frame, a lower frame, a left frame or a right frame of the recognition frame, so that background interference elements are not doped in the recognition frame.
The processing module 2 is used for performing matrixing processing and contrast sharpening processing on the recognition frame to highlight characters in the recognition frame.
The recognition module 3 is configured to recognize a character region in the recognition frame, segment the character region according to a space between characters to obtain block characters, and recognize each character by matching the shape of the character with the shape in the corresponding database.
Wherein, for a part of the masked fonts in the block characters, the identification module is used for matching and identifying the characters represented by the masked fonts by comparing the shapes of the masked fonts with the shapes in the corresponding database.
The system also comprises a sample acquisition module, wherein the sample acquisition module is used for collecting an example picture for covering fonts, extracting the content of a recognition frame of the covered fonts in the example picture, carrying out background denoising and contrast sharpening treatment, carrying out re-labeling on the processed covered text by a jTessBoxEditor tool, carrying out re-training on re-labeled data, generating a new text library, and carrying out recognition prediction on part of the covered fonts in the future by using the new text library.
The storage module 4 is used for analyzing and outputting the identification result and storing the analysis result in a database of the edge computing gateway.
The method and the device aim at old equipment in an industrial field, the old equipment often does not support a standard communication protocol, the conventional data acquisition thought is difficult to realize data acquisition of the equipment, the scheme can make up for the defects of the conventional data acquisition scheme, each output parameter in the screenshot picture can be rapidly and accurately identified, and the comprehensive cost is low.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (2)

1. A method for data acquisition using image processing, comprising the steps of:
s1, marking an identification frame of a numerical value corresponding to each parameter to be read in the collected image, wherein the collected image is a screen capture picture of the control system HMI;
s2, performing matrixing processing and contrast sharpening processing on the recognition frame to highlight characters in the recognition frame;
s3, recognizing a character area in the recognition frame, segmenting the character area according to spaces among characters to obtain block characters, and comparing the shape of each character in each block character with the shape in a corresponding database to recognize each character in a matching manner;
s4, analyzing and outputting the identification result and storing the analysis result in a database of the edge computing gateway;
in step S1, fine-tuning the top border, the bottom border, the left border, or the right border of the recognition frame so that the recognition frame is not doped with background interference elements;
in step S3, for the partial masking font in the block character, the character represented by the masking font is identified by comparing the shape of the masking font with the shape in the corresponding database;
collecting an example picture for covering fonts, extracting the content of a recognition frame of the covered fonts in the example picture, carrying out background denoising and contrast sharpening, carrying out re-labeling on the processed covered text by a jTessBoxEditor tool, retraining re-labeled data to generate a new text library, and carrying out recognition prediction on future partial covered fonts by using the new text library.
2. A system for data acquisition by image processing is characterized by comprising a calibration module, a processing module, an identification module and a storage module;
the calibration module is used for calibrating an identification frame of a numerical value corresponding to each parameter to be read in an acquired image, and the acquired image is a screen capture picture of the control system HMI;
the processing module is used for performing matrixing processing and contrast sharpening processing on the identification frame so as to highlight characters in the identification frame;
the recognition module is used for recognizing a character area in the recognition frame, segmenting the character area according to spaces among characters to obtain block characters, and comparing the shape of each character in each block character with the shape in a corresponding database to recognize each character in a matching manner;
the storage module is used for analyzing and outputting the identification result and storing the identification result in a database of the edge computing gateway;
the calibration module is used for finely adjusting an upper frame, a lower frame, a left frame or a right frame of the identification frame so as to ensure that background interference elements are not doped in the identification frame;
for a part of the masked fonts in the block characters, the identification module is used for matching and identifying the characters represented by the masked fonts by comparing the shapes of the masked fonts with the shapes in the corresponding database;
the system also comprises a sample acquisition module, wherein the sample acquisition module is used for collecting an example picture for covering fonts, extracting the content of a recognition frame of the covered fonts in the example picture, carrying out background denoising and contrast sharpening treatment, carrying out re-labeling on the processed covered text by a jTessBoxEditor tool, carrying out re-training on re-labeled data, generating a new text library, and carrying out recognition prediction on part of the covered fonts in the future by using the new text library.
CN201910645911.2A 2019-07-17 2019-07-17 Method and system for data acquisition by image processing Active CN110502990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910645911.2A CN110502990B (en) 2019-07-17 2019-07-17 Method and system for data acquisition by image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910645911.2A CN110502990B (en) 2019-07-17 2019-07-17 Method and system for data acquisition by image processing

Publications (2)

Publication Number Publication Date
CN110502990A CN110502990A (en) 2019-11-26
CN110502990B true CN110502990B (en) 2022-06-03

Family

ID=68585332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910645911.2A Active CN110502990B (en) 2019-07-17 2019-07-17 Method and system for data acquisition by image processing

Country Status (1)

Country Link
CN (1) CN110502990B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125217A (en) * 2019-12-13 2020-05-08 天津润华科技有限公司 Editable visual image recognition type intelligent data acquisition system and application thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150293A (en) * 2011-12-06 2013-06-12 富泰华工业(深圳)有限公司 Electronic device with messy code recovery function and messy code recovery method
CN103679147A (en) * 2013-12-05 2014-03-26 广州绿怡信息科技有限公司 Method and device for identifying model of mobile phone
CN104951784A (en) * 2015-06-03 2015-09-30 杨英仓 Method of detecting absence and coverage of license plate in real time
CN105528137A (en) * 2015-11-27 2016-04-27 努比亚技术有限公司 Method and apparatus for self-adaptive screen shot according to occluded area
CN107292205A (en) * 2016-03-31 2017-10-24 阿里巴巴集团控股有限公司 A kind of input method and device, electronic equipment
CN207250056U (en) * 2017-07-31 2018-04-17 比亚迪股份有限公司 A kind of backlight type matrix group

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446266A (en) * 2010-09-30 2012-05-09 北京中远通科技有限公司 Device, system and method for automatically identifying industrial number
CN104636748B (en) * 2013-11-14 2018-08-17 张伟伟 A kind of method and device of number plate identification
CN104408931A (en) * 2014-10-29 2015-03-11 合肥指南针电子科技有限责任公司 Incomplete sign license plate identification system and method
CN106682667A (en) * 2016-12-29 2017-05-17 成都数联铭品科技有限公司 Image-text OCR (optical character recognition) system for uncommon fonts
CN109389121B (en) * 2018-10-30 2021-11-09 金现代信息产业股份有限公司 Nameplate identification method and system based on deep learning
CN109858327B (en) * 2018-12-13 2023-06-09 安徽清新互联信息科技有限公司 Character segmentation method based on deep learning

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150293A (en) * 2011-12-06 2013-06-12 富泰华工业(深圳)有限公司 Electronic device with messy code recovery function and messy code recovery method
CN103679147A (en) * 2013-12-05 2014-03-26 广州绿怡信息科技有限公司 Method and device for identifying model of mobile phone
CN104951784A (en) * 2015-06-03 2015-09-30 杨英仓 Method of detecting absence and coverage of license plate in real time
CN105528137A (en) * 2015-11-27 2016-04-27 努比亚技术有限公司 Method and apparatus for self-adaptive screen shot according to occluded area
CN107292205A (en) * 2016-03-31 2017-10-24 阿里巴巴集团控股有限公司 A kind of input method and device, electronic equipment
CN207250056U (en) * 2017-07-31 2018-04-17 比亚迪股份有限公司 A kind of backlight type matrix group

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于可变形模板匹配的变形字体识别;胡晓霞 等;《电子设计工程》;20140630;第22卷(第12期);第160-163页 *

Also Published As

Publication number Publication date
CN110502990A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
US20150262030A1 (en) Image processing device, image processing method, and image processing program
CN106875408B (en) Screenshot method and device and terminal equipment
CN110942074A (en) Character segmentation recognition method and device, electronic equipment and storage medium
CN109255300B (en) Bill information extraction method, bill information extraction device, computer equipment and storage medium
CN111274957A (en) Webpage verification code identification method, device, terminal and computer storage medium
CN110119742B (en) Container number identification method and device and mobile terminal
CN110569774B (en) Automatic line graph image digitalization method based on image processing and pattern recognition
CN111553334A (en) Questionnaire image recognition method, electronic device, and storage medium
CN111915635A (en) Test question analysis information generation method and system supporting self-examination paper marking
CN110502990B (en) Method and system for data acquisition by image processing
EP2816504A1 (en) Character-extraction method and character-recognition device and program using said method
CN113963353A (en) Character image processing and identifying method and device, computer equipment and storage medium
CN113920520A (en) Image text recognition method, system, storage medium and electronic equipment
CN110717060B (en) Image mask filtering method, device and storage medium
CN112613425A (en) Target identification method and system for small sample underwater image
CN107688788B (en) Document chart extraction method, electronic device and computer readable storage medium
CN116631003A (en) Equipment identification method and device based on P & ID drawing, storage medium and electronic equipment
CN116030472A (en) Text coordinate determining method and device
CN115862044A (en) Method, apparatus, and medium for extracting target document part from image
CN111582148A (en) Beijing opera character recognition method, equipment, storage medium and device
JP7075770B2 (en) Character recognition system, character sharpening system, character sharpening program, character sharpening method, and character sharpening image display device
CN112634382A (en) Image recognition and replacement method and device for unnatural object
KR102282364B1 (en) Image Blurring Processing System
CN115631493B (en) Text region determining method, system and related device
CN111339353B (en) Image processing self-optimization 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
GR01 Patent grant
GR01 Patent grant