A frame correction method, a storage medium and a device

By manually selecting and classifying whole questions and sub-question blocks, and adjusting the average coordinates, the problem of inconsistent manual selection of question blocks in teaching aids was solved, and the question blocks in the homework image were neatly arranged, improving the display effect.

CN116630987BActive Publication Date: 2025-10-21ZHUHAI DUSHILANG SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310360289.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-06
Publication Date
2025-10-21
Estimated Expiration
2043-04-06

AI Technical Summary

Technical Problem

In existing technologies, the manual selection of question block coordinates in teaching aids results in inconsistent rectangle sizes, which affects the neat arrangement of question blocks after the homework image is segmented, making the display unsightly.

Method used

By manually selecting the coordinates of each question block, classifying the whole question into whole question blocks and sub-question blocks, and then correcting them separately, the average horizontal coordinate of the whole question block is adjusted, and the average vertical coordinate of the sub-question blocks is adjusted to ensure that each question block is neatly arranged.

Benefits of technology

It achieves accurate alignment and correction of each question block, making the question blocks neatly arranged and improving the display effect of the homework image.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The application discloses a kind of frame question correction method, storage medium and equipment, first import the page image of teaching aid page, manually frame out each question block on page image with rectangular frame, obtain the upper left corner coordinates and right lower corner coordinates of the rectangular frame of each question block;Each question block framed is classified, and the whole question block and the sub-question block are classified, and finally the whole question block and the sub-question block are corrected for frame question respectively.The question block coordinates framed manually can be accurately aligned and corrected using the method, so that each question block is arranged neatly and orderly, and the display effect is not affected by misalignment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent education technology, and in particular to a frame question correction method, storage medium and device. Background Art

[0002] Smart homework systems are constantly evolving. Currently, teachers typically capture student work after grading paper-based teaching aids. The system then uses the system to capture images of student work. The system then segments the images into individual sections and analyzes the student's responses question by question. To better identify and segment questions, the teaching aids require the entry of question information, with question coordinates being crucial.

[0003] Currently, the precise coordinate data of teaching aids is obtained by manually selecting the question blocks. Due to the limitations of the original image size and manual selection, the size of the rectangular frame of each question block is difficult to select, and the sizes of the selected question blocks are also inconsistent. When the question coordinate information obtained in this way is used to segment the homework image, the segmented question blocks are not neatly displayed after being arranged horizontally or vertically, and the display is not beautiful. Therefore, it is very important to correct the frame coordinates after manually selecting the question blocks. Summary of the Invention

[0004] In view of the deficiencies in the prior art, the present invention aims to provide a frame title correction method, storage medium and device.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A method for correcting framed questions, the specific process is as follows:

[0007] S1. Import the page image of the teaching aid page;

[0008] S2. After manually selecting each question block on the page image with a rectangular frame, obtain the coordinates of the upper left corner and the lower right corner of the rectangular frame of each question block; wherein, for a question that does not have multiple sub-questions arranged in the horizontal direction, use a complete rectangular frame to frame it; for a question that has multiple sub-questions arranged in the horizontal direction, use a rectangular frame to frame each sub-question separately;

[0009] S3. Classify each selected question block into whole-question blocks and sub-question blocks; wherein, when a question block has no question block arranged horizontally parallel to it, or the gap between a question block and a question block arranged horizontally parallel to it and adjacent to it is greater than a preset gap threshold, the question block is a whole-question block; when two question blocks are arranged horizontally parallel to each other and adjacent, if the gap between them is less than or equal to the preset gap threshold, the two question blocks are sub-question blocks of the same question;

[0010] S4. Correct the frame questions for the whole question block and the sub-question block respectively;

[0011] The process of correcting the frame question of the entire question block is as follows:

[0012] S4.1.1. Obtain the upper left corner horizontal coordinate of each entire question block as the horizontal starting point coordinate, and the lower right corner horizontal coordinate as the horizontal ending point coordinate. Calculate the average of the horizontal starting point coordinates of each entire question block as the target horizontal starting point coordinate. Calculate the average of the horizontal ending point coordinates of each entire question block as the target horizontal ending point coordinate.

[0013] S4.1.2. Adjust the upper left corner horizontal coordinate of each whole question block to the target horizontal starting point coordinate, and adjust the lower right corner horizontal coordinate of each whole question block to the target horizontal ending point coordinate, while maintaining each whole question block in a rectangular shape;

[0014] The process of correcting the frame questions of the sub-question blocks is as follows:

[0015] S4.2.1. For each sub-question block within the same question, use the upper-left corner ordinate as the vertical starting point coordinate and the lower-right corner ordinate as the vertical ending point coordinate. Calculate the average of the vertical starting point coordinates of each sub-question block as the target vertical starting point coordinate, and calculate the average of the vertical ending point coordinates as the target vertical ending point coordinate.

[0016] S4.2.2. Adjust the upper left corner vertical coordinate of each sub-question block under the same question to the target vertical starting point coordinate obtained in step S4.2.1, and adjust the lower right corner vertical coordinate of each sub-question block under the same question to the target vertical ending point coordinate obtained in step S4.2.1.

[0017] Furthermore, in step S3, when the difference between the upper left corner vertical coordinates or the difference between the lower right corner vertical coordinates of the two question blocks is smaller than a preset height threshold, it is determined that the two question blocks are arranged side by side in the horizontal direction.

[0018] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0019] The present invention also provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program; and when the processor is used to execute the computer program, the above method is implemented.

[0020] The beneficial effect of the present invention is that: using the method of the present invention, the coordinates of the manually selected question blocks can be accurately aligned and corrected, so that the question blocks are arranged neatly and orderly, and the display effect will not be affected by uneven arrangement. DETAILED DESCRIPTION

[0021] The present invention will be further described below. It should be noted that this embodiment is based on the technical solution and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to this embodiment.

[0022] This embodiment provides a method for correcting a frame title, and the specific process is as follows:

[0023] S1. Import the page image of the teaching aid page;

[0024] S2. Manually select each question block on the page image using a rectangular frame, and then obtain the coordinates of the upper left corner and lower right corner of each rectangular frame. For questions that do not have multiple horizontally arranged sub-questions, use a complete rectangular frame; for questions that have multiple horizontally arranged sub-questions, use a separate rectangular frame for each sub-question. It should be noted that the size of the rectangular frame can be resized by dragging it.

[0025] S3. Classify the selected question blocks into whole-question blocks and sub-question blocks; when a question block has no question block arranged horizontally side by side, or the gap between a question block and a question block arranged horizontally side by side and adjacent to it is greater than a preset gap threshold, the question block is a whole-question block; when two question blocks are arranged horizontally side by side and adjacent, if the gap between them is less than or equal to the set gap threshold, the two question blocks are sub-question blocks under the same question.

[0026] Specifically, when the difference between the upper left corner vertical coordinates or the difference between the lower right corner vertical coordinates of two question blocks is smaller than a preset height threshold, it is determined that the two question blocks are arranged side by side in the horizontal direction.

[0027] It should be noted that the horizontally arranged question blocks may be multiple sub-questions of the same question, or they may be two questions arranged horizontally side by side due to the use of a multi-column format. Generally speaking, if the sub-questions are multiple sub-questions of the same question, they will be arranged more closely. If different questions are arranged in columns, there will be larger gaps to distinguish them. Therefore, the method of this embodiment uses the gap detection between two adjacent horizontally arranged question blocks to determine whether the two adjacent horizontally arranged question blocks are sub-question blocks or the entire question block.

[0028] S4. Correct the frame questions for the whole question block and the sub-question block respectively;

[0029] The process of correcting the frame question of the entire question block is as follows:

[0030] S4.1.1. Obtain the upper left corner horizontal coordinate of each entire question block as the horizontal starting point coordinate, and the lower right corner horizontal coordinate as the horizontal ending point coordinate. Calculate the average of the horizontal starting point coordinates of each entire question block as the target horizontal starting point coordinate. Calculate the average of the horizontal ending point coordinates of each entire question block as the target horizontal ending point coordinate.

[0031] S4.1.2. Adjust the upper left corner horizontal coordinate of each whole question block to the target horizontal starting point coordinate, and adjust the lower right corner horizontal coordinate of each whole question block to the target horizontal ending point coordinate, while maintaining each whole question block in a rectangular shape;

[0032] The process of correcting the frame questions of the sub-question blocks is as follows:

[0033] S4.2.1. Take the upper-left corner vertical coordinate of each sub-question block under the same question as the vertical starting point coordinate, and the lower-right corner vertical coordinate as the vertical ending point coordinate. Calculate the average value of the vertical starting point coordinates of each sub-question block as the target vertical starting point coordinate, and calculate the average value of the vertical ending point coordinates as the target vertical ending point coordinate.

[0034] S4.2.2. Adjust the upper left corner vertical coordinate of each sub-question block under the same question to the target vertical starting point coordinate obtained in step S4.2.1, and adjust the lower right corner vertical coordinate of each sub-question block under the same question to the target vertical ending point coordinate obtained in step S4.2.1.

[0035] Those skilled in the art can make various corresponding changes and modifications based on the above technical solutions and concepts, and all of these changes and modifications should be included in the scope of protection of the claims of the present invention.

Claims

1. A method for correcting a frame title, characterized in that: The specific process is: S1. Import the page image of the teaching aid page; S2. After manually selecting each question block on the page image with a rectangular frame, obtain the coordinates of the upper left corner and the lower right corner of the rectangular frame of each question block; wherein, for a question that does not have multiple sub-questions arranged in the horizontal direction, use a complete rectangular frame to frame it; for a question that has multiple sub-questions arranged in the horizontal direction, use a rectangular frame to frame each sub-question separately; S3. Classify each selected question block into whole-question blocks and sub-question blocks; wherein, when a question block has no question block arranged horizontally parallel to it, or the gap between a question block and a question block arranged horizontally parallel to it and adjacent to it is greater than a preset gap threshold, the question block is a whole-question block; when two question blocks are arranged horizontally parallel to each other and adjacent, if the gap between them is less than or equal to the preset gap threshold, the two question blocks are sub-question blocks of the same question; S4. Correct the frame questions for the whole question block and the sub-question block respectively; The process of correcting the frame question of the entire question block is as follows: S4.1.

1. Obtain the upper left corner horizontal coordinate of each entire question block as the horizontal starting point coordinate, and the lower right corner horizontal coordinate as the horizontal ending point coordinate. Calculate the average of the horizontal starting point coordinates of each entire question block as the target horizontal starting point coordinate. Calculate the average of the horizontal ending point coordinates of each entire question block as the target horizontal ending point coordinate. S4.1.

2. Adjust the upper left corner horizontal coordinate of each whole question block to the target horizontal starting point coordinate, and adjust the lower right corner horizontal coordinate of each whole question block to the target horizontal ending point coordinate, while maintaining each whole question block in a rectangular shape; The process of correcting the frame questions of the sub-question blocks is as follows: S4.2.

1. For each sub-question block within the same question, use the upper-left corner ordinate as the vertical starting point coordinate and the lower-right corner ordinate as the vertical ending point coordinate. Calculate the average of the vertical starting point coordinates of each sub-question block as the target vertical starting point coordinate, and calculate the average of the vertical ending point coordinates as the target vertical ending point coordinate. S4.2.

2. Adjust the upper left corner vertical coordinate of each sub-question block under the same question to the target vertical starting point coordinate obtained in step S4.2.1, and adjust the lower right corner vertical coordinate of each sub-question block under the same question to the target vertical ending point coordinate obtained in step S4.2.

1.

2. The method according to claim 1, characterized in that In step S3 , when the difference between the upper left corner vertical coordinates or the difference between the lower right corner vertical coordinates of the two question blocks is smaller than a preset height threshold, it is determined that the two question blocks are arranged side by side in the horizontal direction.

3. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.

4. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program; and when the processor is used to execute the computer program, the method according to any one of claims 1 to 2 is implemented.

Citation Information

Patent Citations

  • Topic content identification method and device, readable storage medium and computer equipment

    CN110956173A

  • Question framing method and system for scanning page, terminal equipment and storage medium

    CN111767830A