Method for scanning test paper and identifying test question information according to coordinate information
The method of identifying test papers through coordinate information solves the problem that traditional test paper scanning cannot identify subjective questions, realizes automated management of paper test papers and automatic grading of objective questions, improves examination efficiency and accuracy, and supports online manual processing of subjective questions. Grading simplifies the work process.
Patent Information
- Application Number
- CN202410229905.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2024-10-22
AI Technical Summary
The traditional test paper scanning method can only identify dedicated answer sheets and cannot conduct online marking of subjective questions, which limits the efficiency and accuracy of offline examinations.
By scanning the test paper according to the coordinate information to identify the test question information, the examination system and the client for scanning the test paper are used to automatically identify the test paper pictures, and support automatic marking of objective questions and online manual marking of subjective questions without the need for special answer sheets.
It realizes automated management of paper examination papers and automatic marking of objective questions, improving the efficiency and accuracy of offline examinations. It also supports online manual marking of subjective questions, simplifying the workflow of teachers and students.
Smart Images

Figure CN118823801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method for scanning a test paper and identifying test question information according to coordinate information. Background Art
[0002] Examination is a very important part of the teaching process, and it is also a relatively objective and fair means of testing students' learning level and learning outcomes. Generally speaking, there are two forms of examinations. One is an offline examination, where the marking of objective questions uses a dedicated answer sheet and uses computer image recognition to mark the papers, which greatly improves the speed and accuracy of marking, so it has been widely used; the other is an online examination, where students answer questions directly through computers and teachers mark the papers online. Generally speaking, the former is the most common method used in actual examinations.
[0003] For offline exams, test paper scanning and recognition is an important application that can help teachers and students manage and use test papers more conveniently. However, traditional test paper scanning can only recognize dedicated answer sheets, while subjective questions cannot be scanned and recognized for subsequent online marking. Summary of the invention
[0004] The present invention aims at the problem that the existing test paper scanning method can only identify the dedicated answer sheet and cannot mark the subjective questions online, and provides a method for scanning the test paper and identifying the test question information according to the coordinate information. The method does not need a dedicated answer sheet, directly scans the student test paper, and automatically processes to obtain the test question information, automatically marks the objective questions and supports the subsequent online marking of the subjective questions.
[0005] The present invention is implemented by adopting the following technical solution: a method for scanning a test paper and identifying test question information according to coordinate information, comprising the following steps: Step 1. Set up the test data in the test system, including the test paper used and the candidates who will take the test; Step 2. Open the test paper scanning client through the test system. At this time, the test system transmits the test ID to the test paper scanning client; Step 3. Scan the test paper. The client scans the test paper after the examinee takes the test and transmits the scanned result to the test system: test paper image + test ID; Step 4. The examination system receives the examination paper image + examination ID sent by the examination paper scanning client and processes the examination paper image; Step 5. Recognize the test paper image processed in step 4; Step 6. End. At this point, all the information of the test paper image has been identified and bound.
[0006] In the above method for scanning a test paper and identifying test question information according to coordinate information, step 4 specifically includes the following steps: Step 4.1. Obtain the unified coordinate information of the test paper corresponding to the test paper used in this test according to the test ID; Step 4.2. Compare the length and width of the test paper image. If the length is less than the width, it means that the test paper image is rotated by +90° or -90° compared with the standard test paper image. Then rotate the test paper image by 90°. Step 4.3. Determine the magnification ratio of the test paper image according to the length of the rotated test paper image compared with the length of the standard test paper image; Step 4.4. Use the grayscale image to read the rotated test paper image; perform Gaussian blur and closing operations to process the grayscale test paper image; Step 4.5. Define the maximum value of the detection circle radius r max and minimum value r min , r max =r×K+A, r min =r×KA, and defines the minimum detection distance between the centers of the positioning circles d min , d min =r×K×B, where r is the radius of the positioning circle in the unified coordinate information of the test paper, K is the magnification ratio, A and B are values determined according to the length of the standard test paper, and the processed test paper image is subjected to Hough circle detection according to the maximum and minimum values of the detection circle radius and the minimum detection distance, and finally five positioning circles are determined; Step 4.6. Define the coordinates of the middle position positioning circle in the horizontal direction in the above test paper image, and calculate the distance between the middle position positioning circle of the test paper image and the middle positioning circle of the standard test paper image according to the coordinates. If the distance is greater than half of the image width, it means that the image needs to be rotated 180°, and the image is adjusted again. At this time, the angle information of the test paper image is consistent with the standard image; Step 4.7. Sort the other position positioning circles found in the order of upper left, upper right, lower left, and lower right; Step 4.8. Correct the test paper image. According to the coordinates of the upper left, upper right, lower left and lower right positioning circles of the standard test paper image and the test paper image processed in the previous step, perform perspective transformation to correct the distortion of the image. The size of the transformed test paper image is the length and width of the standard test paper image multiplied by the magnification ratio.
[0007] In the above method for scanning a test paper and identifying test question information according to coordinate information, step 5 specifically includes the following steps: Step 5.1. The corrected test paper image is first eroded, then expanded, and finally binarized; Step 5.2. The test paper image after binarization is intercepted and recognized on the test paper image according to the coordinates and size of the QR code of the test paper unified coordinate information × magnification ratio. After recognition, the test paper and page number corresponding to the current test paper image can be determined, and the test paper and page number are bound to the current test paper image; Step 5.3. Determine the position of the student ID in the binarized test paper image according to the coordinates and size of the student ID filling area of the test paper unified coordinate information × the magnification ratio. Find the pixel position that occupies the largest proportion of the filling position and is greater than 50% in each student ID column at the filling position, which is the student ID in this column. Get the final student ID and bind the student information. Step 5.4. After all the test paper images are recognized, bind all the candidates' test papers to determine the test paper used by each candidate and the image of each page of the test paper; Step 5.5. Find each examinee in turn, identify the objective fill-in questions, and identify the pixel ratio of the fill-in position according to the coordinates and size information of the fill-in area of the objective question in the coordinate information of each page of the test paper. If it is greater than 50%, it is identified as fill-in, and the correctness of the objective question is determined according to the student's options after identification; Step 5.6. Identify the subjective questions. According to the coordinates and size of the answer area of the subjective questions in the question coordinate information of each page of the test paper, obtain the position information of all subjective questions for image cutting and binding, and obtain the images corresponding to the subjective questions for subsequent online manual marking.
[0008] The above-mentioned method of scanning the test paper and identifying the test question information based on the coordinate information, the unified coordinate information of each set of test papers includes the length and width information of the standard test paper image, the coordinates and size of the QR code image, the coordinates and size of the candidate's student number filling area, the coordinates and radius size of the five positioning circles, and the test question coordinate information of each page of the test paper includes the coordinates and size of each test question and the answer area.
[0009] By using the recognition method of the present invention, the paper test paper can be scanned and the test paper and examinee can be bound according to the test paper and information generated by the page layout function of the online test paper composition system, and the objective questions can be automatically graded and the subsequent subjective questions can be cut and graded manually online without the need to use a dedicated answer sheet. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 Schematic diagram of the test paper set up for the examination system. DETAILED DESCRIPTION
[0011] Examination paper: A test paper consisting of test questions. After completion, a standard test paper image will be generated for each page of the test paper. The unified coordinate information of each set of test papers includes the length and width of the standard test paper image (the test paper is rectangular, the horizontal direction is the length direction, the vertical direction is the width direction, length>width), the coordinates and size of the QR code image, the coordinates and size of the candidate's student number filling area, the coordinates and radius size of the 5 positioning circles (used for correction of the test paper image, the positions are upper left, upper right, lower left, lower right, and upper center), and the coordinate information of each page of the test paper includes the coordinates and size of each question and answer area (the option filling area for objective questions and the answer area for subjective questions).
[0012] Examination system: A software system for setting up examination data online. It can set up an examination and set up the examination papers and candidates for the examination. The examination system can be an existing examination system on the market or designed by yourself according to the examination data to be set up.
[0013] Scanning test paper client: A software system installed on the computer that can link to and operate the scanner on the computer and send the scanned image information back to the examination system.
[0014] A method for scanning a test paper and identifying test question information according to coordinate information comprises the following steps: Step 1. Set up the test data in the test system, including the test papers used and the candidates participating in the test.
[0015] Step 2. Open the test paper scanning client through the test system. At this time, the test system transmits the test ID to the test paper scanning client.
[0016] Step 3. Scan the test paper. The client scans the test paper after the examinee has finished the test and transmits the scanned result to the test system: test paper image + test ID.
[0017] Step 4. The examination system receives the examination paper image + examination ID sent by the examination paper scanning client, and uses openCV to process the examination paper image.
[0018] Step 4.1. Get the unified coordinate information of the test paper corresponding to the test paper used in this test according to the test ID.
[0019] Step 4.2. Compare the length and width of the test paper image. If the length is less than the width, it means that the test paper image has been rotated +90° or -90° compared to the standard test paper image. You need to rotate the test paper image 90° first. At this time, you can determine that the length-to-width ratio of the test paper image has met the standard test paper image.
[0020] Step 4.3. Determine the magnification ratio of the test paper image based on the length of the rotated test paper image compared with the length of the standard test paper image.
[0021] Step 4.4. Use the grayscale image to read the rotated test paper image, and Gaussian blur it to reduce noise, and use the magnification ratio × 5 to determine the kernel of the subsequent image closing operation, perform the closing operation on the test paper image, and obtain the processed test paper image.
[0022] Step 4.5. Define the maximum value of the detection circle radius r max and minimum value r min , r max =r×K+5, r min =r×K-5, and defines the minimum detection distance between the centers of the positioning circles. d min , d min =r×K× , where r is the radius of the positioning circle in the unified coordinate information of the test paper, K is the magnification ratio, and the maximum value of the detection circle radius is r max , minimum r min , minimum detection distance d min The processed test paper images are subjected to Hough circle detection, and five positioning circles are finally determined.
[0023] Step 4.6. Define the coordinates of the middle position positioning circle in the horizontal direction in the above test paper image, and calculate the distance between the middle position positioning circle of the test paper image and the middle positioning circle of the standard test paper image based on the coordinates. If the distance is greater than half of the image width, it means that the test paper image needs to be rotated 180°. Adjust the test paper image again. At this time, the angle information of the test paper image is consistent with that of the standard test paper image.
[0024] Step 4.7. Sort the other position positioning circles found in the order of upper left, upper right, lower left, and lower right.
[0025] Step 4.8. Correct the test paper image. According to the coordinates of the upper left, upper right, lower left, and lower right positioning circles of the standard test paper image and the test paper image processed in the previous step, perform perspective transformation to correct the image distortion. The size of the transformed test paper image is the length and width of the standard test paper image multiplied by the magnification ratio. At this time, the corrected test paper image can use all the coordinate information of the standard test paper image × the magnification ratio for subsequent processing.
[0026] Step 5. Process and identify the test paper image processed in step 4.
[0027] Step 5.1. The corrected test paper image is first corroded, then expanded, and finally binarized.
[0028] Step 5.2. The processed test paper image is intercepted and the QR code image is recognized based on the coordinates and size of the QR code of the unified coordinate information of the test paper × the magnification ratio. After recognition, the test paper and page number corresponding to the current test paper image can be determined, and the test paper and page number are bound to the current test paper image.
[0029] Step 5.3. Same as the previous step, determine the position where the candidate's student number is filled in the test paper image after binary processing according to the coordinates and size of the candidate's student number filling area in the test paper unified coordinate information × the magnification ratio. In each student number column at the filling position, find the pixel position that occupies the largest proportion of the filling position and is greater than 50%, which is the student number in this column. Get the final student number and bind the student information.
[0030] Step 5.4. After all the test paper images are recognized, the test papers of all candidates can be bound to determine the test paper used by each candidate and the image of each page of the test paper.
[0031] Step 5.5. Find each examinee in turn, identify the objective fill-in questions, and identify the pixel ratio of the fill-in position according to the coordinates and size information of the fill-in area of the objective fill-in questions in the question coordinate information of each page of the test paper. If it is greater than 50%, it is identified as fill-in. Determine whether the objective question is correct based on the student's options after identification.
[0032] Step 5.6. Identify the subjective questions. According to the coordinates and size of the answer area of the subjective questions in the question coordinate information of each page of the test paper, obtain the position information of all subjective questions for image cutting and binding, and obtain the images corresponding to the subjective questions for subsequent online manual marking.
[0033] Step 6. End. At this point, all the information of the scanned test paper has been identified and bound.
Claims
1. A method for scanning a test paper and identifying test question information according to coordinate information, characterized in that: The following steps are involved: Step 1. Set up the test data in the test system, including the test paper used and the candidates who will take the test; Step 2. Open the test paper scanning client through the test system. At this time, the test system transmits the test ID to the test paper scanning client; Step 3. Scan the test paper. The client scans the test paper after the examinee takes the test and transmits the scanned result to the test system: test paper image + test ID; Step 4. The examination system receives the examination paper image + examination ID sent by the examination paper scanning client and processes the examination paper image; Step 5. Recognize the test paper image processed in step 4; Step 6. End. At this point, all the information of the test paper image has been identified and bound.
2. A method for scanning a test paper and identifying test question information according to coordinate information according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step 4.
1. Obtain the unified coordinate information of the test paper corresponding to the test paper used in this test according to the test ID; Step 4.
2. Compare the length and width of the test paper image. If the length is less than the width, it means that the test paper image is rotated by +90° or -90° compared with the standard test paper image. Then rotate the test paper image by 90°. Step 4.
3. Determine the magnification ratio of the test paper image according to the length of the rotated test paper image compared with the length of the standard test paper image; Step 4.
4. Use the grayscale image to read the rotated test paper image; Step 4.
5. Define the maximum value of the detection circle radius r max and minimum value r min , r max =r×K+A, r min =r×KA, and defines the minimum detection distance between the centers of the positioning circles d min , d min =r×K×B, where r is the radius of the positioning circle in the unified coordinate information of the test paper, K is the magnification ratio, A and B are values determined according to the length of the standard test paper, and the processed test paper image is subjected to Hough circle detection according to the maximum value, minimum value, and minimum detection distance of the detection circle radius, and finally five positioning circles are determined; Step 4.
6. Define the coordinates of the middle position positioning circle in the horizontal direction in the above test paper image, and calculate the distance between the middle position positioning circle of the test paper image and the middle positioning circle of the standard test paper image according to the coordinates. If the distance is greater than half of the image width, it means that the image needs to be rotated 180°, and the image is adjusted again. At this time, the angle information of the test paper image is consistent with the standard image; Step 4.
7. Sort the other position positioning circles found in the order of upper left, upper right, lower left, and lower right; Step 4.
8. Correct the test paper image. According to the coordinates of the upper left, upper right, lower left and lower right positioning circles of the standard test paper image and the test paper image processed in the previous step, perform perspective transformation to correct the distortion of the image. The size of the transformed test paper image is the length and width of the standard test paper image multiplied by the magnification ratio.
3. A method for scanning a test paper and identifying test question information according to coordinate information according to claim 2, characterized in that: Step 5 specifically includes the following steps: Step 5.
1. The corrected test paper image is first eroded, then expanded, and finally binarized; Step 5.
2. The test paper image after binarization is intercepted and recognized on the test paper image according to the coordinates and size of the QR code of the unified coordinate information of the test paper × the magnification ratio. After recognition, the test paper and the page number corresponding to the current test paper image are determined, and the test paper and page number are bound to the current test paper image; Step 5.
3. Determine the position of the student ID in the binarized test paper image according to the coordinates and size of the student ID filling area of the test paper unified coordinate information × the magnification ratio. Find the pixel position that occupies the largest proportion of the filling position and is greater than 50% in each student ID column at the filling position, which is the student ID in this column. Get the final student ID and bind the student information. Step 5.
4. After all the test paper images are recognized, bind all the candidates' test papers to determine the test paper used by each candidate and the image of each page of the test paper; Step 5.
5. Find each examinee in turn, identify the objective fill-in questions, and identify the pixel ratio of the fill-in position according to the coordinates and size information of the fill-in area of the objective question in the coordinate information of each page of the test paper. If it is greater than 50%, it is identified as fill-in, and the correctness of the objective question is determined according to the student's options after identification; Step 5.
6. Identify the subjective questions. According to the coordinates and size of the answer area of the subjective questions in the question coordinate information of each page of the test paper, obtain the position information of all subjective questions for image cutting and binding, and obtain the images corresponding to the subjective questions for subsequent online manual marking.
4. A method for scanning a test paper and identifying test question information according to coordinate information according to claim 2 or 3, characterized in that: In step 4.4, Gaussian blur and closing operations are performed to process the grayscale test paper image.
5. A method for scanning a test paper and identifying test question information according to coordinate information according to claim 2 or 3, characterized in that: The unified coordinate information of each set of test papers includes the length and width of the standard test paper image, the coordinates and size of the QR code image, the coordinates and size of the area where the candidate's student number is filled in, the coordinates and radius of the five positioning circles, and the test question coordinate information of each page of the test paper includes the coordinates and size of each question and the answer area.
Citation Information
Patent Citations
Automatic scanning and reading system and reading method
CN101334814A
Answer-card identification method and device
CN108171297A
Answer sheet based on image recognition technology and examination system
CN110070151A
Intelligent mark-leaving paper marking system based on image recognition
CN110659584A
Automatic paper marking method and system based on feature recognition
CN110689013A
