RU2647671C2 - Segmentation of multicolumn document - Google Patents

Segmentation of multicolumn document Download PDF

Info

Publication number
RU2647671C2
RU2647671C2 RU2014101125A RU2014101125A RU2647671C2 RU 2647671 C2 RU2647671 C2 RU 2647671C2 RU 2014101125 A RU2014101125 A RU 2014101125A RU 2014101125 A RU2014101125 A RU 2014101125A RU 2647671 C2 RU2647671 C2 RU 2647671C2
Authority
RU
Russia
Prior art keywords
graph
path
document
objects
image
Prior art date
Application number
RU2014101125A
Other languages
Russian (ru)
Other versions
RU2014101125A (en
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 Общество с ограниченной ответственностью "Аби Девелопмент"
Priority to RU2014101125A priority Critical patent/RU2647671C2/en
Publication of RU2014101125A publication Critical patent/RU2014101125A/en
Application granted granted Critical
Publication of RU2647671C2 publication Critical patent/RU2647671C2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/162Segmentation; Edge detection involving graph-based methods
    • 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/42Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation
    • G06V10/421Global feature extraction by analysis of the whole pattern, e.g. using frequency domain transformations or autocorrelation by analysing segments intersecting the pattern

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

FIELD: data processing.
SUBSTANCE: group of inventions refers to image processing technologies, in particular, to the analysis of documents with complex spatial pattern. Method for analyzing the logical structure of a document image is proposed. Method comprises the step of detecting objects in the document image. Further, according to the method, the separating graph of the identified objects is constructed on the basis of construction of diagram for the regions on the detected objects in the document image. Also, at least one optimal path in the dividing graph is detected by assigning the weights to the edges of the separating graph to determine the location of the regions in the document image.
EFFECT: technical result is the expansion of the arsenal of technical means aimed at analyzing the logical structure of the document's image.
26 cl, 11 dwg

Description

ОБЛАСТЬ ТЕХНИКИFIELD OF TECHNOLOGY

[0001] Предмет настоящей заявки относится к способу и системе в области обработки изображений, в частности к анализу документов со сложной пространственной разметкой со сложным пространственным расположением.[0001] The subject of this application relates to a method and system in the field of image processing, in particular to the analysis of documents with complex spatial markup with a complex spatial arrangement.

УРОВЕНЬ ТЕХНИКИBACKGROUND

[0002] В настоящее время распознавание внутреннего содержания сфотографированных или отсканированных документов является сложной задачей. Основной принцип существующих методов сегментации заключается в поиске основной (логической) структуры документа, такой как регионов колонок, врезок и заголовков, а также в анализе внутреннего содержимого выявленных регионов (например, выявлении строк текста в регионах колонок). Известные способы сегментации часто способны выявлять только прямоугольные блоки в документе (например, прямоугольные колонки текста и врезки примитивной формы). Таким способам требуется, чтобы разрывы между колонками и врезками были достаточно большими, для того чтобы правильно определить, принадлежит ли данный фрагмент документа колонке или врезке. Если внутри колонок или врезок имеются изолированные объекты (например, разреженные ячейки таблицы) или если форма регионов не является прямоугольной, то классификация происходит некорректно.[0002] At present, recognizing the internal content of photographed or scanned documents is a complex task. The basic principle of existing segmentation methods is to search for the main (logical) structure of the document, such as regions of columns, frames and headers, as well as to analyze the internal content of the identified regions (for example, identifying lines of text in the regions of columns). Known methods of segmentation are often able to identify only rectangular blocks in a document (for example, rectangular columns of text and inset primitive shapes). Such methods require that the gaps between columns and insets be large enough to correctly determine whether a given fragment of a document belongs to a column or inset. If there are isolated objects inside columns or insets (for example, sparse cells of the table) or if the shape of the regions is not rectangular, then the classification is incorrect.

[0003] Существующие способы распознавания неспособны точно и надежно производить сегментацию изображений документов. Поэтому существует необходимость в разработке нового способа анализа внутреннего содержания документов.[0003] Existing recognition methods are unable to accurately and reliably segment images of documents. Therefore, there is a need to develop a new method for analyzing the internal content of documents.

РАСКРЫТИЕ ИЗОБРЕТЕНИЯSUMMARY OF THE INVENTION

[0004] С одной стороны, настоящее изобретение относится к способу обнаружения базовой (логической) структуры изображения документа. Способ включает в себя выявление объектов на изображении документа, построение диаграммы для областей на выявленных объектах, построение разделяющего графа на основе диаграммы для областей на выявленных объектах и построение графа смежности, на основе разделяющего графа. В некоторых вариантах осуществления построение графа смежности включает назначение вершин графа, соответствующих выявленным объектам, определение пар смежных объектов, соответствующим парам объектов, разделенным по меньшей мере одним ребром в разделяющем графе, и соединение каждой пары смежных объектов ребром графа смежности. Этот способ дополнительно включает в себя выявление вершин графа и ребер графа в диаграмме для областей и построение минимального графа на основе выявленных вершин графа и ребер графа. Этот способ дополнительно включает в себя обнаружение оптимального пути в графе для определения местонахождения областей на изображении документа и разбиение изображения документа на регионы, по меньшей мере частично основанное на найденном оптимальном пути.[0004] On the one hand, the present invention relates to a method for detecting a basic (logical) image structure of a document. The method includes identifying objects in an image of a document, plotting a chart for areas on identified objects, building a dividing graph based on a diagram for areas on identified objects, and building an adjacency graph based on a dividing graph. In some embodiments, constructing an adjacency graph includes assigning vertices of the graph corresponding to the identified objects, determining pairs of adjacent objects, corresponding pairs of objects separated by at least one edge in the separating graph, and connecting each pair of adjacent objects with an edge of the adjacency graph. This method further includes identifying the vertices of the graph and edges of the graph in the diagram for regions and constructing a minimal graph based on the identified vertices of the graph and edges of the graph. This method further includes detecting the optimal path in the graph to locate areas in the document image and dividing the document image into regions, at least partially based on the found optimal path.

[0005] В некоторых вариантах осуществления этот способ дополнительно включает в себя присвоение значений весов и/или штрафов ребрам разделяющего графа. В одном из вариантов реализации значения весов основаны на сопоставлении по меньшей мере двух выявленных объектов. Этот способ дополнительно включает суммирование присвоенных значений весов для определения значения суммарного веса для нахождения оптимального пути. В одном их примеров реализации оптимальный путь представляет собой путь с наилучшим значением суммарного веса. Способ дополнительно включает построение подграфа для разделяющего графа с целью ограничения области поиска требуемого пути, выявление компонент связности в подграфе, построение по меньшей мере одного пути относительно выявленных компонент связности и фильтрацию путей. В некоторых вариантах осуществления этот способ дополнительно включает в себя исправление построенного пути путем добавления одной или нескольких заплаток(патчей). Этот способ дополнительно включает в себя удаление по меньшей мере одного ребра графа из графа смежности, соответствующего оптимальному пути, выявление компонент связности в графе смежности, построение регионов, соответствующих компонентам связности в графе смежности и разделение изображения документа на построенные регионы.[0005] In some embodiments, this method further includes assigning weights and / or penalties to the edges of the separating graph. In one embodiment, the weight values are based on a comparison of at least two identified objects. This method further includes summing the assigned weight values to determine the total weight value to find the optimal path. In one implementation example, the optimal path is the path with the best total weight. The method further includes constructing a subgraph for the dividing graph in order to limit the search area of the desired path, identifying the connected components in the subgraph, building at least one path relative to the identified connected components, and filtering the paths. In some embodiments, the implementation of this method further includes correcting the constructed path by adding one or more patches (patches). This method further includes removing at least one edge of the graph from the adjacency graph corresponding to the optimal path, identifying connectivity components in the adjacency graph, building regions corresponding to connectivity components in the adjacency graph, and dividing the document image into the constructed regions.

[0006] С другой стороны, настоящее изобретение относится к системе обнаружения базовой структуры документа. Эта система включает в себя память, выполненную с возможностью хранения исполняемых процессором команд, и процессор, функционально связанный с памятью. В некоторых вариантах осуществления этот процессор дополнительно имеет возможность выявления объектов на изображении документа, построения диаграммы для областей на выявленных объектах, построения разделяющего графа на основе диаграммы для областей и построения графа смежности на основе разделяющего графа. В некоторых вариантах осуществления этот процессор дополнительно имеет возможность назначения вершин графа, соответствующих выявленным объектам, выявления пар смежных объектов, соответствующих парам объектов, разделенным по меньшей мере одним ребром в разделяющем графе, и возможность соединения каждой пары смежных объектов ребром графа смежности. Этот процессор дополнительно имеет возможность выявления вершин графа и ребер графа в диаграмме для областей и построения минимального графа на основе выявленных вершин графа и ребер графа. Этот способ дополнительно включает обнаружение оптимального пути в графе для определения местонахождения регионов на изображении документа и разделение изображения документа на регионы, по меньшей мере частично основанное на найденном оптимальном пути.[0006] On the other hand, the present invention relates to a system for detecting the basic structure of a document. This system includes a memory configured to store instructions executed by the processor, and a processor operably associated with the memory. In some embodiments, this processor further has the ability to identify objects in the image of the document, build a diagram for areas on the identified objects, build a dividing graph based on a diagram for regions, and construct an adjacency graph based on a dividing graph. In some embodiments, this processor further has the ability to assign vertices of the graph corresponding to the identified objects, identify pairs of adjacent objects corresponding to pairs of objects separated by at least one edge in the separating graph, and the ability to connect each pair of adjacent objects by an edge of the adjacency graph. This processor additionally has the ability to identify the vertices of the graph and edges of the graph in the diagram for areas and build a minimal graph based on the identified vertices of the graph and edges of the graph. This method further includes detecting the optimal path in the graph to determine the location of the regions in the image of the document and dividing the image of the document into regions, at least partially based on the found optimal path.

[0007] В некоторых вариантах осуществления этот процессор дополнительно имеет возможность присвоения значений весов и/или штрафов ребрам разделяющего графа. В одном из вариантов реализации значения весов основаны на сопоставлении по меньшей мере одной пары выявленных объектов. Этот процессор дополнительно имеет возможность суммирования присвоенных значений весов для определения значения суммарного веса для обнаружения оптимального пути. В некоторых вариантах осуществления оптимальный путь представляет собой путь с наилучшим значением суммарного веса. Процессор дополнительно выполнен с возможностью построения подграфа для разделяющего графа с целью ограничения области поиска требуемого пути, выявления компонент связности в подграфе, построения по меньшей мере одного пути относительно выявленных компонент связности и фильтрации путей. В некоторых вариантах реализации процессор дополнительно имеет возможность корректировки построенного пути путем добавления одной или нескольких заплаток. Этот процессор дополнительно имеет возможность удаления по меньшей мере одного ребра графа из графа смежности, соответствующего оптимальному пути, определения компонент связности в графе смежности, построения регионов соответствующих компонентам связности в графе смежности и разделения изображения документа на построенные регионы.[0007] In some embodiments, this processor further has the ability to assign weights and / or penalties to the edges of the separating graph. In one embodiment, the weight values are based on a comparison of at least one pair of identified objects. This processor additionally has the ability to sum the assigned weight values to determine the total weight value to find the optimal path. In some embodiments, the optimal path is the path with the best total weight. The processor is additionally configured to construct a subgraph for the dividing graph in order to limit the search area of the desired path, identify the connected components in the subgraph, build at least one path relative to the identified connected components and filter the paths. In some implementations, the processor further has the ability to adjust the constructed path by adding one or more patches. This processor additionally has the ability to remove at least one edge of the graph from the adjacency graph corresponding to the optimal path, determine the connectivity components in the adjacency graph, construct regions corresponding to the connectivity components in the adjacency graph, and divide the document image into the constructed regions.

[0008] С другой стороны, настоящее изобретение относится к постоянному машиночитаемому носителю данных, содержащему хранимые в нем машиночитаемые команды, причем эти команды могут исполняться процессором вычислительной системы. Эти команды дополнительно включают команды для выявления объектов на изображении документа, построения диаграммы для областей на выявленных объектах, команды по построению разделяющего графа на основе диаграммы для областей и команды для построения графа смежности на основе разделяющего графа. В некоторых вариантах осуществления эти команды дополнительно включают команды для назначения вершин графа, соответствующих выявленным объектам, команды для выявления пар смежных объектов, соответствующих парам объектов, разделенных по меньшей мере одним ребром в разделяющем графе, а также команды для соединения каждой пары смежных объектов ребром графа смежности. Эти команды дополнительно включают команды по выявлению вершин графа и ребер графа на диаграмме для областей и команды по построению минимального графа на основе выявленных вершин графа и ребер графа. Этот способ дополнительно включает поиск оптимального пути в графе для определения местонахождения регионов на изображении документа и разделение изображения документа на выявленные области по меньшей мере частично на основе построенного оптимального пути.[0008] On the other hand, the present invention relates to a permanent computer-readable storage medium containing computer-readable instructions stored therein, and these instructions may be executed by a processor of a computing system. These commands additionally include commands for identifying objects in the image of the document, building a diagram for areas on identified objects, commands for constructing a separating graph based on a diagram for regions, and commands for constructing an adjacency graph based on a separating graph. In some embodiments, these commands further include commands for assigning vertices of the graph corresponding to the identified objects, commands for identifying pairs of adjacent objects corresponding to pairs of objects separated by at least one edge in the separating graph, and also commands for connecting each pair of adjacent objects with an edge of the graph adjacency. These commands additionally include commands to identify the vertices of the graph and edges of the graph in the diagram for areas and teams to build a minimal graph based on the identified vertices of the graph and edges of the graph. This method further includes searching for the optimal path in the graph to determine the location of the regions in the image of the document and dividing the image of the document into identified areas at least partially based on the constructed optimal path.

[0009] В некоторых вариантах осуществления эти команды дополнительно включают команды для присвоения весов и/или штрафов ребрам разделяющего графа. В одном из вариантов осуществления эти штрафы основаны на сравнении взаимных характеристик по меньшей мере для одной пары выявленных объектов. Эти команды дополнительно включают команды для суммирования присвоенных значений весов для определения значения суммарного веса с целью нахождения оптимального пути. В некоторых вариантах осуществления оптимальный путь представляет собой путь с наилучшим значением суммарного веса. Эти команды дополнительно включают команды для построения подграфа для разделяющего графа с целью ограничения области поиска требуемого пути, команды для выявления компонент связности в подграфе, команды для построения по меньшей мере одного пути относительно выявленных компонент связности и команды для фильтрации этих путей. В некоторых вариантах осуществления эти команды дополнительно включают команды для исправления построенного пути путем добавления одной или нескольких заплаток. Эти команды дополнительно включают команды для удаления по меньшей мере одного ребра графа из графа смежности, соответствующего по меньшей мере одному оптимальному пути, команды для выявления компонент связности в графе смежности, команды для построения регионов, соответствующих компонентам связности в графе смежности, и команды для разделения изображения документа на построенные регионы.[0009] In some embodiments, these instructions further include instructions for assigning weights and / or penalties to the edges of the separating graph. In one embodiment, the implementation of these penalties is based on a comparison of the mutual characteristics of at least one pair of identified objects. These commands additionally include commands for summing the assigned weight values to determine the total weight value in order to find the optimal path. In some embodiments, the optimal path is the path with the best total weight. These commands additionally include commands for constructing a subgraph for the dividing graph in order to limit the search area of the desired path, commands for identifying connected components in the subgraph, commands for constructing at least one path relative to the identified connected components, and commands for filtering these paths. In some embodiments, the implementation of these commands further include commands to correct the constructed path by adding one or more patches. These commands further include commands for removing at least one edge of the graph from the adjacency graph corresponding to at least one optimal path, commands for identifying connectivity components in the adjacency graph, commands for constructing regions corresponding to connectivity components in the adjacency graph, and commands for splitting images of the document on the constructed regions.

КРАТКОЕ ОПИСАНИЕ ЧЕРТЕЖЕЙBRIEF DESCRIPTION OF THE DRAWINGS

[0010] Вышеизложенное и другие объекты, аспекты, особенности и преимущества данного раскрытия изобретения станут более очевидными и более понятными при обращении к последующему описанию, рассматриваемому вместе с прилагаемыми чертежами, на которых:[0010] The foregoing and other objects, aspects, features and advantages of this disclosure of the invention will become more apparent and more understandable when referring to the following description, taken together with the accompanying drawings, in which:

[0011] Фиг. 1 представляет собой блок-схему способа обнаружения логической структуры документа в соответствии с иллюстративным вариантом осуществления изобретения;[0011] FIG. 1 is a flowchart of a method for detecting a logical structure of a document in accordance with an illustrative embodiment of the invention;

[0012] Фиг. 2 представляет собой блок-схему способа построения диаграммы для областей в соответствии с иллюстративным вариантом осуществления изобретения;[0012] FIG. 2 is a flowchart of a method of plotting for regions in accordance with an illustrative embodiment of the invention;

[0013] Фиг. 3 представляет собой блок-схему способа построения разделяющего графа в соответствии с иллюстративным вариантом осуществления изобретения;[0013] FIG. 3 is a flowchart of a method for constructing a dividing graph in accordance with an illustrative embodiment of the invention;

[0014] Фиг. 4 представляет собой блок-схему способа обнаружения оптимального пути в соответствии с иллюстративным вариантом осуществления изобретения;[0014] FIG. 4 is a flowchart of a method for detecting an optimal path in accordance with an illustrative embodiment of the invention;

[0015] Фиг. 5 представляет собой блок-схему способа разделения документа на регионы в соответствии с иллюстративным вариантом осуществления изобретения;[0015] FIG. 5 is a flowchart of a method for dividing a document into regions in accordance with an illustrative embodiment of the invention;

[0016] Фиг. 6 иллюстрирует пример изображения документа с искаженными колонками в соответствии с иллюстративным вариантом осуществления изобретения (Эта фигура несла иллюстративный характер. Приведенный в ней текст не нес смысловой нагрузки, переводить ее текст не представляется возможным и текстовая часть заменена на произвольный иллюстративный русский текст. Ни иллюстративный английский текст (фотография), ни заменяющий русский текст не являются частью заявки и приведены как пример иллюстрации);[0016] FIG. 6 illustrates an example image of a document with distorted columns in accordance with an illustrative embodiment of the invention (This figure was illustrative. The text provided therein did not carry a semantic load, it is not possible to translate its text and the text part has been replaced with arbitrary illustrative Russian text. Neither illustrative English the text (photo), nor the replacement of the Russian text are not part of the application and are given as an example of illustration);

[0017] Фиг. 7 иллюстрирует пример изображения документа с врезками в соответствии с иллюстративным вариантом осуществления изобретения (Эта фигура несла иллюстративный характер. Приведенный в ней текст не нес смысловой нагрузки, переводить ее текст не представляется возможным и текстовая часть заменена на произвольный иллюстративный русский текст. Ни иллюстративный английский текст (фотография), ни заменяющий русский текст не являются частью заявки и приведены как пример иллюстрации);[0017] FIG. 7 illustrates an example of an image of a paper with inserts in accordance with an illustrative embodiment of the invention (This figure was illustrative. The text provided therein did not carry a semantic load, it is not possible to translate its text and the text part has been replaced with arbitrary illustrative Russian text. Neither illustrative English text (photo), nor a replacement for the Russian text are not part of the application and are given as an example of illustration);

[0018] Фиг. 8 иллюстрирует примеры объектов на изображении документа в соответствии с иллюстративным вариантом осуществления изобретения;[0018] FIG. 8 illustrates examples of objects in an image of a document in accordance with an illustrative embodiment of the invention;

[0019] Фиг. 9 иллюстрирует первый пример графа объектов на изображении документа в соответствии с иллюстративным вариантом осуществления изобретения;[0019] FIG. 9 illustrates a first example of a graph of objects in an image of a document in accordance with an illustrative embodiment of the invention;

[0020] Фиг. 10 иллюстрирует второй пример графа объектов на изображении документа в соответствии с иллюстративным вариантом осуществления изобретения;[0020] FIG. 10 illustrates a second example of a graph of objects in an image of a document in accordance with an illustrative embodiment of the invention;

[0021] Фиг. 11 представляет собой блок-схему системы для обнаружения логической структуры документа в соответствии с иллюстративным вариантом осуществления изобретения.[0021] FIG. 11 is a block diagram of a system for detecting a logical structure of a document in accordance with an illustrative embodiment of the invention.

ПОДРОБНОЕ ОПИСАНИЕDETAILED DESCRIPTION

[0022] В нижеследующем описании с целью пояснения изложены многочисленные конкретные детали для того, чтобы обеспечить исчерпывающее понимание настоящего изобретения. Однако специалистам в данной области техники будет очевидно, что это изобретение может быть осуществлено на практике без этих конкретных деталей. В других случаях структуры и устройства показаны только в виде блок-схем, чтобы не затруднять понимание сущности изобретения.[0022] In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to those skilled in the art that this invention can be practiced without these specific details. In other cases, structures and devices are shown only in block diagrams so as not to obscure the invention.

[0023] Ссылка в этом описании на «один вариант осуществления» или «вариант осуществления» означает, что конкретная особенность, структура или характеристика, описанная в связи с осуществлением изобретения, включена по меньшей мере в один из вариантов осуществления настоящего изобретения. Неоднократное появление выражения «в одном из вариантов осуществления» в различных местах описания не обязательно относятся к одному и тому же варианту осуществления, а отдельные или альтернативные варианты осуществления изобретения не являются взаимоисключающими по отношению к другим вариантам осуществления. Кроме того, приведено описание различных особенностей, которые могут использоваться в некоторых вариантах осуществления изобретения и не использоваться в других вариантах его осуществления. Аналогично приведены описания различных требований, которые могут предъявляться к некоторым вариантам осуществления этого изобретения, но не к другим вариантам его осуществления.[0023] A reference in this description to “one embodiment” or “embodiment” means that a particular feature, structure, or characteristic described in connection with an embodiment of the invention is included in at least one embodiment of the present invention. The repeated occurrence of the expression “in one embodiment” at various places in the description does not necessarily refer to the same embodiment, and individual or alternative embodiments of the invention are not mutually exclusive with respect to other embodiments. In addition, a description is given of various features that may be used in some embodiments of the invention and not used in other embodiments. Similarly, descriptions are given of the various requirements that may be presented to some embodiments of this invention, but not to other embodiments.

[0024] Сегментация является важным шагом при распознавании изображения документа. Процесс сегментации позволяет выявить различные регионы на изображениях документов. Регионы могут представлять собой колонки, рисунки, таблицы, фрагменты текста, заголовки и т.д.[0024] Segmentation is an important step in image recognition of a document. The segmentation process allows you to identify different regions on the images of documents. Regions can be columns, figures, tables, text fragments, headings, etc.

[0025] Настоящее изобретение относится к способам и системам обнаружения (или выявления) основной структуры документа. В некоторых вариантах осуществления документ может содержать колонки текста, изображения, таблицы и т.д. Настоящее изобретение также относится к обнаружению (выявлению) границ объектов любой сложности, расположенных в документе, например, границы объектов в документе могут частично или полностью врезаться в колонки. В некоторых вариантах осуществления обнаружение границ включает обнаружение просветов между колонками, например, на изображении документа. Просветы на изображениях документов могут быть изогнутыми, узкими или искаженными. В некоторых вариантах осуществления объекты в документе могут иметь произвольную форму, что увеличивает сложность определения границ. Пример документа с изогнутыми колонками 62 показан на Фиг. 6. Документ может содержать различные регионы, такие как фрагменты текста, картинки, колонки, таблицы, схемы и т.д. Описанные в настоящем документе способы и системы могут разделить документ на такие регионы для того, чтобы правильно понять их логическую взаимосвязь.[0025] The present invention relates to methods and systems for detecting (or detecting) the basic structure of a document. In some embodiments, the implementation of the document may contain columns of text, images, tables, etc. The present invention also relates to the detection (detection) of the boundaries of objects of any complexity located in a document, for example, the boundaries of objects in a document can partially or completely cut into columns. In some embodiments, boundary detection includes detecting gaps between columns, for example, in a document image. Gaps in document images may be curved, narrow or distorted. In some embodiments, the objects in the document may be arbitrary in shape, which increases the complexity of defining boundaries. An example of a document with curved columns 62 is shown in FIG. 6. The document may contain various regions, such as fragments of text, pictures, columns, tables, diagrams, etc. The methods and systems described herein may divide a document into such regions in order to correctly understand their logical relationship.

[0026] В документе могут присутствовать регионы двух типов: регионы колонок и неколоночные регионы. Регионы колонок можно рассматривать как участки документа, содержащие текст, который по форме напоминает колонку. В документе может присутствовать одна или несколько колонок текста. Неколоночные регионы в некоторых вариантах осуществления могут представлять собой участки документа, содержащие картинки, рамки с текстом, заголовки или таблицы, в дальнейшем они могут упоминаться как «врезки».[0026] Two types of regions may be present in a document: column regions and non-column regions. Regions of columns can be considered as sections of a document containing text that resembles a column in shape. A document may contain one or more columns of text. Non-column regions in some embodiments may be portions of a document containing pictures, text frames, headings or tables, hereinafter referred to as “boxes”.

[0027] Врезка может представлять собой регион документа, который содержит текст, рамку с текстом, заголовок, таблицу и/или рисунок. В некоторых вариантах осуществления главным признаком врезки является то, что она частично или полностью врезается в колонку основного текста. В дальнейшем врезка, которая частично врезается в колонку, может называться «частичной» врезкой. Кроме того, врезка, которая полностью врезается в колонку, далее может называться «полной» врезкой. Отметим, что основной текст колонки может располагаться либо слева, либо справа от частичной врезки. Таким образом, возможны два типа частичных врезок: правая частичная врезка и левая частичная врезка.[0027] The box may be a region of a document that contains text, a frame with text, a title, a table, and / or a picture. In some embodiments, the main feature of the frame is that it partially or fully cuts into the main text column. In the future, a frame that partially cuts into a column may be called a “partial” frame. In addition, a frame that fully cuts into a column can be called a “full” frame. Note that the main text of the column can be located either to the left or to the right of the partial inset. Thus, two types of partial taps are possible: the right partial tapping and the left partial tapping.

[0028] На Фиг. 7 показан пример изображения документа, содержащего врезки. Изображение документа на Фиг. 7 включает в себя врезку 71, первую колонку 72, среднюю колонку 73, третью колонку 74, полные врезки 75 и границу средней колонки 76. Сложная врезка 71 на Фиг. 7 является врезкой для каждой колонки. Для первой колонки врезка 71 является правой частичной (прямоугольной) врезкой. Для средней колонки врезка 71 является полной врезкой. Для третьей колонки 74 врезка 71 является частичной левой (не прямоугольной) врезкой.[0028] In FIG. 7 shows an example image of a document containing frames. The image of the document in FIG. 7 includes a box 71, a first column 72, a middle column 73, a third column 74, full bars 75 and a border of a middle column 76. A complex box 71 in FIG. 7 is a sidebar for each column. For the first column, inset 71 is the right partial (rectangular) inset. For the middle column, frame 71 is a full frame. For the third column 74, inset 71 is a partial left (not rectangular) inset.

[0029] В некоторых вариантах осуществления врезки могут располагаться в верхней, нижней или средней части колонки текста. Для верхней врезки основной текст может располагаться ниже врезки. Таким образом, эта врезка примыкает к верхней части контекста. Для нижней врезки основной текст может быть расположен выше врезки, причем врезка может примыкать к нижней части контекста. В случае средней врезки текст может располагаться выше, ниже и/или с одной стороны (справа или слева) в зависимости от того, является ли эта врезка правой врезкой или левой врезкой. Например, врезка «В МИРЕ ОЖИВШИХ ЗВУКОВ» (75) на Фиг. 7 является верхней (полной) врезкой для всех колонок. В некоторых вариантах осуществления средние полные врезки могут разделять колонку на две несвязанные части. В одном варианте осуществления заголовок можно рассматривать как особый случай верхней полной врезки.[0029] In some embodiments, the insets can be located at the top, bottom, or middle of the text column. For the top frame, the body text may be located below the frame. Thus, this sidebar is adjacent to the top of the context. For the bottom inset, the main text can be positioned above the inset, the inset can be adjacent to the bottom of the context. In the case of an average inset, the text can be located above, below and / or on one side (right or left), depending on whether this inset is a right inset or a left inset. For example, the inset “IN THE WORLD OF LIVING SOUNDS” (75) in FIG. 7 is the top (full) sidebar for all columns. In some embodiments, the middle full cuts may divide the column into two unrelated parts. In one embodiment, the title may be considered as a special case of the top full frame.

[0030] На Фиг. 1 показана блок-схема последовательности операций способа определения логической структуры документа. Этот способ может быть осуществлен в вычислительном устройстве (например, в устройстве пользователя). В одном варианте осуществления этот способ кодируется на машиночитаемом носителе, содержащем команды, которые при выполнении в вычислительном устройстве приводят к тому, что вычислительное устройство выполняет операции этого способа. В блоке 100 получено изображение документа. В некоторых вариантах осуществления это изображение документа (или кадр) может быть получено в электронном виде с использованием любого из известных методов. В некотором варианте осуществления это изображение может быть получено из памяти электронного устройства или из любых других доступных источников. Изображение документа может быть получено процессором. Этот процессор может быть настроен на возможность приема изображения документа и выполнение способов, описанных в настоящем документе.[0030] In FIG. 1 is a flowchart of a method for determining a logical structure of a document. This method can be implemented in a computing device (for example, in a user device). In one embodiment, this method is encoded on a computer-readable medium containing instructions that, when executed on a computing device, cause the computing device to perform operations of this method. In block 100, an image of the document is received. In some embodiments, this image of a document (or frame) can be obtained electronically using any of the known methods. In some embodiment, this image can be obtained from the memory of an electronic device or from any other available sources. Image of the document can be obtained by the processor. This processor can be configured to receive an image of a document and to execute the methods described herein.

[0031] В блоке 105 выявляются объекты на этом изображении документа. В некоторых вариантах осуществления для того, чтобы найти границы между регионами, первоначально в документе 105 могут быть определены объекты. Объектами в документе могут быть, например, фрагменты строк текста, строки, фрагменты рисунков, рисунки, слова, разделители и т.д. На Фиг. 8 показаны примеры текстовых объектов 82 на изображении документа. На Фиг. 8 показаны фрагменты строк текста, которые могут быть объектами 82. Границы объектов 84 обозначены черной линией.[0031] In block 105, objects in this image of the document are detected. In some embodiments, in order to find boundaries between regions, objects may initially be defined in document 105. Objects in a document can be, for example, fragments of lines of text, lines, fragments of drawings, pictures, words, delimiters, etc. In FIG. 8 shows examples of text objects 82 in a document image. In FIG. 8 shows fragments of lines of text that can be objects 82. The boundaries of objects 84 are indicated by a black line.

[0032] В настоящем раскрытии изобретения изображение документа сегментируется на регионы с использованием диаграммы Вороного для областей (которая ниже именуется «»AVD» от англ. area Voronoi diagram), а выявленные объекты используются в качестве областей Вороного. Возвращаясь к Фиг. 1, на этапе 110 построена AVD. Диаграмма Вороного для областей может быть построена любым удобным способом. Для целей сегментации приближенная диаграмма Вороного для областей может быть построена, используя, например, способ, показанный на Фиг. 2.[0032] In the present disclosure, a document image is segmented into regions using a Voronoi diagram for regions (hereinafter referred to as "" AVD "from the English area Voronoi diagram), and the identified objects are used as Voronoi regions. Returning to FIG. 1, in step 110, an AVD is built. The Voronoi diagram for regions can be constructed in any convenient way. For segmentation purposes, an approximate Voronoi diagram for regions can be constructed using, for example, the method shown in FIG. 2.

[0033] На Фиг. 2 показана блок-схема последовательности операций способа построения приближенной диаграммы Вороного для областей. В блоке 200 получается изображение с выделенными объектами. В блоке 210 каждый объект сначала аппроксимируется с помощью набора точек 210. В некоторых вариантах осуществления набор точек может называться «аппроксимирующими точками». На Фиг. 8 показаны примеры объектов 82 и один из способов их аппроксимации с помощью набора точек 86. После того как аппроксимирующие точки были определены для всех объектов, в блоке 220 для них строится диаграмма Вороного 220. В построенной диаграмме Вороного множество точек, каждая из которых располагается к заданной аппроксимирующей точке ближе, чем ко всем остальным, может называться ячейкой Вороного для аппроксимирующей точки. В блоке 230 исключаются границы между ячейками Вороного, принадлежащими одним и тем же объектам (230). В блоке 240 полученная диаграмма представляет собой приближенную диаграмму Вороного для областей. Следует отметить, что AVD содержит полезную дополнительную информацию, связанную с топологией объектов. Например, ее можно использовать для уточнения границ между объектами. В некоторых вариантах осуществления для этого используется специальная структура данных, называемая «разделяющий граф».[0033] In FIG. 2 shows a flowchart of a method for constructing an approximate Voronoi diagram for regions. In block 200, an image with selected objects is obtained. In block 210, each object is first approximated using a set of points 210. In some embodiments, the set of points may be referred to as “approximating points”. In FIG. Figure 8 shows examples of objects 82 and one way of approximating them using a set of points 86. After approximating points have been determined for all objects, a block Voronoi 220 is constructed for them in block 220. In the constructed Voronoi diagram, there are many points, each of which is located to to a given approximating point closer than to all others, can be called a Voronoi cell for an approximating point. In block 230, boundaries between Voronoi cells belonging to the same objects (230) are excluded. In block 240, the resulting diagram is an approximate Voronoi diagram for regions. It should be noted that AVD contains useful additional information related to the topology of objects. For example, it can be used to clarify the boundaries between objects. In some embodiments, a special data structure called a “dividing graph” is used for this.

[0034] На Фиг. 3 показана блок-схема способа осуществления для построения разделяющего графа (120 на Фиг. 1). В блоке 300 строится диаграмма Вороного для областей. В некоторых вариантах реализации ребрами разделяющего графа означаются непрерывные участки границ между ячейками Вороного, например ячейками Вороного в диаграмме Вороного для областей. Ребра в разделяющем графе могут начинаться и заканчиваться в точках разветвления соответствующих линий границ. Точкой ветвления может быть точка, в которой встречаются три или более ячейки Вороного. В некоторых вариантах ребро снабжено дополнительной информацией, например, ребро может указывать пару объектов, разделенных соответствующей линией границы.[0034] FIG. 3 is a flowchart of an embodiment for constructing a dividing graph (120 in FIG. 1). In block 300, a Voronoi diagram for regions is constructed. In some embodiments, the edges of the separating graph indicate continuous sections of the boundaries between the Voronoi cells, for example, the Voronoi cells in the Voronoi diagram for regions. The edges in the dividing graph can begin and end at the branch points of the corresponding boundary lines. The branch point may be the point at which three or more Voronoi cells meet. In some embodiments, the edge is provided with additional information, for example, the edge may indicate a pair of objects separated by a corresponding boundary line.

[0035] На Фиг. 9 схематично иллюстрируется первый пример разделяющего графа. На Фиг. 9 показано ребро Eab 91, которое разделяет соседние ячейки А 92 и В 93. Вершинами в разделяющем графе могут быть точки ветвления 102 и концевые точки 104 на AVD, как схематически показано на Фиг. 10, которая иллюстрирует второй пример разделяющего графа. В некоторых вариантах осуществления вершины, соответствующие концевым точкам, могут назваться «концевыми вершинами». Концевые вершины могут быть вершинами, расположенными вдоль границы графа. Из концевой вершины может выходить только одно ребро. В некоторых вариантах осуществления, если объект имеет более или менее случайную форму, то ровно 3 ребра будет исходить из каждой неконцевой вершины. Это следует из свойств диаграммы Вороного.[0035] In FIG. 9 schematically illustrates a first example of a dividing graph. In FIG. 9 shows an edge Eab 91 that separates adjacent cells A 92 and B 93. The vertices in the separating graph may be branch points 102 and end points 104 on the AVD, as schematically shown in FIG. 10, which illustrates a second example of a dividing graph. In some embodiments, the implementation of the vertices corresponding to the end points may be called "end vertices." End vertices may be vertices located along the boundary of the graph. Only one edge can exit the end vertex. In some embodiments, if the object has a more or less random shape, then exactly 3 edges will come from each non-terminal vertex. This follows from the properties of the Voronoi diagram.

[0036] Возвращаясь к Фиг. 3, в блоках 310 и 320 при построении разделяющего графа могут использоваться точки ветвления и концевые точки на AVD. В некоторых вариантах осуществления каждой из этих точек соответствует вершина графа 310, а каждому отрезку, разделяющему ячейки Вороного, соответствует ребро графа 320. В блоке 330 полученный граф может быть сведен к минимальному гомеоморфному графу, то есть узлы степени 2 (вершины, имеющие всего два выходящих ребра). В некоторых вариантах осуществления для того, чтобы привести полученный граф к минимальному графу, вершины, из которых выходит только два ребра, могут быть удалены, а два соответствующих ребра могут быть объединены в одно ребро 330. В одном варианте осуществления ребра объединяются только тогда, когда они разделяют одну и ту же пару объектов. Полученный граф является разделяющим графом 340.[0036] Returning to FIG. 3, in blocks 310 and 320, branch points and end points on the AVD can be used to construct the dividing graph. In some embodiments, each of these points corresponds to a vertex of graph 310, and to each segment separating Voronoi cells there corresponds an edge of graph 320. In block 330, the resulting graph can be reduced to a minimal homeomorphic graph, that is, nodes of degree 2 (vertices with only two outgoing ribs). In some embodiments, in order to bring the resulting graph to a minimal graph, the vertices from which only two edges come out can be removed, and two corresponding edges can be combined into one edge 330. In one embodiment, the edges are combined only when they share the same pair of objects. The resulting graph is a separating graph 340.

[0037] Теперь обратимся к Фиг. 1, где в блоке 120 строится граф смежности. В некоторых вариантах осуществления граф смежности объектов может являться двойственным представлением AVD. В отличие от разделяющего графа, вершины графа смежности могут иметь четко определенный физический смысл и соответствовать объектам на изображении документа. Ребра графа смежности соединяют смежные объекты, в то время как ребра разделяющего графа разделяют их. В некоторых вариантах осуществления разделяющий граф может использоваться для построения графа смежности. В одном из вариантов осуществления процедура построения графа смежности с использованием разделяющего графа может включать выявление вершин графа смежности. В некоторых вариантах осуществления вершины графа смежности могут соответствовать объектам, найденным на изображении документа, и две вершины графа смежности могут быть соединены ребром, если объекты, соответствующие этим вершинам, разделены по меньшей мере одним ребром в разделяющем графе (дополнительная информация ребра разделяющего графа указывает объекты, которые данное ребро разделяет). В некоторых вариантах осуществления невозможно однозначно восстановить разделяющий граф из графа смежности объектов. Это связано с тем фактом, что из графа смежности не всегда можно узнать, должны ли два ребра в разделяющем графе быть смежными (то есть иметь общую вершину) или нет.[0037] Now, referring to FIG. 1, where an adjacency graph is constructed in block 120. In some embodiments, an object adjacency graph may be a dual representation of AVD. Unlike the separating graph, the vertices of the adjacency graph can have a well-defined physical meaning and correspond to objects in the image of the document. The edges of the adjacency graph connect adjacent objects, while the edges of the separating graph separate them. In some embodiments, a partitioning graph may be used to construct an adjacency graph. In one embodiment, the procedure for constructing an adjacency graph using a dividing graph may include identifying vertices of the adjacency graph. In some embodiments, the vertices of the adjacency graph can correspond to objects found in the image of the document, and two vertices of the adjacency graph can be connected by an edge if the objects corresponding to these vertices are separated by at least one edge in the separating graph (additional information of the edge of the separating graph indicates objects which this edge shares). In some embodiments, it is not possible to uniquely recover a separating graph from an adjacency graph of objects. This is due to the fact that it is not always possible to find out from an adjacency graph whether two edges in a separating graph should be adjacent (that is, have a common vertex) or not.

[0038] Снова возвращаясь к Фиг. 1, в блоке 140 производится поиск путей. Поиск путей может производиться после построения разделяющего графа и графа смежности, причем поиск путей осуществляется в разделяющем графе.[0038] Returning again to FIG. 1, block 140 searches for paths. The search for paths can be performed after constructing the separating graph and the adjacency graph, and the search for paths is carried out in the separating graph.

[0039] На Фиг. 4 показана блок-схема последовательности операций способа для поиска оптимального пути. В некоторых вариантах осуществления регионы в документе могут быть представлены фрагментами текста, картинками, колонками, таблицами, схемами и т.д. Чаще всего границы между регионами в документах представляют собой довольно большие области пустого пространства, например, разделение между колонками или границами врезок, которые обычно являются непрерывными. С точки зрения разделяющего графа такое пространство может быть довольно длинным непрерывным путем (т.е. последовательностью смежных ребер) в разделяющем графе.[0039] FIG. 4 is a flowchart of a method for finding an optimal path. In some embodiments, regions in a document may be represented by text fragments, pictures, columns, tables, diagrams, etc. Most often, the borders between regions in documents are fairly large areas of empty space, for example, the separation between columns or frame borders, which are usually continuous. From the point of view of the dividing graph, such a space can be a rather long continuous path (i.e., a sequence of adjacent edges) in the dividing graph.

[0040] В одном варианте осуществления путь в разделяющем графе может быть последовательностью ребер, в которой конец одного ребра (вершина) является началом другого ребра. В некоторых вариантах осуществления путь в разделяющем графе может завершиться либо на концевой вершине, либо на вершине из некоторого другого пути. На Фиг. 7 иллюстрируется пример изображения документа, при этом легко заметно, что набор путей 76 будет «разрезать» документ, тем самым разделяя его контекст на требуемые регионы.[0040] In one embodiment, the path in the dividing graph may be a sequence of edges in which the end of one edge (vertex) is the beginning of another edge. In some embodiments, the implementation of the path in the dividing graph may terminate either at the end vertex, or at the top of some other path. In FIG. 7 illustrates an example image of a document, it being easily seen that a set of paths 76 will “cut” the document, thereby dividing its context into the required regions.

[0041] В одном варианте осуществления для корректного разделения документа на регионы определяется оптимальный путь. Для этого возвратимся к Фиг. 4, в блоке 400 ребра разделяющего графа взвешиваются. В некоторых вариантах осуществления ребра разделяющего графа взвешиваются на основе анализа совместимости объектов, между которыми проходят ребра разделяющего графа. Такой анализ может также включать сравнение характеристик выделенных объектов на изображении документа. Например, такой анализ может включать, без ограничений, сравнение текстового качества объектов, положений базовых линий, высоты и т.п. В некоторых вариантах осуществления на основе полученных результатов ребру, разделяющему рассматриваемые объекты, может быть назначен вес или штраф. В одном варианте осуществления штраф (вес) может иметь некоторое числовое значение. В некоторых вариантах осуществления значения весов могут быть основаны на анализе взаимных и/или похожих характеристик по меньшей мере одной пары выявленных объектов. Например, если два объекта очень похожи на куски строки, то ребру, разделяющему эти два объекта, может быть назначен большой штраф. В других вариантах осуществления, если типы двух объектов несовместимы (например, текстовый объект и картинка), то ребрам между этими двумя объектами может быть назначен меньший штраф.[0041] In one embodiment, the optimal path is determined to correctly divide a document into regions. For this, we return to FIG. 4, in block 400, the edges of the separating graph are weighted. In some embodiments, the edges of the dividing graph are weighted based on an analysis of the compatibility of the objects between which the edges of the dividing graph pass. Such an analysis may also include comparing the characteristics of the selected objects in the image of the document. For example, such an analysis may include, without limitation, comparing the text quality of objects, the positions of baselines, heights, etc. In some embodiments, based on the results, the edge separating the objects in question may be assigned a weight or a penalty. In one embodiment, the penalty (weight) may have some numerical value. In some embodiments, the implementation of the values of the weights may be based on the analysis of mutual and / or similar characteristics of at least one pair of identified objects. For example, if two objects are very similar to pieces of a string, then the edge separating the two objects can be given a large fine. In other embodiments, if the types of the two objects are incompatible (for example, a text object and a picture), then the edges between the two objects can be assigned a smaller penalty.

[0042] В некоторых вариантах осуществления размер штрафа может зависеть от расстояния между объектами. В общем случае для различных подзадач штрафы могут различаться. Например, в одном варианте осуществления при поиске определенных типов врезок можно ожидать, что существует колонка текста по крайней мере с одной стороны ребра, так что ребрам, которые разделяют нетекстовые объекты, может присваиваться больший штраф. В другом варианте осуществления большой штраф будет нецелесообразен при поиске путей между колонками (межколоночных путей), потому что возможно, что ребро разделяет две картинки, каждая из которых принадлежит своей колонке.[0042] In some embodiments, the size of the fine may depend on the distance between the objects. In general, fines can vary for different subtasks. For example, in one embodiment, when searching for specific types of frames, it can be expected that there is a column of text on at least one side of the edge, so that edges that share non-text objects can be assigned a higher penalty. In another embodiment, a large fine would be impractical when searching for paths between columns (intercolumn paths), because it is possible that an edge separates two pictures, each of which belongs to its own column.

[0043] В некоторых вариантах осуществления поиск путей в разделяющем графе предполагает, что путь должен пройти вдоль границы между соседними объектами в документе. Поскольку расстояние между границами регионов больше, чем, например, расстояние между строками текста в одной колонке, то после присвоения весов ребрам разделяющего графа получается, что ребра, разделяющие соседние регионы, имеют достаточно малый вес (штраф) по сравнению с ребрами, разделяющими объекты внутри одного региона. Таким образом, в одном варианте осуществления, чтобы найти путь, который проходит вдоль границы между регионами, желательно найти путь с наименьшим штрафом. В некоторых вариантах осуществления путь с наименьшим штрафом может оказаться оптимальным путем. В одном варианте осуществления оптимальный путь может оказаться путем с наилучшим суммарным значением веса. Наилучшее суммарное значение веса может иметь наименьший суммарный штраф или наибольшее значение суммарной оценки.[0043] In some embodiments, searching for paths in a dividing graph assumes that the path must go along the border between adjacent objects in the document. Since the distance between the boundaries of the regions is greater than, for example, the distance between the lines of text in one column, after assigning the weights to the edges of the separating graph, it turns out that the edges separating neighboring regions have a relatively small weight (fine) compared to edges separating objects inside one region. Thus, in one embodiment, in order to find the path that runs along the border between regions, it is desirable to find the path with the least penalty. In some embodiments, the path with the least penalty may be the best path. In one embodiment, the optimal path may be the path with the best total weight. The best total weight value may have the lowest total penalty or the highest total score.

[0044] В одном варианте осуществления процесс построения оптимального пути может начаться с поиска «хороших» ребер или ребер с концевыми вершинами. «Хорошее» ребро может означать ребро с наименьшим штрафом. В одном варианте осуществления «хорошим» может считаться ребро со штрафом, который меньше заранее определенного порога. Первоначально путь не имеет штрафов, потому что он не содержит ни одного ребра. При добавлении каждого ребра штраф пути увеличивается на величину штрафа добавляемого ребра. В некоторых вариантах осуществления можно использовать, например, алгоритм Дейкстры для нахождения пути с наименьшим штрафом. Таким образом, в одном варианте осуществления путь, полученный добавлением ребер с наименьшими штрафами, может быть границей между двумя или несколькими регионами изображения документа. В некоторых вариантах осуществления путь, полученный добавлением ребер с наименьшим штрафом, может проходить между концевыми вершинами и/или частями других путей на изображении документа. В общем случае, любая система оценки может быть выбрана для того, чтобы суммировать, сложить, подытожить и/или количественно оценить значение для ребра. Например, в одном варианте осуществления вместо штрафов можно оценивать качество ребра и/или пути. Таким образом, можно построить путь за счет добавления ребер с наибольшим значением веса (оценки) качества. В описанном ниже способе в качестве примера используется система штрафов.[0044] In one embodiment, the process of constructing an optimal path may begin by searching for “good” edges or edges with end vertices. A “good” rib can mean the rib with the least penalty. In one embodiment, an edge with a penalty that is less than a predetermined threshold can be considered “good”. Initially, the path has no fines, because it does not contain any edges. When adding each edge, the path penalty increases by the amount of the penalty of the added edge. In some embodiments, for example, Dijkstra's algorithm can be used to find the path with the least penalty. Thus, in one embodiment, the path obtained by adding edges with the least penalties may be the boundary between two or more regions of the image of the document. In some embodiments, the implementation of the path obtained by adding edges with the least penalty, can pass between the end vertices and / or parts of other paths in the image of the document. In the general case, any rating system can be selected in order to summarize, add, summarize and / or quantify the value for the rib. For example, in one embodiment, instead of fines, the quality of the rib and / or path can be evaluated. Thus, it is possible to build a path by adding ribs with the highest value of weight (evaluation) of quality. The method described below uses the penalty system as an example.

[0045] В некоторых вариантах осуществления можно построить подграф в разделяющем графе. Подграфом может быть граф, который содержит некоторое подмножество вершин разделяющего графа и некоторое подмножество соответствующих ребер в разделяющем графе. В некоторых вариантах осуществления подграф может быть определен в области изображения документа, по которой требуемый путь предположительно должен пройти. В таких вариантах осуществления поиск пути будет производиться только внутри подграфа. Одно из преимуществ использования подграфов заключается в том, что процесс обнаружения регионов в документе может быть ускорен.[0045] In some embodiments, a subgraph in a dividing graph can be constructed. A subgraph can be a graph that contains a subset of the vertices of the separating graph and a subset of the corresponding edges in the separating graph. In some embodiments, a subgraph may be defined in the image area of the document along which the desired path is supposed to go. In such embodiments, a path will only be searched within the subgraph. One of the advantages of using subgraphs is that the process of locating regions in a document can be accelerated.

[0046] Предложенный способ позволяет сегментировать документы произвольной сложности, имеющие самую разнообразную логическую структуру. Построение путей на основе многоколоночной страницы с врезками, подобной документу, показанному на Фиг. 7, может представлять трудности. Структура такого вида типична для газет и журналов, она является одной из самых сложных задач сегментации. Пример построения путей между колонками и путей для выделения врезок описан ниже.[0046] The proposed method allows you to segment documents of arbitrary complexity having the most diverse logical structure. Building paths based on a multi-column page with insets, similar to the document shown in FIG. 7 may be difficult. This kind of structure is typical of newspapers and magazines; it is one of the most difficult segmentation tasks. An example of constructing paths between columns and paths for selecting frames is described below.

[0047] В некоторых вариантах осуществления построение пути может включать несколько этапов. Сначала может быть построен один или несколько межколоночных графов (т.е. подграфов). В некоторых вариантах осуществления межкоолоночные графы строятся с использованием разделяющего графа. Для построения межколоночного подграфа могут быть проверены различные гипотезы относительно того, как разбить страницу на колонки. При этом следует учитывать, что колонки могут иметь одинаковую или различную ширину. В некоторых вариантах осуществления в межколоночном графе может быть проведен поиск ребер с небольшими штрафами, например, со штрафами, значения которых меньше некоторого порогового значения. В одном варианте осуществления ребра с малыми штрафами могут оказаться наиболее подходящими для использования в качестве границы между двумя колонками. В некоторых вариантах осуществления найденные ребра с небольшими штрафами, могут оказаться частями будущего оптимального пути.[0047] In some embodiments, the implementation of the path may include several steps. First, one or more intercolumn graphs (i.e., subgraphs) can be constructed. In some embodiments, intercolumn graphs are constructed using a separating graph. To construct an intercolumn subgraph, various hypotheses regarding how to split a page into columns can be tested. It should be borne in mind that the columns can have the same or different widths. In some embodiments, an edge column may be searched for edges with small fines, for example, fines whose values are less than a certain threshold value. In one embodiment, the fins with low penalties may be most suitable for use as the boundary between two columns. In some embodiments, the fins found with slight penalties may be parts of a future optimal path.

[0048] В одном варианте осуществления для оптимизации поиска разделяющего пути неориентированный граф может быть преобразован в ориентированный граф. Первоначально подграф может быть неориентированным, например, ребра подграфа могут не иметь направления. Для получения ориентированного графа из неориентированного графа каждое неориентированное ребро может быть заменено двумя ориентированными ребрами, в котором два ориентированных ребра имеют противоположные направления. В некоторых вариантах осуществления поиск производится, например, для путей, которые направлены только сверху вниз. В одном варианте осуществления ребра, которые направлены в противоположном направлении, могут быть исключены. Если для данной гипотезы разбиения на колонки не найдены никакие достоверные участки межколоночных путей (т.е. участки путей, имеющие ребра с малыми штрафами), то другой способ разбиения документа на колонки может быть рассмотрен.[0048] In one embodiment, to optimize the search for the separating path, an undirected graph can be converted to a directed graph. Initially, a subgraph may be non-oriented, for example, the edges of a subgraph may have no direction. To obtain a directed graph from an undirected graph, each non-oriented edge can be replaced by two oriented edges, in which two oriented edges have opposite directions. In some embodiments, the search is performed, for example, for paths that are directed only from top to bottom. In one embodiment, ribs that are directed in the opposite direction can be omitted. If for this hypothesis of columnization no reliable sections of the intercolumnar paths were found (i.e., sections of paths having edges with small fines), then another way of breaking the document into columns can be considered.

[0049] В некоторых вариантах осуществления в дополнение к межколоночным путям можно произвести поиск полных и частичных врезок. В одном варианте осуществления частичные врезки могут быть расположены в тех местах, где имеются разрывы в межколоночных путях. Вершины, в которых прерывается межколоночный путь, можно рассматривать в качестве начальных вершин путей частичных врезок.[0049] In some embodiments, in addition to intercolumn paths, it is possible to search for full and partial cuts. In one embodiment, partial taps may be located where there are gaps in the intercolumnar paths. The vertices at which the intercolumn path is interrupted can be considered as the initial vertices of the partial inset paths.

[0050] В тех местах, где частичные врезки не обнаружены, имеется шанс найти путь полных врезок. В некоторых вариантах осуществления для того, чтобы найти путь полной врезки, может оказаться желательным проверить ребра, расположенные между границами разрыва межколоночных путей. Например, можно найти ребра, веса которых превышают средний вес (или штрафы которых меньше среднего штрафа) ребер в анализируемой колонке (поскольку расстояние между врезкой и основным текстом колонки больше, чем расстояние между строками текста внутри колонки).[0050] In those places where partial taps are not found, there is a chance to find the path of full taps. In some embodiments, in order to find the full insertion path, it may be desirable to check the ribs located between the rupture boundaries of the intercolumn paths. For example, you can find edges whose weights exceed the average weight (or whose fines are less than the average fine) of the edges in the analyzed column (since the distance between the inset and the main text of the column is greater than the distance between the lines of text inside the column).

[0051] В некоторых вариантах осуществления для построения путей в разделяющем графе способ может включать рассмотрение начальных вершин и конечных вершин (т.е., где путь заканчивается) уже построенных путей и попытки начать новый путь из одной из этих вершин. В других вариантах осуществления можно выявить «хорошие» ребра и использовать их в качестве участка для построения нового пути от них за счет последовательного добавления ребер смежных с ними.[0051] In some embodiments, for constructing paths in a dividing graph, the method may include examining the starting vertices and ending vertices (ie, where the path ends) of already constructed paths and attempting to start a new path from one of these vertices. In other embodiments, “good” ribs can be identified and used as a plot to build a new path from them by successively adding edges adjacent to them.

[0052] Теперь перейдем к Фиг. 4, где в блоке 440 строится межколоночный граф. В некоторых вариантах осуществления, как уже отмечалось, предварительно построенный межколоночный граф 440 может использоваться при построении межколоночных путей. Межколоночный граф может содержать только те ребра, которые могут быть элементами пути между колонками. В некоторых вариантах осуществления «горизонтальные ребра» (то есть ребра, которые разделяют горизонтально перекрывающиеся объекты) могут быть исключены из графа. Кроме того, в некоторых вариантах осуществления, ребра, которые не находятся на границах анализируемых колонок, могут быть исключены.[0052] We now turn to FIG. 4, where an inter-column graph is constructed in block 440. In some embodiments, implementation, as already noted, the pre-built intercolumn graph 440 can be used in the construction of intercolumn paths. An intercolumn graph may contain only those edges that can be elements of the path between columns. In some embodiments, “horizontal edges” (that is, edges that separate horizontally overlapping objects) may be excluded from the graph. In addition, in some embodiments, the implementation of the ribs that are not located on the boundaries of the analyzed columns can be excluded.

[0053] В блоке 450 в межколоночном графе может проводиться поиск всех компонент связности. Компонента связности может относиться к множеству вершин графа такому, что для любых двух вершин из этого множества существует путь от одной вершины к другой, и не существует пути от вершины из этого множества к вершине, которая не включена в это множество. Затем в блоке 460 межколоночные пути могут быть сопоставлены с найденными компонентами связности. В некоторых вариантах осуществления межколоночные пути могут быть сопоставлены с компонентами связности, используя алгоритм Дейкстры.[0053] At block 450, a search for all connected components can be performed in the intercolumn graph. A connected component can relate to a set of vertices of a graph such that for any two vertices from this set there is a path from one vertex to another, and there is no path from a vertex from this set to a vertex that is not included in this set. Then, at block 460, the intercolumn paths can be matched to the found connectivity components. In some embodiments, intercolumn paths can be mapped to connectivity components using the Dijkstra algorithm.

[0054] В блоке 470 все пути или часть путей может быть отфильтрована. В некоторых вариантах осуществления пути могут быть отфильтрованы на основе абсолютных и/или относительных характеристик. В одном варианте осуществления при использовании абсолютных характеристик короткие, изогнутые пути и/или пути с большими штрафами могут считаться подозрительными. Короткие изогнутые пути и пути с большими штрафами могут подвергаться фильтрации. В некоторых вариантах осуществления относительная фильтрация учитывает тот факт, что заданный интервал может содержать несколько путей, которые являются хорошими, но несовместимыми друг с другом. Например, в одном варианте осуществления, если таблица находится под межколоночным путем, то она может содержать хороший длинный вертикальный путь, который горизонтально несовместим с межколоночным путем. В некоторых вариантах осуществления определение того, какой из двух путей является ложным, может быть возможным, например, на основе сравнительного анализа, который учитывает, какой путь ближе по горизонтали к центру межколоночного деления.[0054] At block 470, all or part of the paths may be filtered. In some embodiments, the paths may be filtered based on absolute and / or relative characteristics. In one embodiment, when using absolute characteristics, short, curved paths and / or paths with large fines can be considered suspicious. Short curved paths and paths with large fines can be filtered. In some embodiments, relative filtering takes into account the fact that a given interval may contain several paths that are good but incompatible with each other. For example, in one embodiment, if the table is under the intercolumn path, then it may contain a good long vertical path that is horizontally incompatible with the intercolumn path. In some embodiments, determining which of the two paths is false may be possible, for example, based on a comparative analysis that takes into account which path is closer horizontally to the center of the intercolumn division.

[0055] По-прежнему ссылаясь на Фиг. 4, в блоке 410 предварительно построенный колоночный подграф, включающий только те ребра, которые могут отделить врезку от колонки с текстом, может использоваться при построении путей частичных врезок. В некоторых вариантах осуществления, при создании такого подграфа может учитывается то, что по меньшей мере один объект, смежный с ребром искомого пути, скорее всего будет текстовым объектом (колонкой текста).[0055] Still referring to FIG. 4, in block 410, a pre-built column subgraph, including only those edges that can separate the frame from the text column, can be used to construct partial frame paths. In some embodiments, when creating such a subgraph, it can be taken into account that at least one object adjacent to the edge of the search path is most likely to be a text object (text column).

[0056] Процесс построения путей частичных врезок 420 стремится найти путь между разорванными частями найденного межколончного пути. Процесс 420 может последовательно добавлять ребра, расположенные между вершинами прерванного межколоночного пути, строя тем самым путь, соединяющий вершины. В одном варианте осуществления, если производится поиск верхней или нижней врезки, то процесс стремится найти путь от начальной или конечной вершины соответствующего межколоночного пути к одной из концевых вершин в колоночном подграфе.[0056] The process for constructing partial cut-in paths 420 seeks to find a path between the torn parts of a found annular path. Process 420 may sequentially add edges located between the vertices of the interrupted intercolumn path, thereby constructing a path connecting the vertices. In one embodiment, if a top or bottom frame is searched, the process seeks to find a path from the start or end vertex of the corresponding intercolumn path to one of the end vertices in the column subgraph.

[0057] Сначала путь частичной врезки ищется с помощью алгоритма Дейкстры. В некоторых вариантах осуществления путь, предложенный алгоритмом Дейкстры, может считаться основным путем. После того как основной путь 420 был найден, на этапе 430 основной путь может быть исправлен. В некотором варианте осуществления исправление основного пути может включать расширение основного пути 430. В некоторых вариантах осуществления может потребоваться скорректировать основной путь, поскольку врезка может быть разреженной, например, она может состоять из объектов, расположенных далеко друг от друга, или она может представлять собой сложную врезку (например, рисунок и подпись к нему). Если имеется разреженная врезка, то основной путь может быть обнаружен неправильно, то есть этот путь может ошибочно проходить через врезку.[0057] First, the partial insertion path is searched using the Dijkstra algorithm. In some embodiments, the path proposed by the Dijkstra algorithm may be considered the primary path. After the main path 420 has been found, in step 430, the main path can be corrected. In some embodiments, correcting the main path may include expanding the main path 430. In some embodiments, it may be necessary to adjust the main path because the inset may be sparse, for example, it may consist of objects that are far apart, or it may be complex sidebar (for example, a picture and a signature to it). If there is a sparse inset, the main path may be detected incorrectly, that is, this path may erroneously pass through the inset.

[0058] Для борьбы с этим явлением предлагается использовать метод заплаток. В некоторых вариантах осуществления можно использовать заплатки, чтобы правильно скорректировать построенный путь, например, в случае разреженных врезок. Заплатка может представлять собой ребро или часть пути с небольшим штрафом, который является кандидатом на включение в путь. В некоторых вариантах осуществления примером, указывающим на то, что ребро или несколько ребер стоит добавить в качестве заплатки, может являться тот факт, что ребро или ребра разделяют объекты, которые существенно различаются (например, часть рисунка и текстовый объект или текстовые объекты, имеющие разную высоту).[0058] To combat this phenomenon, it is proposed to use the patch method. In some embodiments, patches can be used to correctly adjust the plotted path, for example, in the case of sparse frames. The patch can be a rib or part of the path with a small penalty, which is a candidate for inclusion in the path. In some embodiments, an example indicating that an edge or several edges should be added as a patch may be the fact that the edges or edges separate objects that differ significantly (for example, a portion of a picture and a text object or text objects having different height).

[0059] После построения заплаток можно попытаться добавить заплатки к основному пути врезки. Основной путь с добавлением одной или нескольких заплаток может называться «окончательным путем». В некоторых вариантах осуществления система может добавить несколько заплаток, чтобы найти окончательный путь. В одном варианте осуществления может быть создан набор гипотез заплаточных путей, и можно выбрать лучшие из них. Этот выбор может быть основан на двух критериях. Во-первых, выбор может быть основан на концепции, что для врезки лучше захватывать как можно «большую территорию». Во-вторых, выбор может быть основан на штрафах заплаток, поскольку окончательный путь должен быть «хорошим», т.е. должен содержать ребра с небольшими штрафами.[0059] After building the patches, you can try to add the patches to the main frame path. The main path with the addition of one or more patches may be called the “final path”. In some embodiments, a system may add multiple patches to find the final path. In one embodiment, a set of hypotheses of patch paths can be created, and the best ones can be selected. This choice can be based on two criteria. Firstly, the choice can be based on the concept that it is better to capture as large a territory as possible for a tie-in. Secondly, the choice can be based on patch fines, since the final path should be “good”, i.e. must contain ribs with small fines.

[0060] В целом способ создания путей полных врезок может быть аналогичен способу построения путей частичных врезок. В некоторых вариантах осуществления поиск кандидатов на врезки может производиться на основе перебора конечных или начальных вершин врезочного пути. В одном варианте осуществления окончательный кандидат может выбираться эвристически на основе следующих критериев: a) расстояние от места разрыва межколоночного пути (чем меньше расстояние, тем более предпочтительным является путь-кандидат), b) качество самого пути (например, чем меньше вероятность того, что кандидат на путь «разрезает» абзац колоночного текста, тем лучше).[0060] In general, the method for creating full cut-in paths may be similar to the method for constructing partial cut-in paths. In some embodiments, the search for tie-in candidates may be based on enumerating the end or start vertices of the tie-in. In one embodiment, the final candidate may be heuristically selected based on the following criteria: a) the distance from the break point of the intercolumn path (the smaller the distance, the more preferred the candidate path), b) the quality of the path itself (for example, the less likely that the candidate for the path “cuts” the paragraph of the column text, the better).

[0061] В некоторых вариантах осуществления выявленные колонки текста могут быть проверены на наличие врезок, которые не выступают из границ колонок. Для этого в одном варианте осуществления содержимое колонки может быть проанализировано на предмет наличия участков разделяющих путей с малыми штрафами. Если колонка текста содержит «хороший» участок пути, то в некоторых вариантах осуществления эта колонка может содержать частичную врезку. В одном варианте осуществления попытка построения пути частичной врезки может осуществляться на основе этого участка.[0061] In some embodiments, the detected text columns can be checked for frames that do not protrude from the borders of the columns. For this, in one embodiment, the contents of the column can be analyzed for sections of the dividing paths with small fines. If the text column contains a “good” portion of the path, then in some embodiments, this column may contain a partial inset. In one embodiment, an attempt to construct a partial insertion path may be based on this portion.

[0062] На Фиг. 5 показана блок-схема последовательности операций способа для разделения документа на регионы. Построенная система путей недостаточна для того, чтобы понять логическую структуру документа и получить результат сегментации документа, поэтому необходимо выполнить дополнительные этапы, чтобы выявить регионы в документе. В некоторых вариантах осуществления после обнаружения системы путей в разделяющем графе объекты могут быть приписаны тем регионам, которым они соответствуют. В одном варианте осуществления для этой цели может быть использован граф смежности 120. Те ребра, которые соответствуют построенной системе путей, удаляются из графа смежности. Каждое ребро разделяющего графа хранит информацию об объектах, которые оно разделяет (то есть об объектах, расположенных по обе стороны от этого ребра). Для каждого ребра путей 480 может быть извлечена информация об объектах, разделяемых этим ребром, при этом соответствующее ребро графа смежности, которое соединяет эти объекты, может быть удалено (510). Затем в блоке 520 можно использовать любой известный метод для выявления компонент связности в полученном графе смежности с удаленными соответствующими ребрами (520). Компоненты связности соответствуют искомым регионам и содержат именно те объекты, которые принадлежат этим регионам. В блоке 530 итоговые регионы выявляются на изображении документа (530) и отображаются в результатах сегментации. В итоге, изображение документа может быть разделено на регионы (160).[0062] FIG. 5 is a flowchart of a method for dividing a document into regions. The constructed system of paths is insufficient to understand the logical structure of the document and to obtain the result of the segmentation of the document, so it is necessary to perform additional steps to identify the regions in the document. In some embodiments, when a path system is found in the dividing graph, objects can be assigned to the regions to which they correspond. In one embodiment, an adjacency graph 120 may be used for this purpose. Those edges that correspond to the constructed path system are removed from the adjacency graph. Each edge of the separating graph stores information about the objects that it shares (that is, about objects located on either side of this edge). For each edge of paths 480, information about objects shared by this edge can be extracted, and the corresponding edge of the adjacency graph that connects these objects can be deleted (510). Then, in block 520, any known method can be used to identify the connected components in the resulting adjacency graph with the corresponding corresponding edges removed (520). Connectivity components correspond to the desired regions and contain exactly those objects that belong to these regions. In block 530, the resulting regions are identified on the image of the document (530) and displayed in the segmentation results. As a result, the image of the document can be divided into regions (160).

[0063] Вышеизложенное описание иллюстративных вариантов осуществления было представлено в целях иллюстрации и описания. Не предполагается, что оно является исчерпывающим или ограничивающим по отношению к точной раскрытой форме изобретения, также возможны изменения и вариации в свете изложенных выше идей, или они могут быть получены из практического осуществления раскрытых вариантов. Предполагается, что объем изобретения определяется прилагаемой формулой изобретения и ее эквивалентами.[0063] The foregoing description of illustrative embodiments has been presented for purposes of illustration and description. It is not intended to be exhaustive or limiting with respect to the exact disclosed form of the invention, changes and variations are possible in light of the above teachings, or they can be obtained from the practical implementation of the disclosed options. The scope of the invention is intended to be determined by the appended claims and their equivalents.

[0064] На Фиг. 11 показана система 1100, которая способна определить логическую структуру документа, используя описанные выше методы, в соответствии с некоторыми вариантами осуществления изобретения. Система 1100 обычно включает в себя по меньшей мере один процессор 1102, соединенный с памятью 1104. Процессор 1102 может представлять собой один или несколько процессоров (например, микропроцессоров), а память 1104 может представлять собой оперативные запоминающие устройства (ОЗУ), содержащие главное устройство хранения 1100 и/или любые дополнительные уровни памяти, например, кэш-память, энергонезависимые или резервные запоминающие устройства (например, программируемую или флэш-память), постоянные запоминающие устройства и т.д. Кроме того, память 1104 может включать запоминающее устройство, физически расположенное в какой-либо другой части системы 1100 (например, любую кэш-память в процессоре 1102), а также любое запоминающее устройство, используемое в качестве виртуальной памяти (например, запись в запоминающем устройстве 1110).[0064] FIG. 11 shows a system 1100 that is capable of determining the logical structure of a document using the methods described above, in accordance with some embodiments of the invention. System 1100 typically includes at least one processor 1102 connected to memory 1104. Processor 1102 may be one or more processors (eg, microprocessors), and memory 1104 may be random access memory (RAM) containing a main storage device 1100 and / or any additional memory levels, for example, cache memory, non-volatile or backup storage devices (e.g., programmable or flash memory), read-only memory devices, etc. In addition, memory 1104 may include a storage device physically located in some other part of system 1100 (e.g., any cache in processor 1102), as well as any storage device used as virtual memory (e.g., recording in a storage device 1110).

[0065] В некоторых вариантах осуществления система 1100 имеет несколько входов и выходов для внешнего обмена информацией. Система 1100 может включать в себя одно или несколько устройств пользовательских ввода 1006 (например, клавиатуру, мышь, сканер и т.д.), а также дисплей 1108 (например, панель с жидкокристаллическим дисплеем (ЖКД)) для взаимодействия с пользователем или оператором. Для дополнительного хранения оборудование системы 1100 может также включать в себя одно или несколько съемных запоминающих устройств 1110, например, накопитель на дискете или другом съемном диске, накопитель на жестком диске, запоминающее устройство с прямым доступом (DASD), привод на оптическом диске (например, накопитель на компакт-диске (CD), накопитель на универсальном цифровом диске формата DVD и т.д.) и/или накопитель на магнитной ленте и пр. Кроме того, система 1100 может включать в себя интерфейс с одной или несколькими сетями 1112 (например, с локальной сетью (LAN), глобальной сетью (WAN), беспроводной сетью, и/или сетью Интернет и др.) для обеспечения обмена информацией с другими компьютерами, подключенными к этим сетям. Следует учитывать, что система 1100 обычно включает в себя соответствующие аналоговые и/или цифровые интерфейсы между процессором 1102 и каждым из компонентов 1104, 1106, 1108 и 1112, что хорошо известно специалистам в этой области.[0065] In some embodiments, the system 1100 has multiple inputs and outputs for external communications. System 1100 may include one or more user input devices 1006 (e.g., a keyboard, mouse, scanner, etc.) as well as a display 1108 (e.g., a panel with a liquid crystal display (LCD)) for interacting with a user or operator. For additional storage, the equipment of the system 1100 may also include one or more removable storage devices 1110, for example, a disk drive or other removable disk, a hard disk drive, direct access storage device (DASD), an optical disk drive (e.g. a compact disk (CD) drive, a universal digital drive for DVD, etc.) and / or a tape drive, etc. In addition, system 1100 may include an interface to one or more networks 1112 (e.g. , with lok network (LAN), wide area network (WAN), wireless network, and / or Internet, etc.) to ensure the exchange of information with other computers connected to these networks. It will be appreciated that system 1100 typically includes corresponding analog and / or digital interfaces between processor 1102 and each of components 1104, 1106, 1108, and 1112, as is well known to those skilled in the art.

[0066] Система 1100 работает под управлением операционной системы 1114, она выполняет различные программные приложения, компоненты, программы, объекты, модули и т.д., которые помечены в совокупности ссылкой номер 1116 для осуществления описанных выше способов исправления.[0066] The system 1100 is running an operating system 1114, it executes various software applications, components, programs, objects, modules, etc., which are collectively tagged with reference number 1116 to carry out the correction methods described above.

[0067] В целом процедуры, выполняемые для вариантов осуществления изобретения, могут быть использованы как часть операционной системы или как конкретное приложение, компонента программы, объект, модуль или последовательность команд, которые называются «компьютерными программами». Как правило, компьютерная программа содержит одну или большее число команд, записанных в разное время в различных запоминающих устройствах и системах хранения компьютера, которые после считывания и выполнения одним или несколькими процессорами компьютера заставляют компьютер производить операции, необходимые для выполнения элементов, включая различные аспекты изобретения. Более того, хотя это изобретение было описано в контексте полностью работоспособных компьютеров и компьютерных систем, специалистам в данной области техники будет понятно, что различные варианты осуществления изобретения могут распространяться в виде программного продукта в различных формах, и что это изобретение применимо в равной степени независимо от конкретного типа устройства или машиночитаемого носителя, используемых для фактического осуществления распространения. Примеры машиночитаемых носителей включают, без ограничений, следующие типы носителей с возможностью записи: энергонезависимые и энергозависимые устройства памяти, гибкие диски и другие съемные диски, жесткие диски, оптические диски (например, постоянное запоминающее устройство на компакт-диске (CD ROM), универсальный цифровой диск формата DVD и т.д.), и носители с возможностью передачи данных, такие как цифровые и аналоговые каналы связи. Машиночитаемые носители, включенные в настоящее раскрытие изобретения, включают в себя только постоянные среды (то есть они не включают в себя кратковременные сигналы в пространстве).[0067] In general, the procedures performed for embodiments of the invention can be used as part of an operating system or as a specific application, program component, object, module, or sequence of instructions called “computer programs”. Typically, a computer program contains one or more instructions recorded at different times in various computer storage devices and storage systems, which, after being read and executed by one or more computer processors, cause the computer to perform the operations necessary to execute elements, including various aspects of the invention. Moreover, although this invention has been described in the context of fully functional computers and computer systems, those skilled in the art will understand that various embodiments of the invention can be distributed as a software product in various forms, and that this invention is equally applicable regardless a particular type of device or computer-readable medium used for actual distribution. Examples of computer-readable media include, but are not limited to, the following types of writable media: non-volatile and volatile memory devices, floppy disks and other removable disks, hard disks, optical disks (for example, read-only media on a compact disc (CD ROM), universal digital DVD format disc, etc.), and data transfer media such as digital and analogue communication channels. Computer-readable media included in the present disclosure include only persistent media (i.e., they do not include transient signals in space).

[0068] Несмотря на то, что настоящее описание изобретения приводится со ссылками на конкретные примерные варианты осуществления, следует понимать, что возможны различные модификации этих вариантов без изменения первоначальной сущности изобретения. Соответственно, спецификации и чертежи следует рассматривать в качестве иллюстраций, а не в качестве ограничений.[0068] Although the present description of the invention is provided with reference to specific exemplary embodiments, it should be understood that various modifications of these options are possible without changing the original nature of the invention. Accordingly, the specifications and drawings should be considered as illustrations and not as limitations.

Claims (82)

1. Способ анализа логической структуры изображения документа, включающий:1. The method of analysis of the logical structure of the image of the document, including: выявление объектов на изображении документа; identification of objects in the image of the document; построение разделяющего графа выявленных объектов на основе построения диаграммы для областей на выявленных объектах на изображении документа;building a separating graph of identified objects based on the construction of a diagram for areas on identified objects in the image of the document; обнаружение по меньшей мере одного оптимального пути в разделяющем графе посредством присвоения значений весов ребрам разделяющего графа для определения местонахождения регионов на изображении документа;detection of at least one optimal path in the dividing graph by assigning weight values to the edges of the dividing graph to determine the location of regions in the image of the document; разделение изображения документа на регионы, по меньшей мере частично основанное на обнаруженном оптимальном пути.division of the image of the document into regions, at least partially based on the detected optimal path. 2. Способ по п.у 1, дополнительно содержащий построение графа смежности на основе разделяющего графа, при этом построение графа смежности включает в себя:2. The method according to claim 1, further comprising constructing an adjacency graph based on a dividing graph, wherein constructing an adjacency graph includes: назначение вершин графа, соответствующих выявленным объектам;assignment of graph vertices corresponding to identified objects; выявление пар смежных объектов, соответствующих парам объектов, разделенным по меньшей мере одним ребром в разделяющем графе, а такжеidentifying pairs of adjacent objects corresponding to pairs of objects separated by at least one edge in the separating graph, and соединение каждой пары смежных объектов ребром графа смежности.connecting each pair of adjacent objects by an edge of the adjacency graph. 3. Способ по п. 1, отличающийся тем, что построение разделяющего графа дополнительно содержит:3. The method according to p. 1, characterized in that the construction of the separating graph further comprises: выявление вершин графа и ребер графа в диаграмме для областей, а такжеidentification of graph vertices and graph edges in the diagram for areas, as well as создание минимального графа относительно выявленных вершин графа и ребер графа.creating a minimal graph relative to the identified vertices of the graph and edges of the graph. 4. Способ по п. 1, отличающийся тем, что значения весов, присвоенные ребрам разделяющего графа, основаны на анализе взаимных характеристик по меньшей мере одной пары выявленных объектов.4. The method according to claim 1, characterized in that the values of the weights assigned to the edges of the separating graph are based on an analysis of the mutual characteristics of at least one pair of identified objects. 5. Способ по п. 4, дополнительно содержащий суммирование присвоенных значений весов для определения значения суммарного веса для путей в разделяющем графе, где по меньшей мере один оптимальный путь представляет собой путь с наилучшим значением суммарного веса.5. The method according to claim 4, further comprising summing the assigned weight values to determine the total weight value for the paths in the dividing column, where at least one optimal path is a path with the best total weight value. 6. Способ по п. 1, отличающийся тем, что обнаружение по меньшей мере одного оптимального пути включает:6. The method according to p. 1, characterized in that the detection of at least one optimal path includes: построение по меньшей мере одного подграфа для разделяющего графа;constructing at least one subgraph for a dividing graph; выявление компонент связности в подграфе;identification of connectivity components in a subgraph; построение по меньшей мере одного пути относительно выявленных компонент связности иbuilding at least one path relative to the identified connected components and фильтрацию по меньшей мере одного пути.filtering at least one path. 7. Способ по п. 1, отличающийся тем, что обнаружение оптимального пути дополнительно содержит исправление по меньшей мере одного оптимального пути путем добавления одного или нескольких ребер или одной или нескольких частей пути, являющихся кандидатами на включение в путь, с небольшим весом и/или штрафом.7. The method according to p. 1, characterized in that the detection of the optimal path further comprises correcting at least one optimal path by adding one or more edges or one or more parts of the path that are candidates for inclusion in the path, with low weight and / or fine. 8. Способ по п. 2, отличающийся тем, что разделение изображения документа на регионы дополнительно содержит:8. The method according to p. 2, characterized in that the separation of the image of the document into regions further comprises: удаление по меньшей мере одного ребра графа из графа смежности,removing at least one edge of the graph from the adjacency graph, соответствующего по меньшей мере одному оптимальному пути;corresponding to at least one optimal path; выявление компонент связности в графе смежности;identification of connected components in the adjacency graph; построение регионов, соответствующих компонентам связности в графе смежности; иconstruction of regions corresponding to the connectedness components in the adjacency graph; and разделение изображения документа на построенные регионы.division of the image of the document into the built regions. 9. Система анализа логической структуры изображения документа, включающая:9. The system of analysis of the logical structure of the image of the document, including: память, сконфигурированную для хранения команд, исполняемых процессором;memory configured to store instructions executed by the processor; процессор, функционально соединенный с запоминающим устройством, отличающийся тем, что процессор имеет возможность:a processor functionally connected to a storage device, characterized in that the processor has the ability to: выявлять объекты на изображении документа;identify objects in the image of the document; построить разделяющий граф выявленных объектов на изображении документа;build a separating graph of identified objects on the image of the document; обнаружить по меньшей мере один оптимальный путь в разделяющем графе для определения местонахождения регионов на изображении документа иdetect at least one optimal path in the dividing column to determine the location of regions in the image of the document and разделить изображение документа на регионы по меньшей мере частично на основе обнаруженного оптимального пути.divide the document image into regions at least partially based on the detected optimal path. 10. Система по п. 9, отличающаяся тем, что процессор дополнительно имеет возможность построить диаграмму для областей на выявленных объектах.10. The system according to p. 9, characterized in that the processor additionally has the ability to build a diagram for areas on the identified objects. 11. Система по п. 9, отличающаяся тем, что процессор дополнительно имеет возможность:11. The system according to p. 9, characterized in that the processor further has the ability to: построить граф смежности на основе разделяющего графа, отличающийся тем, что для построения графа смежности процессор дополнительно имеет возможность:build an adjacency graph based on a dividing graph, characterized in that for constructing an adjacency graph, the processor additionally has the ability to: назначать вершины графа, соответствующие выявленным объектам;assign the vertices of the graph corresponding to the identified objects; выявлять пары смежных объектов, соответствующие парам объектов, разделенных по меньшей мере одним ребром в разделяющем графе, иidentify pairs of adjacent objects corresponding to pairs of objects separated by at least one edge in the separating graph, and соединять каждую пару смежных объектов ребром графа смежности.connect each pair of adjacent objects by an edge of the adjacency graph. 12. Система по п. 10, отличающаяся тем, что процессор дополнительно имеет возможность выявлять вершины графа и ребра графа в диаграмме для областей.12. The system according to p. 10, characterized in that the processor additionally has the ability to identify the vertices of the graph and edges of the graph in the diagram for areas. 13. Система по п. 9, отличающаяся тем, что процессор дополнительно имеет возможность присваивать значения весов ребрам разделяющего графа, в котором значения весов основаны на анализе взаимных характеристик по меньшей мере одной пары выявленных объектов.13. The system of claim 9, wherein the processor further has the ability to assign weight values to the edges of the separating graph, in which the weight values are based on an analysis of the mutual characteristics of at least one pair of identified objects. 14. Система по п. 13, отличающаяся тем, что процессор дополнительно имеет возможность суммировать присвоенные значения весов для определения значения суммарного веса для путей в разделяющем графе, в котором по меньшей мере один оптимальный путь представляет собой путь с наилучшим значением суммарного веса.14. The system of claim 13, wherein the processor further has the ability to sum the assigned weight values to determine the total weight value for the paths in the dividing graph, in which at least one optimal path is the path with the best total weight value. 15. Система по п. 9, отличающаяся тем, что процессор дополнительно имеет возможность:15. The system according to p. 9, characterized in that the processor additionally has the ability to: построить по меньшей мере один подграф для разделяющего графа;construct at least one subgraph for the separating graph; выявить компоненты связности в подграфе;identify connectivity components in a subgraph; построить по меньшей мере один путь относительно выявленных компонент связности иbuild at least one path relative to the identified connected components and отфильтровать по меньшей мере один путь.filter out at least one path. 16. Система по п. 9, отличающаяся тем, что процессор дополнительно имеет возможность исправить по меньшей мере один оптимальный путь добавлением одного или нескольких ребер или одной или нескольких частей пути, являющихся кандидатами на включение в путь, с небольшим весом и/или штрафом.16. The system of claim 9, wherein the processor further has the ability to correct at least one optimal path by adding one or more edges or one or more parts of the path that are candidates for inclusion in the path, with a small weight and / or a fine. 17. Система по пункту 11, отличающаяся тем, что процессор дополнительно имеет возможность:17. The system according to paragraph 11, characterized in that the processor further has the ability to: удалить по меньшей мере одно ребро графа из графа смежности, соответствующее по меньшей мере одному оптимальному пути;remove at least one edge of the graph from the adjacency graph corresponding to at least one optimal path; выявить компоненты связности в графе смежности;identify connectivity components in the adjacency graph; построить регионы, соответствующие компонентам связности в графе смежности; иbuild regions corresponding to the connectedness components in the adjacency graph; and разделить изображение документа на построенные регионы.divide the image of the document into the built regions. 18. Постоянный машиночитаемый носитель данных, в котором записаны машиночитаемые исполняемые процессором вычислительной системы команды, отличающийся тем, что эти команды включают:18. A permanent computer-readable storage medium in which computer-readable instructions executed by a processor of a computing system are recorded, characterized in that these instructions include: команды для выявления объектов на изображении документа;commands for identifying objects in the image of the document; команды для построения разделяющего графа выявленных объектов на изображении документа;commands for constructing a dividing graph of identified objects on the image of the document; команды для выявления оптимального пути в разделяющем графе для определения местонахождения регионов на изображении документа, а такжеcommands for identifying the optimal path in the dividing graph to determine the location of regions in the image of the document, команды для разделения изображения документа на регионы по меньшей мере частично на основе обнаруженного оптимального пути.commands for dividing the document image into regions at least partially based on the detected optimal path. 19. Постоянный машиночитаемый носитель данных по п. 18, дополнительно содержащий:19. A permanent computer-readable storage medium according to claim 18, further comprising: команды для построения диаграммы для областей на выявленных объектах.commands for plotting areas for identified objects. 20. Постоянный машиночитаемый носитель данных по п. 18, дополнительно содержащий:20. A permanent computer-readable storage medium according to claim 18, further comprising: команды для построения графа смежности на основе разделяющего графа, отличающийся тем, что построение графа смежности дополнительно включает:instructions for constructing an adjacency graph based on a dividing graph, characterized in that the construction of an adjacency graph further includes: команды для назначения вершин графа, соответствующих выявленным объектам;commands for assigning the vertices of the graph corresponding to the identified objects; команды для выявления пар смежных объектов, соответствующих парам объектов, разделенных по меньшей мере одним ребром в разделяющем графе, а такжеcommands for identifying pairs of adjacent objects corresponding to pairs of objects separated by at least one edge in the separating graph, and команды для соединения каждой пары смежных объектов ребром графа смежности.commands for connecting each pair of adjacent objects with an edge of the adjacency graph. 21. Постоянный машиночитаемый носитель данных по п. 19, дополнительно содержащий:21. A permanent computer-readable storage medium according to claim 19, further comprising: команды для выявления вершин графа и ребер графа в диаграмме для областей, а такжеcommands for identifying graph vertices and graph edges in the diagram for areas, as well as команды для построения минимального графа на основе выявленных вершин графа и ребер графа.commands for constructing a minimal graph based on the identified vertices of the graph and edges of the graph. 22. Постоянный машиночитаемый носитель данных по п. 18, дополнительно содержащий команды для присвоения значений весов ребрам разделяющего графа, в котором значения весов основаны на анализе взаимных характеристик по меньшей мере одной пары выявленных объектов.22. The permanent computer-readable storage medium according to claim 18, further comprising instructions for assigning weight values to the edges of the separating graph, in which the weight values are based on an analysis of the mutual characteristics of at least one pair of identified objects. 23. Постоянный машиночитаемый носитель данных по п. 22, дополнительно содержащий команды для суммирования значений весов, присвоенных для определения значения суммарного веса для путей в разделяющем графе, где по меньшей мере один оптимальный путь представляет собой путь с наилучшим значением суммарного веса.23. The permanent computer-readable storage medium according to claim 22, further comprising instructions for summing the weight values assigned to determine the total weight value for the paths in the dividing column, where at least one optimal path is the path with the best total weight value. 24. Постоянный машиночитаемый носитель данных по п. 19, дополнительно содержащий:24. A permanent computer-readable storage medium according to claim 19, further comprising: команды для построения по меньшей мере одного подграфа для разделяющего графа;commands for constructing at least one subgraph for the separating graph; команды для выявления компонент связности в подграфе;commands for identifying connectivity components in a subgraph; команды для построения по меньшей мере одного пути относительно выявленных связанных компонент, а такжеcommands for constructing at least one path relative to the identified related components, as well as команды для фильтрации по меньшей мере одного пути.commands for filtering at least one path. 25. Постоянный машиночитаемый носитель данных по п. 18, дополнительно содержащий:25. A permanent computer readable storage medium according to claim 18, further comprising: команды для исправления по меньшей мере одного оптимального пути путем добавления одного или нескольких ребер или одной или нескольких частей пути, являющихся кандидатами на включение в путь, с небольшим весом и/или штрафом.commands for correcting at least one optimal path by adding one or more edges or one or more parts of the path that are candidates for inclusion in the path, with little weight and / or a fine. 26. Постоянный машиночитаемый носитель данных по п. 20, дополнительно содержащий:26. A permanent computer readable storage medium according to claim 20, further comprising: команды для удаления по меньшей мере одного ребра из графа смежности, соответствующего по меньшей мере одному оптимальному пути;instructions for removing at least one edge from an adjacency graph corresponding to at least one optimal path; команды для выявления компонент связности в графе смежности;commands for identifying connected components in an adjacency graph; команды для построения регионов, соответствующих компонентам связности в графе смежности; иcommands for constructing regions corresponding to the connectivity components in the adjacency graph; and команды для разделения изображения документа на построенные регионы.commands for dividing a document image into built regions.
RU2014101125A 2014-01-15 2014-01-15 Segmentation of multicolumn document RU2647671C2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2014101125A RU2647671C2 (en) 2014-01-15 2014-01-15 Segmentation of multicolumn document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2014101125A RU2647671C2 (en) 2014-01-15 2014-01-15 Segmentation of multicolumn document

Publications (2)

Publication Number Publication Date
RU2014101125A RU2014101125A (en) 2015-07-20
RU2647671C2 true RU2647671C2 (en) 2018-03-16

Family

ID=53611484

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2014101125A RU2647671C2 (en) 2014-01-15 2014-01-15 Segmentation of multicolumn document

Country Status (1)

Country Link
RU (1) RU2647671C2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5889886A (en) * 1995-11-28 1999-03-30 Xerox Corporation Method and apparatus for detecting running text in an image
RU2421810C2 (en) * 2005-07-01 2011-06-20 Майкрософт Корпорейшн Parsing of document visual structures
US20130211816A1 (en) * 2006-10-10 2013-08-15 Abbyy Infopoisk Llc Deep Model Statistics Method for Machine Translation
US8559718B1 (en) * 2012-04-27 2013-10-15 Abbyy Development Llc Defining a layout of text lines of CJK and non-CJK characters

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5889886A (en) * 1995-11-28 1999-03-30 Xerox Corporation Method and apparatus for detecting running text in an image
RU2421810C2 (en) * 2005-07-01 2011-06-20 Майкрософт Корпорейшн Parsing of document visual structures
US20130211816A1 (en) * 2006-10-10 2013-08-15 Abbyy Infopoisk Llc Deep Model Statistics Method for Machine Translation
US8559718B1 (en) * 2012-04-27 2013-10-15 Abbyy Development Llc Defining a layout of text lines of CJK and non-CJK characters

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
статья Thai V. Hoang et al. "Recognition-based Segmentation of Nom Characters from Body Text Regions of Stele Images Using Area Voronoi Diagram", опубл. 10.11.2009. *

Also Published As

Publication number Publication date
RU2014101125A (en) 2015-07-20

Similar Documents

Publication Publication Date Title
US20150199821A1 (en) Segmentation of a multi-column document
JP6951905B2 (en) How to cut out lines and words for handwritten text images
JP5775225B2 (en) Text detection using multi-layer connected components with histograms
US20150095769A1 (en) Layout Analysis Method And System
US6006240A (en) Cell identification in table analysis
US8249356B1 (en) Physical page layout analysis via tab-stop detection for optical character recognition
Shivakumara et al. An efficient edge based technique for text detection in video frames
RU2697649C1 (en) Methods and systems of document segmentation
JP7026165B2 (en) Text recognition method and text recognition device, electronic equipment, storage medium
US20130148857A1 (en) Apparatus for extracting character area in vehicle number plate and method thereof
CN101419717B (en) Format file graphic-text auto-associating method and system
KR101836811B1 (en) Method, apparatus and computer program for matching between the images
Ravagli et al. Text recognition and classification in floor plan images
WO2019201029A1 (en) Candidate box update method and apparatus
JP6690089B2 (en) Form recognition method, form recognition device, and form recognition program
CN115546809A (en) Table structure identification method based on cell constraint and application thereof
JP2010102709A (en) Character string recognition method, character string system, and character string recognition program recording medium
Chen et al. Efficient text localization in born-digital images by local contrast-based segmentation
Yang et al. Automatic single page-based algorithms for medieval manuscript analysis
US9811726B2 (en) Chinese, Japanese, or Korean language detection
KR101118628B1 (en) Iamge Data Recognition and Managing Method for Ancient Documents using Intelligent Recognition Library and Management Tool
RU2647671C2 (en) Segmentation of multicolumn document
JP2013012195A (en) Method and device for identifying direction of character in image block
CN115797955A (en) Table structure identification method based on cell constraint and application thereof
CN112766073B (en) Table extraction method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
HE9A Changing address for correspondence with an applicant
PC43 Official registration of the transfer of the exclusive right without contract for inventions

Effective date: 20181121

QB4A Licence on use of patent

Free format text: LICENCE FORMERLY AGREED ON 20201211

Effective date: 20201211

QC41 Official registration of the termination of the licence agreement or other agreements on the disposal of an exclusive right

Free format text: LICENCE FORMERLY AGREED ON 20201211

Effective date: 20220311