Document paragraph position extraction device
By imaged PDF documents, cleaned and divided into columns, the problem of inaccurate paragraph position positioning in the existing technology is solved, and efficient paragraph position extraction across languages and document types is achieved.
Patent Information
- Application Number
- CN202111529231.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-12-14
AI Technical Summary
In the prior art, when processing PDF documents, accurate paragraph position information cannot be obtained based on stream data analysis methods, and the OCR-based method does not have high accuracy in extracting special characters, and depends on the document language type, resulting in misalignment of paragraph information.
By image processing on PDF documents, fusion of text outline information, cleaning up non-text outlines, dividing columns and segmenting paragraphs, image processing technology is used to determine the location of paragraphs.
Improves the universality, accuracy and reliability of PDF document paragraph positioning, and is suitable for any type of PDF document and does not depend on the document language type.
Smart Images

Figure CN114495142B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a document paragraph position extraction device. Background Art
[0002] With the rapid development of digital publishing technology, the vast majority of journals and conference papers are published electronically. PDF (Portable Document Format) is a widely used electronic publication format for journals and papers due to its ability to directly convert Word or LaTeX documents, embed fonts, support highly compressed images, small file size for easy transfer, cross-platform display, ease of modification, and high security.
[0003] With the development of digital information technology, more and more document retrieval organizations are looking to use computers to automatically extract text from journal articles by segmenting them into paragraphs. Accurately segmenting paragraphs is both fundamental and crucial for accurate text extraction. Existing paragraph segmentation technologies fall into two categories: one analyzes the stream data within PDF documents to locate paragraph positions; the other uses OCR (Optical Character Recognition) to determine character positions and derive paragraph positions.
[0004] However, methods based on stream data analysis require that the stream data of a PDF document must contain text and paragraph information. However, in reality, the stream data in many PDF documents does not contain such information, such as PDF documents generated by a scanner or converted from images. Therefore, such methods cannot obtain accurate paragraph position information from such PDF documents.
[0005] Another OCR-based solution, however, is highly dependent on the accuracy of the OCR tool. For example, existing OCR tools have low accuracy in extracting the positional information of special characters such as punctuation, Greek letters, numbers, and symbols, which can easily lead to misplaced paragraph information. Furthermore, OCR accuracy is highly dependent on the language of the document; an OCR tool that works well for English documents may not work at all for Chinese documents. Summary of the Invention
[0006] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a document paragraph position extraction device.
[0007] Specifically, the embodiments of the present invention provide the following technical solutions:
[0008] An embodiment of the present invention provides a document paragraph position extraction device, comprising:
[0009] A processing module, configured to perform image processing on a page of a document to be processed to obtain a first image;
[0010] a cleaning module, configured to determine the outline of text in the first image based on the non-blank area included in the first image;
[0011] a column division module, configured to determine whether the first image includes column division information based on the first image and the outline of the text included in the first image;
[0012] The segmentation module is configured to determine the document paragraph position of the page of the document to be processed according to whether the first image includes column information.
[0013] Furthermore, when determining the outline of text in the first image based on the non-blank area included in the first image, the cleaning module is specifically configured to:
[0014] determining a first contour information library included in the first image according to the non-blank area included in the first image;
[0015] The non-text contours included in the first contour information library are cleaned to determine the text contours in the first image.
[0016] Furthermore, when determining the first contour information library included in the first image based on the non-blank area included in the first image, the cleaning module is specifically configured to:
[0017] performing binarization processing on the first image to obtain a binarized image;
[0018] Locating pixel points in a non-blank area of the binary image to establish a first pixel coordinate library;
[0019] The first contour information library included in the first image is determined by fusing contours and distinguishing disjoint contours through the first pixel coordinate library.
[0020] Furthermore, when the cleaning module performs binarization processing on the first image to obtain a binarized image, it is specifically used to:
[0021] A dynamic threshold is calculated, and binarization processing is performed on the first image according to the dynamic threshold to obtain a binarized image.
[0022] Furthermore, when cleaning the non-text contours included in the first contour information library and determining the text contours in the first image, the cleaning module is specifically configured to:
[0023] screening the contours in the first contour information library according to a first preset condition to locate text contours and non-text contours;
[0024] If a non-text contour exists, excluding the non-text contour from the first contour information database;
[0025] Count all text outlines and capture effective information images;
[0026] The page size of the effective information image is calculated, and all the character outline information is corrected and updated according to the page size.
[0027] Furthermore, when the column module determines whether the first image includes column information based on the first image and the text outline included in the first image, it is specifically configured to:
[0028] In the effective information image, locate the outline of the text, determine the area except the outline of the text as a blank area, and establish a second pixel coordinate library to record the blank area information;
[0029] fusing contours, distinguishing disjoint contours, and establishing a second contour information library through the second pixel coordinate library;
[0030] In the second contour information database, contours that are close in adjacent directions are merged and sorted;
[0031] The contours in the second contour information library are screened according to a second preset condition to determine whether the first image includes column information.
[0032] Furthermore, when determining the document paragraph position of the page of the document to be processed according to whether the first image includes column information, the segmentation module is specifically configured to:
[0033] If it is determined that the page does not have a column outline, the page is considered to be a single column; otherwise, within the valid information image, the text outline is divided into different text columns from top to bottom and from left to right according to the column outline;
[0034] In the same text column, in the horizontal direction, the text outlines whose distance is less than a first preset distance threshold are merged and sorted;
[0035] In the same text column, in the vertical direction, the text outlines whose distance is less than a second preset distance threshold are merged and sorted;
[0036] The document paragraph position of the page of the document to be processed is determined according to the sorted text outline information.
[0037] Furthermore, the document to be processed includes a PDF document or a WORD document.
[0038] According to the above technical solution, the document paragraph position extraction device provided by the embodiment of the present invention, starting from the perspective of image processing, cleans, divides columns and segments paragraphs of the document to be processed by fusing contour information, thereby avoiding the problems of existing methods requiring that the stream data of the PDF document must contain text and paragraph information, heavily relying on the accuracy of the OCR tool, and heavily relying on the language type of the document, thereby improving the universality, accuracy and reliability of PDF document paragraph position positioning.
[0039] It should be noted that additional aspects and advantages of the present invention will be given in part in the following description, and in part will become apparent from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 It is a structural diagram of a document paragraph position extraction device provided by an embodiment of the present invention;
[0042] Figure 2 It is a schematic diagram of the implementation process of the document paragraph position extraction device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0044] As discussed in the background, methods based on stream data analysis require that the stream data of a PDF document contain text and paragraph information. However, many PDF documents, such as those generated by scanners or converted from images, do not contain this information. Therefore, these methods are unable to accurately obtain paragraph location information from such PDF documents. Technical solutions based on optical character recognition (OCR) (OCR) rely heavily on the accuracy of the OCR tool. However, existing OCR tools have low accuracy in extracting the location information of special characters such as punctuation, Greek letters, numbers, and symbols, which can easily lead to misplaced paragraph information. Furthermore, OCR accuracy is highly dependent on the document's language; an OCR tool that works well for English documents may be completely ineffective for Chinese documents. To address these shortcomings of existing methods, the present invention utilizes image processing to clean, columnize, and segment documents by fusing contour information. This method is effective for all types of PDF documents, including those generated by scanners or converted from images, and provides accurate positioning, independent of the document's language. Furthermore, it should be noted that the document paragraph location extraction device provided in this embodiment of the present invention can also be applied to Word documents where necessary. The document paragraph position extraction device provided by the present invention will be described in detail below through specific embodiments.
[0045] Figure 1 A schematic diagram showing the structure of a document paragraph position extraction device provided by an embodiment of the present invention is shown. Figure 1 , the paragraph position extraction device provided by the embodiment of the present invention includes:
[0046] The processing module 20 is used to perform image processing on the page of the document to be processed to obtain a first image;
[0047] a cleaning module 21, configured to determine the outline of text in the first image based on the non-blank area included in the first image;
[0048] A column division module 22 is configured to determine whether the first image includes column division information based on the first image and the outline of the text included in the first image;
[0049] The segmentation module 23 is configured to determine the document paragraph position of the page of the document to be processed according to whether the first image includes column information.
[0050] In this embodiment, the document to be processed is divided into pages, and each page of the document is image-processed to obtain a corresponding first image. When converting the pages of the document to be processed into images, the image size can be adjusted to an appropriate size based on computing power.
[0051] In this embodiment, the document to be processed can be a Word document or a PDF document. The PDF document here can be a horizontal PDF journal article, where each page in the PDF document corresponds to a single page in the journal article. The PDF document can be any type of PDF document, including PDF documents generated by a scanner and converted from images. The page content can be black and white or color.
[0052] In this embodiment, the first image corresponding to each page is converted into a two-dimensional grayscale image. The pixel value distribution of all pixels is comprehensively analyzed. The image is then binarized by setting a global threshold or by using local thresholds such as weighted mean and Otsu's algorithm. All black pixels are then located, and a first contour information library is established.
[0053] In this embodiment, all black pixels are first located to establish a first pixel coordinate library. Then, based on preset conditions, pixels that are close in the four directions of up, down, left, and right are merged into a common outline, while non-close outlines are distinguished to establish a first outline information library. Non-text outline information is then cleaned up, and a valid information image is captured. Specifically, the first outline information library is first organized and recorded in a standardized format. Then, using a preset threshold, outline information such as size and area is filtered, and outlines that do not meet the requirements are defined as non-text outlines. If any non-text outlines exist, they are removed from the first outline information library, and the remaining outlines are defined as text outlines. All text outlines are combined to calculate the minimum valid information image page size that includes all text outlines. The outline coordinate information in the first outline information library is updated based on the boundary coordinates of the valid information image. In this embodiment, all white pixels are located in the resulting valid information image, and a second outline information library is established. Specifically, all white pixels in the valid information image are first located to establish a second pixel coordinate library. If the pixel coordinates fall within the aforementioned non-text outlines, they are removed from the second pixel coordinate library. Then, according to the preset conditions, the pixels close to each other in the four directions of up, down, left and right are fused into the same contour, while the non-close contours are distinguished to establish a second contour information database, which is then sorted and recorded in a standardized form.
[0054] Then, the column outline is located and the text outline is segmented. Specifically, the size, area, and other information of the outlines in the second outline information library are screened using a preset threshold, and the outlines that meet the conditions are defined as column outlines. The column outline is located by screening the outline size and area.
[0055] In this embodiment, the column outline is located by screening the size and area of the outline. If no column outline exists, the page is considered a single column. Otherwise, within the valid information image, the text outline is divided into different text columns from top to bottom and from left to right according to the column outline.
[0056] In this embodiment, for all text outlines in the same text column, first, all horizontally similar text outlines are merged according to a preset threshold to form row outlines. Dissimilar row outlines should belong to different outlines. Then, all vertically similar row outlines are merged to form segment outlines. Dissimilar segment outlines should belong to different outlines. The resulting segment outline information is the extracted paragraph position information.
[0057] According to the above technical solution, the embodiment of the present invention starts from the perspective of image processing and cleans, divides columns and segments paragraphs of the document to be processed by fusing contour information. This avoids the problems of existing methods requiring that the stream data of the PDF document must contain text and paragraph information, heavily relying on the accuracy of the OCR tool, and heavily relying on the language type of the document. It improves the universality, accuracy and reliability of paragraph positioning in PDF documents.
[0058] Based on the content of the above embodiment, in this embodiment, when the cleaning module determines the outline of the text in the first image according to the non-blank area included in the first image, it is specifically used to:
[0059] determining a first contour information library included in the first image according to the non-blank area included in the first image;
[0060] The non-text contours included in the first contour information library are cleaned to determine the text contours in the first image.
[0061] In this embodiment, when determining the outlines of text in the first image based on the non-blank areas included in the first image, the following methods can be used: determining a first outline information library included in the first image based on the non-blank areas included in the first image; and cleaning the non-text outlines included in the first outline information library to determine the outlines of text in the first image. Thus, this embodiment processes the non-blank areas in the first image to obtain all outlines, and then cleans the non-text outlines, thereby obtaining text outlines that are truly useful for paragraph segmentation, thereby improving the accuracy of paragraph extraction.
[0062] Based on the content of the above embodiment, in this embodiment, when the cleaning module determines the first contour information library included in the first image according to the non-blank area included in the first image, it is specifically configured to:
[0063] performing binarization processing on the first image to obtain a binarized image;
[0064] Locating pixel points in a non-blank area of the binary image to establish a first pixel coordinate library;
[0065] The first contour information library included in the first image is determined by fusing contours and distinguishing disjoint contours through the first pixel coordinate library.
[0066] In this embodiment, when determining the first contour information library included in the first image based on the non-blank area included in the first image, the means that can be used are: binarizing the first image to obtain a binary image; locating the pixel points of the non-blank area in the binary image to establish a first pixel coordinate library; and determining the first contour information library included in the first image by fusing contours and distinguishing non-connected contours through the first pixel coordinate library. As can be seen, this embodiment first establishes the first pixel coordinate library by binarizing the first image, then locating the pixel points of the non-blank area in the binary image, and finally, based on the first pixel coordinate library, determines all contour information included in the first image by fusing contours and distinguishing non-connected contours through the first pixel coordinate library. As can be seen, through this contour determination method, all contours included in the first image can be easily and conveniently found, thereby providing a basis for subsequent cleaning of non-text contours and determining text contours that are truly useful for paragraph segmentation.
[0067] Based on the content of the above embodiment, in this embodiment, when the cleaning module performs binarization processing on the first image to obtain a binarized image, it is specifically used to:
[0068] A dynamic threshold is calculated, and binarization processing is performed on the first image according to the dynamic threshold to obtain a binarized image.
[0069] In this embodiment, by calculating a dynamic threshold and performing binarization processing on the first image according to the dynamic threshold, the obtained binarized image is more accurate and can better reflect the actual situation of the document itself.
[0070] Based on the content of the above embodiment, in this embodiment, when the cleaning module cleans the non-text contours included in the first contour information library and determines the text contours in the first image, it is specifically used to:
[0071] screening the contours in the first contour information library according to a first preset condition to locate text contours and non-text contours;
[0072] If a non-text contour exists, excluding the non-text contour from the first contour information database;
[0073] Count all text outlines and capture effective information images;
[0074] The page size of the effective information image is calculated, and all the character outline information is corrected and updated according to the page size.
[0075] In this embodiment, the first contour information library is first organized and recorded in a standardized format. Then, contour size, area, and other information are screened using preset thresholds. Contours that do not meet these criteria are defined as non-text contours. If any non-text contours exist, they are removed from the first contour information library, and the remaining contours are defined as text contours. The minimum valid information image page size that includes all text contours is calculated based on the integration of all text contours. The contour coordinate information in the first contour information library is then updated based on the boundary coordinates of the valid information image.
[0076] Based on the content of the above embodiment, in this embodiment, when the column module determines whether the first image includes column information based on the first image and the text outline included in the first image, it is specifically configured to:
[0077] In the effective information image, locate the outline of the text, determine the area except the outline of the text as a blank area, and establish a second pixel coordinate library to record the blank area information;
[0078] fusing contours, distinguishing disjoint contours, and establishing a second contour information library through the second pixel coordinate library;
[0079] In the second contour information database, contours that are close in adjacent directions are merged and sorted;
[0080] The contours in the second contour information library are screened according to a second preset condition to determine whether the first image includes column information.
[0081] In this embodiment, all white pixels are first located in the valid information image to establish a second pixel coordinate library. If the pixel coordinates fall within the aforementioned non-text contours, they are removed from the second pixel coordinate library. Next, based on preset conditions, pixels that are close in the four directions of up, down, left, and right are merged into the same contour, while non-close contours are distinguished to establish a second contour information library. This second contour information library is then organized and recorded in a standardized format. Column contours are located and text contours are segmented. First, the size, area, and other information of the contours in the second contour information library are screened using a preset threshold. Contours that meet the conditions are defined as column contours. By screening the contour size and area, the column contours are located.
[0082] Based on the content of the above embodiment, in this embodiment, when the segmentation module determines the document paragraph position of the page of the to-be-processed document according to whether the first image includes column information, it is specifically configured to:
[0083] If it is determined that the page does not have a column outline, the page is considered to be a single column; otherwise, within the valid information image, the text outline is divided into different text columns from top to bottom and from left to right according to the column outline;
[0084] In the same text column, in the horizontal direction, the text outlines whose distance is less than a first preset distance threshold are merged and sorted;
[0085] In the same text column, in the vertical direction, the text outlines whose distance is less than a second preset distance threshold are merged and sorted;
[0086] The document paragraph position of the page of the document to be processed is determined according to the sorted text outline information.
[0087] In this embodiment, if no column outlines exist, the page is considered a single column; otherwise, within the valid information image, the text outlines are divided into different text columns from top to bottom and from left to right according to the column outlines. The outlines within the same text column are merged, and paragraph position information is extracted. In this step, for all text outlines within the same text column, all horizontally similar text outlines are first merged based on a preset threshold to form row outlines. Dissimilar row outlines should belong to different outlines. Then, all vertically similar row outlines are merged to form segment outlines. Dissimilar segment outlines should belong to different outlines. The final segment outline information is the extracted paragraph position information.
[0088] Figure 2This is a schematic diagram of the implementation process of the document paragraph position extraction device provided in an embodiment of the present invention. In addition to the processing module 20, the device also primarily includes a cleaning module 21, a column separation module 22, and a segmentation module 23. The cleaning module 21 is used to extract and fuse text contours. If the fused contour does not meet preset thresholds such as size and area, it is determined to be a non-text contour and cleaned. The column separation module 22 is used to extract column information from the valid information image and assign the text contours to the corresponding text columns. The segmentation module 23 is used to segment the text contours in each text column into different paragraphs and record the rectangular contour information of the paragraphs. Preferably, the cleaning module 21 includes an image conversion unit 211, an outline positioning unit 212, and a page cleaning unit 213. The image conversion unit 211 is used to image and binarize the PDF document pages, the outline positioning unit 212 is used to locate and fuse non-blank pixels and obtain outline information, and the page cleaning unit 213 is used to determine and clean non-text contour information and generate a valid information image. Preferably, the column separation module 22 includes a blank positioning unit 221 and a column segmentation unit 222. The blank locating unit 221 is used to locate the blank rectangular column outline, and the column segmentation unit 222 is used to divide the text outline into different text columns based on the column outline information.
[0089] The document paragraph position extraction device provided by the embodiment of the present invention is particularly suitable for horizontal PDF journal articles. The working process of the device is described below using a PDF document as an example:
[0090] Step 11: Paginate the PDF document and convert it into image files.
[0091] In this step, the PDF document is a landscape-formatted journal article, with each page corresponding to a single page in the journal article. The PDF document can be any type of PDF document, including those generated by scanners and those converted from images. Page content can be in black and white or color. When converting to an image, the image size can be adjusted to a suitable size based on computing power, and the threshold can be adjusted accordingly.
[0092] Step 12: Convert the single-page image into an image containing only pure black and pure white.
[0093] In this step, the image is first converted into a two-dimensional grayscale image to comprehensively analyze the pixel value distribution of all pixels. The image can then be binarized by setting a global threshold or using local thresholds such as the weighted mean and Otsu's algorithm.
[0094] Step 13: locate all black pixels and establish a first contour information database.
[0095] In this step, all black pixel points are first located to establish a first pixel coordinate library. Then, according to preset conditions, pixels close to each other in the four directions of up, down, left, and right are fused into the same contour, while non-close contours are distinguished to establish a first contour information library.
[0096] Step 14: clean up non-text outline information and capture the valid information image.
[0097] In this step, the first contour information library is first organized and recorded in a standardized format. Then, using preset thresholds, contour information such as size and area is screened, and contours that do not meet the criteria are defined as non-text contours. If any non-text contours exist, they are removed from the first contour information library, and the remaining contours are defined as text contours. The minimum valid information image page size that includes all text contours is calculated based on all text contours. The contour coordinate information in the first contour information library is then updated based on the boundary coordinates of the valid information image.
[0098] Step 15: locate all white pixel positions in the valid information image and establish a second contour information database.
[0099] In this step, all white pixels in the valid information image are located to establish a second pixel coordinate library. If the pixel coordinates are included in the non-text contours in step 14, they are removed from the second pixel coordinate library. Next, based on pre-set conditions, pixels that are close in the four directions (upward, downward, leftward, and rightward) are fused to form the same contour, while non-close contours are distinguished to establish a second contour information library. This second contour information library is then organized and recorded in a standardized format.
[0100] Step 16: Position the column outline and split the text outline.
[0101] In this step, the outlines in the second outline information library are first screened using a preset threshold, including size and area. Outlines that meet these criteria are defined as column outlines. By screening the outlines based on size and area, the column outlines are located. If no column outlines exist, the page is considered a single column. Otherwise, within the valid information image, the text outlines are divided into different text columns from top to bottom and from left to right based on the column outlines.
[0102] Step 17: merge the outlines in the same text column and extract the paragraph position information.
[0103] In this step, for all text contours in the same text column, first, based on a preset threshold, all horizontally similar text contours are merged to form row contours. Dissimilar row contours should belong to different contours. Then, vertically, all similar row contours are merged to form segment contours. Dissimilar segment contours should belong to different contours. The final segment contour information is the extracted paragraph position information.
[0104] From the perspective of image processing, the embodiments of the present invention clean up, divide columns and segment paragraphs of the document to be processed by fusing contour information. This avoids the problems of existing methods such as requiring the stream data of PDF documents to contain text and paragraph information, being heavily dependent on the accuracy of OCR tools, and being heavily dependent on the language type of the document. This improves the universality, accuracy and reliability of paragraph positioning in PDF documents.
Claims
1. A document paragraph position extraction device, characterized in that: include: A processing module, configured to perform image processing on a page of a document to be processed to obtain a first image; a cleaning module, configured to determine the outline of text in the first image based on the non-blank area included in the first image; a column division module, configured to determine whether the first image includes column division information based on the first image and the outline of the text included in the first image; a segmentation module, configured to determine a document paragraph position of a page of the document to be processed according to whether the first image includes column information; The cleaning module is specifically used to: determining a first contour information library included in the first image according to the non-blank area included in the first image; The first contour information database is sorted and recorded in a standardized form, the size and area of the contours are screened using a preset threshold, and contours that do not meet the conditions are defined as non-text contours; If there are non-text contours, the non-text contours are removed from the first contour information library, and the remaining contours are defined as text contours; All the character outlines are integrated to calculate the minimum effective information image page size containing all the character outlines, and the outline coordinate information in the first outline information library is updated according to the boundary coordinates of the effective information image.
2. The document paragraph position extraction device according to claim 1, characterized in that: When the cleaning module determines the first contour information library included in the first image based on the non-blank area included in the first image, the cleaning module is specifically configured to: performing binarization processing on the first image to obtain a binarized image; Locating pixel points in a non-blank area of the binary image to establish a first pixel coordinate library; The first contour information library included in the first image is determined by fusing contours and distinguishing disjoint contours through the first pixel coordinate library.
3. The document paragraph position extraction device according to claim 2, characterized in that: When the cleaning module performs binarization processing on the first image to obtain a binarized image, the cleaning module is specifically used to: A dynamic threshold is calculated, and binarization processing is performed on the first image according to the dynamic threshold to obtain a binarized image.
4. The document paragraph position extraction device according to claim 1, characterized in that: When the column division module determines whether the first image includes column division information based on the first image and the text outline included in the first image, it is specifically configured to: In the effective information image, locate the outline of the text, determine the area except the outline of the text as a blank area, and establish a second pixel coordinate library to record the blank area information; fusing contours, distinguishing disjoint contours, and establishing a second contour information library through the second pixel coordinate library; In the second contour information database, contours that are close in adjacent directions are merged and sorted; The contours in the second contour information library are screened according to a second preset condition to determine whether the first image includes column information.
5. The document paragraph position extraction device according to claim 4, characterized in that: When determining the document paragraph position of the page of the document to be processed according to whether the first image includes column information, the segmentation module is specifically configured to: If it is determined that the page does not have a column outline, the page is considered to be a single column; otherwise, within the valid information image, the text outline is divided into different text columns from top to bottom and from left to right according to the column outline; In the same text column, in the horizontal direction, the text outlines whose distance is less than a first preset distance threshold are merged and sorted; In the same text column, in the vertical direction, the text outlines whose distance is less than a second preset distance threshold are merged and sorted; The document paragraph position of the page of the document to be processed is determined according to the sorted text outline information.
6. The document paragraph position extraction device according to any one of claims 1 to 5, characterized in that: The document to be processed includes a PDF document or a WORD document.
Citation Information
Patent Citations
A research report format identification and segmentation method, system and apparatus
CN108960210A
Document picture recognition method and device and computer equipment
CN113221632A
OCR image character recognition and paragraph output method based on deep learning
CN113435449A