Image processing method, system, storage medium and electronic device
By text recognition and proportion analysis of the page images collected by the camera device, it is possible to accurately determine whether the page exceeds the field of view of the camera device, which solves the problem of insufficient accuracy in the existing technology and improves work efficiency and user experience.
Patent Information
- Application Number
- CN202211398986.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2042-11-09
AI Technical Summary
When the prior art recognizes the position of the paper or page printed with text, it is impossible to accurately determine whether the page exceeds the field of view of the photography equipment and is susceptible to interference from blank areas at the edge of the page, resulting in insufficient accuracy and affecting work efficiency.
By obtaining the page image collected by the camera device and text recognition, all the text content contained in the page image and the text content of the boundary area of the current page are obtained. Based on the proportion information of these two text contents, it is determined whether the current page exceeds the field of view of the camera device, and if necessary, a reminder message is issued or the shooting angle of the camera device is adjusted.
The accuracy of page position judgment is improved, interference with blank areas at the edge of the page is eliminated, and problems such as decreased work efficiency and poor user experience due to inaccurate judgment are avoided.
Smart Images

Figure CN115866147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of text detection, and in particular, to an image processing method, system, storage medium, and electronic device. Background Art
[0002] With the development of educational intelligence, the intelligent application of paper products such as books has been increasingly widely developed and applied to various products. Among them, the scanning and extraction of text content in books or pages have also gradually become intelligent. For example, when using a camera device to extract text content, it is necessary to intelligently identify the position of the book or page so that the text content therein can be completely extracted.
[0003] In traditional technologies, the intelligent identification of the position of a book or page is usually based on the position of the page edge in the image, and it is impossible to judge the degree of influence of the page edge exceeding situation. For example, when there is a blank area at the page edge, a slight exceeding of the page edge beyond the field of view will not affect the extraction of text content. Therefore, using traditional technologies for intelligent identification is often not flexible enough and the accuracy is insufficient, thus affecting work efficiency. Summary of the Invention
[0004] In view of this, the embodiments of the present application are committed to providing an image processing method, system, storage medium, and electronic device to solve the problem in the prior art that when identifying the position of a paper surface or page printed with text, the judgment accuracy of whether the page exceeds the field of view of the camera device is insufficient and it is easily interfered by the blank area at the page edge.
[0005] On the one hand, the present application provides an image processing method, including: obtaining a page image of the current page of a target book collected by a camera device; when it is determined based on the page image that the current page is suspected of exceeding the field of view of the camera device, performing text recognition on the page image to obtain first text content included in the page image; obtaining second text content of the current page of the target book; and determining whether the current page exceeds the field of view of the camera device based on the first text content and the second text content.
[0006] In combination with the first aspect, in some implementation manners of the first aspect, the first text content is all the text content included in the page image, and the second text content is the text content of the boundary area of the current page. Determining whether the current page exceeds the field of view of the camera device based on the first text content and the second text content includes: determining the proportion information of the text content of the boundary area of the current page in all the text content included in the page image based on all the text content included in the page image and the text content of the boundary area of the current page; and determining whether the current page exceeds the field of view of the camera device based on the proportion information.
[0007] In combination with the first aspect, in some implementations of the first aspect, the boundary area of the current page includes the area between the body area of the current page and the page edge of the current page.
[0008] In combination with the first aspect, in some implementations of the first aspect, when it is determined, based on the page image, that the current page is suspected of exceeding the field of view of the imaging device, before performing optical character recognition on the page image to obtain the first text content included in the page image, it further includes: determining, based on the page image, the minimum distance between the page edge of the current page and the image edge of the page image; determining, based on the page image, the longest side of the image edge of the page image; and determining whether the current page is suspected of exceeding the field of view of the imaging device based on the ratio between the minimum distance and the longest side.
[0009] In combination with the first aspect, in some implementations of the first aspect, after determining whether the current page exceeds the field of view of the imaging device based on the first text content and the second text content, the method further includes: when it is determined that the current page exceeds the field of view of the imaging device, sending a reminder message so that the user can adjust the placement position of the current page based on the reminder message.
[0010] In combination with the first aspect, in some implementations of the first aspect, after determining whether the current page exceeds the field of view of the imaging device based on the first text content and the second text content, the method further includes: when it is determined that the current page exceeds the field of view of the imaging device, for each side of the page image, determining the text content of the boundary area corresponding to each side in the page image; determining, based on the second text content, the text content of the boundary area corresponding to each side in the second text content; determining the proportion information of the text content of the boundary area corresponding to each side in the page image in the text content of the boundary area corresponding to each side in the second text content; and adjusting the shooting angle of the imaging device based on the proportion information corresponding to each side of the page image so that the current page falls within the field of view of the imaging device.
[0011] In combination with the first aspect, in some implementations of the first aspect, the target book includes multiple pages. Before obtaining the second text content of the current page of the target book, the method further includes: obtaining the page images of the multiple pages respectively; performing optical character recognition on the page images of the multiple pages respectively to obtain the second text content of the multiple pages respectively; and storing the page images of the multiple pages and the second text content of the multiple pages respectively.
[0012] In a second aspect, an embodiment of the present application provides an image processing system, including: a first acquisition module configured to acquire a page image of the current page of a target book collected by an imaging device; an identification module configured to perform optical character recognition on the page image to obtain first text content included in the page image when it is determined based on the page image that the current page is suspected of exceeding the field of view of the imaging device; a second acquisition module configured to acquire second text content of the current page of the target book; and a determination module configured to determine whether the current page exceeds the field of view of the imaging device based on the first text content and the second text content.
[0013] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including computer-executable instructions stored thereon, and the executable instructions, when executed by a processor, implement the method mentioned in the first aspect above.
[0014] In a fourth aspect, an embodiment of the present application provides an electronic device, including: a processor configured to execute the method mentioned in the first aspect above; and a memory configured to store processor-executable instructions.
[0015] In the image processing method according to the embodiments of the present application, by judging whether the page position exceeds the field of view of the imaging device through text content, interference caused by blank areas at the page edges during determining the page placement position can be excluded, the accuracy is improved, and problems such as decreased user work efficiency and poor user experience effect caused by inaccurate judgment of the page placement position are avoided. Description of the Drawings
[0016] Figure 1 The figure shows a schematic diagram of an operating machine usage scenario provided by an embodiment of the present application.
[0017] Figure 2 The figure shows a schematic flowchart of an image processing method provided by an embodiment of the present application.
[0018] Figure 3 The figure shows a schematic diagram of the boundary area of the current page provided by an embodiment of the present application.
[0019] Figure 4 The figure shows a schematic flowchart of an image processing method provided by another embodiment of the present application.
[0020] Figure 5 The figure shows a schematic diagram of a page image of the current page provided by another embodiment of the present application.
[0021] Figure 6 The figure shows a schematic flowchart of an image processing method provided by another embodiment of the present application.
[0022] Figure 7 The figure shows a schematic flowchart of an image processing method provided by another embodiment of the present application.
[0023] Figure 8 The figure shows a schematic flowchart of an image processing method provided by another embodiment of the present application.
[0024] Figure 9 The figure shows a schematic flowchart of an image processing method provided by another embodiment of the present application.
[0025] Figure 10 The figure shows a schematic structural diagram of an image processing system provided by an embodiment of the present application.
[0026] Figure 11 The figure shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0027] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0028] Overview of the Application
[0029] With the development of text recognition technology, this technology is increasingly applied to the field of intelligent education, such as intelligent learning machines, homework machines, etc. The homework machine is mainly used to analyze the learning situation of students' homework based on artificial intelligence and big data technologies. During the teacher's grading process, it is necessary to obtain the homework image in real time to analyze the homework content in combination with text recognition and text detection. In a working scenario of a homework machine, when the teacher does not place the homework book in the correct position so that it is completely within the field of view of the camera device, the homework machine cannot completely extract the effective information in the homework book, thus affecting the normal operation of the homework machine. When correcting the placement position of the homework book, the teacher is usually reminded.
[0030] In the traditional technology, when the edge of the textbook page exceeds the field of view of the camera device, it is considered that the placement position of the page exceeds the field of view. Only when the teacher places the entire page within the field of view of the camera device is it considered that the placement position of the page is correct, and the homework machine can work normally; however, in many cases, there is a large blank area at the edge of the textbook page. Even if it exceeds the field of view of the camera device, it does not affect the homework machine's extraction of the effective information in the page. But at this time, the traditional homework machine still needs to adjust the page to be completely within the field of view of the camera device before it can continue to work, and the work efficiency is greatly affected. Therefore, when using the traditional technology to judge the placement position of the page, it often cannot meet the requirements of actual work for accuracy, resulting in the problem of reduced work efficiency due to insufficient accuracy.
[0031] To solve the problem of insufficient accuracy and susceptibility to interference from the blank area at the page edge in the above-mentioned traditional technology when judging whether the page placement position exceeds the visual field range, an embodiment of the present application provides an image processing method.
[0032] Figure 1 It is a schematic diagram of the usage scenario of a working machine provided by an embodiment of the present application. As Figure 1 shown, the user collects the page image of the exercise book by placing the exercise book under the imaging device. Therefore, it is necessary to place the page in the correct placement position so that the page is within the visual field of the imaging device. When the user operates, the working machine processes the collected page image through optical character recognition technology to determine whether the current page exceeds the visual field range of the imaging device. If it exceeds the visual field range of the imaging device, a reminder message will be sent.
[0033] Figure 2 Shown is a schematic flowchart of the image processing method provided by an embodiment of the present application. Next, in combination with Figure 1 and Figure 3 , the image processing method mentioned in an embodiment of the present application shown in Figure 2 will be described in detail. The method includes the following steps.
[0034] Step S100: Obtain a page image of the current page of the target book collected by the imaging device.
[0035] It can be understood that the target book is the above-mentioned exercise book. Among them, the page image of the current page is the image of the current page of the exercise book in the visual field of the imaging device.
[0036] Exemplarily, the imaging device can be the camera of the working machine. As Figure 1 shown, placing the current page of the target book under the camera can obtain the page image of the current page.
[0037] Step S120: When it is determined based on the page image that the current page is suspected of exceeding the visual field range of the imaging device, perform optical character recognition on the page image to obtain the first text content included in the page image.
[0038] Among them, the first text content is all the text content included in the page image.
[0039] Specifically, optical character recognition includes text line detection and text line recognition to obtain all the text content included in the page image
[0040] Exemplarily, all the text content is all the recognizable characters within the page edge.
[0041] Step S140: Obtain the second text content of the current page of the target book.
[0042] Exemplarily, the user can pre-select a target book, that is, the target book is a book stored in the database of the operation machine.
[0043] Specifically, the second text content is the text content of the boundary area of the current page. The boundary area of the current page includes the area between the main text area of the current page and the page edge of the current page.
[0044] Exemplarily, as Figure 3 shown, the area between the two black borders is the boundary area of the current page.
[0045] Exemplarily, during pre-storage, an Optical Character Recognition (OCR) engine is used to recognize printed text on each page of the target book, and the picture of each page and the recognized text content are stored in the database as a pair. At the same time, the boundary area of each page is a pre-defined area, so the text content of the boundary area corresponding to the current page can be obtained and used as the second text content.
[0046] Step S160: Based on the first text content and the second text content, determine whether the current page exceeds the field of view of the imaging device.
[0047] Specifically, by obtaining the proportion information of the characters in the second text content in the characters in the first text content, it can be determined whether the current page exceeds the field of view of the imaging device.
[0048] The embodiment of the present application provides an image processing method based on the text content of the page boundary area, which can accurately determine whether the page boundary area exceeds the field of view and excludes the interference of the blank area of the page boundary.
[0049] Figure 4 The following shows a schematic flowchart of the image processing method according to another embodiment of the present application, which is extended based on the Figure 2 embodiment shown. Figure 4 Based on the embodiment shown, the following Figure 4 embodiment shown and the Figure 2 embodiment shown are emphasized. The differences between the two embodiments are described below, and the same parts will not be elaborated.
[0050] Step S162: Based on all the text content included in the page image and the text content of the boundary area of the current page, determine the proportion information of the text content of the boundary area of the current page in all the text content included in the page image.
[0051] Specifically, calculate how many characters in the text content of the boundary area of the current page are in the characters included in all the text content of the page image, and obtain the proportion information.
[0052] Exemplarily, the proportion information is the ratio of the number of characters belonging to the boundary area in all the text content included in the page image to the number of characters in the text content of the boundary area of the current page.
[0053] Step S164: Based on the proportion information, determine whether the current page exceeds the field of view of the imaging device.
[0054] Exemplarily, if the ratio in the proportion information is greater than a preset threshold, for example, 95%, it can be determined that the current page does not exceed the field of view of the imaging device; otherwise, it can be determined that the current page exceeds the field of view of the imaging device.
[0055] Through the proportion information of the boundary area characters, the information that the effective content in the boundary area exceeds the field of view can be accurately obtained, and the interference of the blank area on judging the page position is excluded.
[0056] In some embodiments of the present application, in the case where it is determined based on the page image that the current page is suspected of exceeding the field of view of the imaging device, before performing character recognition on the page image to obtain the first text content included in the page image, a rough judgment of the page position in the page image can be made. The following will be combined with Figure 5 and Figure 6 to further describe an embodiment of the present application.
[0057] Figure 6 The following shows a schematic flowchart of an image processing method according to another embodiment of the present application. Based on the embodiment shown in Figure 2 an embodiment shown in Figure 6 is extended. The following will focus on describing Figure 6 the differences between the embodiment shown in Figure 2 and the embodiment shown in
[0058] The same parts will not be described again.
[0059] Exemplarily, as shown in Figure 5 the minimum distance between the page edge of the current page and the image edge of the page image can be recognized by a target detection method, such as Faster-RCNN, etc., that is, recognize Figure 5 the minimum value of the distance between the black edge line in
[0060] Step S620: Based on the page image, determine the longest side of the image edge of the page image.
[0061] Exemplarily, as shown in Figure 5 if the page image is a rectangle, the longest side of the image edge is the long side of the rectangle, that is, the length value of the upper edge or the lower edge.
[0062] Step S640: Determine whether the current page is suspected of exceeding the field of view of the imaging device based on the ratio between the minimum distance and the longest side.
[0063] Exemplarily, calculate the ratio between the minimum distance and the longest side. If the ratio is greater than a preset threshold, such as 1 / 20, it indicates that the current page does not exceed the field of view of the imaging device; if the ratio is less than the preset threshold, such as 1 / 20, it indicates that the current page is suspected of exceeding the field of view of the imaging device.
[0064] Through the method of the embodiments of the present application, it is possible to roughly determine whether the current page exceeds the field of view of the imaging device, improve the calculation speed, and reduce unnecessary calculation work in the case where it is obvious that the field of view is not exceeded.
[0065] Figure 7 The following shows a flowchart of an image processing method according to another embodiment of the present application, which is extended based on the Figure 2 embodiment shown. Figure 7 The following embodiment will be emphasized. Figure 7 The differences between the embodiment shown in Figure 2 and the embodiment shown will be described below, and the same parts will not be elaborated.
[0066] Step S700: When it is determined that the current page exceeds the field of view of the imaging device, send a reminder message.
[0067] Exemplarily, the purpose of sending the reminder message is for the user to adjust the placement position of the current page based on the reminder message.
[0068] Specifically, the reminder message can include any one or a combination of images, sounds, and videos, and is used to prompt the user that the current page exceeds the field of view of the imaging device. When the current page moves into the field of view of the imaging device, the reminder message will no longer be sent.
[0069] Through the method of the embodiments of the present application, it is possible to timely remind the situation where the current page exceeds the field of view, so as to prevent the collected images from being unusable due to the failure to timely remind when collecting image information.
[0070] Figure 8 The following shows a flowchart of an image processing method according to another embodiment of the present application, which is extended based on the Figure 2 embodiment shown. Figure 8 The following embodiment will be emphasized. Figure 8 The differences between the embodiment shown in Figure 2 and the embodiment shown will be described below, and the same parts will not be elaborated.
[0071] Step S800: When it is determined that the current page exceeds the field of view of the imaging device, for each side of the page image, determine the text content of the boundary region corresponding to each side in the page image.
[0072] Specifically, determine the text content of the boundary region corresponding to each side in the page image from all the text content included in the page image.
[0073] Step S820: Based on the second text content, determine the text content of the boundary region corresponding to each side in the second text content.
[0074] Specifically, determine the text content of the boundary region corresponding to each side from the text content of the boundary region of the current page.
[0075] Step S840: Determine the ratio information of the text content of the boundary region corresponding to each side in the page image in the text content of the boundary region corresponding to each side in the second text content.
[0076] Specifically, calculate the ratio of the number of characters in the text content of the boundary region of each side of the page image to the number of characters in the text content of the boundary region of the corresponding side of the current page image, and obtain the ratio corresponding to each side.
[0077] Exemplarily, the ratio information is the ratio of the number of characters of each side belonging to the boundary region in all the text content included in the page image to the number of characters of the corresponding each side in the text content of the boundary region of the current page.
[0078] Step S860: Based on the ratio information corresponding to each side of the page image, adjust the shooting angle of the imaging device so that the current page falls within the field of view of the imaging device.
[0079] Specifically, compare the ratio corresponding to each side with a preset threshold. If it exceeds the preset threshold, for example, 95%, it is determined that the corresponding side of the page image does not exceed the field of view of the imaging device; if it does not exceed the preset threshold, for example, 95%, it is determined that the corresponding side of the page image exceeds the field of view of the imaging device.
[0080] Exemplarily, when it is determined that the corresponding side of the page image exceeds the field of view of the imaging device, a reminder message is sent so that the user can obtain the movement direction information for making the side of the page image that exceeds the field of view of the imaging device enter the field of view of the imaging device based on the reminder message. For example, if the upper edge exceeds the field of view of the imaging device, a reminder message to move the page down is sent.
[0081] Exemplarily, the reminder message includes any one or a combination of images, sounds, and videos.
[0082] Exemplarily, a driving device can be installed under the image acquisition device of the working machine. When receiving information about the edge of the corresponding page image that exceeds the field of view of the imaging device, the driving image acquisition device automatically moves the target book or page, so that the edge of the page image that exceeds the field of view of the imaging device enters the field of view of the imaging device.
[0083] Through the method of the embodiment of the present application, a fast and accurate reminder function for the user is realized, assisting the user to accurately move the page so that the page can be quickly placed within the field of view of the imaging device.
[0084] Figure 9 The following shows a schematic flowchart of an image processing method according to another embodiment of the present application, which is extended based on Figure 2 the embodiment shown. Figure 9 The following embodiment will be mainly described Figure 9 the differences between the embodiment shown and Figure 2 the embodiment shown. The same parts will not be described again.
[0085] Step S900: Obtain page images of multiple pages respectively.
[0086] Specifically, scan the books or pages of multiple pages that need to be used in advance to obtain the page image of each page.
[0087] Step S920: Perform character recognition on the page images of multiple pages respectively to obtain the second text content of multiple pages respectively.
[0088] Specifically, use an OCR engine to perform printed character recognition on the page image of each page to obtain the text content of the boundary region of multiple pages respectively.
[0089] Step S940: Store the page images of multiple pages and the second text content of multiple pages respectively.
[0090] Specifically, store the image and the recognized text as a pair in a database.
[0091] Through the method of the embodiment of the present application, the books or multiple pages to be recognized are pre-stored in the database in advance, which speeds up the processing speed and realizes the complete correspondence between the page images to be processed and the target books or multiple pages.
[0092] Figure 10 The following shows a schematic structural diagram of an image processing system provided by an embodiment of the present application. As Figure 10 shown, the image processing system 1000 provided by the embodiment of the present application includes: a first acquisition module 1010, a recognition module 1020, a second acquisition module 1030, and a determination module 1040.
[0093] Specifically, a first acquisition module 1010 is configured to acquire a page image of the current page of a target book collected by an imaging device; an identification module 1020 is configured to perform character recognition on the page image to obtain first text content included in the page image when it is determined based on the page image that the current page is suspected of exceeding the field of view range of the imaging device; a second acquisition module 1030 is configured to acquire second text content of the current page of the target book; and a determination module 1040 is configured to determine whether the current page exceeds the field of view range of the imaging device based on the first text content and the second text content.
[0094] In an embodiment of the present application, the first text content is all the text content included in the page image, and the second text content is the text content of the boundary area of the current page. When the determination module 1040 executes the step of determining whether the current page exceeds the field of view range of the imaging device based on the first text content and the second text content, the following steps are executed: determining the proportion information of the text content of the boundary area of the current page in all the text content included in the page image based on all the text content included in the page image and the text content of the boundary area of the current page; and determining whether the current page exceeds the field of view range of the imaging device based on the proportion information.
[0095] In an embodiment of the present application, the boundary area of the current page includes: the area between the body text area of the current page and the page edge of the current page.
[0096] In an embodiment of the present application, before the identification module 1020 executes the step of performing character recognition on the page image to obtain first text content included in the page image when it is determined based on the page image that the current page is suspected of exceeding the field of view range of the imaging device, it is further configured to: determine the minimum distance between the page edge of the current page and the image edge of the page image based on the page image; determine the longest side of the image edge of the page image based on the page image; and determine whether the current page is suspected of exceeding the field of view range of the imaging device based on the ratio between the minimum distance and the longest side.
[0097] In an embodiment of the present application, after the determination module 1040 executes the step of determining whether the current page exceeds the field of view range of the imaging device based on the first text content and the second text content, it is further configured to: send a reminder message when it is determined that the current page exceeds the field of view range of the imaging device, so that the user can adjust the placement position of the current page based on the reminder message.
[0098] In an embodiment of the present application, after the determination module 1040 executes the step of determining whether the current page exceeds the field of view of the imaging device based on the first text content and the second text content, it is further configured to: in the case where it is determined that the current page exceeds the field of view of the imaging device, for each side of the page image, determine the text content of the boundary region corresponding to each side in the page image; based on the second text content, determine the text content of the boundary region corresponding to each side in the second text content; determine the proportion information of the text content of the boundary region corresponding to each side in the page image in the text content of the boundary region corresponding to each side in the second text content; and adjust the shooting angle of the imaging device based on the proportion information corresponding to each side of the page image so that the current page falls within the field of view of the imaging device.
[0099] In an embodiment of the present application, the target book includes multiple pages. Before the first acquisition module 1010 executes the step of acquiring the second text content of the current page of the target book, it is further configured to: acquire the page images of multiple pages respectively; perform character recognition on the page images of multiple pages respectively to obtain the second text content of multiple pages respectively; and store the page images of multiple pages and the second text content of multiple pages respectively.
[0100] Figure 11 The following shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 11 shown, the electronic device 1100 includes one or more processors 1110 and a memory 1120.
[0101] The processor 1110 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1100 to perform desired functions.
[0102] The memory 1120 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1110 may run the program instructions to implement the image processing methods of various embodiments of the present application described above and / or other desired functions. Various contents such as the page image of the current page may also be stored in the computer-readable storage medium.
[0103] In one example, the electronic device 1100 may further include: an input device 1130 and an output device 1140, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0104] The input device 1130 may include, for example, a keyboard, a mouse, and so on.
[0105] The output device 1140 may output various information to the outside, including reminder information and so on. The output device 1140 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, and so on.
[0106] Of course, for simplicity, Figure 11 only some of the components related to the present application in the electronic device 1100 are shown, and components such as a bus, an input / output interface, and so on are omitted. In addition, according to specific application scenarios, the electronic device 1100 may further include any other appropriate components.
[0107] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, and when the computer program instructions are run by a processor, the processor is caused to execute the steps in the image processing method according to various embodiments of the present application described above in this specification.
[0108] The computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present application. The programming languages include object-oriented programming languages, such as Java, C++, etc., and also include conventional procedural programming languages, such as the "C" language or similar programming languages. The programming code may be executed entirely on a user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0109] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. An image processing method, characterized in that: include: Acquire a page image of a current page of a target book captured by a camera device; In a case where it is determined based on the page image that the current page is suspected to be beyond the field of view of the camera device, performing text recognition on the page image to obtain a first text content contained in the page image; Acquire the second text content of the current page of the target book; Based on the first text content and the second text content, determining whether the current page is beyond the field of view of the camera device; Wherein, the first text content is all text content contained in the page image, and the second text content is text content in the border area of the current page; The determining, based on the first text content and the second text content, whether the current page is beyond the field of view of the camera device includes: Based on the entire text content contained in the page image and the text content in the edge area of the current page, determining the proportion of the text content in the edge area of the current page in the entire text content contained in the page image; Based on the proportion information, it is determined whether the current page exceeds the field of view of the camera device.
2. The image processing method according to claim 1, characterized in that: The boundary area of the current page includes the area between the text area of the current page and the page edge of the current page.
3. The image processing method according to claim 1 or 2, characterized in that: In the case where it is determined based on the page image that the current page is suspected to be beyond the field of view of the camera device, before performing text recognition on the page image to obtain the first text content contained in the page image, the method further includes: Based on the page image, determining a minimum distance between a page edge of the current page and an image edge of the page image; Based on the page image, determining the longest side of the image edge of the page image; Based on the ratio between the minimum distance and the longest side, it is determined whether the current page is suspected to be beyond the field of view of the camera device.
4. The image processing method according to claim 1 or 2, characterized in that: After determining whether the current page is beyond the field of view of the camera device based on the first text content and the second text content, the method further includes: When it is determined that the current page is beyond the field of view of the camera device, a reminder message is issued so that the user can adjust the placement of the current page based on the reminder message.
5. The image processing method according to claim 1 or 2, characterized in that: After determining whether the current page is beyond the field of view of the camera device based on the first text content and the second text content, the method further includes: In the case where it is determined that the current page exceeds the field of view of the camera device, determining, for each edge of the page image, text content of a boundary area corresponding to each edge in the page image; Based on the second text content, determining text content of a boundary area corresponding to each edge in the second text content; Determine the proportion of the text content of the boundary area corresponding to each edge in the page image to the text content of the boundary area corresponding to each edge in the second text content; Based on the proportion information corresponding to each edge of the page image, the shooting angle of the camera device is adjusted so that the current page falls within the field of view of the camera device.
6. The image processing method according to claim 1 or 2, wherein the target book comprises a plurality of pages, and before obtaining the second text content of the current page of the target book, further comprising: Acquire page images of the respective pages; Performing text recognition on the page images of the plurality of pages respectively to obtain second text contents of the plurality of pages respectively; The page images of the plurality of pages and the second text contents of the plurality of pages are stored.
7. An image processing system, characterized in that: include: A first acquisition module is used to acquire a page image of a current page of a target book captured by a camera device; A recognition module, configured to perform text recognition on the page image to obtain a first text content contained in the page image when it is determined based on the page image that the current page is suspected to be beyond the field of view of the camera device; A second acquisition module, used to acquire the second text content of the current page of the target book; A determination module, configured to determine whether the current page exceeds the field of view of the camera device based on the first text content and the second text content; Wherein, the first text content is all text content contained in the page image, and the second text content is text content in the border area of the current page; When the determination module performs the step of determining whether the current page exceeds the field of view of the camera device based on the first text content and the second text content, the determination module performs: determining the proportion of the text content of the border area of the current page in the total text content contained in the page image based on the total text content contained in the page image and the text content of the edge area of the current page; Based on the proportion information, it is determined whether the current page exceeds the field of view of the camera device.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the image processing method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to execute the image processing method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for quickly converting paper book contents into digital contents
CN110298349A
Page anomaly detection method and device, equipment and storage medium
CN112130944A