A method for correcting written content, terminal device and readable storage medium

By correcting the tilt problem of writing content using preset algorithms in the terminal device, the problem of inaccurate recognition caused by user writing content tilt is solved, and the accuracy of recognition of writing content is improved.

CN114973250BActive Publication Date: 2025-04-22GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110216690.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-26
Publication Date
2025-04-22
Estimated Expiration
2041-02-26

AI Technical Summary

Technical Problem

When users write test papers or after-class exercises, the content is tilted due to writing habits, and it is difficult for terminal devices to accurately identify the written content.

Method used

By using a preset algorithm in the terminal device, the boundaries of the rectangular area on the paper book surface are obtained, the angle between the boundaries is calculated, and when the angle exceeds the preset range, the writing content is corrected to make it meet the preset angle range.

Benefits of technology

Improve the accuracy of writing content recognition and ensure that the terminal device can effectively identify and process the corrected writing content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114973250B_ABST
    Figure CN114973250B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method for correcting written content, a terminal device, and a readable storage medium, which are used for the terminal device to correct the written content in a timely manner through a preset algorithm during the process of recording the written content, so as to improve the accuracy of the recognition of the written content. The method of the embodiment of the present invention includes: obtaining a first rectangular area on the surface of a paper book, and using the first boundary of the first rectangular area as a first reference line; after a preset time, obtaining a second rectangular area on the surface of the paper book, and a second boundary of the second rectangular area; obtaining a first angle between the second boundary and the first reference line; when the first angle is outside the preset angle range, correcting the second written content through a preset algorithm, so that the second boundary of the answered area corresponding to the corrected second written content and the second angle between the first reference line are within the preset angle range; wherein the first boundary corresponds to the second boundary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the application field of terminal equipment, and in particular to a method for correcting written content, a terminal equipment and a readable storage medium. Background Art

[0002] When users are writing test papers or homework, the test papers or homework may appear tilted due to their writing habits. In this case, the written content collected by the terminal device is also tilted, making it difficult for the terminal device to recognize the correct written content, thereby reducing the accuracy of writing content recognition. Summary of the invention

[0003] The embodiments of the present invention provide a method for correcting written content, a terminal device, and a readable storage medium, which are used for the terminal device to correct the written content in a timely manner through a preset algorithm during the process of recording the written content, so as to improve the accuracy of writing content recognition.

[0004] A first aspect of an embodiment of the present invention provides a method for correcting written content, the method being applied to a terminal device, the terminal device including a first camera and a second camera, the method may include:

[0005] Acquire a first rectangular area on a paper book surface, and use a first boundary of the first rectangular area as a first reference line, wherein the first rectangular area includes a first test question on a first image obtained by photographing the paper book surface through the first camera and a question-to-be-answered area corresponding to the first test question, and / or, obtain, through the second camera, a first written content on a first answer preview interface corresponding to the paper book surface and a question-answered area corresponding to the first written content;

[0006] After a preset time, a second rectangular area on the paper book surface and a second boundary of the second rectangular area are obtained, wherein the second rectangular area includes second written content on a second answer preview interface corresponding to the paper book surface obtained by the second camera and an answered question area corresponding to the second written content;

[0007] Obtaining a first angle between the second boundary and the first reference line;

[0008] When the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that a second angle between a second boundary of the answered question area corresponding to the corrected second written content and the first reference line is within the preset angle range;

[0009] The first boundary corresponds to the second boundary.

[0010] Optionally, the first boundary corresponds to the second boundary, including: when the first boundary is the upper boundary or the lower boundary of the first rectangular area, the second boundary corresponding to the first boundary is the upper boundary or the lower boundary of the second rectangular area; when the first boundary is the left boundary or the right boundary of the first rectangular area, the second boundary corresponding to the first boundary is the left boundary or the right boundary of the second rectangular area.

[0011] Optionally, after obtaining the first angle between the second boundary and the first baseline, the method further includes: when the first angle is outside the preset angle range, controlling the first camera to rotate according to the first angle so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range, the second rectangular area includes the first test question on the second image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question; and controlling the second camera to rotate according to the second angle so that the second boundary of the second rectangular area and the second angle between the first baseline When the first angle is within the preset angle range, the second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered area corresponding to the second written content; or, when the first angle is outside the preset angle range, the second camera is controlled to rotate according to the second angle so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range, the second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered area corresponding to the second written content.

[0012] Optionally, the first written content on the first answer preview interface corresponding to the paper book surface and the answered question area corresponding to the first written content are obtained through the second camera, including: obtaining, through the second camera, an infrared light spot emitted by the smart pen through the infrared transmitter on the paper book surface; displaying the infrared light spot on the first answer preview interface corresponding to the paper book surface, and obtaining feature data corresponding to the infrared light spot; and obtaining the first written content and the answered question area corresponding to the first written content based on the feature data.

[0013] Optionally, the method also includes: when the first angle is within a preset angle range, detecting whether the area to be answered matches the answered area corresponding to the corrected second written content; when it is determined that the area to be answered matches the answered area corresponding to the corrected second written content, obtaining reference answer information corresponding to the first test question; and comparing the reference answer information with the corrected second written content to obtain a comparison result.

[0014] Optionally, when the first angle is within a preset angle range, detecting whether the area to be answered matches the answered area corresponding to the corrected second writing content, including: when the first angle is within the preset angle range, binarizing the corrected second writing content to obtain target writing content; obtaining a target answered area corresponding to the target writing content, and detecting whether the area to be answered matches the target answered area; when it is determined that the area to be answered matches the answered area corresponding to the corrected second writing content, obtaining reference answer information corresponding to the first test question, including: when it is determined that the area to be answered matches the target answered area, obtaining reference answer information corresponding to the first test question.

[0015] Optionally, the comparison result includes at least one of the following: the correct or incorrect result of the reference answer information, the correct or incorrect ratio of the first test question, the score of the first test question, and the reference answer information corresponding to the first test question when it is wrong.

[0016] A second aspect of an embodiment of the present invention provides a terminal device, the terminal device includes a first camera and a second camera, and the terminal device may include: an acquisition module and a processing module;

[0017] The acquisition module is used to acquire a first rectangular area on a paper book surface, and use a first boundary of the first rectangular area as a first reference line, wherein the first rectangular area includes a first test question on a first image obtained by photographing the paper book surface through the first camera and a question-to-be-answered area corresponding to the first test question, and / or, through the second camera, obtain a first written content on a first answer preview interface corresponding to the paper book surface and a question-answered area corresponding to the first written content;

[0018] The acquisition module is further used to acquire a second rectangular area on the paper book surface and a second boundary of the second rectangular area after a preset time period, wherein the second rectangular area includes a second written content on a second answer preview interface corresponding to the paper book surface obtained by the second camera and an answered question area corresponding to the second written content;

[0019] The acquisition module is further used to acquire a first angle between the second boundary and the first reference line;

[0020] The processing module is used to correct the second written content through a preset algorithm when the first angle is outside the preset angle range, so that the second angle between the second boundary of the answered area corresponding to the corrected second written content and the first baseline is within the preset angle range; wherein the first boundary corresponds to the second boundary.

[0021] Optionally, the first boundary corresponds to the second boundary, including: when the first boundary is the upper boundary or the lower boundary of the first rectangular area, the second boundary corresponding to the first boundary is the upper boundary or the lower boundary of the second rectangular area; when the first boundary is the left boundary or the right boundary of the first rectangular area, the second boundary corresponding to the first boundary is the left boundary or the right boundary of the second rectangular area.

[0022] Optionally, the terminal device may also include a control module; the control module is used to control the first camera to rotate according to the first angle when the first angle is outside the preset angle range, so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range, and the second rectangular area includes the first test question on the second image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question; and control the second camera to rotate according to the second angle, so that the second boundary of the second rectangular area and the second angle between the first baseline are within the preset angle range, and the second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained through the second camera and the answered area corresponding to the second written content; or,

[0023] The control module is used to control the second camera to rotate according to the second angle when the first angle is outside the preset angle range, so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range. The second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered question area corresponding to the second written content.

[0024] Optionally, the acquisition module is specifically used to acquire, through the second camera, an infrared light spot emitted by the smart pen on the surface of the paper book through the infrared transmitter;

[0025] The processing module is specifically used to display the infrared light spot on the first question answering preview interface corresponding to the paper book surface, and obtain the characteristic data corresponding to the infrared light spot;

[0026] The acquisition module is specifically used to obtain the first written content and the answered question area corresponding to the first written content according to the characteristic data.

[0027] Optionally, the processing module is further configured to detect whether the area to be answered matches the area where the answered question corresponds to the corrected second written content when the first angle is within a preset angle range;

[0028] The acquisition module is also used to obtain the reference answer information corresponding to the first test question when it is determined that the area to be answered matches the answered area corresponding to the corrected second written content; and compare the reference answer information with the corrected second written content to obtain a comparison result.

[0029] Optionally, the processing module is specifically used to binarize the corrected second written content to obtain target written content when the first angle is within a preset angle range; obtain a target answered area corresponding to the target written content, and detect whether the area to be answered matches the target answered area;

[0030] The acquisition module is specifically used to obtain the reference answer information corresponding to the first test question when it is determined that the area for questions to be answered matches the target area for questions that have been answered.

[0031] Optionally, the comparison result includes at least one of the following: the correct or incorrect result of the reference answer information, the correct or incorrect ratio of the first test question, the score of the first test question, and the reference answer information corresponding to the first test question when it is wrong.

[0032] A third aspect of an embodiment of the present invention provides a terminal device, the terminal device includes a first camera and a second camera, and the terminal device may include:

[0033] A memory storing executable program code;

[0034] and a processor coupled to the memory;

[0035] The processor calls the executable program code stored in the memory, and when the executable program code is executed by the processor, the processor implements the method as described in the first aspect of the embodiment of the present invention.

[0036] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having executable program code stored thereon. When the executable program code is executed by a processor, the method described in the first aspect of the embodiment of the present invention is implemented.

[0037] A fifth aspect of an embodiment of the present invention discloses a computer program product. When the computer program product runs on a computer, the computer is enabled to execute any one of the methods disclosed in the first aspect of the embodiment of the present invention.

[0038] A sixth aspect of an embodiment of the present invention discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes any one of the methods disclosed in the first aspect of the embodiment of the present invention.

[0039] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:

[0040] In an embodiment of the present invention, a first rectangular area on a paper book is obtained, and the first boundary of the first rectangular area is used as a first reference line; after a preset time, a second rectangular area on the paper book is obtained, and the second boundary of the second rectangular area is obtained; the first angle between the second boundary and the first reference line is obtained; when the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that the second boundary of the answered area corresponding to the corrected second written content and the second angle between the first reference line are within the preset angle range. That is, the terminal device obtains the first angle between the two boundaries corresponding to the two rectangular areas respectively; when the terminal device determines that the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that the first angle is corrected to the second angle, and the second angle is within the preset angle range. This method enables the terminal device to correct the written content in a timely manner through a preset algorithm during the process of recording the written content, so as to improve the accuracy of the written content recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and other drawings can be obtained based on these drawings.

[0042] Figure 1 A schematic diagram of an embodiment of a method for correcting written content in an embodiment of the present invention;

[0043] Figure 2a is a schematic diagram of an embodiment of a first image in an embodiment of the present invention;

[0044] Figure 2b This is a schematic diagram of an embodiment of the first question answering preview interface in an embodiment of the present invention;

[0045] Figure 2c This is a schematic diagram of an embodiment of the first rectangular area in an embodiment of the present invention;

[0046] Figure 2d A schematic diagram of an embodiment of the second question answering preview interface in an embodiment of the present invention;

[0047] Figure 2e is another schematic diagram of an embodiment of the second rectangular area in an embodiment of the present invention;

[0048] Figure 3It is a schematic diagram of another embodiment of the method for correcting written content in an embodiment of the present invention;

[0049] Figure 4 It is a schematic diagram of another embodiment of the method for correcting written content in an embodiment of the present invention;

[0050] Figure 5 It is a schematic diagram of another embodiment of the method for correcting written content in an embodiment of the present invention;

[0051] Figure 6a A schematic diagram of an embodiment of a terminal device in an embodiment of the present invention;

[0052] Figure 6b A schematic diagram of another embodiment of a terminal device in an embodiment of the present invention;

[0053] Figure 7 FIG. 2 is a schematic diagram of another embodiment of a terminal device in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The embodiments of the present invention provide a method for correcting written content, a terminal device, and a readable storage medium, which are used for the terminal device to correct the written content in a timely manner through a preset algorithm during the process of recording the written content, so as to improve the accuracy of writing content recognition.

[0055] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiments in the present invention, they should all fall within the scope of protection of the present invention.

[0056] It can be understood that the terminal devices involved in the embodiments of the present invention may include general handheld screen electronic terminal devices, such as mobile phones, smart phones, portable terminals, terminals, personal digital assistants (PDA), portable multimedia players (Personal Media Player, PMP) devices, laptop computers, notebooks (Note Pad), wireless broadband (Wireless Broadband, Wibro) terminals, tablet computers (Personal Computer, PC), smart PCs, sales terminals (Point of Sales, POS) and car computers, etc.

[0057] Terminal devices may also include wearable devices. Wearable devices are portable electronic devices that can be worn directly on the user or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but can also achieve powerful intelligent functions through software support, data interaction, and cloud interaction, such as: computing function, positioning function, and alarm function. They can also be connected to mobile phones and various terminals. Wearable devices may include but are not limited to watches supported by the wrist (such as watches, wrists, etc.), shoes supported by the foot (such as shoes, socks, or other products worn on the legs), Glass supported by the head (such as glasses, helmets, headbands, etc.), and various non-mainstream product forms such as smart clothing, school bags, crutches, accessories, etc.

[0058] The technical solution of the present invention is further described below by way of embodiments. Figure 1 FIG. 1 is a schematic diagram of an embodiment of a method for correcting written content in an embodiment of the present invention. The method is applied to a terminal device, the terminal device includes a first camera and a second camera, and the method may include:

[0059] 101. Acquire a first rectangular area on a paper book, and use a first boundary of the first rectangular area as a first reference line.

[0060] It should be noted that the paper book page can be homework exercises, test papers, or exercise books, and there is no specific limitation here.

[0061] The first rectangular area may include the first test question on the first image obtained by the terminal device through the first camera photographing the paper book surface and the area to be answered corresponding to the first test question, and / or the first written content on the first answer preview interface corresponding to the paper book surface obtained by the terminal device through the second camera and the answered question area corresponding to the first written content.

[0062] It is understandable that the first rectangular area is located on the first image and / or on the first answer preview interface. The first camera can be an ordinary camera, which can obtain a first image with R (Red) G (Green) B (Blue) on the paper book surface. The first image is an image with the first test question on the paper book surface. The first test question can be a multiple-choice question, a fill-in-the-blank question, a subjective question, or a connecting question. Among them, the first test question can be in Chinese or in English, which is not specifically limited here.

[0063] Optionally, when the first question is a multiple-choice question, the area to be answered corresponding to the multiple-choice question may be a blank area within brackets; when the first question is a subjective question, the area to be answered corresponding to the subjective question may be a blank area below the subjective question.

[0064] It is understandable that the second camera can be an infrared camera, which can collect infrared light spots emitted by the infrared transmitter on the smart pen on the surface of the paper book. The first answer preview interface is an image interface with the first written content on the surface of the paper book captured by the infrared camera. The first written content can be the options corresponding to the multiple-choice questions, the options and answers corresponding to the fill-in-the-blank questions, the answers corresponding to the subjective questions, or the connection process corresponding to the connection questions, which is not specifically limited here.

[0065] It is understandable that the terminal device can capture the answer preview interface on the paper book in real time through the second camera.

[0066] Optionally, before step 101, the method may further include: the terminal device starts the first camera and the second camera.

[0067] Optionally, the terminal device starts the first camera and the second camera, which may include but is not limited to the following implementation methods:

[0068] Implementation method 1: When it is detected that the terminal device is located on a bracket associated with the terminal device, the first camera and the second camera are started.

[0069] Optionally, before implementing mode 1, the method may further include: connecting the terminal device to the bracket in a first connection form. The first connection form may include but is not limited to at least one of the following: a Bluetooth connection form, a Wireless Fidelity (WiFi) connection form, a voice connection form, and a data line connection form.

[0070] Wherein, the bracket is used to support the terminal device.

[0071] Implementation method 2: When the terminal device responds to the user's operation and enters the target application software, the first camera and the second camera are started.

[0072] It should be noted that the operation can be a key operation or a voice operation. There is a corresponding relationship between the target application software and the operation, and the corresponding relationship can be set by the terminal device before leaving the factory or can be set by the user.

[0073] Implementation method 3: Based on big data, obtain the time when the user uses the paper book page; and automatically start the first camera and the second camera based on the time.

[0074] It is understandable that the big data may include: a user, a paper book page, and the start time when the user uses the paper book page, and data on the corresponding relationship between the three.

[0075] For example, the terminal device obtains information based on big data that student X starts writing the test paper at 6:00 p.m.; when the terminal device detects that the time is 6:00 p.m., the first camera and the second camera are automatically started.

[0076] Optionally, the terminal device uses the first camera to photograph the paper book surface to obtain the first test question on the first image and the area to be answered corresponding to the first test question, which may include but is not limited to the following implementation methods:

[0077] Implementation method 1: The terminal device detects a first distance between the first camera and the paper book surface; when the first distance is within a preset distance range, the terminal device photographs the paper book surface through the first camera to obtain a first image, a first test question on the first image, and a question-to-be-answered area corresponding to the first test question.

[0078] It should be noted that the preset distance range is an interval formed by the first preset distance threshold and the second preset distance threshold. The first distance is within the preset distance range, that is, the first distance is greater than the first preset distance threshold and less than or equal to the second preset distance threshold.

[0079] For example, assuming that the first preset distance threshold is 10 centimeters (cm for short), and the second preset distance threshold is 25 cm, that is, the preset distance range is (10 cm, 25 cm). The terminal device detects through the distance sensor that the first distance between the first camera and the paper book surface is 17 cm, and the 17 cm is within (10 cm, 25 cm). At this time, the terminal device uses the first camera to shoot the paper book surface to obtain a first image, a first test question on the first image, and a question area corresponding to the first test question.

[0080] Implementation method 2: The terminal device detects the tilt angle between the terminal device and the paper book surface; when the tilt angle is within a preset tilt angle range, the terminal device photographs the paper book surface through the first camera to obtain a first image, a first test question on the first image, and a question area corresponding to the first test question.

[0081] It should be noted that the tilt angle between the terminal device and the paper book surface can be the tilt angle between the display screen of the terminal device and the paper book surface, or the tilt angle between the back shell of the terminal device and the paper book surface. The tilt angle can be detected by an angle detection device on the terminal device, and the angle detection device can be an angle sensor.

[0082] The preset tilt angle range is an interval formed by the first preset tilt angle threshold and the second preset tilt angle threshold. The tilt angle is within the preset tilt angle range, that is, the tilt angle is greater than the first preset tilt angle threshold and less than or equal to the second preset tilt angle threshold.

[0083] Exemplarily, assuming that the preset tilt angle threshold is the tilt angle threshold between the display screen of the terminal device and the paper book surface, the first preset tilt angle threshold is 60 degrees (abbreviated as: °), and the second preset tilt angle threshold is 90°, that is, the preset angle range is (60°, 90°). The terminal device detects through the angle sensor that the tilt angle threshold is 75°, and the 75° is within (60°, 90°). At this time, the terminal device uses the first camera to shoot the paper book surface to obtain a first image, a first test question on the first image, and a question area to be answered corresponding to the first test question.

[0084] It should be noted that Figure 1 Implementation 1 and implementation 2 in step 101 can be performed simultaneously to form a new implementation, which is also within the protection scope of the present invention and will not be described in detail here.

[0085] Implementation method 3: The terminal device obtains the holding temperature of the smart pen; when the holding temperature is within a preset temperature range, the terminal device uses the first camera to shoot the paper book surface to obtain a first image, a first test question on the first image, and a question area corresponding to the first test question.

[0086] It should be noted that the holding temperature is the temperature at which the user holds the smart pen when writing on a paper book with the smart pen. The holding temperature can be detected by a temperature detection device on a terminal device, or can be detected by a temperature detection device on the smart pen and sent to the terminal device. The temperature detection device can be a temperature sensor.

[0087] The preset temperature range is an interval formed by a first preset temperature threshold and a second preset temperature threshold. The first temperature is within the preset temperature range, that is, the first temperature is greater than the first preset temperature threshold and less than or equal to the second preset temperature threshold.

[0088] For example, assume that the first preset temperature threshold is 36 degrees Celsius (abbreviated as: ℃), and the second preset temperature threshold is 40℃, that is, the preset temperature range is (36℃, 40℃). The smart pen detects through the temperature sensor that the user's holding temperature of the smart pen is 37℃, and the 37℃ is within (36℃, 40℃). At this time, the smart pen sends the holding temperature of 37℃ to the terminal device, and the terminal device receives the holding temperature and uses the first camera to shoot the paper book surface to obtain a first image, a first test question on the first image, and a question area to be answered corresponding to the first test question.

[0089] Optionally, before implementing mode 3, the method may further include: the terminal device and the smart pen are connected in a second connection form. The explanation of the second connection form is similar to the explanation of the first connection form, and will not be described in detail here.

[0090] Implementation method 4: The terminal device uses the first camera to capture a paper book surface to obtain a first image; binarizes the first image to obtain a first target image, a first test question on the first target image, and a question area corresponding to the first test question.

[0091] It should be noted that the terminal device binarizes the first image, that is, the terminal device filters the pixel values ​​of the first image so that the pixel values ​​on the first target image are within the first preset pixel value range. This can improve the recognition efficiency of the first camera for the first target image, thereby making the image quality of the first target image clearer.

[0092] The first preset pixel value range is an interval formed by the first preset pixel value threshold and the second preset pixel value threshold.

[0093] Optionally, the terminal device obtains, through the second camera, the first written content on the first answer preview interface corresponding to the paper book surface and the answered question area corresponding to the first written content, which may include but is not limited to the following implementation methods:

[0094] Implementation method 1: On the first answer preview interface, obtain the first writing content emitted by the smart pen on the paper book surface through the infrared transmitter, and the answered question area corresponding to the first writing content.

[0095] It should be noted that when the terminal device collects the first question answer preview interface in real time, it can obtain the first written content on the first question answer preview interface and the answered question area corresponding to the first written content in real time.

[0096] Implementation method 2: Detect the angle between the infrared transmitter on the smart pen and the surface of the paper book; when the angle is within a preset target angle range, obtain the first writing content emitted by the infrared transmitter on the surface of the paper book and the answered question area corresponding to the first writing content on the first question answering preview interface.

[0097] It should be noted that the angle between the infrared emitter and the paper book surface is the tangent angle between the smart pen and the horizontal plane, that is, the angle is the tangent angle between the infrared emitter and the paper book surface. The preset angle range is the interval formed by the first preset target angle threshold and the second preset target angle threshold. The first target angle is within the preset target angle range, that is, the first target angle is greater than the first preset target angle threshold, and less than or equal to the second preset target angle threshold.

[0098] For example, assuming that the first preset target angle threshold is 30°, the second preset target angle threshold is 60°, that is, the preset target angle range is (30°, 60°). The terminal device detects through the angle sensor that the angle between the infrared transmitter and the paper book surface is 48°, and the 48° is within (30°, 60°). At this time, the terminal device obtains the first writing content emitted by the infrared transmitter on the paper book surface and the answered question area corresponding to the first writing content on the first answer preview interface.

[0099] Optionally, the terminal device obtains, on the first answer preview interface, the first writing content emitted by the smart pen on the paper book surface through the infrared transmitter, and the answered question area corresponding to the first writing content, which may include but is not limited to the following implementation methods:

[0100] Implementation method 1: Through the second camera, obtain the infrared light spot emitted by the smart pen through the infrared transmitter on the paper book surface; display the infrared light spot on the first answer preview interface corresponding to the paper book surface, and obtain the characteristic data corresponding to the infrared light spot; based on the characteristic data, obtain the first writing content and the answered question area corresponding to the first writing content.

[0101] It should be noted that the characteristic data is a white dot obtained by a filter on the second camera when the infrared light dot is displayed on the second camera, and the coordinates corresponding to the white dot. Optionally, the first characteristic data corresponding to the first moment and the second characteristic data corresponding to the second moment are obtained, wherein the first characteristic data includes a first white dot and a first coordinate corresponding to the first white dot, and the second characteristic data includes a second white dot and a second coordinate corresponding to the second white dot, the first moment is prior to the second moment, and the first moment is adjacent to the second moment; the first coordinate corresponding to the first white dot and the second coordinate corresponding to the second white dot are connected in the order of the moments to obtain the first written content.

[0102] Implementation method 2: Binarize the first question answer preview interface to obtain a target question answer preview interface, where the pixel value on the target question answer preview interface is greater than the first pixel threshold and less than or equal to the second pixel threshold; on the target question answer preview interface, obtain the first writing content emitted by the smart pen on the paper book surface through the infrared transmitter, as well as the answered question area corresponding to the first writing content.

[0103] It should be noted that the terminal device binarizes the first question answer preview interface, that is, the terminal device filters the pixel values ​​on the first question answer preview interface so that the pixel values ​​on the target question answer preview interface are within the second preset pixel value range. This can improve the recognition efficiency of the second camera for the target question answer preview interface, thereby making the image quality of the target question answer preview interface clearer.

[0104] The explanation of the second preset pixel value range is similar to the explanation of the first preset pixel value range, and will not be described in detail here. The third preset pixel value range may be the same as or different from the first preset pixel value range, and will not be specifically limited here.

[0105] Optional, such as Figure 2a FIG. 2 is a schematic diagram of an embodiment of the first image in an embodiment of the present invention, wherein the first image 201 may include a first rectangular area 2011 , and the first rectangular area 2011 may include a first test question 20111 on the first image 201 , and a to-be-answered question area 20112 corresponding to the first test question 20111 .

[0106] Optional, such as Figure 2b As shown, it is a schematic diagram of an embodiment of the first answer preview interface in an embodiment of the present invention. The first answer preview interface 202 may include a first rectangular area 2011, and the first rectangular area 2011 may include a first written content 20113 on the first answer preview interface 202, and an answered area 20114 corresponding to the first written content 20113.

[0107] Optional, such as Figure 2c As shown, it is a schematic diagram of an embodiment of the first rectangular area in an embodiment of the present invention. The first rectangular area 2011 may include the first test question 20111 on the first image 201, the unanswered question area 20112 corresponding to the first test question 20111, the first written content 20113 on the first answer preview interface 202, and the answered question area 20114 corresponding to the first written content 20113.

[0108] 102. After a preset time period, obtain a second rectangular area on the paper book and a second boundary of the second rectangular area.

[0109] It should be noted that the preset duration can be set by the terminal device when it leaves the factory, or it can be customized by the user according to his or her own habits, and no specific limitation is made here.

[0110] The second rectangular area is located on the second answer preview interface. The second rectangular area may include the second written content on the second answer preview interface corresponding to the paper book surface obtained by the terminal device through the second camera and the answered area corresponding to the second written content.

[0111] Optionally, the second rectangular area may also include the first test question on the second image obtained by the terminal device photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question, as well as the second written content on the second answer preview interface corresponding to the paper book surface obtained by the terminal device through the second camera and the answered area corresponding to the second written content.

[0112] It is understandable that as long as the second rectangular area includes the second written content on the second answer preview interface and the answered area corresponding to the second written content, it can be determined whether the first angle between the second boundary and the first reference line is within the preset angle range. If the first angle is outside the preset angle range, the terminal only needs to correct the second written content.

[0113] Optional, such as Figure 2d As shown, it is a schematic diagram of an embodiment of the second answer preview interface in an embodiment of the present invention. The second answer preview interface 203 may include a second rectangular area 2031, and the second rectangular area 2031 may include a second written content 20311 on the second answer preview interface 203, and an answered area 20312 corresponding to the second written content 20311.

[0114] Optional, such as Figure 2e , which is another embodiment schematic diagram of the second rectangular area in the embodiment of the present invention. The second rectangular area 2031 may include the second written content 20311 on the second question answering preview interface 203, the answered question area 20322 corresponding to the second written content 20311, the first test question 20111 on the first image 201, and the unanswered question area 20112 corresponding to the first test question 20111.

[0115] It can be understood that the explanation of the second written content and the answered area corresponding to the second written content is similar to the explanation of the first written content and the answered area corresponding to the first written content in step 101, and will not be elaborated here.

[0116] It should be noted that the first boundary corresponds to the second boundary.

[0117] The boundary refers to the upper boundary, lower boundary, left boundary or right boundary of the rectangular area.

[0118] Optionally, the first boundary corresponds to the second boundary, which may include: when the first boundary is the upper boundary or the lower boundary of the first rectangular area, the second boundary corresponding to the first boundary is the upper boundary or the lower boundary of the second rectangular area; when the first boundary is the left boundary or the right boundary of the first rectangular area, the second boundary corresponding to the first boundary is the left boundary or the right boundary of the second rectangular area.

[0119] It can be understood that when the first boundary is the upper boundary or the lower boundary of the first rectangular area, if the second boundary is the left boundary or the right boundary of the second rectangular area, then the error of the obtained first angle is larger and the accuracy of correcting the second written content is lower.

[0120] 103. Obtain a first angle between the second boundary and the first reference line.

[0121] It should be noted that the first angle can be detected by the terminal device through an angle sensor.

[0122] 104. When the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that a second angle between a second boundary of the answered area corresponding to the corrected second written content and the first baseline is within the preset angle range.

[0123] It should be noted that the preset algorithm is used to correct the second written content. The preset algorithm is generally set by the terminal device before leaving the factory. The preset algorithm can be a text correction algorithm or a text correction model, which is not specifically limited here.

[0124] The preset angle range is an interval formed by a first preset angle threshold and a second preset angle threshold. The first angle is within the preset angle range, that is, the first angle is greater than the first preset angle threshold and less than or equal to the second preset angle threshold.

[0125] Exemplarily, assuming that the first preset angle threshold is 0°, and the second preset angle threshold is 30°, that is, the preset angle range is (0°, 30°). The terminal device detects through the angle sensor that the angle between the second boundary of the answered area corresponding to the second written content and the first baseline is 38°, and the 38° is outside (0°, 30°). At this time, the terminal device corrects the second written content through the text correction algorithm so that the second boundary of the answered area corresponding to the corrected second written content and the second angle between the first baseline is 25°, and at this time, the 25° is within (0°, 30°).

[0126] In an embodiment of the present invention, a first rectangular area on a paper book is obtained, and the first boundary of the first rectangular area is used as a first reference line; after a preset time, a second rectangular area on the paper book is obtained, and the second boundary of the second rectangular area is obtained; the first angle between the second boundary and the first reference line is obtained; when the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that the second boundary of the answered area corresponding to the corrected second written content and the second angle between the first reference line are within the preset angle range. That is, the terminal device obtains the first angle between the two boundaries corresponding to the two rectangular areas respectively; when the terminal device determines that the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that the first angle is corrected to the second angle, and the second angle is within the preset angle range. This method enables the terminal device to correct the written content in a timely manner through a preset algorithm during the process of recording the written content, so as to improve the accuracy of the written content recognition.

[0127] like Figure 3 FIG. 2 is a schematic diagram of another embodiment of a method for correcting written content in an embodiment of the present invention. The method is applied to a terminal device, the terminal device includes a first camera and a second camera, and the method may include:

[0128] 301. Acquire a first rectangular area on a paper book, and use a first boundary of the first rectangular area as a first reference line.

[0129] Among them, the first rectangular area includes the first test question on the first image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question, and / or, through the second camera, the first written content on the first answer preview interface corresponding to the paper book surface and the answered question area corresponding to the first written content.

[0130] 302. After a preset time period, obtain a second rectangular area on the paper book and a second boundary of the second rectangular area.

[0131] The first boundary corresponds to the second boundary. The second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered area corresponding to the second written content.

[0132] 303. Obtain a first angle between the second boundary and the first reference line.

[0133] It should be noted that steps 301-303 are similar to those in this embodiment. Figure 1The steps 101-103 shown are similar and will not be repeated here.

[0134] 304. When the first angle is outside a preset angle range, control the second camera to rotate at a second angle so that a second angle between a second boundary of the second rectangular area and the first reference line is within the preset angle range.

[0135] The second rectangular area includes the second written content on the second question answer preview interface corresponding to the paper book surface obtained through the second camera and the answered question area corresponding to the second written content.

[0136] It is understandable that if the first angle is outside the preset angle range, the terminal device needs to correct the second written content.

[0137] Optionally, the method may also include: when the first angle is outside the preset angle range, controlling the first camera to rotate according to the first angle so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range; and controlling the second camera to rotate according to the second angle so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range.

[0138] Among them, when the second rectangular area is obtained by photographing the first camera, the second rectangular area includes the first test question on the second image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question; when the second rectangular area is obtained by photographing the second camera, the second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained through the second camera and the answered question area corresponding to the second written content.

[0139] It can be understood that when the first angle is outside the preset angle range, while correcting the second written content and the answered question area corresponding to the second written content, the first test question on the second image and the unanswered question area corresponding to the first test question can also be corrected.

[0140] In an embodiment of the present invention, a first rectangular area on a paper book is obtained, and the first boundary of the first rectangular area is used as a first reference line; after a preset time, a second rectangular area on the paper book is obtained, and the second boundary of the second rectangular area is obtained; the first angle between the second boundary and the first reference line is obtained; the second camera is controlled to rotate at a second angle so that the second angle between the second boundary of the second rectangular area and the first reference line is within the preset angle range. This method allows the terminal device to correct the written content in a timely manner by controlling the camera to rotate at a certain angle during the process of recording the written content, so as to improve the accuracy of the recognition of the written content.

[0141] like Figure 4 FIG. 2 is a schematic diagram of another embodiment of a method for correcting written content in an embodiment of the present invention. The method is applied to a terminal device, the terminal device includes a first camera and a second camera, and the method may include:

[0142] 401. Acquire a first rectangular area on a paper book, and use a first boundary of the first rectangular area as a first reference line.

[0143] Among them, the first rectangular area includes the first test question on the first image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question, and / or, through the second camera, the first written content on the first answer preview interface corresponding to the paper book surface and the answered question area corresponding to the first written content.

[0144] 402. After a preset time period, obtain a second rectangular area on the paper book and a second boundary of the second rectangular area.

[0145] The first boundary corresponds to the second boundary. The second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered area corresponding to the second written content.

[0146] 403. Obtain a first angle between the second boundary and the first reference line.

[0147] 404. When the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that a second angle between a second boundary of the answered area corresponding to the corrected second written content and the first baseline is within the preset angle range.

[0148] It should be noted that steps 401-404 are similar to those in this embodiment. Figure 1 The steps 101-104 shown are similar and will not be described again here.

[0149] 405. When the first angle is within a preset angle range, detect whether the area to be answered matches the area where the answered question corresponds to the corrected second written content.

[0150] Optionally, when the first angle is within a preset angle range, the terminal device detects whether the area to be answered matches the answered area corresponding to the corrected second written content, which may include: when the first angle is within a preset angle range, the terminal device detects whether the position of the area to be answered matches the position of the answered area corresponding to the corrected second written content.

[0151] It should be noted that the position of the unanswered question area corresponding to the first test question and the position of the answered question area corresponding to the written content are both relative to the paper book surface. For example, the position of the unanswered question area and the position of the answered question area are both located at the upper 1 / 3 of the left side of the paper book surface.

[0152] 406. When it is determined that the area to be answered matches the area of ​​answered questions corresponding to the corrected second written content, obtain reference answer information corresponding to the first test question.

[0153] It should be noted that when the terminal device detects that the position of the area to be answered is the same as the position of the answered area corresponding to the corrected second written content, and the area of ​​the area to be answered is greater than or equal to the area of ​​the answered area corresponding to the corrected second written content, it is determined that the area to be answered matches the answered area corresponding to the corrected second written content.

[0154] It can be understood that when the terminal device detects that the position of the area to be answered coincides with the position of the answered area, if the terminal device detects that the area of ​​the area to be answered is greater than or equal to the area corresponding to the corrected second written content, then the terminal device determines that the area to be answered matches the answered area corresponding to the corrected second written content.

[0155] Optionally, the terminal device obtains the reference answer information corresponding to the first test question, which may include: after the terminal device performs OCR recognition on the first test question, searching for the reference answer information corresponding to the first test question from the cloud question bank; or, the terminal device searches for the reference answer information corresponding to the first test question from the cloud question bank in an image search manner.

[0156] Optionally, when it is determined that the area to be answered matches the answered area corresponding to the corrected second written content, obtaining reference answer information corresponding to the first test question; comparing the reference answer information with the corrected second written content to obtain a comparison result, which may include: when the first angle is within a preset angle range, binarizing the corrected second written content to obtain target written content; obtaining a target answered area corresponding to the target written content, and detecting whether the area to be answered matches the target answered area; when it is determined that the area to be answered matches the target answered area, obtaining the reference answer information corresponding to the first test question.

[0157] 407. Compare the reference answer information with the corrected second written content to obtain a comparison result.

[0158] Among them, the comparison result may include at least one of the following: the correct or incorrect result of the reference answer information, the correct or incorrect ratio of the first test question, the score of the first test question, and the reference answer information corresponding to the error of the first test question.

[0159] It can be understood that the process of comparing the reference answer information with the corrected second written content can be the process of the terminal device correcting the test questions.

[0160] In an embodiment of the present invention, a first rectangular area on a paper book surface is obtained, and a first boundary of the first rectangular area is used as a first reference line; after a preset time period, a second rectangular area on the paper book surface and a second boundary of the second rectangular area are obtained; a first angle between the second boundary and the first reference line is obtained; when the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that the second angle between the second boundary of the answered question area corresponding to the corrected second written content and the first reference line is within the preset angle range; when the first angle is within the preset angle range, it is detected whether the area to be answered matches the answered question area corresponding to the corrected second written content; when it is determined that the area to be answered matches the answered question area corresponding to the corrected second written content, the reference answer information corresponding to the first test question is obtained; the reference answer information is compared with the corrected second written content to obtain a comparison result. This method not only enables the terminal device to correct the written content in a timely manner through a preset algorithm during the process of recording the written content to improve the accuracy of writing content recognition, but also simplifies the process of the terminal device comparing the written content of the test question with the reference answer information, so that the user can obtain the answer comparison results in a timely manner.

[0161] like Figure 5FIG. 2 is a schematic diagram of another embodiment of a method for correcting written content in an embodiment of the present invention. The method is applied to a terminal device, the terminal device includes a first camera and a second camera, and the method may include:

[0162] 501. Acquire a first rectangular area on a paper book, and use a first boundary of the first rectangular area as a first reference line.

[0163] Among them, the first rectangular area includes the first test question on the first image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question, and / or, through the second camera, the first written content on the first answer preview interface corresponding to the paper book surface and the answered question area corresponding to the first written content.

[0164] 502. After a preset time period, obtain a second rectangular area on the paper book and a second boundary of the second rectangular area.

[0165] The first boundary corresponds to the second boundary. The second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered area corresponding to the second written content.

[0166] 503. Obtain a first angle between the second boundary and the first reference line.

[0167] 504. When the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that a second angle between a second boundary of the answered area corresponding to the corrected second written content and the first baseline is within the preset angle range.

[0168] 505. When the first angle is within a preset angle range, detect whether the area to be answered matches the area where the answered question corresponds to the corrected second written content.

[0169] 506. When it is determined that the area to be answered matches the area of ​​answered questions corresponding to the corrected second written content, obtain reference answer information corresponding to the first test question.

[0170] 507. Compare the reference answer information with the corrected second written content to obtain a comparison result.

[0171] It should be noted that steps 501-507 are similar to those in this embodiment. Figure 4 The steps 401-407 shown are similar and will not be repeated here.

[0172] 508. Output the comparison result.

[0173] Optionally, the comparison result may also include, but is not limited to: the knowledge points involved in the first test question and the difficulty level ratio of the first test question.

[0174] Optionally, the terminal device outputs the comparison result, which may include but is not limited to the following implementations:

[0175] Implementation method 1: The terminal device broadcasts the comparison result in voice form.

[0176] Implementation method 2: The terminal device displays the comparison result in text form or animation form.

[0177] For example, assuming that the first test question consists of 10 multiple-choice questions, the comparison result is that the score of the first test question is 70 points; the difficulty level ratio of the first test question is 2:8, where 2 is a difficult question and 8 is a basic question; the right-wrong ratio of the first test question is 7:3, where 7 is the number of correct questions and 3 is the number of incorrect questions. The terminal device displays "Score: 70 points; Difficulty level ratio is 2:8 (2 difficult questions, 8 basic questions); Right-wrong ratio is 7:3 (7 correct questions, 3 incorrect questions)" in an animated form.

[0178] Implementation method 3: The terminal device sends the comparison result to an electronic device associated with the terminal device, and the electronic device receives the comparison result and broadcasts the comparison result in voice form.

[0179] Implementation method 4: The terminal device sends the comparison result to an electronic device associated with the terminal device, and the electronic device receives the comparison result and displays the comparison result in text form or animation form.

[0180] Implementation method 5: The terminal device sends the comparison result to the smart pen associated with the terminal device, and the smart pen receives the comparison result and announces the comparison result in voice form.

[0181] It is understandable that whether the comparison result is reported in voice form or displayed in text form / animation form, it is convenient for the user to intuitively know the user's mastery of the corresponding knowledge points of the test questions.

[0182] Optionally, after step 508, the method may further include: the terminal device constructs a knowledge graph related to the first test question based on the first test question.

[0183] The knowledge graph may include knowledge points related to the first test question. If the second written content is wrong, the knowledge graph may also include weak knowledge points related to the first test question.

[0184] In an embodiment of the present invention, a first rectangular area on a paper book surface is obtained, and a first boundary of the first rectangular area is used as a first reference line; after a preset time period, a second rectangular area on the paper book surface and a second boundary of the second rectangular area are obtained; a first angle between the second boundary and the first reference line is obtained; when the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that the second angle between the second boundary of the answered area corresponding to the corrected second written content and the first reference line is within the preset angle range; when the first angle is within the preset angle range, it is detected whether the area to be answered matches the answered area corresponding to the corrected second written content; when it is determined that the area to be answered matches the answered area corresponding to the corrected second written content, reference answer information corresponding to the first test question is obtained; the reference answer information is compared with the corrected second written content to obtain a comparison result; and the comparison result is output. This method not only enables the terminal device to correct the written content in time through a preset algorithm during the process of recording the written content to improve the accuracy of written content recognition, but also simplifies the process of the terminal device comparing the written content of the test question with the reference answer information, so that the user can obtain and understand the comparison results in time, and the user can intuitively know the user's mastery of the corresponding knowledge points of the test question, and can also grasp his or her own answer situation in time.

[0185] It should be noted that step 407 or step 508 is different from the step 407 or step 508 in this embodiment. Figure 1 Step 104 shown, and Figure 3 The steps 304 shown can be combined with each other to form a new embodiment. The new embodiment is also within the scope of protection of the present invention and will not be described in detail here.

[0186] like Figure 6a As shown, it is a schematic diagram of an embodiment of a terminal device in an embodiment of the present invention, the terminal device includes a first camera and a second camera, and the terminal device may include: an acquisition module 601 and a processing module 602;

[0187] The acquisition module 601 is used to acquire a first rectangular area on a paper book surface, and use a first boundary of the first rectangular area as a first reference line, wherein the first rectangular area includes a first test question on a first image obtained by photographing the paper book surface through the first camera and a question-to-be-answered area corresponding to the first test question, and / or, through the second camera, obtain a first written content on a first answer preview interface corresponding to the paper book surface and a question-answered area corresponding to the first written content;

[0188] The acquisition module 601 is further used to acquire a second rectangular area on the paper book surface and a second boundary of the second rectangular area after a preset time period, wherein the second rectangular area includes a second written content on a second answer preview interface corresponding to the paper book surface obtained by the second camera and an answered question area corresponding to the second written content;

[0189] The acquisition module 601 is further used to acquire a first angle between the second boundary and the first reference line;

[0190] Processing module 602 is used to correct the second written content through a preset algorithm when the first angle is outside the preset angle range, so that the second angle between the second boundary of the answered area corresponding to the corrected second written content and the first baseline is within the preset angle range; wherein the first boundary corresponds to the second boundary.

[0191] Optionally, in some embodiments of the present invention,

[0192] The first boundary corresponds to the second boundary, including: when the first boundary is the upper boundary or the lower boundary of the first rectangular area, the second boundary corresponding to the first boundary is the upper boundary or the lower boundary of the second rectangular area; when the first boundary is the left boundary or the right boundary of the first rectangular area, the second boundary corresponding to the first boundary is the left boundary or the right boundary of the second rectangular area.

[0193] Optionally, in some embodiments of the present invention,

[0194] like Figure 6b , which is a schematic diagram of another embodiment of a terminal device in an embodiment of the present invention, the terminal device may further include a control module 603;

[0195] The control module 603 is used to control the first camera to rotate according to the first angle when the first angle is outside the preset angle range, so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range, and the second rectangular area includes the first test question on the second image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question; and control the second camera to rotate according to the second angle, so that the second boundary of the second rectangular area and the second angle between the first baseline are within the preset angle range, and the second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered area corresponding to the second written content; or,

[0196] The control module 603 is used to control the second camera to rotate according to the second angle when the first angle is outside the preset angle range, so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range, and the second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained by the second camera and the answered question area corresponding to the second written content.

[0197] Optionally, in some embodiments of the present invention,

[0198] The acquisition module 601 is specifically used to acquire, through the second camera, an infrared light spot emitted by the smart pen on the surface of the paper book through the infrared transmitter;

[0199] The processing module 602 is specifically used to display the infrared light spot on the first question answering preview interface corresponding to the paper book surface, and obtain feature data corresponding to the infrared light spot;

[0200] The acquisition module 601 is specifically used to obtain the first written content and the answered question area corresponding to the first written content according to the characteristic data.

[0201] Optionally, in some embodiments of the present invention,

[0202] The processing module 602 is further configured to detect whether the area to be answered matches the area to be answered corresponding to the corrected second written content when the first angle is within a preset angle range;

[0203] The acquisition module 601 is also used to obtain the reference answer information corresponding to the first test question when it is determined that the area to be answered matches the answered area corresponding to the corrected second written content; and compare the reference answer information with the corrected second written content to obtain a comparison result.

[0204] Optionally, in some embodiments of the present invention,

[0205] The processing module 602 is specifically used to perform binarization processing on the corrected second written content to obtain target written content when the first angle is within the preset angle range; obtain the target answered area corresponding to the target written content, and detect whether the area to be answered matches the target answered area;

[0206] The acquisition module 601 is specifically used to acquire the reference answer information corresponding to the first test question when it is determined that the area for questions to be answered matches the target area for questions that have been answered.

[0207] Optionally, in some embodiments of the present invention,

[0208] The comparison result includes at least one of the following: the correct or incorrect result of the reference answer information, the correct or incorrect ratio of the first test question, the score of the first test question, and the reference answer information corresponding to the first test question when it is wrong.

[0209] like Figure 7 FIG. 1 is a schematic diagram of another embodiment of a terminal device in an embodiment of the present invention. Figure 7 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present invention. Figure 7 The mobile phone includes: a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a WiFi module 770, a processor 780, and a power supply 790. Those skilled in the art will understand that Figure 7 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0210] Combine the following Figure 7 A detailed introduction to the various components of the mobile phone:

[0211] The RF circuit 710 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 780 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 710 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 710 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0212] The memory 720 can be used to store software programs and modules. The processor 780 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 720. The memory 720 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 720 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0213] The input unit 730 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 731 or near the touch panel 731 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 731 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch panel 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 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.

[0214] The display unit 740 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 may include a display panel 741. Optionally, the display panel 741 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 731 may cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of touch event. Subsequently, the processor 780 provides a corresponding visual output on the display panel 741 according to the type of touch event. Although in Figure 7 In the embodiment, the touch panel 731 and the display panel 741 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone.

[0215] The mobile phone may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 741 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0216] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the mobile phone. The audio circuit 760 can transmit the received audio data to the speaker 761 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another mobile phone through the RF circuit 710, or the audio data is output to the memory 720 for further processing.

[0217] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 770. It provides users with wireless broadband Internet access. Figure 7A WiFi module 770 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0218] The processor 780 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 780 may include one or more processing units; preferably, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 780.

[0219] The mobile phone also includes a power supply 790 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.

[0220] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0221] In the embodiment of the present invention, the processor 780 included in the terminal device also has the following functions:

[0222] Acquire a first rectangular area on a paper book surface, and use a first boundary of the first rectangular area as a first reference line, wherein the first rectangular area includes a first test question on a first image obtained by photographing the paper book surface through the first camera and a question-to-be-answered area corresponding to the first test question, and / or, obtain, through the second camera, a first written content on a first answer preview interface corresponding to the paper book surface and a question-answered area corresponding to the first written content;

[0223] After a preset time, a second rectangular area on the paper book surface and a second boundary of the second rectangular area are obtained, wherein the second rectangular area includes second written content on a second answer preview interface corresponding to the paper book surface obtained by the second camera and an answered question area corresponding to the second written content;

[0224] Obtaining a first angle between the second boundary and the first reference line;

[0225] When the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that a second angle between a second boundary of the answered question area corresponding to the corrected second written content and the first reference line is within the preset angle range;

[0226] The first boundary corresponds to the second boundary.

[0227] Optionally, the processor 780 also has the following functions:

[0228] When the first boundary is the upper boundary or the lower boundary of the first rectangular area, the second boundary corresponding to the first boundary is the upper boundary or the lower boundary of the second rectangular area;

[0229] When the first boundary is the left boundary or the right boundary of the first rectangular area, the second boundary corresponding to the first boundary is the left boundary or the right boundary of the second rectangular area.

[0230] Optionally, the processor 780 also has the following functions:

[0231] When the first angle is outside the preset angle range, the first camera is controlled to rotate according to the first angle so that the second angle between the second boundary of the second rectangular area and the first reference line is within the preset angle range, and the second rectangular area includes the first test question on the second image obtained by photographing the paper book surface through the first camera and the area to be answered corresponding to the first test question; and the second camera is controlled to rotate according to the second angle so that the second angle between the second boundary of the second rectangular area and the first reference line is within the preset angle range, and the second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained through the second camera and the answered area corresponding to the second written content;

[0232] or,

[0233] When the first angle is outside the preset angle range, the second camera is controlled to rotate according to the second angle so that the second angle between the second boundary of the second rectangular area and the first baseline is within the preset angle range. The second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained through the second camera and the answered question area corresponding to the second written content.

[0234] Optionally, the processor 780 also has the following functions:

[0235] Acquire, by the second camera, an infrared light spot emitted by the smart pen on the surface of the paper book through the infrared transmitter;

[0236] Displaying the infrared light spot on the first question answering preview interface corresponding to the paper book surface, and obtaining feature data corresponding to the infrared light spot;

[0237] According to the characteristic data, the first written content and the answered question area corresponding to the first written content are obtained.

[0238] Optionally, the processor 780 also has the following functions:

[0239] When the first angle is within the preset angle range, detecting whether the area to be answered matches the area where the question has been answered corresponding to the corrected second written content;

[0240] When it is determined that the area to be answered matches the area of ​​answered questions corresponding to the corrected second written content, obtaining reference answer information corresponding to the first test question;

[0241] The reference answer information is compared with the corrected second written content to obtain a comparison result.

[0242] Optionally, the processor 780 also has the following functions:

[0243] When the first angle is within the preset angle range, binarizing the corrected second written content to obtain target written content;

[0244] Obtain the target answered area corresponding to the target written content, and detect whether the area to be answered matches the target answered area;

[0245] When it is determined that the area for questions to be answered matches the target area for answered questions, reference answer information corresponding to the first test question is obtained.

[0246] Optionally, the processor 780 also has the following functions:

[0247] The comparison result includes at least one of the following: the correct or incorrect result of the reference answer information, the correct or incorrect ratio of the first test question, the score of the first test question, and the reference answer information corresponding to the first test question when it is wrong.

[0248] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0249] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center to another website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

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

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

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

[0253] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0254] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0255] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for correcting written content, characterized in that: The method is applied to a terminal device, the terminal device includes a first camera and a second camera, and the method includes: Acquire a first rectangular area on a paper book surface, and use a first boundary of the first rectangular area as a first reference line, wherein the first rectangular area includes a first test question on a first image obtained by photographing the paper book surface through the first camera and a question-to-be-answered area corresponding to the first test question, and / or, obtain, through the second camera, first written content on a first answer preview interface corresponding to the paper book surface and a question-answered area corresponding to the first written content; After a preset time, a second rectangular area on the paper book surface and a second boundary of the second rectangular area are obtained, wherein the second rectangular area includes a second written content on a second answer preview interface corresponding to the paper book surface obtained by the second camera and an answered question area corresponding to the second written content; Obtaining a first angle between the second boundary and the first reference line; When the first angle is outside the preset angle range, the first camera is controlled to rotate according to the first angle so that a second angle between a second boundary of the second rectangular area and the first reference line is within the preset angle range; or, when the first angle is outside the preset angle range, the second camera is controlled to rotate according to the second angle so that a second angle between a second boundary of the second rectangular area and the first reference line is within the preset angle range; When the first angle is outside the preset angle range, the second written content is corrected by a preset algorithm so that a second angle between a second boundary of the answered area corresponding to the corrected second written content and the first reference line is within the preset angle range; The first boundary corresponds to the second boundary.

2. The method according to claim 1, characterized in that The first boundary corresponds to the second boundary, including: When the first boundary is the upper boundary of the first rectangular area, the second boundary corresponding to the first boundary is the upper boundary of the second rectangular area; When the first boundary is the lower boundary of the first rectangular area, the second boundary corresponding to the first boundary is the lower boundary of the second rectangular area; When the first boundary is the left boundary of the first rectangular area, the second boundary corresponding to the first boundary is the left boundary of the second rectangular area; When the first boundary is the right boundary of the first rectangular area, the second boundary corresponding to the first boundary is the right boundary of the second rectangular area.

3. The method according to claim 1, characterized in that The second rectangular area includes a first test question on a second image obtained by photographing the paper book surface through the first camera and a question-to-be-answered area corresponding to the first test question; and the second camera is controlled to rotate according to a second angle so that a second angle between a second boundary of the second rectangular area and the first reference line is within the preset angle range, and the second rectangular area includes second written content on a second answer preview interface corresponding to the paper book surface obtained through the second camera and an answered question area corresponding to the second written content; or, The second rectangular area includes the second written content on the second answer preview interface corresponding to the paper book surface obtained through the second camera and the answered question area corresponding to the second written content.

4. The method according to claim 1, characterized in that: The method of obtaining, through the second camera, the first written content on the first answer preview interface corresponding to the paper book surface and the answered question area corresponding to the first written content includes: Acquire, by the second camera, an infrared light spot emitted by the smart pen on the surface of the paper book through the infrared transmitter; Displaying the infrared light spot on the first question-answering preview interface corresponding to the paper book surface to obtain feature data corresponding to the infrared light spot; According to the feature data, a first written content and an answered question area corresponding to the first written content are obtained.

5. The method according to claim 1, characterized in that The method further comprises: When the first angle is within a preset angle range, detecting whether the area to be answered matches the area where the answered question corresponds to the corrected second written content; When it is determined that the area to be answered matches the area of ​​answered questions corresponding to the corrected second written content, obtaining reference answer information corresponding to the first test question; The reference answer information is compared with the corrected second written content to obtain a comparison result.

6. The method according to claim 5, characterized in that When the first angle is within a preset angle range, detecting whether the area to be answered matches the area where the answered question corresponds to the corrected second written content, includes: When the first angle is within a preset angle range, binarizing the corrected second written content to obtain target written content; Obtaining a target answered area corresponding to the target written content, and detecting whether the area to be answered matches the target answered area; When it is determined that the area to be answered matches the area of ​​answered questions corresponding to the corrected second written content, obtaining reference answer information corresponding to the first test question includes: When it is determined that the to-be-answered question area matches the target answered question area, reference answer information corresponding to the first test question is obtained.

7. The method according to claim 5 or 6, characterized in that: The comparison result includes at least one of the following: the correctness or incorrectness result of the reference answer information, the correctness or incorrectness ratio of the first test question, the score of the first test question, and the reference answer information corresponding to when the first test question is incorrect.

8. A terminal device, characterized in that: The terminal device includes a first camera and a second camera; the terminal device includes: an acquisition module, for acquiring a first rectangular area on a paper book surface, and using a first boundary of the first rectangular area as a first reference line, wherein the first rectangular area includes a first test question on a first image obtained by photographing the paper book surface through the first camera and a to-be-answered area corresponding to the first test question, and / or, through the second camera, obtaining a first written content on a first answer preview interface corresponding to the paper book surface and an answered area corresponding to the first written content; The acquisition module is further configured to acquire a second rectangular area on the paper book surface and a second boundary of the second rectangular area after a preset time period, wherein the second rectangular area includes a second written content on a second answer preview interface corresponding to the paper book surface obtained by the second camera and an answered question area corresponding to the second written content; The acquisition module is further used to acquire a first angle between the second boundary and the first reference line; a control module, configured to, when the first angle is outside a preset angle range, control the first camera to rotate according to the first angle so that a second angle between a second boundary of the second rectangular area and the first reference line is within the preset angle range; or, when the first angle is outside the preset angle range, control the second camera to rotate according to the second angle so that a second angle between a second boundary of the second rectangular area and the first reference line is within the preset angle range; A processing module is used to correct the second written content by a preset algorithm when the first angle is outside the preset angle range, so that the second angle between the second boundary of the answered area corresponding to the corrected second written content and the first baseline is within the preset angle range; wherein the first boundary corresponds to the second boundary.

9. A terminal device, characterized in that: include: A memory storing executable program code; and a processor coupled to the memory; The processor calls the executable program code stored in the memory, and when the executable program code is executed by the processor, the processor implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable program code stored thereon, characterized in that: When the executable program code is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for identifying answer content of test questions

    CN110879987A

  • Character inclination correction method and electronic equipment

    CN111079737A