Text recognition method, terminal and storage device based on file scanning

By obtaining the character position information and correcting it, and merging the paragraph text, the problem in the existing technology of being unable to completely restore the document layout structure is solved, and the effect of retaining the original document layout structure and obtaining text paragraphs without editing is achieved, simplifying the operation process. and reduce workload.

CN113836865BActive Publication Date: 2024-10-29GUANGZHOU WEIMENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110948343.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-18
Publication Date
2024-10-29
Estimated Expiration
2041-08-18

AI Technical Summary

Technical Problem

When existing file scanning technology outputs TXT or PDF files, it cannot completely restore the layout structure and text paragraphs of the original document, resulting in the output file needing further editing, which is cumbersome and time-consuming.

Method used

By obtaining the position information of characters, calculating the position and font size of lines and paragraphs, making corrections using the character width, line width, and character height, merging line text in paragraphs, and outputting text based on position information, the layout structure of the original document can be modified. Preservation and correct restoration of text passages.

Benefits of technology

It can retain the layout structure of the original document and obtain text paragraphs without editing. The operation is simple, time-consuming and reduces the workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113836865B_ABST
    Figure CN113836865B_ABST
Patent Text Reader

Abstract

The present invention provides a text recognition method, terminal and storage device based on file scanning, and the text recognition method based on file scanning includes: S101: obtaining the line, paragraph and line and paragraph position information of the character according to the position of each character; S102: obtaining the character width after character rendering according to the character height, correcting the character height, and obtaining the size of each character in the paragraph according to the corrected character height; S103: merging the line text in the paragraph, calculating the line height of the paragraph, and outputting the scanned text according to the position information of the paragraph, the size of the character and the line height of the paragraph. The present invention can correctly identify the text position on the manuscript and correctly restore the text paragraph of the manuscript, and can also perform typeset according to the position, line height, font size and other information of each paragraph, and can achieve the retention of the original document typesetting structure and the acquisition of text paragraphs without editing, and has simple operation, short time consumption and low workload.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of text scanning, and in particular to a text recognition method, terminal and storage device based on file scanning. Background Art

[0002] At present, computer input methods mainly include Wubi input method, Pinyin input method, handwriting input method and other types. When we collect information, we often need to enter text from a large number of paper documents into the computer. If we use the above input methods to enter text, it is time-consuming and laborious. At present, document scanning is an effective tool for text entry. In the prior art, document scanning usually uses optical character recognition (OCR) technology to capture the required text as an image, and then recognize the image to achieve fast input.

[0003] However, after using the OCR function for text recognition, there are two defects when outputting the scanned file:

[0004] 1. When outputting a TXT file, each recognition can only merge words into string paragraphs, and then splice the paragraphs with line breaks and output them to the TXT file. This method can only obtain the text content, but lose the font size, paragraph indentation, paragraph line height and spacing between paragraphs in the text, and cannot completely restore the original document layout structure.

[0005] 2. When outputting a PDF file, each time the recognition is done, the area corresponding to the word can only be filled with the background color, and then each word text is filled into the area according to the area size, and finally output to the PDF file. This method does not merge the text into complete paragraphs, but is actually an independent text line, and paragraph copying cannot be performed.

[0006] In order to make the output document close to the original document, the output file needs to be further edited according to the scanned document. The operation is cumbersome and time-consuming, which increases the scanning cost. Summary of the invention

[0007] In order to overcome the shortcomings of the prior art, the present invention proposes a text recognition method, an intelligent terminal and a storage device based on file scanning, which obtains the position information of characters and lines and paragraphs in the same line and paragraph according to the position of the characters, and obtains the character width after rendering according to the character height, and uses the character width, line width and character height to correct the character height, so as to obtain the typesetting and paragraph information of the file, and can correctly identify the text position on the manuscript and correctly restore the text paragraphs of the manuscript. It can also typeset according to the position, line height, font size and other information of each paragraph, and can retain the original document typesetting structure and obtain text paragraphs without editing. The operation is simple, time-saving, and the workload is reduced.

[0008] To solve the above problems, a technical solution adopted by the present invention is: a text recognition method based on file scanning, the text recognition method based on file scanning comprising: S101: obtaining the position of each character, obtaining the line and paragraph where the character is located according to the position, and obtaining the position information of the line and paragraph; S102: obtaining the character height, obtaining the character width after rendering according to the character height, correcting the character height according to the character width, the width of the line where the character is located and the character height, and obtaining the size of each character in the paragraph according to the corrected character height; S103: merging the line text in the paragraph, calculating the line height of the paragraph, and outputting the scanned text according to the position information of the paragraph, the size of the character and the line height of the paragraph.

[0009] Furthermore, the step of obtaining the row or paragraph where the character is located according to the position specifically includes: obtaining characters located in the same row / paragraph according to the position, obtaining characters located in the same paragraph according to the row, or obtaining characters located in the same row according to the paragraph.

[0010] Furthermore, the step of obtaining characters located in the same row according to the position specifically includes: obtaining the order of the characters in a direction perpendicular to the row according to the position, traversing the characters according to the order, and determining whether the distance between the character and the previous character in a direction perpendicular to the row and the height difference are both less than a first preset value; if so, determining that the character is located in the same row as the previous character; if not, determining that the character is not located in the same row as the previous character.

[0011] Furthermore, the step of obtaining characters located in the same paragraph according to the rows specifically includes: traversing the rows according to the order of the rows in the direction perpendicular to the rows, and determining whether the distance and height difference between the row and the previous row in the direction perpendicular to the rows meet preset conditions; if so, determining that the row and the previous row are located in the same paragraph; if not, determining that the row and the previous row are not located in the same paragraph.

[0012] Furthermore, the step of acquiring the character width after rendering the character according to the character height specifically includes: acquiring the character width after rendering the character according to the character height and a font corresponding to the character.

[0013] Furthermore, the step of correcting the character height by the character width, the line width of the line where the character is located, and the character height specifically includes: obtaining the corrected character height by the formula A=min(lineFontSize*width / contentWidth, lineFontSize), wherein A is the corrected character height, lineFontSize is the character height, width is the line width of the line where the character is located, and contentWidth is the character width after the character is rendered.

[0014] Furthermore, the step of merging the lines of text in the paragraph specifically includes: splicing the lines of text in the paragraph according to the order of the lines in a direction perpendicular to the line, inserting separators between the lines of text, and determining the indentation of the paragraph according to the distance difference between the line and the paragraph in the line direction.

[0015] Furthermore, the step of outputting the scanned text according to the position information of the paragraphs, the size of the characters and the line height of the paragraphs specifically includes: obtaining a scaling ratio through the size of the output file, merging the paragraphs in order according to the coordinate sizes of the paragraphs in a direction perpendicular to the line to form text, and drawing the text on the output file at a scaling ratio based on the position information, the size of the characters and the line height of the paragraphs.

[0016] Based on the same inventive concept, the present invention further proposes an intelligent terminal, which includes: a processor and a memory, wherein the memory stores a computer program, and the processor executes the above-mentioned text recognition method based on file scanning through the computer program.

[0017] Based on the same inventive concept, the present invention further proposes a storage device, which stores program data, and the program data is used to execute the above-mentioned text recognition method based on document scanning.

[0018] Compared with the prior art, the beneficial effects of the present invention are: obtaining the position information of the characters and the line and paragraph in the same line and paragraph according to the position of the characters, and obtaining the character width after rendering according to the character height, and correcting the character height using the character width, line width and character height, and then obtaining the size and line height of the characters in the paragraph, thereby obtaining the typesetting and paragraph information of the file, being able to correctly identify the text position on the manuscript, and correctly restore the text paragraphs of the manuscript, and being able to typeset according to the position, line height, font size and other information of each paragraph, and being able to retain the original document typesetting structure and obtain the text paragraphs without editing, with simple operation, short time consumption and reduced workload. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flow chart of an embodiment of a text recognition method based on document scanning of the present invention;

[0020] Figure 2 A schematic diagram of an embodiment of a document outputted without using the text recognition method based on document scanning of the present invention;

[0021] Figure 3 A schematic diagram of an embodiment of a document outputted by the text recognition method based on document scanning of the present invention;

[0022] Figure 4 This is a structural diagram of an embodiment of the smart terminal;

[0023] Figure 5 FIG. 4 is a structural diagram of a storage device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.

[0025] The terms "comprises," "includes," or any other variations thereof herein are intended to cover a non-exclusive inclusion, such that a process or method that includes a list of steps includes not only those steps but may include other steps not expressly listed or inherent to such process or method. Similarly, a reference to one or more devices or subsystems, elements or structures or components preceded by "comprises ... an" does not, without more limitations, exclude the presence of other devices or other subsystems or other elements or other structures or other components or other devices or other subsystems or other elements or other structures or other components. Throughout the specification, appearances of the phrases "in one embodiment," "in another embodiment," and similar language may, but do not necessarily, all refer to the same embodiment.

[0026] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0027] See also Figure 1-3 , Figure 1 It is a flow chart of an embodiment of a text recognition method based on document scanning of the present invention; Figure 2 A schematic diagram of an embodiment of a document outputted without using the text recognition method based on document scanning of the present invention; Figure 3 This is a schematic diagram of an embodiment of a document output using the text recognition method based on document scanning of the present invention. Figure 1-3 The text recognition method based on document scanning of the present invention is described in detail.

[0028] In this embodiment, the text recognition method based on file scanning includes:

[0029] S101: Obtain the position of each character, obtain the line or paragraph where the character is located according to the position, and obtain the position information of the line or paragraph.

[0030] In this embodiment, the device that executes the text recognition method based on file scanning can be a computer, a server, a cloud platform, a scanner, a scanning pen, and other smart terminals that can obtain scanned images of files and perform text typeset based on the scanned images.

[0031] In this embodiment, the intelligent terminal obtains a scanned image of the file and identifies the position of each character in the file through a text recognition algorithm, wherein the character may be Chinese characters, English, formulas, letters, and other text that can form lines or paragraphs in the file.

[0032] The coordinate system where the character is located can place the origin of the coordinate system at any one of the four corners of the scanned image, and the horizontal coordinate and the vertical coordinate of the character are its coordinates relative to the origin of the coordinate system.

[0033] In a specific embodiment, the smart terminal is a mobile phone, the characters are words, and the mobile phone recognizes the position and size of each word through a text recognition algorithm, which is recorded as (x, y, width, height), where x is the horizontal coordinate of the word, y is the vertical coordinate of the word, width is the width of the word, and height is the height of the word.

[0034] In this embodiment, the step of obtaining characters in the same row and characters in the same paragraph according to position specifically includes: obtaining characters in the same row / paragraph according to position, obtaining characters in the same paragraph according to row, or obtaining characters in the same row according to paragraph.

[0035] The step of obtaining characters located in the same row according to position specifically includes: obtaining the order of the characters in a direction perpendicular to the row according to the position, traversing the characters according to the order, and determining whether the distance between the character and the previous character in a direction perpendicular to the row and the height difference are both less than a first preset value; if so, determining that the character is located in the same row as the previous character; if not, determining that the character is not located in the same row as the previous character.

[0036] In this embodiment, the Y axis is perpendicular to the row direction, and the X axis is parallel to the row direction, and the row and paragraph of the character are obtained according to the coordinates of the character on the X axis and the Y axis. In other embodiments, the X axis may be perpendicular to the row direction, and the Y axis may be parallel to the row direction, or both the X axis and the Y axis may not be parallel to the row direction or perpendicular to the row direction, and it is sufficient to be able to obtain the position of the character or row in the perpendicular row direction or the row direction.

[0037] In a specific embodiment, the characters are words, and each word is traversed in order from the smallest to the largest coordinate value y on the y-axis. It is assumed that the y value differs from the y value of the previous word by △y, and the height value height value differs from the height value of the previous word by △height. If △y and △height are both less than height*k (the coefficient k is greater than 0, preferably 0.5), they are regarded as the same row.

[0038] In this embodiment, after the step of determining that a character is in the same row as the previous character, the step also includes: traversing the characters according to the order of the characters in the row direction, and determining whether the distance between the character and the previous character is greater than a second preset value; if so, dividing the character and the previous character into different rows; if not, determining that the character and the previous character are in the same row.

[0039] After obtaining the characters in the same row, the position information of each row may be obtained first, and then the characters not in the same row may be filtered out, and the position information of each row may be corrected according to the filtering result.

[0040] In a specific embodiment, the intelligent terminal updates the position information of the row, and the position information is recorded as (x, y, width, height), where x and y are the minimum values ​​of all words in the row on the X-axis and Y-axis respectively, the width value (i.e., row width) width is the max(x+width)-min(x) of all its words, and the height value height is the max(y+height)-min(y) of all its words. Among them, max(x+width) is the sum of the maximum coordinate of the word in the row on the X-axis and the width of the word, min(x) is the minimum coordinate of the word in the row on the X-axis, max(y+height) is the sum of the maximum coordinate of the word in the row on the Y-axis and the height of the word, and min(y) is the minimum coordinate of the word in the row on the Y-axis. Traverse each row in order of the y value of the row on the Y axis from small to large; for each row, traverse each word in the row in order of the size of the word's x value, and record that the left side of the current word i is left(i)=x(i), x(i) is the coordinate of word i on the X axis, and the right side of the previous word j is right(j)=x(j)+width(j), x(j) is the coordinate of word j on the X axis, and width(j) is the width of word j. If left(i)>right(j)+g (the coefficient g range is greater than the row height height, preferably height*3), it means that word i and word j are far apart and should be split into different rows. Update the row position information according to the split rows.

[0041] In this embodiment, the step of obtaining characters located in the same paragraph according to rows specifically includes: traversing the rows according to the order of the rows in the direction perpendicular to the rows, and determining whether the distance and height difference between the row and the previous row in the direction perpendicular to the rows meet preset conditions; if so, determining that the row and the previous row are located in the same paragraph; if not, determining that the row and the previous row are not located in the same paragraph.

[0042] In a specific embodiment, each row is traversed in order of its y value on the Y axis from small to large, and the minimum value of its height value height and the height value of the previous row is recorded as h, and the difference between its y value and the y value of the previous row is △y, and the difference between its height value height and the height value of the previous row is △height. If △y is less than h*g and △height is less than h*f (coefficient g is greater than 0, preferably 0.7, coefficient f is greater than 0 and less than 1, preferably 0.3), then the two rows are considered to be in the same paragraph. Update the position information of the paragraph, recorded as (x 1 ,y 1 ,width 1 ,height 1 ), where x 1 The minimum value of the line in the paragraph on the x-axis, y 1 The minimum Y-axis value of a line in a paragraph, width 1 is the paragraph width, height 1 The height of the paragraph.

[0043] In the above embodiment, the method for calculating the position information of a paragraph is the same as the method for calculating the position information of the previous line, and there is no priority in the order of identifying the positions of lines and paragraphs, that is, the position of the line can be identified first, or the position of the paragraph can be identified first.

[0044] S102: Obtain the character height, obtain the character width after rendering according to the character height, correct the character height according to the character width, the line width of the character line and the character height, and obtain the size of each character in the paragraph according to the corrected character height.

[0045] The character height (character height) of the characters in the line is calculated based on the line height of each line. Because the font selected by the system is different from the printing font, and the recognition height is different from the printing content height, the character height needs to be corrected after calculation.

[0046] In this embodiment, the step of obtaining the character width after character rendering according to the character height specifically includes: obtaining the character width after character rendering (the width of the character) according to the character height and the font corresponding to the character. The font corresponding to the character is the font that the system font is about to render, and the character width after character rendering is determined by the proportional relationship between the size of the font and the character height.

[0047] In this embodiment, the step of correcting the character height by the character width, the line width of the line where the character is located, and the character height specifically includes: obtaining the corrected character height by the formula A=min(lineFontSize*width / contentWidth, lineFontSize), wherein A is the corrected character height, lineFontSize is the character height, width is the line width of the line where the character is located, and contentWidth is the character width after the character is rendered.

[0048] In a specific embodiment, the line character size is calculated based on the line height of each line as lineFontSize=height, where height is the line height and lineFontSize is the character height; since the font selected by the system is different from the printing font, and there are differences between the recognition height and the printed content height, lineFontSize needs to be corrected once; the correction method is to determine the width contentWidth of the characters after content rendering through the ratio of the system font size and lineFontSize size, and to correct lineFontSize=min(lineFontSize*width / contentWidth, lineFontSize) in proportion to the character width and the line width width; calculate the average lineFontSize of the size of the characters in the lines within the paragraph, and the average is the height fontSize of the characters in the paragraph.

[0049] S103: Merging the line texts in the paragraph, calculating the line height of the paragraph, and outputting the scanned text according to the position information of the paragraph, the size of the characters, and the line height of the paragraph.

[0050] The line height of a paragraph is obtained by dividing the paragraph height by the number of paragraph lines.

[0051] In this embodiment, the step of merging text lines in a paragraph specifically includes: splicing text lines in the paragraph according to the order of the lines in a direction perpendicular to the line, inserting separators between text lines, and determining the indentation of the paragraph according to the distance difference between the line and the paragraph in the line direction.

[0052] Specifically, all the lines of text in the paragraph are concatenated in order of the y value of the line on the Y axis from small to large, and "\n" separators are inserted between the lines of text; according to the difference between the x value of each line on the X axis and the x value of the paragraph on the X axis, the corresponding number of spaces are inserted before the line of text as indentation. Calculate the line height of the paragraph, lineHeight = paragraph height value height / number of lines in the paragraph, lineHeight is the line height.

[0053] In this embodiment, the step of outputting the scanned text according to the position information of the paragraphs, the size of the characters, and the line height of the paragraphs specifically includes: obtaining the scaling ratio through the size of the output file, merging the paragraphs in order according to the coordinate sizes of the paragraphs in the direction perpendicular to the line to form text, and drawing the text on the output file at the scaling ratio based on the position information, the size of the characters, and the line height of the paragraphs.

[0054] The output file can be in the format of PDF, DOC, DOCX, or other documents that can be used to store scanned information of files.

[0055] In a specific embodiment, the intelligent terminal formats the scanned text and outputs it in PDF format. The size of the recognized image is used as the size of the PDF document, and the paragraphs of each paragraph are merged in order from small to large according to the coordinate value y of the paragraph on the Y axis, and drawn into the corresponding area of ​​the manuscript according to its position information, font and line height, and finally saved as a PDF file. If the output is to a specified size, the scale is set, and the value of the paragraph can be scaled in the same proportion.

[0056] In another specific embodiment, the intelligent terminal formats the scanned text and outputs it in DOCX format. Assuming that the recognized image is of A4 paper size, the ratio of the image width to the paper width is recorded as scale, and the paragraphs of each paragraph are merged in order from small to large in the order of the coordinate value y of the paragraph on the Y axis, and are drawn on the manuscript according to the font and line height multiplied by the scale ratio, and finally saved as a DOCX file.

[0057] Beneficial effects: The text recognition method based on file scanning of the present invention obtains the characters and the position information of the lines and paragraphs in the same line and paragraph according to the positions of the characters, and obtains the character width after rendering according to the character height, and uses the character width, line width and character height to correct the character height, so as to obtain the typesetting and paragraph information of the file, and can correctly identify the text position on the manuscript and correctly restore the text paragraphs of the manuscript, and can also typeset according to the position, line height, font size and other information of each paragraph, and can retain the original document typesetting structure and obtain text paragraphs without editing, and the operation is simple, time-saving, and the workload is reduced.

[0058] Based on the same inventive concept, the present invention also proposes an intelligent terminal, see Figure 4 , Figure 4 FIG. 1 is a structural diagram of an embodiment of a smart terminal of the present invention. Figure 4 The intelligent terminal of the present invention is described.

[0059] In this embodiment, the intelligent terminal includes: a processor and a memory, wherein the memory stores a computer program, and the processor executes the text recognition method based on file scanning as described in the above embodiment through the computer program.

[0060] Based on the same inventive concept, the present invention further proposes a storage device, see Figure 5 , Figure 5 FIG. 1 is a structural diagram of an embodiment of a storage device of the present invention. Figure 5 The storage device of the present invention will be described.

[0061] In this embodiment, the storage device stores program data, and the program data is used to execute the text recognition method based on document scanning as described in the above embodiment.

[0062] In the embodiments provided by the present invention, it should be understood that the disclosed intelligent terminal / storage device and method can be implemented in other ways. For example, the embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another storage device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some codes, devices or units, which can be electrical, mechanical or other forms.

[0063] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0064] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0065] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text recognition method based on document scanning, characterized in that: The text recognition method based on file scanning includes: S101: Obtain the position of each character, obtain the line or paragraph where the character is located according to the position, and obtain the position information of the line or paragraph; S102: Obtaining the character height of the character, obtaining the character width of the rendered character according to the character height, correcting the character height according to the character width and height after rendering and the width of the line where the character is located, and obtaining the size of each character in the paragraph according to the corrected character height; S103: merging the line texts in the paragraphs, obtaining the line height of the paragraphs by dividing the paragraph height by the number of paragraph lines, and outputting the scanned text according to the position information of the paragraphs, the size of the characters, and the line height of the paragraphs; The step of obtaining the line or paragraph where the character is located according to the position specifically includes: Acquire characters located in the same line / paragraph according to the position, acquire characters located in the same paragraph according to the line, or acquire characters located in the same line according to the paragraph; The step of correcting the character height by using the character width after the character is rendered, the line width of the line where the character is located, and the character height specifically includes: The corrected character height is obtained through the formula A=min(lineFontSize*width / contentWidth, lineFontSize), where A is the corrected character height, lineFontSize is the character height, width is the line width of the character, and contentWidth is the character width after character rendering.

2. The text recognition method based on document scanning as claimed in claim 1, characterized in that: The step of acquiring characters located in the same row according to the positions specifically includes: Obtaining the order of the characters in a direction perpendicular to the row according to the positions, traversing the characters according to the order, and determining whether the distance and height difference between the character and the previous character in a direction perpendicular to the row are both less than a first preset value; If so, determining that the character is in the same row as the previous character; If not, it is determined that the character is not located in the same row as the previous character.

3. The text recognition method based on document scanning as claimed in claim 1, characterized in that: The step of obtaining characters located in the same paragraph according to the rows specifically includes: Traversing the rows according to the order of the rows in a direction perpendicular to the rows, and determining whether the distance and height difference between the row and the previous row in a direction perpendicular to the rows meet a preset condition; If so, determining that the line is in the same paragraph as the previous line; If not, it is determined that the line is not located in the same paragraph as the previous line.

4. The text recognition method based on document scanning as claimed in claim 1, characterized in that: The step of obtaining the character width after the character is rendered according to the character height specifically includes: The character width after rendering is obtained according to the character height and the font corresponding to the character.

5. The text recognition method based on document scanning as claimed in claim 1, characterized in that: The step of merging the line texts in the paragraphs specifically includes: The line texts in the paragraph are spliced ​​according to the order of the lines in a direction perpendicular to the line, separators are inserted between the line texts, and the indentation of the paragraph is determined according to the distance difference between the line and the paragraph in the line direction.

6. The text recognition method based on document scanning as claimed in claim 1, characterized in that: The step of outputting the scanned text according to the position information of the paragraph, the size of the characters and the line height of the paragraph specifically includes: The scaling ratio is obtained by the size of the output file, the paragraphs are sequentially merged to form text according to the coordinate sizes of the paragraphs in a direction perpendicular to the line direction, and the text is drawn on the output file at the scaling ratio based on the position information, the size of the characters and the line height of the paragraphs.

7. An intelligent terminal, characterized in that: The intelligent terminal comprises: a processor and a memory, wherein the memory stores a computer program, and the processor executes the text recognition method based on file scanning according to any one of claims 1 to 6 through the computer program.

8. A storage device, characterized in that: The storage device stores program data, and the program data is used to execute the text recognition method based on document scanning as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for resetting scan edition document

    CN102890826A

  • Method and device for determining average character width, and character division method and device

    JP2013101610A