Examination auxiliary system based on standardized answer sheet

Through the examination assistance system based on standardized answer sheets, using A4 paper and intuitive and easy-to-use answer area styles, the high cost and operational complexity of the existing examination system are solved, low-cost, convenient and efficient examination data processing and scoring are achieved, and the compatibility and scalability of the system are improved.

CN120449226APending Publication Date: 2025-08-08INNER MONGOLIA NORMAL UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510474071.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing examination system has problems such as complex production, high cost, strong equipment dependence, poor compatibility and difficult operation, especially when subjective question scoring and equipment failures affect the accuracy and timeliness of the examination results.

Method used

The examination assistance system based on standardized answer sheets is adopted, including page layout design module, answer sheet information acquisition module, generation module and image processing module. A4 paper is used as answer sheets to design intuitive and easy-to-use answer area styles, ensure accurate alignment and correction of images through positioning graphics and QR codes, simplify the template design process, and support automatic marking and online marking.

Benefits of technology

It reduces the cost of making and equipment maintenance of answer sheets, improves the economics of the system and user operation convenience, ensures the accuracy and efficiency of data processing, enhances the compatibility and expansion of the system, and supports automatic marking and online marking functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449226A_ABST
    Figure CN120449226A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of examination assistance, in particular to an examination assistance system based on standardized answer sheets. The system comprises a page layout design module which is used for designing the page layout of the answer sheet, and the page layout comprises a positioning graph, a two-dimensional code, a test paper information area, a student information area, a test question information area and a unit and page number information area; the answer sheet information acquisition module is used for acquiring answer sheet information, and the answer sheet information comprises answer area style information, test question information and title information; the answer sheet generation module is used for generating answer sheets according to the answer sheet information and recording position information; the answer sheet image processing module is used for scanning the answer sheet after the answer is completed to obtain an answer sheet image; the answer sheet image is processed to obtain a student number information image and an answer area image, and then question judgment is carried out. According to the method, the examination cost can be reduced, the template convenience is improved, data processing is accurate and efficient, and compatibility and expansibility are high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of examination assistance technology, and in particular to an examination assistance system based on a standardized answer sheet. Background Art

[0002] With the rapid development of information technology, online examination systems have demonstrated numerous advantages, such as convenience, cost-effectiveness, automated scoring, and rapid assessment. However, they also face numerous challenges, such as a high reliance on technology, limitations in question design and answer formats, and a lack of humanistic care. Traditional examination methods remain the primary choice for important examinations such as the college entrance examination due to their robust monitoring and anti-cheating capabilities, highly controllable examination environment, and relatively low technical barriers to entry. With technological advancements, automated grading, online grading, and automated digitization of grades have matured and are widely used in education, aiming to improve the efficiency and accuracy of grading and digitization of grades, and to reduce the burden on teachers.

[0003] Existing examination systems include those based on OMR (Objergometer) fill-in answer sheets and those using image processing technology to create templated answer sheets. However, OMR-based systems require strict adherence to standards for creating and filling in answer sheets, increasing operational complexity for both teachers and examinees. This technology is primarily suitable for objective-based exams and is inadequate for subjective questions. Furthermore, it relies heavily on OMRs and their supporting software, and any equipment or software failure directly impacts the accuracy and timeliness of exam results. Furthermore, the material and printing costs of answer sheets are high, as is the equipment purchase cost, which is inconsistent with sustainable development. Resource consumption and waste disposal are significant issues. Templated answer sheet systems based on image processing technology have a complex template creation process, requiring the creator to possess advanced image processing and template design capabilities. Template matching technology faces challenges, and answer sheets that cannot be matched are difficult to process. Summary of the Invention

[0004] In order to solve the above technical problems, the purpose of the present invention is to provide an examination assistance system based on a standardized answer sheet. The technical solutions adopted are as follows:

[0005] One embodiment of the present invention provides an examination assistance system based on a standardized answer sheet, the system comprising:

[0006] The page layout design module is used to design the page layout of the answer sheet. The page layout includes positioning graphics, QR code, test paper information area, student information area, test question information area, and unit and page number information area;

[0007] The answer sheet information acquisition module is used to obtain the answer sheet information, which includes the answer area style information, test question information and title information;

[0008] The answer sheet generation module is used to generate the answer sheet according to the answer sheet information and record the position information;

[0009] The answer sheet image processing module is used to scan the completed answer sheet to obtain the answer sheet image; process the answer sheet image to obtain the student number information image and the answer area image; and judge the questions based on the student number information image and the answer area image.

[0010] Preferably, the positioning pattern includes: the positioning pattern is located in cells at the upper left, lower left and lower right corners of the internal space, and is in a "U" shape.

[0011] Preferably, the answer area style information includes:

[0012] The answer area style information includes the first answer area style, the second answer area style and the third answer area style; the first answer area style includes the first style and the second style. The question number and the answer area of this style adopt a top-bottom structure layout, and the space occupied by each question is adjusted by the parameter number of cells; the second answer area style is a top-bottom structure layout, and the space occupied by each question is adjusted by the parameter number of cells. The space occupied under this style is not merged, and the cell border is displayed; the third answer area style. The question number and the answer area of this style adopt a front-back structure layout, and each question has the number of rows, underlines, and inline Figure 3 The number of rows can be used to adjust the space occupied by the test questions. The underline display parameter can be used to choose whether to display the underline. The embedded image parameter can be used to insert a specified image into the test answer area.

[0013] Preferably, the test question information includes:

[0014] Obtain the specific question type of the exam, and obtain the default answer area style sheet for the question type based on the specific question type and style parameters; generate group titles based on the principle of grouping different question types, combined with the number of questions and score information of each group, to obtain a question grouping table; associate the question grouping table with the default answer area style sheet for the question type to generate the final question information.

[0015] Preferably, the title information includes the examination year, semester number, major and examination paper name.

[0016] Preferably, generating an answer sheet according to the answer sheet information and recording the position information includes:

[0017] The specific steps to generate the answer sheet are:

[0018] The first step is to obtain the test question information, title information and test unit information;

[0019] The second step is to create a blank page image;

[0020] The third step is to generate positioning graphics;

[0021] Step 4: Generate a QR code;

[0022] Step 5: Generate test paper information;

[0023] Step 6: Generate a form to fill in student information and record the coordinates of the student number rectangle;

[0024] Step 7: Generate unit and page number information;

[0025] Step 8: Generate test information and record the rectangular coordinates of the answer area;

[0026] Step 9: Process the embedded images in the test questions to generate the answer sheet;

[0027] Record location information, including the student ID rectangle location information and the answer area rectangle location information.

[0028] Preferably, processing the answer sheet image to obtain the student number information image and the answer area image includes:

[0029] Step 1, identifying the positioning pattern on the answer sheet image;

[0030] Step 2: determining the page orientation based on the recognized answer sheet image and rotating and correcting it to obtain a corrected answer sheet image;

[0031] Step 3, performing geometric correction on the rotation-corrected answer sheet image to obtain a geometrically corrected answer sheet image;

[0032] Step 4: Crop the geometrically corrected answer sheet image to obtain the student ID information image and the answer area image.

[0033] Preferably, after the answer sheet image is processed to obtain the student number information image and the answer area image, the method further includes:

[0034] The cropped student number information image and answer area image are saved separately in a folder named Course Number-Page Number.

[0035] The embodiments of the present invention have at least the following beneficial effects: This application uses ordinary A4 paper as answer sheets, avoiding reliance on expensive specialized answer sheets, thereby reducing the production cost of answer sheets and simplifying the paper procurement and management process. This makes it particularly suitable for large-scale examinations, significantly saving the operating expenses of educational institutions. Furthermore, the system is compatible with various common scanning devices, eliminating the need to purchase and maintain expensive specialized OCRs. Exam organizers can use existing scanners to digitize answer sheets, further reducing equipment investment and maintenance costs and improving the system's affordability and sustainability.

[0036] Through the design of an intuitive and easy-to-use "answer area style", this technical solution provides a flexible template generation function. Teachers can adjust parameters, preview and adjust the layout in real time, without the need for professional image processing and design capabilities, thus simplifying the template design process, significantly improving the convenience and satisfaction of user operations, optimizing the overall user experience;

[0037] This application demonstrates high precision and efficiency in data processing. By designing a "hui" - shaped positioning pattern at the four corners of the answer sheet, it ensures the accurate alignment and correction of the scanned image, laying a solid foundation for subsequent image processing and data extraction. Using image processing algorithms, it efficiently and accurately identifies and extracts the positioning pattern, automatically determines the page orientation and performs rotation correction to ensure the correct alignment of the image content. At the same time, it quickly obtains control points for precise geometric correction, eliminates image deformation and distortion, records the coordinates of key areas and performs precise cropping to ensure the accuracy and efficiency of data extraction, supporting functions such as automatic marking and online marking;

[0038] This application has significant advantages in terms of compatibility and scalability. The method for generating answer sheets is highly modular and standardized, making it easy to integrate into different exam management and score analysis systems, improving the overall efficiency and accuracy of the system. The cropped image file format is clear, facilitating seamless integration with other education management systems and supporting the expansion of system functions; The generated score record form uses a common data format (such as CSV, Excel), making it easy to seamlessly integrate with other education management systems, data analysis tools or report generation tools, further expanding the application scope and functions of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0040] Figure 1 It is a system block diagram of an exam assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0041] Figure 2 It is a schematic diagram of the page layout of an exam assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0042] Figure 3 It is the first schematic diagram of the answer style of an exam assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0043] Figure 4A second schematic diagram of an answering style of an examination assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0044] Figure 5 A third schematic diagram of an answering style of an examination assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0045] Figure 6 A fourth schematic diagram of an answering style of an examination assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0046] Figure 7 A fifth schematic diagram of an answering style of an examination assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0047] Figure 8 A sixth schematic diagram of an answering style of an examination assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0048] Figure 9 A schematic diagram of the first page of a test assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0049] Figure 10 A schematic diagram of the second page of a test assistance system based on a standardized answer sheet provided by an embodiment of the present invention;

[0050] Figure 11 A schematic diagram of outline nesting of an examination assistance system based on a standardized answer sheet provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] To further illustrate the technical means and effectiveness of the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of a standardized answer sheet-based test assistance system proposed by the present invention. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0052] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0053] The following describes in detail a specific solution of a test assistance system based on a standardized answer sheet provided by the present invention with reference to the accompanying drawings.

[0054] Example:

[0055] The main application scenarios of the present invention are as follows: This application is mainly applied to the design of answer sheets and the processing of scanned images of answer sheets after answering questions, so as to facilitate subsequent question marking.

[0056] Please refer to Figure 1 , which shows a system block diagram of an exam assistance system based on a standardized answer sheet provided by an embodiment of the present invention. The system includes the following modules:

[0057] The page layout design module is used to design the page layout of the answer sheet. The page layout includes positioning graphics, QR codes, test paper information areas, student information areas, question information areas, and unit and page number information areas.

[0058] Students answer questions on the standardized answer sheet generated by this solution. After answering the questions, scan the answered answer sheet and import the answer sheet image. Provide data support for the automatic marking and online marking functions of the exam assistance system.

[0059] In this application, the paper size of the standard answer sheet is A4 paper, the template image resolution is 300 DPI, and the image size is 2480×3508 pixels (width × height). There is a border around the answer sheet page, where the upper and lower border widths are 54 pixels, and the left and right border widths are 40 pixels. The internal space of the border consists of 100 pixel × 100 pixel rectangular cells arranged in 24 columns and 34 rows. The internal space includes positioning graphics, QR codes, test paper information areas, student information areas, question information areas, and unit and page number information areas.

[0060] The specific layout is as follows:

[0061] Positioning graphics: Located in the cells at the upper left, lower left, and lower right corners of the internal space, in the shape of a "hui" character pattern.

[0062] QR code: Arranged in 4 cells in the upper right corner of the internal space, generating a QR code with a size of 200 pixels, used to store course and page number information.

[0063] Test paper information area: Consisting of 21 cells in the first row of the internal space, used to display information such as semester, major, course, and AB volume.

[0064] Student information area: Occupying the cells in the second and third rows of the internal space, it is the area for filling in information such as student name, class, and student number.

[0065] Question information area: Located in the core area of the internal space, consisting of cells arranged in 22 columns and 30 rows, used to display information such as question titles, serial numbers, and answer areas.

[0066] Unit and page number information area: Consisting of 22 cells in the last row of the internal space, used to display the issuing unit and answer sheet page number information. Its page layout is as Figure 2 Through the above layout design, the answer sheet ensures the orderly arrangement of information and easy identification, improving the efficiency and accuracy of traditional test support systems.

[0067] The answer sheet information acquisition module is used to obtain the answer sheet information, which includes the answer area style information, test question information and title information.

[0068] After determining the page layout of the answer sheet, it is necessary to obtain the answer sheet information and then generate the answer sheet based on the answer sheet information, wherein the answer sheet information includes the answer area style information, test question information and title information.

[0069] To improve the convenience of answer sheet generation, this application proposes the concept of "answer area styles." Each question group on the answer sheet is assigned a specific answer area style for display; users can modify the page content by adjusting the style parameters, enabling a preview-while-adjustment generation mode.

[0070] The answer area style information includes a first answer area style, a second answer area style, and a third answer area style.

[0071] Among them, the first answer area style includes the first style and the second style. The question number and the answer area of this style adopt a top-bottom structure layout, and the space occupied by each question is adjusted by the style parameter cell number. It is suitable for multiple-choice questions, true-or-false questions, fill-in-the-blank questions and other question types. The effect diagrams of the first style and the second style are as follows: Figure 3 and Figure 4 shown.

[0072] The second answer area style also uses a top-bottom structure layout, and the space occupied by each question is adjusted by the style parameter "number of cells". However, the space occupied in this style is not merged, and the cell borders are displayed. This style is suitable for multiple-choice questions. The effect diagram of the second answer area style is as follows Figure 5 shown.

[0073] The third answer area style has the question number and answer area in a front-to-back structure. Each question has the number of rows, underline, and embedded Figure 3 Style parameters. The space occupied by the test questions can be adjusted by the number of rows. The effect is as follows Figure 6 As shown; through the display underline parameter, you can choose whether to display the underline, the effect is as follows Figure 7 As shown; Through the embedded image parameter, you can insert a specified graphic into the test answer area, the effect is as follows Figure 8 shown.

[0074] Furthermore, it is necessary to obtain the test question information, obtain the specific question type of the test, and obtain the default answer area style table of the question type based on the specific question type and style parameters, as shown in the following table:

[0075] Table 1 Default answer area style table for question types

[0076]

[0077] Based on the test question information of the test paper, group them by question type and generate a title for each group, as follows:

[0078] Table 2 Test question information table

[0079]

[0080]

[0081] According to the principle of grouping different question types, combined with the number of questions and score information of each group, the group titles are generated and the question grouping table is obtained. The results are as follows:

[0082] Table 3 Test question grouping table

[0083]

[0084] Associate the "Question Grouping Table" with the "Question Type Default Answer Area Style Table" to generate the final question information, as shown in the Answer Sheet Question Information Table:

[0085] Table 4 Answer sheet test information table

[0086]

[0087]

[0088] Note that for the "Question Number" column, "All" in the style parameters indicates that all questions in that group use the same style parameters; specific question numbers, such as 26-28, correspond to their own style parameters. Embedded images are only available for questions that require an image, such as Question 26 in the short-answer section.

[0089] Finally, you need to obtain the title information, which includes the exam year, semester number, major, and test paper name. For example, "2023-2024 Academic Year Second Semester Physical Geography and Resources and Environment Major "Human Geography" Test Paper A", the exam year is the 2023-2024 academic year, the semester number is the second semester, the major is Physical Geography and Resources and Environment, and the test paper name is "Human Geography" Test Paper A.

[0090] Through the above steps, the "Answer Sheet Question Information Table" is successfully generated, ensuring that each question type is correctly displayed according to the predetermined format and recording the necessary style parameters and embedded image information. This information table provides comprehensive data support for the subsequent generation of the answer sheet.

[0091] Answer sheet generation module, which is used to generate an answer sheet according to the answer sheet information and record the position information.

[0092] After obtaining the answer sheet information, it is necessary to generate an answer sheet according to the answer sheet information. The specific steps include:

[0093] The first step is to obtain the question information, title information and test paper issuing unit information;

[0094] The second step is to create a blank page image;

[0095] The third step is to generate positioning graphics;

[0096] The fourth step is to generate a QR code;

[0097] The fifth step is to generate the test paper information;

[0098] The sixth step is to generate a table for filling in student information and record the coordinates of the student ID rectangle;

[0099] The seventh step is to generate the unit and page number information;

[0100] The eighth step is to generate the question information and record the coordinates of the answer area rectangle;

[0101] The ninth step is to process the embedded figures in the questions to generate the answer sheet.

[0102] Among them, in the second step, using the method technology of creating a blank page image, a blank image with a width of 2480 pixels and a height of 3508 pixels is generated as the basic template of the answer sheet. The specific steps of the method technology of creating a blank page image include:

[0103] Define the page size: Set the width and height of the image to 2480 pixels and 3508 pixels respectively, which conform to the pixel size of A4 paper size (210mm×297mm) at 300 DPI;

[0104] Create a white background image: Use NumPy to generate a fully white RGB image array and initialize the image as a white background;

[0105] Convert to a PIL image object: Convert the NumPy array to a PIL image object for further drawing operations;

[0106] Create a drawing object: Use the ImageDraw.Draw method to create a drawing object draw for drawing graphics and text on the image.

[0107] The third step, generating the positioning graphics specifically includes: Adopting the method technology of drawing rectangles, draw the "hui" character pattern in the cells at the upper left, lower left and lower right corners of the internal space of the answer sheet page to achieve precise positioning of the page.

[0108] The technique for drawing a rectangle includes using the ImageDraw.rectangle method to draw a rectangle. The specific steps are as follows:

[0109] Define the coordinates of the rectangle: specify the coordinates of the upper left corner and lower right corner of the rectangle, (x1, y1) and (x2, y2);

[0110] Define color and border width: Set the rectangle's fill color to white, border color to black, and border width to 1 pixel;

[0111] Draw a rectangle: Use the draw.rectangle method to draw a rectangle with the specified coordinates and style on the image.

[0112] The fourth step, generating a QR code, involves using the QR code generation method and the image insertion method to create a 200-pixel QR code in the top-right corner of the answer sheet, storing the course number and page number. The QR code generation method uses the QRCode library to generate a 200-pixel QR code image with the content '130,0' and a size of 200 pixels. The specific steps are:

[0113] Define the QR code content and size: Set the QR code content to '130,0' and the QR code size to 200 pixels.

[0114] Create a QR code object: Use the qrcode.QRCode method to create a QR code generator, set the error correction level to low (ERROR_CORRECT_L), and no border (border=0);

[0115] Add data and generate a QR code: Add data to the QR code generator, generate a QR code image, and convert it to RGB mode for subsequent image processing.

[0116] The method and technology of inserting another image into the specified position of an image, the specific steps are:

[0117] Convert image format: Convert the PIL image object image2 to NumPy array format to be compatible with OpenCV images;

[0118] Get the size of the inserted image: get the height h and width w of the inserted image;

[0119] Insert image: Overwrite the inserted image array image2_array to the specified position (x, y) of the target image image1, ensuring that the size of the inserted area is consistent with the inserted image.

[0120] The fifth step is to generate the test paper information, which specifically includes: applying the text drawing method technology to draw the basic information of the test paper in the test paper information area of the answer sheet, such as semester, major, course name, etc. The specific steps of the text drawing method technology are:

[0121] Define the text content and style: Set the text content to be drawn, set the font size to 12, use the TrueType font file MSYH.TTC, and the font color to black;

[0122] Draw text: Use the draw.text method to draw text at the specified coordinate (x, y).

[0123] The sixth step is to generate a form for filling in student information and record the coordinates of the student number rectangle, which specifically includes: using the rectangle drawing method technology and the text drawing method technology to draw a form for filling in student name, class and student number in the student information area.

[0124] When drawing the rectangle for the student ID area, record the coordinates of the rectangle in the format of ((x1,y1),(x2,y2)) so that it can be accurately positioned when importing the scanned answer sheet image.

[0125] The seventh step is to generate unit and page number information, which specifically includes: using the text drawing method technology to draw the test unit and the page number information of the answer sheet in the unit and page number information area.

[0126] The eighth step is to generate the test information and record the rectangular coordinates of the answer area, which specifically includes: based on the content of the "Answer Sheet Test Information Table", applying the rectangle drawing method technology and the text drawing method technology, drawing the test title, serial number and answer area in the test information area according to the test group order and style information.

[0127] When drawing the answer rectangle area for each question, record its coordinates in the format of ((x1,y1),(x2,y2)) so that it can be accurately identified and processed when importing the scanned answer sheet image.

[0128] The ninth step is to process the embedded images in the test questions, including: using the method of inserting another image at a specified position of an image, and inserting the image file of the embedded image of each test question into the corresponding answer rectangle.

[0129] Through the above steps, a standardized answer sheet was successfully generated, and the student ID and the coordinates of each answer area were accurately recorded. These location records provide the necessary data support for subsequent answer sheet scanning and image import, ensuring the efficiency and accuracy of the system in practical applications. The first and second page diagrams of the answer sheet are shown in the figure below. Figure 9 and Figure 10 shown.

[0130] Furthermore, it is necessary to record the position information, which includes the student number rectangle position information and the answer area rectangle position information. The student number rectangle position information is recorded as the rectangular coordinates of the student number, in the format of ((x1, y1), (x2, y2)). The answer area rectangle position information is recorded as the rectangular coordinates of the answer area of each question, in the format of ((x1, y1), (x2, y2)). The student number rectangle position information and the answer area rectangle position information are used to generate the student number rectangle position record table and the answer area rectangle position record table respectively. Specific examples are shown in Table 5 and Table 6:

[0131] Table 5 Student ID rectangle position record table

[0132]

[0133]

[0134] Table 6 Answer area rectangle position record table

[0135]

[0136] This will generate a standard answer sheet.

[0137] The answer sheet image processing module is used to scan the completed answer sheet to obtain the answer sheet image; process the answer sheet image to obtain the student number information image and the answer area image; and judge the questions based on the student number information image and the answer area image.

[0138] Furthermore, the completed answer sheet is scanned to obtain an answer sheet image, wherein the image scanning technology is a well-known technology and will not be described in detail here.

[0139] To ensure that subsequent automated processing and recognition steps can accurately extract student ID information and answer information, high-quality scanning equipment is required to ensure image clarity. During the scanning process, please pay attention to the following points to ensure image quality:

[0140] Resolution setting: Scan at a resolution of 300 DPI or higher to ensure the clarity of text and markings. This helps improve the accuracy of subsequent image processing and recognition.

[0141] Color Mode: Select grayscale or black and white mode to reduce color interference and improve image processing efficiency. Grayscale mode can effectively distinguish text from background, facilitating subsequent image analysis.

[0142] Scan area: Ensure the entire page is scanned completely, avoiding missing edges. A complete scan helps accurately locate the student ID and answer area, preventing information loss.

[0143] Image Format: Save in a commonly used lossless compression format, such as PNG or TIFF, to maintain image quality. Lossless formats ensure that scanned image details are not lost through compression, making them suitable for subsequent image processing and analysis.

[0144] Through the above steps, high-quality images can be obtained, providing a reliable basis for subsequent image import and processing, and ensuring the accurate extraction of student number information and answer information.

[0145] Furthermore, the specific steps of processing the answer sheet image to obtain the student number information image and the answer area image are as follows:

[0146] Step 1: Identify the positioning pattern on the answer sheet image. The specific steps are as follows:

[0147] 1) Estimate the size of the positioning pattern in the image

[0148] First, obtain the width and height of the answer sheet image and take the smaller value as the image width w (in pixels). When generating the answer sheet, the page width is set to 2480 pixels, the outer outline size of the positioning pattern is 100 pixels, and the minimum inner outline size of the QR code positioning pattern is 30 pixels;

[0149] Assuming that the deformation rate of the scanned answer sheet image is less than 1%, the outline size of the positioning figure in the scanned image should meet the following conditions:

[0150] Maximum size: finder_pattern_max_size = w / 2480 × (1 + 1%) × 100 pixels,

[0151] Minimum size: finder_pattern_min_size=w / 2480×(1-1%)×30 pixels.

[0152] 2) Obtain a square outline that meets the positioning pattern outline size requirements.

[0153] Apply the square contour search technique to extract all square contours within the [finder_pattern_min_size,finder_pattern_max_size] range from the answer sheet image. This step ensures that only potential positioning pattern contours of the expected size are selected, reducing the false positive rate.

[0154] The square outline query method and technology mainly include:

[0155] (1) Image preprocessing

[0156] Grayscale conversion: Convert color images to grayscale images to improve processing efficiency.

[0157] Gaussian Blur: Apply Gaussian blur to reduce image noise and details, which helps with edge detection.

[0158] Canny Edge Detection: Use the Canny algorithm to extract the edges of the image and generate an edge image.

[0159] (2) Contour Detection

[0160] Find Contours: Use the cv2.findContours function to find all the contours in the image.

[0161] Polygon Approximation: Simplify the contours through the cv2.approxPolyDP function to reduce the number of contour points and improve the detection efficiency.

[0162] (3) Square Contour Screening

[0163] Get Bounding Rectangle: Use cv2.boundingRect on the simplified contours to obtain the coordinates and dimensions of their bounding rectangles.

[0164] Size Judgment: Determine whether the contour is an approximate square and its side length is within the specified minimum and maximum size ranges.

[0165] Contour Filtering: Only retain the rectangular contours that meet the conditions to reduce the false detection rate.

[0166] (4) Auxiliary Functions

[0167] is_approx_square: Determine whether a contour is approximately a square and its side length is within the specified range.

[0168] point_to_line_distance: Calculate the shortest distance from a point to a line segment, which is used to determine whether the shape of the contour meets the requirements of a square.

[0169] This method is mainly applied to identify the positioning graphics on the answer sheet for subsequent page correction and data extraction, ensuring the accuracy and consistency of image processing.

[0170] 3) Identify Positioning Graphics

[0171] Among all the square contours that meet the size requirements obtained, identify the actual positioning graphics. The specific steps are as follows:

[0172] 1 Group Nested Contours

[0173] Use the nested contour grouping method to group all the square contours. Since the "hui" - shaped positioning graphic consists of three nested contours, only retain the groups that contain three or more contours to ensure the accurate identification of the positioning graphics.

[0174] The nested contour grouping method mainly includes:

[0175] To determine whether there is a nested relationship between contour A and contour B, this method judges whether contour B is completely inside contour A. If there is a nested relationship, then contour A and contour B are grouped together, as Figure 11 shown.

[0176] When judging, judgment conditions need to be met. The judgment conditions consist of four parts. Only when all four parts are fully met can it be determined that contour B is completely inside contour A. The four parts are respectively:

[0177] 1) x1 + range_ < x2: The left boundary (x1) of contour A plus the tolerance range_ must be less than the left boundary (x2) of contour B. This ensures that contour B does not exceed the left boundary of contour A in the horizontal direction.

[0178] 2) (x1 + w1) > (x2 + w2) + range_: The right boundary (x1 + w1) of contour A must be greater than the right boundary (x2 + w2) of contour B plus the tolerance range_. This ensures that contour B does not exceed the right boundary of contour A in the horizontal direction.

[0179] 3) y1 + range_ < y2: The upper boundary (y1) of contour A plus the tolerance range_ must be less than the upper boundary (y2) of contour B. This ensures that contour B does not exceed the upper boundary of contour A in the vertical direction. <​​​​​​​​​​​​This method is mainly used to identify and group the contours of the positioning figures on the answer sheet, ensuring the accuracy of subsequent processing steps such as outer contour selection and positioning figure position determination.

[0185] 2 Select the outer contour

[0186] For each group, the outer contour selection method technology in the nested contour group is applied to select the outermost contour as the proposed positioning pattern outer contour.

[0187] The main techniques for selecting the outer contour in a nested contour group include:

[0188] (1) Select the outermost contour

[0189] For each group, initially set the first rectangle as the outermost rectangle. Traverse all rectangles in the group, and if a rectangle is found not inside the current outermost rectangle, update it to the new outermost rectangle.

[0190] (2) Result storage

[0191] Add the outermost rectangular outline determined in each group to the result list.

[0192] This method is used to determine the outer contours of the positioning pattern on the answer sheet, ensuring an accurate basis for page correction and image processing.

[0193] ③Determine the positions of the four positioning graphics

[0194] From all proposed outer contours, identify the four true positioning graphic contours located at the top left, bottom left, top right, and bottom right of the page. The specific method is as follows:

[0195] Step 1: Identify the upper left corner outline

[0196] Find the contour with the smallest x and y values among the contours, and determine the upper left corner positioning graphic contour by comparing the x+y values.

[0197] Step 2: Identify the lower right corner outline

[0198] Find the contour with the largest x and y values among the contours, and determine the lower right corner of the positioning graphic contour by comparing the x+y values.

[0199] Step 3: Identify the lower left corner outline

[0200] The x value of the lower left corner contour should be equal to the x value of the upper left corner contour, and the y value should be equal to the y value of the lower right corner contour. The lower left corner positioning pattern contour is determined by calculating the distance between the contour and the point (x of the lower left corner contour, y of the lower right corner contour).

[0201] Step 4: Identify the upper right corner outline

[0202] The x value of the top right corner contour should be equal to the x value of the bottom right corner contour, and the y value should be equal to the y value of the top left corner contour. The top right corner positioning pattern contour is determined by calculating the distance between the contour and the point (x of the bottom right corner contour, y of the top left corner contour).

[0203] Through the above steps, the positions of the four positioning patterns are accurately identified, thus providing a reliable basis for subsequent page orientation correction and image processing.

[0204] Step 2: Determine the page orientation based on the identified positioning pattern on the answer sheet and rotate it to obtain a corrected answer sheet image. Specifically:

[0205] The upper right corner of the internal space of the answer sheet contains a QR code, and there is a positioning pattern in the upper right corner of the QR code. Compared with the positioning patterns in the other three corners (upper left, lower left, and lower right), the positioning pattern in the upper right corner is smaller. Specifically, when generating the answer sheet, the positioning patterns in the upper left, lower left, and lower right corners are 100 pixels in size, while the positioning pattern in the upper right corner is 70 pixels in size (which is also the positioning pattern of the QR code). Based on this, by comparing the sizes of the positioning patterns in the four corners, the direction of the scanned answer sheet image can be determined and the corresponding rotation correction can be performed. The specific method is as follows:

[0206] The first possibility: If the positioning graphic in the upper right corner is the smallest, the page orientation is normal and no rotation correction is required.

[0207] The second possibility is that if the locator pattern in the lower right corner is the smallest, the page has been rotated 90° clockwise. In this case, you need to apply image rotation techniques to correct the problem by rotating it 90° counterclockwise and reorder the four corner locators to ensure accuracy in subsequent processing.

[0208] Possible cause: If the top-left corner locator is the smallest, the page has been rotated 90° counterclockwise. In this case, you'll need to apply image rotation techniques to correct the problem by rotating the page 90° clockwise and reordering the four corner locators to ensure accuracy in subsequent processing.

[0209] Possible cause: If the bottom-left corner locator pattern is the smallest, the page has been rotated 180°. In this case, you'll need to apply image rotation techniques to correct the problem by rotating the image 180° and reordering the four corner locators to ensure accuracy in subsequent processing.

[0210] Image rotation methods and technologies mainly include:

[0211] This method is used to rotate the image. Its specific functions include:

[0212] (1) Rotate 90° clockwise

[0213] Use the cv2.rotate function to rotate the image 90 degrees clockwise.

[0214] (2) Rotate 90° counterclockwise

[0215] Use the cv2.rotate function to rotate the image 90 degrees counterclockwise.

[0216] (3) Rotate 180°

[0217] Use cv2.rotate function to rotate the image 180 degrees.

[0218] This method is used to adjust the image orientation of the answer sheet according to the detection results of the positioning pattern in the page orientation correction step, ensuring the accuracy of subsequent processing steps such as geometric correction and data extraction.

[0219] Step 3: Perform geometric correction on the rotation-corrected answer sheet image to obtain a geometrically corrected answer sheet image. Specifically:

[0220] The size of the scanned answer sheet image may be different from the page size when it was generated, and the image may be deformed to a certain extent. The "student number rectangle position" and "answer area rectangle position" recorded when generating the answer sheet are obtained on the generated page. If they are directly cropped from the scanned answer sheet image, it may cause position offset. Therefore, it is necessary to obtain the coordinates of the same position (called control points) from the generated page image and the scanned answer sheet image, and perform geometric correction on the scanned answer sheet image. The specific geometric correction method is as follows:

[0221] 1) Get control point data

[0222] Select the upper left corner of the upper left corner positioning figure on the [Answer Sheet] page, the upper right corner of the upper right corner positioning figure, the lower right corner of the lower right corner positioning figure, and the lower left corner of the lower left corner positioning figure, for a total of four control points. The specific method to obtain them is as follows:

[0223] ① Get the control point from the generated [Answer Sheet] page

[0224] pt_left_top_newpage (the upper left corner of the upper left corner positioning graphic): (40,54)

[0225] pt_right_top_newpage (the upper right corner of the positioning graphic): (2440,54)

[0226] pt_right_bottom_newpage (the lower right corner of the positioning graphic): (2440,3454)

[0227] pt_left_bottom_newpage (the lower left corner of the positioning graphic): (40,3454)

[0228] Result data:

[0229] dst_points=(pt_left_top_newpage, pt_right_top_newpage, pt_right_bottom_newpage, pt_left_bot tom_newpage).

[0230] ② Get control points from the scanned [answer sheet] image

[0231] Based on the four corners after adjusting the order in the previous step, the contour data of the graphics is located and the specific control points are obtained as follows:

[0232] pt_left_top_scan (locate the upper left corner of the graphic): locate the upper left corner of the graphic outline. Assuming the outline is ((x1, y1), (x2, y2)), the point is (x1, y1).

[0233] pt_right_top_scan (locate the upper right corner of the graphic): locate the upper right corner of the graphic outline. Assuming the outline is ((x1, y1), (x2, y2)), the point is (x2, y1).

[0234] pt_right_bottom_scan (locate the lower right corner of the graphic): locate the lower right corner of the graphic outline. Assuming the outline is ((x1,y1),(x2,y2)), the point is (x2,y2).

[0235] pt_left_bottom_scan (locating the lower left corner of the graphics): locate the lower left corner of the graphics outline. Assuming the outline is ((x1,y1), (x2,y2)), the point is (x1,y2).

[0236] Result data:

[0237] src_points=(pt_left_top_scan,pt_right_top_scan,pt_right_bottom_scan,pt_left_bottom_scan).

[0238] 2) Geometric correction

[0239] Applying geometric correction techniques, using the src_points and dst_points control point data as parameters, we perform geometric correction on the scanned, rotation-corrected answer sheet image. This geometric correction ensures that all content is positioned exactly as it was on the generated answer sheet, providing accurate data for the next step of image cropping.

[0240] The geometric correction method technology mainly includes:

[0241] This method is used to perform geometric correction on an image. The specific steps include:

[0242] (1) Calculate the perspective transformation matrix

[0243] Use the cv2.getPerspectiveTransform function to calculate the perspective transformation matrix matrix based on the source point src_points and the destination point dst_points.

[0244] (2) Apply perspective transformation

[0245] Use the cv2.warpPerspective function to apply the calculated transformation matrix to perform perspective transformation correction on the image and generate the corrected image corrected_image.

[0246] This method is used in the geometric correction step to eliminate image deformation that may be caused during the scanning process, ensuring that all contents of the answer sheet remain in the same position and proportion as when they were generated after scanning, providing a basis for accurate data extraction.

[0247] Step 4: Crop the geometrically corrected answer sheet image to obtain the student ID information image and the answer area image.

[0248] Using image cropping techniques, we use the "student ID rectangle position" and "answer area rectangle position" data recorded when generating the answer sheet to crop images of the student ID and answer content from the geometrically corrected scanned answer sheet image. These cropped images serve as input for the automatic and online grading functions of traditional test support systems. The steps are detailed below:

[0249] 1) Get the coordinates of the clipping area

[0250] According to the "student number rectangle position" and "answer area rectangle position" recorded when generating the answer sheet, the corresponding coordinate data is extracted.

[0251] 2) Perform image cropping

[0252] Use the image cropping method to crop the desired area from the geometrically corrected scanned image according to the recorded rectangular coordinates. The specific operation is as follows:

[0253] ①Cut the student ID area

[0254] According to the coordinates of the "student ID rectangle position", the image part containing the student ID is cropped to obtain the student ID information image for subsequent student identification.

[0255] ②Cut the answer area

[0256] According to the coordinates of the "answer area rectangular position", the image part containing the student's answer content is cropped to obtain the answer area image for automatic and online grading.

[0257] Image cropping methods and technologies mainly include:

[0258] (1) Unpacking rectangle coordinates and dimensions

[0259] Get the upper left corner coordinates (x, y), width w and height h of the rectangle through the tuple enclosing_rectangle.

[0260] (2) Calculate the coordinates of the clipping area

[0261] Calculates the start and end coordinates of the clipping region based on the rectangle coordinates and dimensions. Optionally adds a buffer to add extra margin around the rectangle when clipping. Ensures that the clipping coordinates do not exceed the bounds of the image.

[0262] (3) Perform image cropping

[0263] Use array slicing to extract the specified cropping area from the image and generate the cropped image cropped_image.

[0264] This method is used to crop out key image parts such as student ID and answer area from the geometrically corrected answer sheet image, providing input for subsequent handwriting recognition and data extraction.

[0265] Finally, save the cropped student number information image and answer area image. Specifically, save the cropped student number information image and answer area image separately in a folder named "Course Number-Page Number" (obtained from the QR code in the upper right corner of the [Answer Sheet]).

[0266] The file naming rules are shown in the following table:

[0267] Table 6 File naming rules

[0268]

[0269] The cropped student ID information image and answer area image are input into the traditional examination auxiliary system to realize automatic marking and online marking functions, thereby improving marking efficiency and accuracy.

[0270] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0271] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

[0272] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An examination assistance system based on a standardized answer sheet, characterized in that: The system includes: A page layout design module for designing the page layout of the answer sheet. The page layout includes positioning graphics, QR codes, test paper information areas, student information areas, question information areas, and unit and page number information areas; An answer sheet information acquisition module for acquiring answer sheet information, which includes answer area style information, question information, and title information; An answer sheet generation module for generating an answer sheet according to the answer sheet information and recording position information; An answer sheet image processing module for scanning the completed answer sheet to obtain an answer sheet image; processing the answer sheet image to obtain a student ID information image and an answer area image; and grading questions based on the student ID information image and the answer area image.

2. The test assistance system based on a standardized answer sheet according to claim 1, characterized in that: The positioning graphics include: cells located in the upper left, lower left, and lower right corners of the internal space of the positioning graphics, forming a "hui" - shaped pattern.

3. The test assistance system based on a standardized answer sheet according to claim 1, characterized in that: The answer area style information includes: The answer area style information includes a first answer area style, a second answer area style, and a third answer area style; the first answer area style includes a first style and a second style. For this style, the question numbers and the answer areas are arranged in an up - down structure layout, and the space occupied by each question is adjusted by the number of parameter cells; the second answer area style is in an up - down structure layout, and the space occupied by each question is adjusted by the number of parameter cells. In this style, the occupied space is not merged, and the borders of the cells are displayed; the third answer area style has the question numbers and the answer areas arranged in a front - back structure layout. Each question has three parameters: the number of rows, display underline, and embedded figure. The space occupied by the question can be adjusted by the number of rows. By the display underline parameter, it can be selected whether to display the underline; by the embedded figure parameter, a specified graphic can be inserted into the question answer area.

4. The test assistance system based on a standardized answer sheet according to claim 1, characterized in that: The question information includes: Obtaining the specific question types of the exam, obtaining the default answer area style table for question types according to the specific question types and style parameters; generating grouped titles according to the principle of grouping different question types, combining the number of questions and score information in each group, and obtaining a question grouping table; associating the question grouping table with the default answer area style table for question types to generate the final question information.

5. The test assisting system based on a standardized answer sheet according to claim 1, characterized in that: ​ 6. The test assisting system based on a standardized answer sheet according to claim 1, characterized in that: ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ 7. The test assisting system based on a standardized answer sheet according to claim 1, characterized in that: ​ ​ ​ Step 3, performing geometric correction on the rotation-corrected answer sheet image to obtain a geometrically corrected answer sheet image; Step 4: Crop the geometrically corrected answer sheet image to obtain the student ID information image and the answer area image.

8. The test assisting system based on a standardized answer sheet according to claim 1, characterized in that: After the answer sheet image is processed to obtain the student number information image and the answer area image, the method further includes: The cropped student number information image and answer area image are saved separately in a folder named Course Number-Page Number.

Citation Information

Patent Citations

  • Typesetting style generation method for general answer sheet

    CN105718438A

  • Answer sheet generation method, answer sheet identification method, and assignment system

    CN107908612A

  • A system and a method for fast information input of structured visual document

    CN109033046A

  • Answer sheet generation method and device, answer sheet recognition method and device and storage medium

    CN110765995A

  • Answer sheet correction method and device, electronic equipment and storage medium

    CN112348019A