WO2019041526A1 - Procédé d'extraction de graphiques dans un document, dispositif électronique et support de stockage lisible par ordinateur - Google Patents

Procédé d'extraction de graphiques dans un document, dispositif électronique et support de stockage lisible par ordinateur Download PDF

Info

Publication number
WO2019041526A1
WO2019041526A1 PCT/CN2017/108809 CN2017108809W WO2019041526A1 WO 2019041526 A1 WO2019041526 A1 WO 2019041526A1 CN 2017108809 W CN2017108809 W CN 2017108809W WO 2019041526 A1 WO2019041526 A1 WO 2019041526A1
Authority
WO
WIPO (PCT)
Prior art keywords
chart
area
text
document
distribution
Prior art date
Application number
PCT/CN2017/108809
Other languages
English (en)
Chinese (zh)
Inventor
王鸿滨
王晓伟
汪伟
苏晓明
肖京
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019041526A1 publication Critical patent/WO2019041526A1/fr

Links

Images

Classifications

    • 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/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text

Definitions

  • the present application relates to the field of computer information technology, and in particular, to a document chart extraction method, an electronic device, and a computer readable storage medium.
  • the existing PDF chart extraction tools and programs are mostly based on PDF storage objects. This method can only extract charts stored as separate image objects, and contains more chart information (such as Office charts, etc.) in a PDF document. These charts can visually express some of the information in the document.
  • existing PDF chart extraction tools and programs cannot be correctly extracted for charts composed of multiple parts such as Office charts. Therefore, the design of the document chart extraction method in the prior art is not reasonable enough and needs to be improved.
  • the present application proposes a document chart extraction method, an electronic device, and a computer readable storage medium, which extracts a chart from a PDF document by text density analysis, thereby improving the efficiency and coverage of the chart extraction.
  • the present application provides an electronic device including a memory, a processor, and a document chart extraction system stored on the memory and operable on the processor, the document chart
  • the following steps are implemented when the extraction system is executed by the processor:
  • Analyzing the text distribution information in the specified document determining an area in the specified document with a low distribution density of characters, and/or an area having no text distribution, and the area having a low text distribution density, or/and no text
  • the area of the distribution is marked as a candidate chart area
  • the determining that the area of the specified document has a low density of text distribution comprises: if the length of the line of characters is less than the first threshold, determining that the line of text has a lower density of distribution and cleaning the line of text.
  • the determining that the area of the specified document has no text distribution comprises: scanning each page of the specified document from top to bottom, and if the area exceeding the second threshold width does not scan the text, determining This area is an area with no text distribution.
  • the filtering out the picture containing the chart information from the converted picture comprises: passing Pixel distribution analysis, filter the converted image, and select the image containing the chart information.
  • the filtering the image containing the chart information from the converted image comprises:
  • the number of rows containing the specific content is counted. If the number of rows containing the specific content is greater than or equal to the set threshold, it is determined that the converted image is a picture containing the chart information.
  • the present application further provides a document chart extraction method, which is applied to an electronic device, and the method includes:
  • Analyzing the text distribution information in the specified document determining an area in the specified document with a low distribution density of characters, and/or an area having no text distribution, and the area having a low text distribution density, or/and no text
  • the area of the distribution is marked as a candidate chart area
  • the determining that the area of the specified document has a low density of text distribution comprises: if the length of the line of characters is less than the first threshold, determining that the line of text has a lower density of distribution and cleaning the line of text;
  • the determining that the area of the specified document has no text distribution includes: scanning each page of the specified document from top to bottom, and if the area exceeding the second threshold width does not scan the text, determining that the area is An area without text distribution.
  • the filtering the image including the chart information from the converted image comprises: filtering the converted image by pixel distribution analysis, and selecting a picture including the chart information.
  • the filtering the image containing the chart information from the converted image comprises:
  • the number of rows containing the specific content is counted. If the number of rows containing the specific content is greater than or equal to the set threshold, it is determined that the converted image is a picture containing the chart information.
  • the present application further provides a computer readable storage medium storing a document chart extraction system, the document chart extraction system being executable by at least one processor, such that The at least one processor performs the steps of the document chart extraction method as described above.
  • the electronic device, document chart extraction method and calculation proposed by the present application A machine-readable storage medium that extracts a chart from a PDF document by text density analysis.
  • the method can extract a chart composed of multiple parts such as Office chart information that cannot be extracted by a conventional method. , improve the efficiency and coverage of chart extraction.
  • 1 is a schematic diagram of an optional hardware architecture of an electronic device of the present application
  • FIG. 2 is a schematic diagram of a program module of an embodiment of a document chart extraction system in an electronic device of the present application
  • FIG. 3 is a schematic diagram of an implementation process of an embodiment of a method for extracting a document in the present application.
  • first, second and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. .
  • features defining “first” and “second” may include at least one of the features, either explicitly or implicitly.
  • the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, when the combination of technical solutions occurs mutual spears When the shield is not implemented, it should be considered that the combination of such technical solutions does not exist and is not within the scope of protection claimed in this application.
  • FIG. 1 it is a schematic diagram of an optional hardware architecture of the electronic device 2 of the present application.
  • the electronic device 2 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23 that can communicate with each other through a system bus. It is pointed out that FIG. 1 only shows the electronic device 2 with the components 21-23, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the electronic device 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server.
  • the electronic device 2 may be an independent server or a server cluster composed of multiple servers. .
  • the memory 21 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2.
  • the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk equipped on the electronic device 2, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card, etc.
  • the memory 21 may also include both an internal storage unit of the electronic device 2 and an external storage device thereof.
  • the memory 21 is generally used to store an operating system installed in the electronic device 2 and various types of application software, such as program codes of the document chart extraction system 20, and the like. Further, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 22 is typically used to control the overall operation of the electronic device 2, such as performing control and processing related to data interaction or communication with the electronic device 2.
  • the processor 22 is configured to run program code or process data stored in the memory 21, such as running the document chart extraction system 20 and the like.
  • the network interface 23 may include a wireless network interface or a wired network interface, the network interface 23 Typically used to establish a communication connection between the electronic device 2 and other electronic devices.
  • the network interface 23 is configured to connect the electronic device 2 to an external data platform through a network, and establish a data transmission channel and a communication connection between the electronic device 2 and an external data platform.
  • the network may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, or a 5G network.
  • Wireless or wired networks such as network, Bluetooth, Wi-Fi, etc.
  • FIG. 2 it is a program module diagram of an embodiment of the document chart extraction system 20 in the electronic device 2 of the present application.
  • the document chart extraction system 20 may be divided into one or more program modules, the one or more program modules being stored in the memory 21 and being processed by one or more processors ( This embodiment is executed by the processor 22) to complete the application.
  • the document chart extraction system 20 can be segmented into an acquisition module 201, an analysis module 202, and an extraction module 203.
  • a program module as referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program for describing the execution process of the document chart extraction system 20 in the electronic device 2. The function of each program module 201-203 will be described in detail below.
  • the obtaining module 201 is configured to acquire location information of all characters in a specified document (such as a PDF document), and obtain text distribution information in the specified document according to location information of all the characters.
  • a specified document such as a PDF document
  • the position information of the character includes, but is not limited to, a horizontal coordinate, a vertical coordinate, a longitudinal distance from the previous line of characters, and a longitudinal distance from the next line of characters.
  • the text distribution information includes, but is not limited to, coordinates of the upper left corner of each line of text, length and width of the line of characters, and the like.
  • the analyzing module 202 is configured to analyze the text distribution information in the specified document, determine an area in the specified document with a low text distribution density, or/and a non-text distribution area, and lower the text distribution density. The area, or/and the area without the text distribution, are marked as candidate chart areas.
  • the determining that the area of the specified document has a low density of characters includes: if the length of the line of characters is less than the first threshold (eg, 5 characters per unit length), determining the line The text is distributed at a lower density and cleans (deletes) the line of text. The line of text after cleaning becomes an area with no text distribution.
  • the first threshold eg, 5 characters per unit length
  • the determining that the area of the specified document has no text distribution comprises: scanning each page of the specified document from top to bottom, if the second threshold width is exceeded (eg, 2 If the area of the character unit width is not scanned, the area is judged to be an area where no text is distributed.
  • the second threshold width eg, 2 If the area of the character unit width is not scanned, the area is judged to be an area where no text is distributed.
  • the extracting module 203 is configured to convert the marked candidate chart area into a picture, and filter the picture containing the chart information from the converted picture as the extracted figure in the specified document.
  • the marked candidate chart area can be converted to a picture using a specific image processing tool such as the ImageMagick tool.
  • the filtering the picture including the chart information from the converted picture comprises: filtering the converted picture by using pixel distribution analysis (or content richness analysis), and selecting the included chart A picture of information (such as PDF chart information). Since there are two cases in the non-text area: one is a chart, and the other is a blank area of the page. By analyzing the pixel distribution of the picture, it can be determined which of the two cases.
  • pixel distribution analysis or content richness analysis
  • the image including the chart information is filtered from the converted image by pixel distribution analysis, including:
  • each pixel of the picture is represented as 0 or 255. Where 0 is black, which is a pixel with information content in the picture, and 255 is white, which is a blank pixel in the picture.
  • the number of rows containing specific content is counted to determine the richness of the content in the image. The more rows containing the specific content, the richer the content representing the image. If the number of lines containing the specific content is greater than or equal to the set threshold (such as 2 lines), it is determined that the converted picture is rich in content, and is a picture containing the chart information. On the other hand, if the number of rows containing the specific content is less than the set threshold (such as 2 rows), it is determined that the converted image content is not rich enough, and is a blank image that does not contain the chart information.
  • the set threshold such as 2 lines
  • the document chart extraction system 20 proposed by the present application extracts a chart from a PDF document by text density analysis.
  • the method can also extract the traditional method.
  • the present application also proposes a document chart extraction method.
  • FIG. 3 it is a schematic flowchart of an implementation process of an embodiment of a method for extracting a chart of the present application.
  • the order of execution of the steps in the flowchart shown in FIG. 3 may be changed according to different requirements, and some steps may be omitted.
  • Step S31 Acquire location information of all the characters in the specified document (such as a PDF document), and obtain the text distribution information in the specified document according to the location information of all the characters.
  • the location information of the text includes, but is not limited to, text Horizontal coordinate, longitudinal coordinate, vertical distance from the previous line of text, and vertical distance from the next line of text.
  • the text distribution information includes, but is not limited to, coordinates of the upper left corner of each line of text, length and width of the line of characters, and the like.
  • Step S32 analyzing the text distribution information in the specified document, determining an area in the specified document with a low distribution density of characters, and/or an area having no text distribution, and the area where the character distribution density is low, or The area with no text distribution is marked as a candidate chart area.
  • the determining that the area of the specified document has a low density of characters includes: if the length of the line of characters is less than the first threshold (eg, 5 characters per unit length), determining the line The text is distributed at a lower density and cleans (deletes) the line of text. The line of text after cleaning becomes an area with no text distribution.
  • the first threshold eg, 5 characters per unit length
  • the determining that the area of the specified document has no text distribution comprises: scanning each page of the specified document from top to bottom, if the second threshold width is exceeded (eg, 2 If the area of the character unit width is not scanned, the area is judged to be an area where no text is distributed.
  • the second threshold width eg, 2 If the area of the character unit width is not scanned, the area is judged to be an area where no text is distributed.
  • Step S33 converting the marked candidate chart area into a picture, and filtering out the picture containing the chart information from the converted picture as the chart extracted from the specified document.
  • the marked candidate chart area can be converted to a picture using a specific image processing tool such as the ImageMagick tool.
  • the filtering the picture including the chart information from the converted picture comprises: filtering the converted picture by using pixel distribution analysis (or content richness analysis), and selecting the included chart A picture of information (such as PDF chart information). Since there are two cases in the non-text area: one is a chart, and the other is a blank area of the page. By analyzing the pixel distribution of the picture, it can be determined which of the two cases.
  • pixel distribution analysis or content richness analysis
  • the image including the chart information is filtered from the converted image by pixel distribution analysis, including:
  • each pixel of the picture is represented as 0 or 255. Where 0 is black, which is a pixel with information content in the picture, and 255 is white, which is a blank pixel in the picture.
  • the number of rows containing specific content is counted to determine the richness of the content in the image. The more rows containing the specific content, the richer the content representing the image. If the number of rows containing the specific content is greater than or equal to a set threshold (such as 2 rows), it is determined that the converted image is rich in content. Is a picture with chart information. On the other hand, if the number of rows containing the specific content is less than the set threshold (such as 2 rows), it is determined that the converted image content is not rich enough, and is a blank image that does not contain the chart information.
  • a set threshold such as 2 rows
  • the document chart extraction method proposed by the present application extracts a chart from a PDF document by text density analysis, and the method can extract the chart which can be extracted by the traditional method, and can extract the traditional method cannot extract.
  • the present application further provides a computer readable storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), where the computer readable storage medium stores a document chart extraction system 20, the document chart
  • the extraction system 20 can be executed by at least one processor 22 to cause the at least one processor 22 to perform the steps of the document chart extraction method as described above.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Character Input (AREA)

Abstract

L'invention concerne un procédé permettant d'extraire un graphique dans un document. Le procédé consiste à : acquérir les informations de position de tous les textes dans un document spécifié, puis acquérir les informations de distribution de texte dans le document spécifié en fonction des informations de position de tous les textes (S31); analyser les informations de distribution de texte dans le document spécifié et déterminer une zone ayant une densité inférieure de distribution de texte dans le document spécifié et/ou une zone sans distribution de texte, puis marquer la zone ayant la densité inférieure de distribution de texte et/ou la zone sans distribution de texte comme étant des zones de graphiques candidates (S32); et convertir les zones de graphiques candidates marquées en images, puis filtrer les images contenant des informations de graphiques parmi les images converties afin d'obtenir les graphiques extraits du document spécifié (S33). Le procédé permet d'améliorer l'efficacité et la couverture de l'extraction de graphiques.
PCT/CN2017/108809 2017-08-31 2017-10-31 Procédé d'extraction de graphiques dans un document, dispositif électronique et support de stockage lisible par ordinateur WO2019041526A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710776352.X 2017-08-31
CN201710776352.XA CN107688788B (zh) 2017-08-31 2017-08-31 文档图表抽取方法、电子设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019041526A1 true WO2019041526A1 (fr) 2019-03-07

Family

ID=61155960

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108809 WO2019041526A1 (fr) 2017-08-31 2017-10-31 Procédé d'extraction de graphiques dans un document, dispositif électronique et support de stockage lisible par ordinateur

Country Status (2)

Country Link
CN (1) CN107688788B (fr)
WO (1) WO2019041526A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115111A (zh) * 2019-06-20 2020-12-22 上海怀若智能科技有限公司 一种基于ocr的文档版本管理方法和***

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752424B (zh) * 2019-03-26 2022-05-03 珠海金山办公软件有限公司 一种图表保存的方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5680479A (en) * 1992-04-24 1997-10-21 Canon Kabushiki Kaisha Method and apparatus for character recognition
CN1967567A (zh) * 2005-11-18 2007-05-23 三星电子株式会社 自动创建索引的图像形成装置及其方法
CN101004792A (zh) * 2006-01-18 2007-07-25 株式会社理光 图像处理装置和方法,图像形成装置以及计算机程序产品
CN101008960A (zh) * 2006-01-26 2007-08-01 株式会社理光 信息处理设备,信息处理方法,以及计算机程序产品
CN107133566A (zh) * 2017-03-31 2017-09-05 常诚 一种识别pdf文档中图表的方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7466875B1 (en) * 2004-03-01 2008-12-16 Amazon Technologies, Inc. Method and system for determining the legibility of text in an image
CN101833664A (zh) * 2010-04-21 2010-09-15 中国科学院自动化研究所 基于稀疏表达的视频图像文字检测方法
CN106156691B (zh) * 2015-03-25 2019-12-06 中测高科(北京)测绘工程技术有限责任公司 复杂背景图像的处理方法及其装置
CN106407969A (zh) * 2016-08-30 2017-02-15 杭州电子科技大学 一种健壮的复杂背景视频文本定位和抽取方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5680479A (en) * 1992-04-24 1997-10-21 Canon Kabushiki Kaisha Method and apparatus for character recognition
CN1967567A (zh) * 2005-11-18 2007-05-23 三星电子株式会社 自动创建索引的图像形成装置及其方法
CN101004792A (zh) * 2006-01-18 2007-07-25 株式会社理光 图像处理装置和方法,图像形成装置以及计算机程序产品
CN101008960A (zh) * 2006-01-26 2007-08-01 株式会社理光 信息处理设备,信息处理方法,以及计算机程序产品
CN107133566A (zh) * 2017-03-31 2017-09-05 常诚 一种识别pdf文档中图表的方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115111A (zh) * 2019-06-20 2020-12-22 上海怀若智能科技有限公司 一种基于ocr的文档版本管理方法和***

Also Published As

Publication number Publication date
CN107688788A (zh) 2018-02-13
CN107688788B (zh) 2021-01-08

Similar Documents

Publication Publication Date Title
CN107688789B (zh) 文档图表抽取方法、电子设备及计算机可读存储介质
CN107689070B (zh) 图表数据结构化提取方法、电子设备及计算机可读存储介质
CN107093172B (zh) 文字检测方法及***
US8218890B2 (en) Method and apparatus for cropping images
US10679089B2 (en) Systems and methods for optical character recognition
US9524559B2 (en) Image processing device and method
CN104298982A (zh) 一种文字识别方法及装置
WO2019200802A1 (fr) Procédé de reconnaissance d'images de contrat, dispositif électronique et support de stockage lisible
US10417516B2 (en) System and method for preprocessing images to improve OCR efficacy
CN110675940A (zh) 病理图像标注方法、装置、计算机设备及存储介质
CN102855232A (zh) 一种表格分析编改加工方法
CN110728687B (zh) 文件图像分割方法、装置、计算机设备和存储介质
US10740638B1 (en) Data element profiles and overrides for dynamic optical character recognition based data extraction
CN101833546A (zh) 从可移植电子文档中提取表格的方法和装置
CN114005126A (zh) 表格重构方法、装置、计算机设备及可读存储介质
WO2019041526A1 (fr) Procédé d'extraction de graphiques dans un document, dispositif électronique et support de stockage lisible par ordinateur
CN105551044A (zh) 一种图片对比方法和装置
CN114049540A (zh) 基于人工智能的标注图像检测方法、装置、设备及介质
CN111008987B (zh) 基于灰色背景中边缘图像提取方法、装置及可读存储介质
CN111160193B (zh) 关键信息提取方法、装置及存储介质
CN110363092B (zh) 柱状图识别方法、装置、设备及计算机可读存储介质
CN110287988B (zh) 数据增强方法、装置及计算机可读存储介质
CN109635729B (zh) 一种表格识别方法及终端
JP4967045B2 (ja) 背景判別装置、方法及びプログラム
CN105512100B (zh) 一种版面分析方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17923391

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 23.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17923391

Country of ref document: EP

Kind code of ref document: A1