Picture text recognition method and device, electronic equipment and storage medium

By dividing the picture into sub-pictures with overlapping areas and identifying and splicing the position information, the problem of difficult text information recognition when the image size is too large is solved, and the completeness and accuracy of text information are achieved.

CN119169645APending Publication Date: 2024-12-20SHANGHAI WEIWENJIA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310675372.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

When the image size is too large, optical character recognition technology will find it difficult to effectively recognize text information, which can easily lead to blurring or loss of text information, especially when the magnification is too high, the text information becomes dot-shaped, or part of the text information is lost after the image is divided.

Method used

Divide the picture to be identified into multiple sub-pictures to ensure that the adjacent sub-pictures have overlapping areas, and identify and splice position information separately, and splice the text information of the overlapping areas to obtain complete text information.

Benefits of technology

It avoids the loss and unrecognition of text information, and ensures the integrity and accuracy of text information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169645A_ABST
    Figure CN119169645A_ABST
Patent Text Reader

Abstract

The invention provides a picture text recognition method and device, electronic equipment and a storage medium, and relates to the technical field of image processing, and the method comprises the steps: obtaining a to-be-recognized picture, and determining the size of the to-be-recognized picture; if the size is greater than a preset size threshold value, segmenting the to-be-identified picture to obtain a plurality of sub-pictures; wherein the sub-pictures comprise text information fragments, and the text information fragments in the adjacent sub-pictures have overlapping areas; performing position information identification on the plurality of sub-pictures, and determining position information of text information fragments included in the plurality of sub-pictures; and based on the position information and the overlapping region, splicing the plurality of text information fragments to obtain text information in the to-be-identified picture. By means of the mode, the situation that the text information is lost and cannot be recognized is avoided, and the integrity of the text information is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, electronic equipment and storage medium for image text recognition. Background Art

[0002] Recognizing text information in images is an important task in digital image processing. Generally, OCR (Optical Character Recognition) is used. In the implementation process, the image is usually processed differently according to the size of the image, and then the text information in the image is recognized. The text information obtained after recognition is then spliced ​​to obtain complete text information.

[0003] When the image size is too large, the image is usually enlarged before the text information is recognized. However, after the image is enlarged, the text information is easily blurred, resulting in the inability to recognize the text information. If the magnification is too high, the text information may become dots, resulting in the loss of text information. Alternatively, the image is segmented and then the text information is recognized after the segmentation. However, after the image is segmented, some text information is easily lost. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a method, device, electronic device and storage medium for image text recognition, by dividing an image into sub-images, and adjacent sub-images have overlapping areas, and the text information fragments in the sub-images are separately identified and then spliced ​​to obtain the text information of the image to be identified, thereby avoiding the loss of text information and the inability to be recognized.

[0005] In the first aspect, in the embodiment provided by the present invention, it includes: obtaining a picture to be identified and determining the size of the picture to be identified; if the size is greater than a preset size threshold, dividing the picture to be identified to obtain multiple sub-pictures; wherein the sub-pictures include text information fragments, and there are overlapping areas of text information fragments in adjacent sub-pictures; performing position information identification on multiple sub-pictures respectively to determine the position information of the text information fragments included in the multiple sub-pictures; based on the position information and the overlapping area, splicing the multiple text information fragments to obtain the text information in the picture to be identified.

[0006] In a preferred embodiment of the present invention, the above-mentioned segmenting the image to be identified to obtain a plurality of sub-images includes: segmenting the image to be identified according to a preset segmentation order and a preset segmentation size to obtain a plurality of sub-images.

[0007] In a preferred embodiment of the present invention, the method also includes: if the length or width of a target sub-image is less than a preset length threshold or width threshold, a portion of a previous sub-image of the target sub-image is spliced ​​with the target sub-image so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

[0008] In a preferred embodiment of the present invention, the method also includes: if there is a target sub-image whose length or width is less than a preset length threshold or width threshold, splicing the blank image with the target sub-image so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

[0009] In a preferred embodiment of the present invention, if the size is greater than a preset size threshold, the image to be identified is segmented to obtain multiple sub-images, and the method further includes: if the size is less than the preset size threshold, a blank image is spliced ​​with the image to be identified so that the size of the spliced ​​image to be identified reaches the size threshold.

[0010] In a preferred embodiment of the present invention, the above-mentioned performing position information recognition on multiple sub-pictures respectively to determine the position information of the text information segments of each of the multiple sub-pictures includes: performing position information recognition on multiple sub-pictures respectively to determine the position coordinates of the multiple sub-pictures in the picture to be recognized; determining the position coordinates of the text information segments of the multiple sub-pictures in the picture to be recognized based on the position coordinates of the multiple sub-pictures in the picture to be recognized; using the position coordinates of the text information segments of the multiple sub-pictures in the picture to be recognized as the position information of the text information segments of the multiple sub-pictures.

[0011] In a preferred embodiment of the present invention, the above-mentioned method of splicing multiple text information fragments based on position information and overlapping areas to obtain text information in the picture to be identified includes: determining overlapping text in the overlapping area based on position information; splicing multiple text information fragments based on the overlapping text to obtain text information in the picture to be identified.

[0012] In a second aspect, an embodiment of the present invention further provides an image text recognition device, comprising: a size determination device, used to obtain an image to be recognized and determine the size of the image to be recognized; a image segmentation device, used to segment the image to be recognized if the size is greater than a preset size threshold, to obtain multiple sub-images; wherein the sub-images include text information fragments, and there are overlapping areas of text information fragments in adjacent sub-images; a position information recognition device, used to respectively identify position information of multiple sub-images, and determine the position information of the text information fragments included in the multiple sub-images; a text information fragment splicing device, used to splice multiple text information fragments based on the position information and the overlapping area, to obtain text information in the image to be recognized.

[0013] The embodiments of the present invention bring the following beneficial effects:

[0014] An embodiment of the present invention provides a method, device, electronic device and storage medium for image text recognition, which avoids the loss of text information by dividing an image to be recognized into multiple sub-images, and there are overlapping areas of text information fragments in adjacent sub-images. Then, position information of the multiple sub-images is recognized respectively to obtain position information of text information fragments included in the multiple sub-images. The text information fragments are spliced ​​according to the position information and the overlapping areas to obtain the text information in the image to be recognized, thereby avoiding the loss of text information and the inability to be recognized, and ensuring the integrity of the text information.

[0015] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0016] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A flowchart of a method for image text recognition provided by an embodiment of the present invention;

[0019] Figure 2 A flowchart of another method for image text recognition provided by an embodiment of the present invention;

[0020] Figure 3 A flowchart of another method for image text recognition provided by an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the structure of a device for image text recognition provided by an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Recognizing text information in images is an important task in digital image processing. Generally, OCR (Optical Character Recognition) is used. In the implementation process, the image is usually processed differently according to the size of the image, and then the text information in the image is recognized. The text information obtained after recognition is then spliced ​​to obtain complete text information.

[0025] When the image size is too large, the image is usually enlarged before the text information is recognized. However, after the image is enlarged, the text information is easily blurred, resulting in the inability to recognize the text information. If the magnification is too high, the text information may become dots, resulting in the loss of text information. Alternatively, the image is segmented and then the text information is recognized after the segmentation. However, after the image is segmented, some text information is easily lost.

[0026] Based on this, an embodiment of the present invention provides a method, device, electronic device and storage medium for image text recognition, which avoids the loss of text information by dividing the image to be recognized into multiple sub-images, and there are overlapping areas of text information fragments in sub-images with adjacent positions, and then respectively identifies the position information of the multiple sub-images to obtain the position information of the text information fragments included in the multiple sub-images, and splices the text information fragments according to the position information and the overlapping areas to obtain the text information in the image to be recognized, thereby avoiding the loss of text information and the situation where it cannot be recognized.

[0027] To facilitate understanding of this embodiment, a method for image text recognition disclosed in an embodiment of the present invention is first introduced in detail.

[0028] Example 1

[0029] The embodiment of the present invention provides a method for image text recognition. Figure 1 The following is a flow chart of a method for image text recognition provided by an embodiment of the present invention. Figure 1 As shown, the image text recognition method may include the following steps:

[0030] Step S101, obtaining a picture to be identified and determining the size of the picture to be identified.

[0031] The image to be identified may be an image input by a user from which text information needs to be extracted. After the image to be identified is input, the size of the image to be identified may be automatically identified, and the size may be expressed in pixels.

[0032] Step S102: if the size is greater than a preset size threshold, the image to be identified is segmented to obtain a plurality of sub-images.

[0033] The sub-pictures include text information fragments, and the text information fragments in adjacent sub-pictures have overlapping areas.

[0034] The text information segment may include characters, and the preset size threshold may be 2400 pixels*2400 pixels.

[0035] Specifically, the image to be identified may be segmented according to a preset segmentation order and a preset segmentation size to obtain a plurality of sub-images.

[0036] Among them, the preset segmentation size can be 2400 pixels * 2400 pixels, and the preset segmentation order can be segmentation from left to right. After one row is segmented, the next row is segmented. For example, a segmentation frame with a size of 2400 pixels * 2400 pixels can be set, and the segmentation frame is slid from left to right. The segmentation frame advances 80% of its size each time, that is, 1920 pixels * 2400 pixels, and then a picture with a size of 2400 pixels * 2400 pixels is taken as a sub-picture. At this time, the overlapping area of ​​adjacent sub-pictures is 20% of the sub-picture. The segmentation is performed according to the logic of segmenting each row from top to bottom to obtain multiple sub-pictures of the same size.

[0037] During the segmentation process, according to the preset segmentation order, the size of the last image in each row may not meet the preset segmentation size. Therefore, if the length or width of the target sub-image is less than the preset length threshold or width threshold, part of the previous sub-image of the target sub-image will be spliced ​​with the target sub-image so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

[0038] For example, when splitting from left to right, when the remaining size is smaller than a preset length threshold or width threshold, that is, when the length or width of the target sub-image is smaller than the preset length threshold or width threshold, where the preset length threshold or width threshold can be 80% of the preset splitting size, part of the pixels will be captured from the previous sub-image and added to the last sub-image, so that the size of the last sub-image meets the preset splitting size.

[0039] During the segmentation process, according to the preset segmentation order, the size of the last image in each column may not meet the preset segmentation size. Therefore, if the length or width of the target sub-image is less than the preset length threshold or width threshold, the blank image is spliced ​​with the target sub-image so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

[0040] For example, when cutting from top to bottom, when the remaining size is smaller than a preset length threshold or width threshold, that is, the length or width of the target sub-image is smaller than the preset length threshold or width threshold, where the preset length threshold or width threshold can be 80% of the preset cutting size, the blank image and the target sub-image will be spliced ​​so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

[0041] As an implementation method, if the size of the image to be identified is smaller than a preset size threshold, a blank image is spliced ​​with the image to be identified so that the size of the spliced ​​image to be identified reaches the preset size threshold, and the method of extracting text information from the spliced ​​image to be identified is the same as the method of extracting text information fragments from sub-images obtained after segmenting the image to be identified whose size is larger than the preset size threshold, and the OCR system can be used for identification.

[0042] Step S103 , performing position information recognition on the multiple sub-pictures respectively, and determining the position information of the text information segments included in the multiple sub-pictures.

[0043] The upper left corner of the image to be identified can be used as the coordinate origin, and after the image to be identified is segmented, the position coordinates of the text information fragment included in the sub-image can be located in the image to be identified.

[0044] Step S104: Based on the position information and the overlapping area, multiple text information fragments are spliced ​​to obtain text information in the image to be identified.

[0045] The position information can be used to determine whether two sub-images are adjacent sub-images, as well as the position coordinates of overlapping texts in the overlapping areas of adjacent sub-images. The text information fragments included in all adjacent sub-images are spliced ​​using the position coordinates of the overlapping texts to obtain the text information in the image to be identified, thereby avoiding duplicate text information.

[0046] The image text recognition method provided by the embodiment of the present invention avoids the loss of text information by dividing the image to be recognized into multiple sub-images, and there are overlapping areas of text information fragments in the adjacent sub-images, then performs position information recognition on the multiple sub-images respectively to obtain the position information of the text information fragments included in the multiple sub-images, and splices the text information fragments according to the position information and the overlapping areas to obtain the text information in the image to be recognized, thereby avoiding the loss of text information and the situation where it cannot be recognized, and ensuring the integrity of the text information.

[0047] Example 2

[0048] An embodiment of the present invention also provides another method for image text recognition; this method is implemented on the basis of the method in the above embodiment; this method focuses on describing the specific implementation method of respectively identifying the position information of multiple sub-images and determining the position information of the text information fragments of each of the multiple sub-images.

[0049] Figure 2 A flowchart of another method for image text recognition provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the image text recognition method may include the following steps:

[0050] Step S201 , identifying the position information of the multiple sub-pictures respectively, and determining the position coordinates of the multiple sub-pictures in the picture to be identified.

[0051] A rectangular coordinate system can be established with the upper left corner of the image to be identified as the coordinate origin, the horizontal direction as the x-axis, and the vertical direction as the y-axis. After the image to be identified is segmented, the position coordinates of the text information fragment included in the sub-image can be located in the image to be identified. The specific position coordinates of the sub-image can be represented by the coordinate point corresponding to the upper left corner of the sub-image and the coordinate point corresponding to the lower right corner.

[0052] Step S202: determining the position coordinates of the text information segments of the plurality of sub-pictures in the picture to be identified based on the position coordinates of the plurality of sub-pictures in the picture to be identified.

[0053] A rectangular coordinate system can be established with the upper left corner of the sub-image as the origin of the coordinates, the horizontal direction as the x-axis, and the vertical direction as the y-axis to determine the position of the text information segment in the sub-image. The specific position coordinates of the text information segment can be represented by the coordinate points corresponding to the upper left corner of the text information segment and the coordinate points corresponding to the lower right corner. Then, the horizontal and vertical coordinates of the upper left corner of the sub-image are added to the horizontal and vertical coordinates corresponding to the upper left corner and the lower right corner of the text information segment, respectively, to obtain the position coordinates of the upper left corner and the lower right corner of the text information segment in the image to be identified.

[0054] Specifically, the text information segment may include one or more characters. When it includes one character, the position of the text information segment in the sub-picture may be the position of the character in the sub-picture. When it includes multiple characters, the position of the text information segment in the sub-picture may be the positions of the multiple characters in the sub-picture respectively.

[0055] Step S203: taking the position coordinates of the text information segments of the multiple sub-pictures in the picture to be identified as the position information of the text information segments of the multiple sub-pictures.

[0056] The image text recognition method provided by the embodiment of the present invention provides a basis for splicing text information fragments, ensures the integrity of text information, and avoids the loss of text information by determining the position coordinates of multiple sub-images in the image to be recognized, and then determines the position coordinates of text information fragments of multiple sub-images in the image to be recognized.

[0057] Example 3

[0058] An embodiment of the present invention also provides another method for image text recognition; this method is implemented on the basis of the method in the above embodiment; this method focuses on describing a specific implementation method of splicing multiple text information fragments based on position information and overlapping areas to obtain text information in the image to be recognized.

[0059] Figure 3 A flowchart of another method for image text recognition provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the image text recognition method may include the following steps:

[0060] Step S301, determining overlapping text in the overlapping area based on position information.

[0061] The overlapping text includes characters, specifically characters included in a portion of text information fragments in the overlapping area of ​​adjacent sub-pictures.

[0062] Since the position information is represented by position coordinates, the coordinate area of ​​the overlapping area, i.e., the upper left corner position coordinates and the lower right corner position coordinates of the overlapping area, can be determined through the position coordinates, and then the partial text information segment located in the coordinate area, i.e., the overlapping text, can be determined according to the position coordinates of the text information segment.

[0063] Step S302: splicing multiple text information fragments based on overlapping texts to obtain text information in the image to be identified.

[0064] By splicing multiple text information fragments according to the overlapping text in each overlapping area, the text information in the image to be identified can be obtained, which avoids duplication of text information and ensures the integrity of the text information.

[0065] For ease of understanding, the splicing of text information fragments is illustrated by an example, for example, text information fragment 1: "The embodiment of the present invention provides, a", the upper left corner coordinates are (100,100), and the lower right corner coordinates are (500,200); text information fragment 2: "Provides, a picture text recognition method" has the upper left corner coordinates (400,100), and the lower right corner coordinates are (1000,200). Then the coordinate area of ​​the overlapping area can be determined by the position coordinates, which is the upper left corner (400,100), the lower right corner (500,200), and the overlapping text is "Provides, a", then after splicing text information fragment 1 and text information fragment 2, you will get a complete text information of "The embodiment of the present invention provides, a picture text recognition method".

[0066] The image text recognition method provided by the embodiment of the present invention determines the overlapping text in the overlapping area, thereby determining whether the text information fragments in the adjacent sub-images constituting the overlapping area are a continuous text information fragment, and then splices multiple text information fragments based on the overlapping text, thereby avoiding duplication of text information and ensuring the integrity of the spliced ​​text information.

[0067] Example 4

[0068] Corresponding to the above method embodiment, the embodiment of the present invention provides a picture text recognition device, Figure 4 A schematic diagram of the structure of a device for recognizing text in an image provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the image text recognition device may include:

[0069] The size determination module 401 is used to obtain the image to be identified and determine the size of the image to be identified;

[0070] The image segmentation module 402 is used to segment the image to be identified into multiple sub-images if the size is greater than a preset size threshold; wherein the sub-images include text information fragments, and there are overlapping areas of text information fragments in adjacent sub-images;

[0071] A position information identification module 403 is used to identify the position information of the multiple sub-pictures respectively, and determine the position information of the text information segments included in the multiple sub-pictures;

[0072] The text information segment splicing module 404 is used to splice multiple text information segments based on the position information and the overlapping area to obtain the text information in the image to be identified.

[0073] The image text recognition device provided by the embodiment of the present invention avoids the loss of text information by dividing the image to be recognized into multiple sub-images, and there are overlapping areas of text information fragments in the adjacent sub-images, and then respectively identifies the position information of the multiple sub-images to obtain the position information of the text information fragments included in the multiple sub-images, and splices the text information fragments according to the position information and the overlapping areas to obtain the text information in the image to be recognized, thereby avoiding the loss of text information and the situation where it cannot be recognized.

[0074] In some embodiments, the module for segmenting the image to be identified is further used to segment the image to be identified according to a preset segmentation order and a preset segmentation size to obtain multiple sub-images.

[0075] In some embodiments, the image segmentation module to be identified is also used to splice part of the previous sub-image of the target sub-image with the target sub-image if the length or width of the target sub-image is less than a preset length threshold or width threshold, so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

[0076] In some embodiments, the image segmentation module to be identified is also used to splice a blank image with the target sub-image if the length or width of the target sub-image is less than a preset length threshold or width threshold, so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

[0077] In some embodiments, the module for segmenting the image to be identified is further used to splice the blank image with the image to be identified if the size is smaller than a preset size threshold, so that the size of the spliced ​​image to be identified reaches the size threshold.

[0078] In some embodiments, the position information identification module is also used to perform position information identification on multiple sub-pictures respectively, and determine the position coordinates of the multiple sub-pictures in the picture to be identified; based on the position coordinates of the multiple sub-pictures in the picture to be identified, determine the position coordinates of the text information fragments of the multiple sub-pictures in the picture to be identified; and use the position coordinates of the text information fragments of the multiple sub-pictures in the picture to be identified as the position information of the text information fragments of the multiple sub-pictures.

[0079] In some embodiments, the text information fragment splicing module is further used to determine overlapping text in the overlapping area based on the position information; and splice multiple text information fragments based on the overlapping text to obtain text information in the picture to be identified.

[0080] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0081] Example 5

[0082] The embodiment of the present invention also provides an electronic device for executing the above-mentioned image text recognition method; see Figure 5 A structural schematic diagram of an electronic device is shown, which includes a memory 500 and a processor 501, wherein the memory 500 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 501 to implement the above-mentioned image text recognition method.

[0083] Further, Figure 5 The electronic device shown further includes a bus 502 and a communication interface 503 , and the processor 501 , the communication interface 503 and the memory 500 are connected via the bus 502 .

[0084] The memory 500 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 503 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 502 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0085] The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 500, and the processor 501 reads the information in the memory 500 and completes the steps of the method of the above embodiment in combination with its hardware.

[0086] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned image text recognition method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0087] The computer program product for performing the image text recognition method provided in the embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0088] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0089] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, 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 through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0090] 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.

[0091] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0092] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0093] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for image text recognition, characterized in that: include: Obtain a picture to be identified, and determine the size of the picture to be identified; If the size is greater than a preset size threshold, the image to be identified is segmented to obtain a plurality of sub-images; wherein the sub-images include text information fragments, and there are overlapping areas of text information fragments in adjacent sub-images; Performing position information recognition on the multiple sub-pictures respectively to determine position information of text information segments included in the multiple sub-pictures; Based on the position information and the overlapping area, multiple text information fragments are spliced ​​to obtain the text information in the picture to be identified.

2. The method according to claim 1, characterized in that The step of segmenting the image to be identified to obtain a plurality of sub-images includes: The image to be identified is segmented according to a preset segmentation order and a preset segmentation size to obtain a plurality of sub-images.

3. The method according to claim 2, characterized in that The method further comprises: If there is a target sub-image whose length or width is less than a preset length threshold or width threshold, part of the previous sub-image of the target sub-image is spliced ​​with the target sub-image so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

4. The method according to claim 2, characterized in that: The method further comprises: If there is a target sub-image whose length or width is less than a preset length threshold or width threshold, the blank image is spliced ​​with the target sub-image so that the length or width of the spliced ​​target sub-image reaches the length threshold or width threshold.

5. The method according to claim 1, characterized in that If the size is greater than a preset size threshold, the image to be identified is segmented to obtain a plurality of sub-images, and the method further includes: If the size is smaller than a preset size threshold, the blank image is spliced ​​with the image to be identified so that the size of the spliced ​​image to be identified reaches the size threshold.

6. The method according to claim 1, characterized in that The step of respectively identifying the position information of the plurality of sub-pictures to determine the position information of the text information segments of the plurality of sub-pictures includes: Recognize the position information of the multiple sub-pictures respectively, and determine the position coordinates of the multiple sub-pictures in the picture to be identified; Based on the position coordinates of the multiple sub-pictures in the picture to be identified, determining the position coordinates of the text information fragments of the multiple sub-pictures in the picture to be identified; The position coordinates of the text information segments of the multiple sub-pictures in the picture to be identified are used as the position information of the text information segments of the multiple sub-pictures.

7. The method according to claim 1, characterized in that The step of combining the plurality of text information segments based on the position information and the overlapping area to obtain the text information in the image to be identified includes: Determining overlapping text in the overlapping area based on the position information; Based on the overlapping texts, multiple text information fragments are spliced ​​to obtain text information in the image to be identified.

8. A device for image text recognition, characterized in that: include: A size determination module, used to obtain a picture to be identified and determine the size of the picture to be identified; A module for segmenting the image to be identified, for segmenting the image to be identified into a plurality of sub-images if the size is greater than a preset size threshold; wherein the sub-images include text information fragments, and there are overlapping areas of text information fragments in adjacent sub-images; A position information identification module, used to identify the position information of the multiple sub-pictures respectively, and determine the position information of the text information fragments included in the multiple sub-pictures; The text information fragment splicing module is used to splice the multiple text information fragments based on the position information and the overlapping area to obtain the text information in the picture to be identified.

9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the image text recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the image text recognition method according to any one of claims 1 to 7.