CN115187988A - Regional text recognition method and device, electronic equipment and storage medium - Google Patents

Regional text recognition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115187988A
CN115187988A CN202210706700.7A CN202210706700A CN115187988A CN 115187988 A CN115187988 A CN 115187988A CN 202210706700 A CN202210706700 A CN 202210706700A CN 115187988 A CN115187988 A CN 115187988A
Authority
CN
China
Prior art keywords
image
area
target
determining
recognition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210706700.7A
Other languages
Chinese (zh)
Inventor
孙铁
苏志锋
王琳婧
苏沁宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202210706700.7A priority Critical patent/CN115187988A/en
Publication of CN115187988A publication Critical patent/CN115187988A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/1444Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
    • G06V30/1448Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields based on markings or identifiers characterising the document or the area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/20Combination of acquisition, preprocessing or recognition functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/418Document matching, e.g. of document images

Landscapes

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

Abstract

The embodiment of the application discloses a method and a device for identifying regional texts, electronic equipment and a storage medium. The method comprises the following steps: the electronic equipment acquires an image to be identified and determines a target identification area and an area to be processed in the image to be identified; determining an image in the target identification area as a target image, and performing text identification on the target image to obtain a first identification result; responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation; and performing text recognition on the marked image to obtain a second recognition result. The regional text recognition method recognizes partial contents in the image to be recognized, and improves recognition efficiency of text recognition.

Description

Regional text recognition method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for recognizing a region text, an electronic device, and a storage medium.
Background
In the prior art, in a text recognition process, a whole page image is often recognized, so as to obtain text contents therein.
However, in some text recognition scenarios, a user often only needs to recognize a part of the content in the image, and if the user directly recognizes the whole page of image, the text recognition time is too long, so that the text recognition efficiency is low.
Disclosure of Invention
The embodiment of the application provides a regional text recognition method and device, electronic equipment and a storage medium. The regional text recognition method can improve the recognition efficiency of text recognition.
In a first aspect, an embodiment of the present application provides a method for recognizing a region text, including:
acquiring an image to be recognized, and determining a target recognition area and an area to be processed in the image to be recognized;
determining an image in the target recognition area as a target image, and performing text recognition on the target image to obtain a first recognition result;
responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation;
and performing text recognition on the marked image to obtain a second recognition result.
In a second aspect, an embodiment of the present application provides an apparatus for recognizing regional text, including:
the determining module is used for acquiring an image to be recognized and determining a target recognition area and an area to be processed in the image to be recognized;
the first identification module is used for determining the image in the target identification area as a target image and performing text identification on the target image to obtain a first identification result;
the marking module is used for responding to the marking operation corresponding to the input image of the area to be processed and determining a marking image in the image corresponding to the area to be processed according to the marking operation;
and the second identification module is used for performing text identification on the marked image to obtain a second identification result.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory storing executable program code, a processor coupled to the memory; the processor calls the executable program codes stored in the memory to execute the steps in the region text recognition method provided by the embodiment of the application.
In a fourth aspect, an embodiment of the present application provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor, so as to implement the steps in the area text recognition method provided in the embodiment of the present application.
In the embodiment of the application, the electronic equipment acquires an image to be identified and determines a target identification area and an area to be processed in the image to be identified; determining an image in the target recognition area as a target image, and performing text recognition on the target image to obtain a first recognition result; responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation; and performing text recognition on the marked image to obtain a second recognition result. The regional text recognition method recognizes partial contents in the image to be recognized, and improves recognition efficiency of text recognition.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first flowchart of a region text recognition method according to an embodiment of the present application.
Fig. 2 is a second flowchart of a region text recognition method according to an embodiment of the present application.
Fig. 3 is a schematic view of a text recognition scenario provided in an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an area text recognition apparatus according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, in the process of text recognition, the whole page image is often recognized, so as to obtain the text content therein.
However, in some text recognition scenarios, a user often only needs to recognize a part of the content in the image, and if the user directly recognizes the whole page of image, the text recognition time is too long, so that the text recognition efficiency is low.
In order to solve the technical problem, embodiments of the present application provide a method and an apparatus for recognizing a regional text, an electronic device, and a storage medium. The regional text recognition method can improve the recognition efficiency of text recognition.
Referring to fig. 1, fig. 1 is a first flowchart of a method for recognizing a regional text according to an embodiment of the present application. The region text recognition method may include the steps of:
110. and acquiring an image to be recognized, and determining a target recognition area and an area to be processed in the image to be recognized.
In some embodiments, the electronic device may determine an area containing preset mark content in the image to be recognized; and determining an area containing preset mark content as a target identification area and determining an area not containing the preset mark content as an area to be processed in the image to be identified.
The preset mark content may be highlight mark content or content containing preset position information.
In some embodiments, the electronic device may determine highlight marker content in the image to be recognized; and determining the area corresponding to the highlight mark content as the area containing the preset mark content.
The highlight mark content may be content that has been marked manually or by a computer in the image to be identified, and the area corresponding to the highlight mark content may be an area that is different from the colors of other areas, for example, the area corresponding to the highlight mark content is yellow, and the colors of the other areas are white.
In some embodiments, the preset mark content may be content corresponding to an area including preset position information. The electronic device may determine preset position information in the image to be recognized, and then determine an area corresponding to the preset position information as an area containing preset mark content.
Before determining the target recognition area and the to-be-processed area in the to-be-recognized image, the electronic device may determine a type of the to-be-recognized image, for example, the type of the to-be-recognized image may be a service ticket type, a certificate type, or the like. The image can be different types of images such as a bank business bill, an identity card, a passport, a bank card and the like.
And then the electronic equipment determines the preset position information corresponding to the image to be recognized according to the type of the image to be recognized. For example, the electronic device may compare the type of the image to be recognized with the preset image type database, so as to determine a target preset image type that is the same as the type of the image to be recognized, determine preset position information corresponding to the target preset image type, and then determine the preset position information corresponding to the target preset image type as the preset position information corresponding to the image to be recognized.
It should be noted that the preset location information may be understood as location information corresponding to a specific area, for example, the specific area may be an area containing important text, for example, when the image to be identified is a banking order image, content contained in the area corresponding to the preset location information is agreement content between the user and a bank, or signature content of the user.
In some embodiments, for different image types, corresponding location information may be preset, for example, the preset location information corresponding to the image of the certificate type may be location information of an area where content such as a name and a certificate number is located.
And regarding the area not containing the preset mark content as the area to be processed of the image to be identified. The pending area may contain other textual content. For example, when the type of the image to be recognized is a certificate type, the content corresponding to the area to be processed may be the content of a certificate issuing authority or the like.
120. And determining the image in the target recognition area as a target image, and performing text recognition on the target image to obtain a first recognition result.
In some embodiments, the electronic device may determine the image in the target recognition area as the target image, and the electronic device may perform text recognition on the target image in the target recognition area by using a text recognition model, so as to determine the first recognition result.
For example, the electronic device cuts an image corresponding to a target recognition area in an image to be recognized, so as to obtain a target image, inputs the target image into a text recognition model, and recognizes a target graph through the text recognition model, so as to obtain a first recognition result.
In some embodiments, after obtaining the first recognition result, the electronic device may display the first recognition result to the user, and when the user selects an incorrect recognized text from the first recognition result, determine a first image corresponding to the incorrect recognized text in the target image, and then recognize the first image, so as to obtain a re-recognition result corresponding to the first image. Therefore, re-recognition of the whole target image is avoided, and the efficiency of text recognition is improved.
In some embodiments, when the target identification area is a plurality of areas, the electronic device may determine a priority corresponding to each target identification area; sequencing the target identification areas from high to low according to the priority to obtain a sequencing result; and identifying the target image corresponding to each target identification area according to the sequencing result to obtain a first identification result.
Specifically, the electronic device may obtain an area corresponding to each target identification region, and then determine a priority corresponding to each target identification region according to the area, where the larger the area is, the lower the priority is.
For example, the electronic device may determine to sort the plurality of target identification regions according to a sorting manner from large to small of the priority level corresponding to each target identification region, so as to obtain a sorting result, and the electronic device may identify the target identification region with a high priority level. That is, the electronic device can recognize a target recognition area having a small area first, thereby increasing the recognition speed.
In some embodiments, when the computing power of the electronic device is sufficient, the electronic device may simultaneously recognize a plurality of target recognition areas, thereby obtaining a first recognition result.
130. And responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation.
In some embodiments, after the electronic device identifies the first target identification result corresponding to the target identification area, the user may further need to identify other content in the image to be identified, and the user may mark the area to be processed, where text identification is not performed, so as to obtain a corresponding marked image in the area to be processed.
For example, if the to-be-processed area includes date information, the user may mark the date information, for example, by using a plurality of marking methods, such as highlighting, text box, and line marking, to mark the to-be-processed area, so as to obtain a marked image.
Or, when the electronic device has a touch function, the to-be-processed area may be marked in a manner of touch by a finger of the user, for example, the to-be-processed area is marked at a position touched by the finger of the user, or the to-be-processed area is marked by a gesture of the user, so as to obtain a marked image.
140. And performing text recognition on the marked image to obtain a second recognition result.
In some embodiments, the electronic device may perform text recognition on the marked image by using a text recognition model, so as to determine the second recognition result.
After the second recognition result is obtained, the electronic device may show the second recognition result to the user, and when the user selects an incorrect recognized text from the second recognition result, a second image corresponding to the incorrect recognized text is determined in the marked image, and then the second image is recognized, so that a re-recognition result corresponding to the second image is obtained. Therefore, re-recognition of the whole marked image is avoided, and the efficiency of text recognition is improved.
In the embodiment of the application, the electronic equipment acquires the image to be identified and determines a target identification area and an area to be processed in the image to be identified; determining an image in the target recognition area as a target image, and performing text recognition on the target image to obtain a first recognition result; responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation; and performing text recognition on the marked image to obtain a second recognition result. The area text recognition method recognizes the part of the content to be recognized in the image to be recognized, and improves the recognition efficiency of text recognition.
In order to understand the method for recognizing a regional text provided in the embodiment of the present application, please continue to refer to fig. 2, where fig. 2 is a second flowchart of the method for recognizing a regional text provided in the embodiment of the present application. The region text recognition method may include the steps of:
201. and acquiring an original image, and correcting image parameters and direction information of the original image to obtain an image to be identified.
In some embodiments, after the electronic device obtains the original image, the original image may be preprocessed to obtain a preprocessed image, which is more favorable for text recognition. The original image may be a different type of image such as a banking order, a document, a photograph, etc.
The original image may be an image of a different format type, for example, the original image may be an image of a different format such as pdf format, peg format, etc.
In some embodiments, the electronic device may obtain a file format of an original image, and convert the file format of the original image into a preset file format to obtain an original image to be processed; and then preprocessing the original image to be processed to obtain a preprocessed image.
For example, the original image is an image in pdf format, and the original image may be converted into an image in jpg format, where the image in jpg format is the original image to be processed.
Then, the electronic device may adjust an image direction and an image parameter of the original image to be processed to obtain an image to be recognized.
Specifically, the electronic device may adjust an image direction of the original image to be processed to a preset direction to obtain the first image. For example, the electronic device may rotate the original image to be processed, so that the direction of the original image to be processed is a preset direction, and a first image is obtained.
The image parameters may include brightness and contrast, and the electronic device may adjust the brightness and/or contrast of the first image to obtain the image to be recognized. For example, when the brightness of the first image is too bright or too dark, the recognition of the text recognition model on the first image is not facilitated, and at this time, the brightness of the first image may be adjusted to be the preset normal brightness, so as to obtain the image to be recognized, which is more favorable for text recognition.
For another example, when the text in the first image is not clear enough, the contrast can be adjusted to further highlight the difference between the text and the background. For example, if the background in the first image is white and the text is black, the contrast can be adjusted such that white is whiter and black is blacker in the background. Thereby obtaining the image to be recognized which is more beneficial to text recognition.
It should be noted that, in the embodiment of the present application, the first image may be adjusted in a single manner, for example, only by brightness adjustment. The first image may also be adjusted in a number of ways, such as using contrast and brightness to adjust the image together.
The image parameters may include other parameters such as a degree of sharpening, a color temperature, a color, and the like, in addition to contrast and brightness. The electronic device can adjust the first image by adopting various image parameters, so as to obtain the image to be identified.
202. And determining an area containing the content of the preset mark in the image to be recognized.
The preset mark content may be highlight mark content or content containing preset position information.
In some embodiments, the electronic device may determine highlight marker content in the image to be recognized; and determining the area corresponding to the highlight mark content as the area containing the preset mark content.
The highlight mark content may be content that has been marked manually or by a computer in the image to be identified, and the area corresponding to the highlight mark content may be an area that is different from colors of other areas, for example, the area corresponding to the highlight mark content is yellow, and the colors of the other areas are white.
In some embodiments, the preset mark content may be content corresponding to an area including preset position information. The electronic device may determine preset position information in the image to be recognized, and then determine an area corresponding to the preset position information as an area containing preset mark content.
Before determining the target recognition area and the to-be-processed area in the image to be recognized, the electronic device may determine a type of the image to be recognized, for example, the type of the image to be recognized may be a service ticket type, a certificate type, or the like. The image can be different types of images such as a bank business bill, an identity card, a passport, a bank card and the like.
And then the electronic equipment determines the preset position information corresponding to the image to be recognized according to the type of the image to be recognized. For example, the electronic device may compare the type of the image to be recognized with the preset image type database, so as to determine a target preset image type that is the same as the type of the image to be recognized, determine preset position information corresponding to the target preset image type, and then determine preset position information corresponding to the target preset image type as the preset position information corresponding to the image to be recognized.
It should be noted that the preset position information may be understood as position information corresponding to a specific area, for example, the specific area may be an area containing important text, for example, when the image to be recognized is a banking order image, content contained in the area corresponding to the preset position information is agreement content between the user and a bank, or signature content of the user.
In some embodiments, for different image types, corresponding location information may be preset, for example, the preset location information corresponding to the image of the certificate type may be location information of an area where content such as a name and a certificate number is located.
In some embodiments, the preset mark content may also be a preset pattern or icon, for example, in some banking tickets, a corresponding pattern is often set in some signature areas, the pattern may be set as the preset mark content, and when the preset mark content is recognized by the electronic device, an area corresponding to the preset mark content is determined as the target recognition area.
203. And determining an area containing preset mark content as a target identification area and determining an area not containing the preset mark content as an area to be processed in the image to be identified.
In some embodiments, after the electronic device determines the preset mark content included in the image to be recognized, the electronic device may determine a region corresponding to the preset mark content as the target recognition region, and set a region not including the preset mark content in the image to be recognized as the region to be processed.
And regarding the area not containing the preset mark content as the area to be processed of the image to be identified. The region to be processed may contain other text content. For example, when the type of the image to be recognized is a certificate type, the content corresponding to the region to be processed may be the content of a certificate issuing authority or the like.
204. And determining the corresponding priority of each target identification area.
In some embodiments, when the target identification area is a plurality of areas, the electronic device may determine a priority corresponding to each target identification area.
Specifically, the electronic device may obtain an area corresponding to each target identification region, and then determine a priority corresponding to each target identification region according to the area, where the larger the area is, the lower the priority is.
For example, if the area corresponding to the target recognition area a is 50 and the area corresponding to the target recognition area B is 40, the priority of the target recognition area a is lower than that of the target recognition area B.
205. And sequencing the target identification areas according to the priority from high to low to obtain a sequencing result.
For example, the electronic device may determine to sort the plurality of target identification regions according to a sorting manner from large to small of the priority level corresponding to each target identification region, so as to obtain a sorting result, and the electronic device may identify the target identification region with a high priority level.
206. And identifying the target image corresponding to each target identification area according to the sequencing result to obtain a first identification result.
In some embodiments, if there are two target identification areas with the same corresponding priority, the electronic device may identify the two target identification areas with the same priority at the same time, so as to obtain identification results corresponding to the two target identification areas respectively.
In some embodiments, when the computing power of the electronic device is sufficient, the electronic device may simultaneously identify a plurality of target identification areas with different priorities, thereby obtaining a first identification result.
In some embodiments, the electronic device may identify the target image corresponding to each target identification area according to the sorting result, to obtain a first identification result.
207. And responding to the marking operation corresponding to the input image of the area to be processed to determine a marking image in the area to be processed.
In some embodiments, after the electronic device identifies the first target identification result corresponding to the target identification area, and the user may need to identify other content in the image to be identified, the user may mark the area to be processed, where text identification is not performed, so as to obtain a corresponding marked image in the area to be processed.
For example, if the to-be-processed area includes date information, the user may mark the date information, for example, by using a plurality of marking methods, such as highlighting, text box, and line marking, to mark the to-be-processed area, so as to obtain a marked image.
Or, when the electronic device has a touch function, the to-be-processed area may be marked in a manner of finger touch by the user, for example, the to-be-processed area is marked at a position touched by the finger of the user, or the to-be-processed area is marked by a gesture of the user, so as to obtain a marked image.
208. And identifying the marked image to obtain a second identification result.
In some embodiments, the electronic device may perform text recognition on the tagged image using a text recognition model to determine the second recognition result.
After the second recognition result is obtained, the electronic device may show the second recognition result to the user, and when the user selects an incorrect recognized text from the second recognition result, a second image corresponding to the incorrect recognized text is determined in the marked image, and then the second image is recognized, so that a re-recognition result corresponding to the second image is obtained. Therefore, re-recognition of the whole marked image is avoided, and the efficiency of text recognition is improved.
In the embodiment of the application, the electronic device corrects the image parameters and the direction information of the original image by acquiring the original image, so as to obtain the image to be identified. Determining an area containing preset mark content in the image to be recognized, then determining the area containing the preset mark content in the image to be recognized as a target recognition area, and determining the area not containing the preset mark content as an area to be processed.
And then determining the corresponding priority of each target identification area, and sequencing the target identification areas from high to low according to the priority to obtain a sequencing result. And identifying the target image corresponding to each target identification area according to the sequencing result to obtain a first identification result. And finally, responding to the marking operation corresponding to the input image of the area to be processed to determine the marking image in the area to be processed, and identifying the marking image to obtain a second identification result.
Therefore, the content needing to be identified in the image to be identified is identified, the image to be identified in the whole page is prevented from being identified, and the text identification efficiency of the electronic equipment is improved.
Referring to fig. 3, fig. 3 is a scene schematic diagram of a region text recognition method according to an embodiment of the present application.
Wherein, S1 is a target image corresponding to the target identification area, and S11 is preset mark content. And S2, marking the marked image for the user.
After the electronic device acquires the image to be recognized, the electronic device may recognize the preset mark content of the image to be recognized. For example, if the preset mark content is the pattern S11, the area corresponding to the pattern S11 is determined as the target identification area, and then the image corresponding to the target identification area is determined as the target image S1. The electronic equipment identifies the target image S1 to obtain a first identification result.
The user may mark a to-be-processed region, which does not include preset mark content, in the to-be-recognized image, to obtain a mark image, such as the mark image S2 in fig. 3, and then the electronic device performs text recognition on the mark image S2, so as to obtain a second recognition result.
In the embodiment of the application, the content needing to be identified in the image to be identified is identified, and the image to be identified in the whole page is prevented from being identified, so that the text identification efficiency of the electronic equipment is improved.
Correspondingly, an embodiment of the present application further provides a device for recognizing a regional text, as shown in fig. 4, fig. 4 is a schematic structural diagram of the device for recognizing a regional text provided in the embodiment of the present application. The region text recognition apparatus may include:
the determining module 310 is configured to acquire an image to be recognized, and determine a target recognition area and an area to be processed in the image to be recognized.
A determining module 310, further configured to obtain an original image; and correcting the image parameters and the direction information of the original image to obtain an image to be identified.
The determining module 310 is further configured to determine an area containing preset mark content in the image to be recognized;
and determining an area containing preset mark content as a target identification area and determining an area not containing the preset mark content as an area to be processed in the image to be identified.
The preset mark content comprises highlight mark content, and the determining module 310 is further configured to determine the highlight mark content in the image to be identified; and determining the area corresponding to the highlight mark content as the area containing the preset mark content.
The preset mark content comprises content corresponding to an area containing preset position information, and the determining module 310 is further configured to determine the preset position information in the image to be identified; and determining the area corresponding to the preset position information as the area containing the preset mark content.
The first recognition module 320 is configured to perform text recognition on the target image in the target recognition area to obtain a first recognition result.
The first identification module 320 is further configured to determine a priority corresponding to each target identification area;
sequencing the target identification areas from high to low according to the priority to obtain a sequencing result;
and identifying the target image corresponding to each target identification area according to the sequencing result to obtain a first identification result.
The first identification module 320 is further configured to obtain an area corresponding to each target identification area;
and determining the priority corresponding to each target identification area according to the area, wherein the higher the area is, the lower the priority is.
The marking module 330 is configured to determine a marking image in the region to be processed in response to a marking operation corresponding to the input region to be processed image.
The second recognition module 340 is configured to recognize the marked image to obtain a second recognition result.
In the embodiment of the application, the electronic equipment acquires an image to be identified and determines a target identification area and an area to be processed in the image to be identified; determining an image in the target recognition area as a target image, and performing text recognition on the target image to obtain a first recognition result; responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation; and performing text recognition on the marked image to obtain a second recognition result. The regional text recognition method recognizes the contents to be recognized in the image to be recognized, and improves the recognition efficiency of text recognition.
Accordingly, an electronic device may include, as shown in fig. 5, a memory 401 including one or more computer-readable storage media, an input unit 402, a display unit 403, a sensor 404, a processor 405 including one or more processing cores, and a power supply 406. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the memory 401 may be used to store software programs and modules, and the processor 405 executes various functional applications and data processing by operating the software programs and modules stored in the memory 401. The memory 401 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 401 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 401 may further include a memory controller to provide the processor 405 and the input unit 402 with access to the memory 401.
The input unit 402 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, input unit 402 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 405, and can receive and execute commands sent by the processor 405. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 402 may include other input devices in addition to a touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 403 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 403 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 405 to determine the type of touch event, and then the processor 405 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 5 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The electronic device may also include at least one sensor 404, such as a light sensor, motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when the motion sensor is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of electronic equipment, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured, the description thereof is omitted here.
The processor 405 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 401 and calling data stored in the memory 401, thereby performing overall monitoring of the electronic device. Optionally, processor 405 may include one or more processing cores; preferably, the processor 405 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 405.
The electronic device also includes a power source 406 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 405 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 406 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 405 in the electronic device loads the computer program stored in the memory 401, and the processor 405 implements various functions by loading the computer program:
acquiring an image to be recognized, and determining a target recognition area and an area to be processed in the image to be recognized;
determining an image in the target identification area as a target image, and performing text identification on the target image to obtain a first identification result;
responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation;
and performing text recognition on the marked image to obtain a second recognition result.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the area text recognition methods provided in the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring an image to be recognized, and determining a target recognition area and an area to be processed in the image to be recognized;
determining an image in the target recognition area as a target image, and performing text recognition on the target image to obtain a first recognition result;
responding to the marking operation corresponding to the input image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation;
and performing text recognition on the marked image to obtain a second recognition result.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any region text recognition method provided in the embodiments of the present application, beneficial effects that can be achieved by any region text recognition method provided in the embodiments of the present application may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The method, the apparatus, the electronic device, and the storage medium for recognizing the regional text provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for recognizing regional text, comprising:
acquiring an image to be recognized, and determining a target recognition area and an area to be processed in the image to be recognized;
determining the image in the target recognition area as a target image, and performing text recognition on the target image to obtain a first recognition result;
responding to the input marking operation corresponding to the image of the area to be processed, and determining a marking image in the image corresponding to the area to be processed according to the marking operation;
and performing text recognition on the marked image to obtain a second recognition result.
2. The method for recognizing regional text according to claim 1, wherein the acquiring the image to be recognized comprises:
acquiring an original image;
and correcting the image parameters and the direction information of the original image to obtain the image to be identified.
3. The method for recognizing regional text according to claim 1, wherein the determining the target recognition region and the region to be processed in the image to be recognized comprises:
determining an area containing preset mark contents in the image to be recognized;
and determining the area containing the preset mark content as the target identification area and determining the area not containing the preset mark content as the area to be processed in the image to be identified.
4. The method for recognizing regional text according to claim 3, wherein the preset mark content comprises highlight mark content, and the determining the region containing the preset mark content in the image to be recognized comprises:
determining the content of the highlight mark in the image to be identified;
and determining the area corresponding to the highlight mark content as the area containing the preset mark content.
5. The method for recognizing regional text according to claim 3, wherein the preset mark content includes content corresponding to a region including preset position information, and determining the region including the preset mark content in the image to be recognized includes:
determining preset position information in the image to be identified;
and determining the area corresponding to the preset position information as the area containing the preset mark content.
6. The method for recognizing regional text according to claim 1, wherein the number of the target recognition regions is multiple, and performing text recognition on the target image in the target recognition region to obtain a first recognition result includes:
determining the priority corresponding to each target identification area;
sequencing the target identification areas according to the priority from high to low to obtain a sequencing result;
and identifying the target image corresponding to each target identification area according to the sequencing result to obtain the first identification result.
7. The method of claim 6, wherein the determining the priority corresponding to each of the target recognition areas comprises:
acquiring the area corresponding to each target identification area;
and determining the priority corresponding to each target identification area according to the area, wherein the higher the area is, the lower the priority is.
8. An area text recognition apparatus, comprising:
the device comprises a determining module, a processing module and a processing module, wherein the determining module is used for acquiring an image to be identified and determining a target identification area and an area to be processed in the image to be identified;
the first identification module is used for determining the image in the target identification area as a target image and performing text identification on the target image to obtain a first identification result;
the marking module is used for responding to the input marking operation corresponding to the image of the area to be processed and determining a marking image in the image corresponding to the area to be processed according to the marking operation;
and the second identification module is used for performing text identification on the marked image to obtain a second identification result.
9. An electronic device, comprising:
a memory storing executable program code, a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the steps in the region text recognition method according to any one of claims 1 to 7.
10. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the method for region text recognition according to any one of claims 1 to 7.
CN202210706700.7A 2022-06-21 2022-06-21 Regional text recognition method and device, electronic equipment and storage medium Pending CN115187988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210706700.7A CN115187988A (en) 2022-06-21 2022-06-21 Regional text recognition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210706700.7A CN115187988A (en) 2022-06-21 2022-06-21 Regional text recognition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115187988A true CN115187988A (en) 2022-10-14

Family

ID=83514812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210706700.7A Pending CN115187988A (en) 2022-06-21 2022-06-21 Regional text recognition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115187988A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115761311A (en) * 2022-11-03 2023-03-07 广东科力新材料有限公司 Performance detection data analysis method and system of PVC calcium zinc stabilizer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115761311A (en) * 2022-11-03 2023-03-07 广东科力新材料有限公司 Performance detection data analysis method and system of PVC calcium zinc stabilizer

Similar Documents

Publication Publication Date Title
US11262895B2 (en) Screen capturing method and apparatus
CN109684980B (en) Automatic scoring method and device
CN107395871B (en) Method and device for opening application, storage medium and terminal
KR20190021146A (en) Method and device for translating text displayed on display
CN111353458B (en) Text box labeling method, device and storage medium
KR101474856B1 (en) Apparatus and method for generateg an event by voice recognition
JP2011221604A (en) Handwriting data management system, handwriting data management program, and handwriting data management method
US20150002431A1 (en) Method and apparatus for operating lock screen of electronic device
US11366888B2 (en) Electronic device using a fingerprint sensor included in a display of the electronic device and controlling method thereof
US11216154B2 (en) Electronic device and method for executing function according to stroke input
US20240045587A1 (en) Electronic device and method for processing handwriting input thereof
US10204257B2 (en) Display apparatus and display method
KR102147086B1 (en) Apparatus and method for verifying handwritten signature
CN115187988A (en) Regional text recognition method and device, electronic equipment and storage medium
KR20190093003A (en) Apparatus and method for recognizing of fingerprint
KR102621809B1 (en) Electronic device and method for displaying screen via display in low power state
CN115187987A (en) Method and device for recognizing text outside special area, electronic equipment and storage medium
CN106886351B (en) Display method and device of terminal time information and computer equipment
CN115188001A (en) Handwritten text recognition method and device, electronic equipment and storage medium
CN115188003A (en) Model-based text recognition method and device, electronic equipment and storage medium
US11372498B2 (en) Electronic device for supporting user input and control method of electronic device
CN115187986A (en) Text recognition method and device, electronic equipment and storage medium
KR102569170B1 (en) Electronic device and method for processing user input based on time of maintaining user input
KR102468082B1 (en) Correction method for handwriting input, electronic device and storage medium therefor
CN115188012A (en) Text recognition model updating method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination