A system and method for automatically correcting multiple-choice questions
By identifying and comparing the answers to different pens of multiple-choice questions, the cumbersome and inconvenient problems of traditional systems are solved, efficient and accurate automatic correction is achieved, and the marking error and fatigue of candidates are reduced.
Patent Information
- Application Number
- CN202411338620.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The traditional automatic multiple-choice correction system requires a specific answer pen to write an answer or a question sheet, which is very restrictive and cumbersome, which makes it inconvenient for candidates to write multiple-choice answers during the exam, and is prone to errors due to fatigue.
By pre-storing multiple-choice text and standard answer information, using scans to collect answer data, identify the answer handwriting written by different pens, perform edge detection and direction gradient analysis, compare answers by question, output correction results, and generate correction reports, and label easy to mark Wrong question.
It realizes the recognition of answers written by different pens, reduces the burden on the marking teachers, improves the convenience of writing and correction accuracy of candidates during the exam, reduces errors, and improves the efficiency of the exam.
Smart Images

Figure CN118887832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of educational service technology, and in particular to a system and method for automatically correcting multiple-choice questions. Background Art
[0002] After a large-scale examination, the examiners need to mark the examination papers. However, a large amount of marking and marking will make the examiners tired and may cause errors in judgment due to fatigue. At this time, it is necessary to automatically mark the multiple-choice questions in the examination papers to reduce the burden on the examiners. However, the traditional automatic marking system for multiple-choice questions requires the use of specific answer pens to write answers, or the use of answer sheets to display the candidates' answers. There are too many limitations and it is too cumbersome, which will cause troubles for the candidates during the examination. For example, the answer pen used by the candidate is lost or damaged and cannot be used normally, or some candidates do not have time to copy the answers on the examination paper onto the answer sheet.
[0003] With respect to the traditional automatic marking method for multiple-choice questions, the present invention pre-stores the multiple-choice question text and standard answer information, and then scans and collects the answer data to identify the answer handwriting, thereby identifying the handwriting written by different pens on the test paper. The strokes written by different pens are recognized to be line segments of different lengths and thicknesses. Therefore, the texture of the narrower or lighter line segments is identified, and the direction of the strokes is identified to obtain the answer outline, and then the direction of the next experimental operation is determined.
[0004] Compare the answers to each question according to the outline of the handwriting in the options, make corrections, and output the correction results. Then, make a correction report based on the correction results, and summarize and mark the questions that are easy to make mistakes.
[0005] In summary, how to make it more convenient and easier for candidates to write answers to multiple-choice questions during exams is an issue that needs to be urgently solved and optimized in the automatic grading system for multiple-choice questions. Summary of the invention
[0006] The present invention provides a system and method for automatically correcting multiple-choice questions, which solve the technical problem in the related art of how to make it more convenient and easier for examinees to write answers to multiple-choice questions during examinations.
[0007] In order to solve the above technical problems, the present invention provides a system and method for automatically correcting multiple-choice questions. The specific technical solution is as follows:
[0008] In a first aspect, a method for automatically correcting multiple-choice questions comprises the following steps:
[0009] Pre-store multiple-choice question text and standard answer information;
[0010] Scan and collect answer data and identify answer handwriting, specifically including: the first instruction collects the answer question number and the answer image corresponding to the question number, and identifies the modified answer by expanding the answer writing box corresponding to the question number; based on the first instruction, the second instruction further performs edge detection on the acquired answer image in four dimensions of up, down, left, and right to obtain the stroke texture direction to obtain the four answer structures of "A, B, C, D"; based on the second instruction and according to the four dimensions, draw the directional gradient distribution of edge pixel points on the x and y coordinate axes, and then use the third instruction to judge the direction of adjacent pixel points of blurred or separated strokes to obtain the final answer,
[0011] Compare the answers one by one according to the handwriting of the answers, make corrections, and output the correction results;
[0012] Prepare a correction report based on the correction results, and summarize and mark the questions that are easy to make mistakes.
[0013] As a further optimization solution of the present invention, the multiple-choice question text and standard answer information are pre-stored, including:
[0014] Determine the storage format of the question number and text information of the question and enter it;
[0015] Based on the entered question information, enter the four standard answers "A, B, C, D" corresponding to the question.
[0016] As a further optimization scheme of the present invention, scanning and collecting answer data and identifying answer handwriting include:
[0017] Collect answer data and check question numbers and corresponding answers to locate answer images in answer writing boxes;
[0018] Preprocessing the answer image to obtain preprocessing data;
[0019] Identify the traces of erasure of preprocessed data in the answer writing box and determine the number of modifications;
[0020] For answers that have been modified multiple times, the recognition area is expanded, and the areas above, below, left, and right of the answer writing box are scanned to detect and identify answers that may deviate from the writing box;
[0021] Based on the distance recognition results between the answer writing box and the offset answer, the final valid answer is determined and corrected to the corresponding question position;
[0022] Perform edge detection in four dimensions on the preprocessed data to obtain the answer stroke direction.
[0023] As a further optimization scheme of the present invention, edge detection in four dimensions is performed on the preprocessed data to obtain the stroke direction of the answer, including:
[0024] Edge detection is performed on four dimensions of the preprocessed data, and the directional distribution of the four dimensions of the edge pixel points is captured to draw the x and y coordinate axes;
[0025] By: ; where Dir(x, y) represents the directional gradient value of I(x, y), arctg() represents the direction calculation function, and I(x, y) represents the pixel point coordinates, is the symbol for differential derivative, represents the distribution of the x and y coordinate axes. Thus, the directional distribution of each pixel point is statistically analyzed, and the distribution of each pixel point is presented on the coordinate axes;
[0026] According to the sparsity or density of the pixel point distribution on the coordinate axes, the stroke texture direction is obtained.
[0027] As a further optimization scheme of the present invention, according to the sparsity or density of the pixel point distribution on the coordinate axes, obtaining the stroke texture direction includes:
[0028] Based on the distribution of pixel points on the coordinate map, the four answers of "A, B, C, D" are decomposed into seven stroke structures of " / , \, —, 丨, 3, C, and ";
[0029] " / , \, —, 丨" are respectively mapped on the coordinate map to represent the four directions of "↙, ↘, →, ↓", and the trend direction of "3" is from top to bottom, forming two connected curved lines, with the direction being clockwise; the trend direction of "C" is from top to bottom, forming a semi-circular arc, with the direction being counterclockwise; " " has a trend direction from top to bottom, forming a semi-circular arc, with the direction being clockwise;
[0030] According to the trend direction of each stroke, the judgment levels are divided into three types, namely "A", "B or D", and "C", to identify unclear or interrupted strokes;
[0031] The unclear or interrupted critical pixel points are represented as (i, j) on the coordinate map, and the pixel points accumulated for each stroke are integrated into a point set G t , starting from the pixel point (i, j), along the pre-determined stroke trend direction, search for the adjacent point p(i p , j p ) of the pixel point (i, j) by circularly expanding up, down, left, and right.
[0032] As a further optimization scheme of the present invention, the unclear or interrupted critical pixel points are represented as (i, j) on the coordinate map, and the pixel points accumulated for each stroke are integrated into a point set G t, starting from the pixel point (i, j), along the pre-determined stroke trend direction, circularly expand and search for the adjacent point p(i p , j p ), including:
[0033] When the included angle between the line connecting the adjacent point p(i p , j p ) and the positive y-axis is α, and |tgα| ≤ θ, where θ is a constant with a range of 0 ≤ θ < 0.5, by: ; judging that the adjacent point p(i p , j p ) is included in the " / " point set G t , thus determining that the answer is "A";
[0034] By: ; judging that the adjacent point p(i p , j p ) is included in the "|" point set G t , thus determining that the answer is "B or D";
[0035] Since the difference between the strokes of "3" and " " lies in the presence or absence of the "→" direction stroke in the middle, then by: ; judging that the middle part of the "|" contains the adjacent point p(i p , j p ) in the "→" direction, thus determining that the answer is "B", and conversely, if the middle part of the "|" does not contain the adjacent point p(i p , j p ) in the "→" direction, the answer can be determined to be "D";
[0036] By: ; judging that the adjacent point p(i p , j p ) is included in the "C" point set G t , thus determining that the answer is "C".
[0037] As a further optimization scheme of the present invention, compare the answers question by question according to the answer handwriting, make corrections, and output the correction results, including:
[0038] Compare the obtained final answer with the standard answer question by question to obtain the comparison result;
[0039] Judge the correctness of the answer to each question according to the comparison result, and mark it as "correct" or "wrong"; according to the correctness judgment result, calculate the score for each question and accumulate the total score;
[0040] Output the correction content including the correctness, score and total score of each question to obtain the correction result.
[0041] As a further optimization scheme of the present invention, a correction report is prepared according to the correction results, and the easy-to-make mistakes are summarized and marked, including:
[0042] Compare each student's answer with the standard answer to obtain the grading result data;
[0043] Generate a preliminary grading report based on the scores, correctness and wrong questions contained in the grading result data;
[0044] Count the error rate based on the preliminary correction report to get the easy-to-make mistakes in the report and mark them;
[0045] Integrate the marked error-prone questions with the preliminary report to form a complete correction report.
[0046] In a second aspect, the system provides an electronic device including a memory, a processor, and a method program for automatically correcting multiple-choice questions stored in the memory and executable on the processor, wherein the method program for automatically correcting multiple-choice questions implements the steps of the method for automatically correcting multiple-choice questions when executed by the processor.
[0047] In a third aspect, a multiple-choice question automatic marking system includes:
[0048] Information storage module 201: used to pre-store multiple-choice question texts and standard answer information;
[0049] Answer recognition module 202: It is used to scan and collect answer data and recognize answer handwriting, specifically including: the first instruction collects the answer question number and the answer image corresponding to the question number, and recognizes the modified answer by expanding the answer writing box corresponding to the question number, and further performs edge detection in four dimensions of up, down, left, and right on the acquired answer image based on the first instruction through the second instruction to obtain the stroke texture direction to obtain the four answer structures of "A, B, C, D"; based on the second instruction and according to the four dimensions, draw the directional gradient distribution of edge pixel points on the x and y coordinate axes, and then judge the direction of adjacent pixel points of blurred or separated strokes through the third instruction to obtain the final answer;
[0050] Comparison and correction module 203: It is used to compare the answers one by one according to the handwriting of the answers, make corrections, and output the correction results;
[0051] Report generation module 204: It is used to prepare a correction report based on the correction results, and summarize and mark the easy-to-make mistakes.
[0052] The present invention has at least the following beneficial effects: the present invention can directly identify the answers written on the test paper by pre-storing the text of the multiple-choice questions and the standard answer information, and then scanning and collecting the answer data to identify the answer handwriting, and can also identify the answers written by different types of pens, especially for the extremely fine handwriting, the corresponding answers can be further identified, so that the examinees do not need to worry about whether the answer writing requires a specific pen and whether there is enough time to copy the answer on the answer sheet during the test, ensuring that the examinees can relax and take the test easily during the test;
[0053] Then, the answers are compared question by question based on the handwriting of the answers, corrections are made, and the correction results are output. A correction report is made based on the correction results, and the questions that are easy to make mistakes are summarized and marked, so that the candidates' wrong test questions can be further sorted out and summarized to facilitate the improvement and preparation of the candidates' subsequent studies. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flow chart of a method for automatically correcting multiple-choice questions provided by an embodiment of the present invention;
[0055] Figure 2 It is a schematic diagram of an automatic correction system for multiple-choice questions provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The present application is further described in detail below in conjunction with the accompanying drawings. It is necessary to point out here that the following specific implementation methods are only used to further illustrate the present application and cannot be understood as limiting the scope of protection of the present application. Technical personnel in this field can make some non-essential improvements and adjustments to the present application based on the above application content.
[0057] A system and method for automatically correcting multiple-choice questions, the specific implementation methods are as follows:
[0058] like Figure 1 As shown, a method for automatically correcting multiple-choice questions includes the following steps:
[0059] Step 1, pre-storing the multiple-choice question text and standard answer information;
[0060] Step 2, scanning and collecting answer data, identifying answer handwriting, specifically includes: the first instruction collects the answer question number and the answer image corresponding to the question number, and identifies the modified answer by expanding the answer writing box corresponding to the question number; based on the first instruction, the second instruction further performs edge detection on the acquired answer image in four dimensions of up, down, left, and right, and obtains the stroke texture direction to obtain the four answer structures of "A, B, C, D"; based on the second instruction and according to the four dimensions, the directional gradient distribution of the edge pixel points is drawn on the x and y coordinate axes, and then the third instruction is used to judge the direction of adjacent pixel points of blurred or separated strokes to obtain the final answer,
[0061] Step 3, compare the answers one by one according to the handwriting of the answers, make corrections, and output the correction results;
[0062] Step 4: Prepare a correction report based on the correction results, and summarize and mark the questions that are easy to make mistakes.
[0063] In a preferred embodiment of the present invention, in step 1, the system first stores all the multiple-choice questions to be corrected and the corresponding standard answers. A question bank is established, and each question and its correct answer are stored in a database or memory. By pre-storing the questions and standard answers, the speed and accuracy of matching answers in subsequent steps can be improved, and the preparation work for correcting multiple-choice questions is done sufficiently, which can reduce the amount of calculation when processing answer data, making the subsequent correction process more efficient.
[0064] Based on step 1, the system scans the answer sheet through step 2, collects the candidate's answer data through the first instruction, identifies the question number and the corresponding answer area image, which includes identifying the answer options (A, B, C, D) filled in by the candidate on the answer sheet, and makes the system expand the answer writing box corresponding to the question number to detect whether there is a modified answer. In this way, multiple modified and final selected answers can be identified. In the second instruction, edge detection is performed on the identified answer image. Edge detection is used to determine the outline of the examinee's strokes, and based on this, the specific answer chosen by the examinee is judged. Edge detection in the four directions of up, down, left, and right can be used to extract the texture direction of the strokes. These texture direction information can reflect the shape characteristics of the specific answer chosen by the examinee and lay the foundation for the subsequent decomposition of the answer into seven strokes. Finally, the blurred or separated strokes are corrected through the third instruction by judging the direction of adjacent pixels to ensure that the final recognized answer is correct. Edge detection combined with analysis of directional gradient distribution can improve the accuracy of recognition of examinee answers. In particular, when examinees modify their answers or write irregularly, the system has the ability to handle blurred or separated recognition functions, which can handle some unclear handwriting and reduce misjudgment.
[0065] In step 3, the system compares the candidate's answers identified in step 2 with the standard answers stored in step 1 question by question. The candidate's answer to each question is compared with the standard answer to determine whether the candidate is correct. After the comparison is completed, the system will record the correctness of each question and generate an output containing the grading results of all questions. Through automated comparison and grading, the grading speed and efficiency are greatly improved, while the errors and deviations that may be caused by manual grading are reduced, and it is helpful to provide timely feedback on the candidate's scores, which is especially suitable for the grading work of large-scale examinations. Finally, through step 4: the system generates a detailed grading report based on the grading results The report includes whether each question is correct or not, as well as the overall performance of the examinee. The system will count the performance of all examinees on each question, identify questions with higher error rates, and mark them as "easy-to-make mistakes". The report not only summarizes the examinee's performance, but also provides analysis and suggestions for some common errors. The generated correction report can help examinees understand their own answering situation and weak links, which is helpful for subsequent review and improvement. The marking and analysis of easy-to-make mistakes can help teachers identify problems in the questions, thereby optimizing teaching content and improving teaching effectiveness. The summary and analysis function can also provide feedback for question setters to help them improve the quality of questions.
[0066] In a preferred embodiment of the present invention, the above step 1 further includes:
[0067] Step 11, determine the storage format of the question number and text information of the question and enter it;
[0068] Step 12, based on the entered question information, enter the four standard answers "A, B, C, D" corresponding to the question.
[0069] In a preferred embodiment of the present invention, the storage format of the question data needs to be determined first in step 11, which is based on a database, JSON, XML or other structured data formats. Regardless of which format is used, the storage format must be able to effectively organize the question number and question text information and support fast retrieval.
[0070] For example, you can use a database table with one column storing the question number and another column storing the question text. The table structure should be designed to facilitate quick search and association of data. If you use JSON or XML, you need to define key-value pairs to represent the question number and question text.
[0071] According to the determined storage format, enter the question number and corresponding text information of each question one by one. The entry can be done by manual input, file import, or automatic recognition of paper questions using OCR technology. For manual input, the system's user interface is usually used to enter the question number and text into the corresponding fields respectively. For file import, data may be read from CSV or Excel files and imported into the system in batches according to the format. For OCR technology, the system automatically recognizes and enters the question number and question stem text by scanning the test paper or question bank data;
[0072] By determining and using standardized storage formats, the orderly management and easy access of question data are ensured. Structured data can facilitate efficient query, matching and analysis of the system. Through standardized entry processes, manual input errors are reduced and the accuracy and completeness of data are improved. Especially when there are a large number of questions to be entered, file import and OCR technology can greatly improve efficiency. Once the appropriate storage format is determined, the system can be easily expanded to support more question types or additional information (such as pictures, annotations, etc.).
[0073] Then, in step 12, the system first associates the question number and question stem information entered in step 11 with the standard answer. Each question has one or more correct answer options (A, B, C, D), which need to be correctly associated with the question number. The standard answer can usually be entered in the following ways: (1) The operator selects the question number and manually enters or selects the corresponding correct answer option (A, B, C, D) through the system interface. For example, for a certain question, the correct answer is "C";
[0074] (2) If the standard answers have been organized in electronic documents, the system can batch input the standard answers by importing files. This is usually done in conjunction with CSV or Excel files;
[0075] (3) When questions are imported from an existing question bank or paper documents, OCR or other recognition technologies may be used to automatically extract and enter standard answers.
[0076] After the input is completed, the system may conduct a verification check to ensure that each question has been correctly associated with the standard answer and there is no omission or duplication. By associating the input questions and standard answers, it ensures that each question has a clear correct answer for the system to use when grading. This is the basis for ensuring the accuracy of the grading results, especially for the processing of a large number of questions. Batch import and automatic recognition technology can greatly improve the input efficiency and reduce manual workload. Through the system's input verification and inspection mechanism, it further reduces the errors that may occur during the input process, ensures the reliability of the data, and the structured input and storage of standard answers make subsequent maintenance and updates more convenient. If you need to modify the answer to a question, you only need to update the corresponding record in the system.
[0077] In a preferred embodiment of the present invention, the above step 2 may include:
[0078] Step 21, collecting answer data and checking the question number and the corresponding answer to locate the answer image in the answer writing box;
[0079] Step 22, preprocessing the answer image to obtain preprocessing data;
[0080] Step 23, identifying the traces of modification of the pre-processed data in the answer writing box and determining the number of modifications;
[0081] Step 24, expanding the recognition area for answers that have been modified multiple times, and scanning the areas above, below, left, and right of the answer writing box to detect and recognize answers that may deviate from the writing box;
[0082] Step 25, based on the distance recognition result between the answer writing box and the offset answer, determine the final valid answer and correct it to the corresponding question position;
[0083] Step 26, perform edge detection in four dimensions on the preprocessed data to obtain the stroke direction.
[0084] In an embodiment of the invention, in step 21, a scanner or camera device is used to collect image data on the examinee's answer sheet, obtain all question numbers and their corresponding answer writing areas, and then the question numbers in the collected image data are checked with the answer positions through the question number information pre-stored by the system. The system needs to accurately locate the answer writing box corresponding to each question number to ensure that subsequent processing can be performed in the correct area. Accurately locating the answer writing box is the basis for subsequent image processing and answer recognition. This step ensures that subsequent processing can be concentrated in the correct area to avoid misidentification. By checking the question number and the answer position, the system can quickly identify the image in the answer writing box and reduce the waste of computing resources on irrelevant areas. Then, a series of preprocessing operations are performed on the collected answer image through step 22 to improve the image quality and make it easier for subsequent analysis and processing. Common preprocessing operations include: converting color images into grayscale images to simplify image data and reduce computational complexity, and then converting grayscale images into black and white images to highlight handwriting and writing areas. This helps to distinguish the answers filled in by the candidates from the background, and then use filtering technology to remove noise in the image to ensure that the handwriting is clearer. Finally, adjust the brightness and contrast of the image to make the handwriting more obvious. The preprocessing steps can significantly improve the image quality and make the handwriting clearer, thereby improving the accuracy of edge detection and handwriting recognition in subsequent steps. De-noising and contrast enhancement help reduce interference factors in the image and reduce the probability of misrecognition, especially when dealing with answer sheets with unclear writing or impurities.
[0085] In step 23, the system analyzes the overlap, density, direction and other characteristics of the strokes in the image data pre-processed in step 2 to identify traces of possible modification by the examinee. Common traces of modification include:
[0086] Overlapping marks from multiple scribbles; residual handwriting left after an eraser has been used, as well as various water-based pens or ballpoint pens used to cross out, cross out, and blacken circles to correct uncertain answers;
[0087] For the recognition of the cross mark, we can analyze the feature points of the line intersections, detect the intersection structure in the image, use the Harris corner detection algorithm or Hough transform to detect the obvious "X" shaped structure, and then analyze the directionality of the lines (such as 45-degree and 135-degree lines) to determine whether there is an intersection at a specific angle.
[0088] Crossed-out mark recognition uses Hough line transform to detect long straight lines, which usually pass through or cover text. The length and position of the line are used to determine whether it is a crossed-out mark, and whether the line covers other image areas (such as letters, numbers, etc.) to further confirm the crossed-out mark;
[0089] By calculating the pixel density of the local area (the density of black pixels), it is determined whether the area is blackened. The blackened area usually has a higher black pixel density, and by analyzing the local texture features of the image, the blackened area usually appears as a dense and irregular black area, rather than independent lines or characters.
[0090] Then perform morphological operations (such as dilation, erosion, opening and closing) on the binarized image to enhance the connectivity of the feature area, remove isolated noise points, and merge connected areas of the same mark type. For example, merge the lines that form an "X" shape into a whole. Finally, use a predefined template (such as an "X"-shaped template) to match the extracted feature area to determine whether it conforms to the shape of a specific mark. By training a classifier (such as SVM or CNN), different types of marks in the image are identified. The extracted features are input into the classifier, and the mark type (crossed, crossed out, blackened, etc.) is output. According to the recognition results, each mark is classified as crossed, crossed out, or blackened, and these areas are marked in the image for reference by the grading system to determine the specific answer;
[0091] The system analyzes the number of layers and coverage of the erasure marks, and determines whether the examinee has made multiple revisions. The answer area that has been revised multiple times may have superpositions of strokes in different directions and thicknesses. Identifying the erasure marks can help the system understand the examinee's modification behavior, which is crucial for determining the final valid answer. By identifying and judging the number of revisions, the system can avoid misjudgments caused by multiple revisions by the examinee and ensure the fairness and accuracy of the grading.
[0092] Then, in step 24, if multiple modification traces are detected, the system will expand the recognition area to ensure that all possible handwriting changes are included. The expanded area may cover the upper, lower, left, and right sides of the original writing box. Sometimes, candidates may deviate from the designated answer writing box due to irregular writing. The system scans in the expanded area to identify these possible deviations. The specific method includes:
[0093] Analyze all pixels in the extended area to find strokes that match the shape characteristics of the answer.
[0094] Use edge detection and shape recognition technology to identify handwriting that deviates from the writing box but fits the characteristics of the answer.
[0095] The steps of expanding the recognition area and detecting deviation answers can effectively deal with the mistakes made by candidates on the answer sheet due to misoperation or irregular writing. This can avoid misjudgments caused by these problems. By expanding the recognition range, the system can maintain a high accuracy rate when facing various complex actual situations (such as alterations, deviations, etc.).
[0096] Then, according to step 25, the relative position and distance of the main handwriting in the writing box and the possible offset answers are calculated, and which answer is finally valid is determined according to the distance and the coverage of the alteration. Usually:
[0097] The answer closest to the center of the writing box and not covered by corrections may be judged as a valid answer.
[0098] If there is an offset answer and it meets certain characteristics (such as being close to the box, having a complete shape, etc.), the system will regard it as the final answer and correct the final valid answer identified back to the corresponding position of the question for subsequent correction. This step ensures that the final answer obtained by the system matches the correct question number. Through distance judgment and correction, the system can extract the most likely valid answer from handwriting that has been modified multiple times or deviated from the writing box, reducing misjudgment. The answer correction step matches the final identified answer with the corresponding question number to ensure that the correction result of each question is accurate.
[0099] Finally, step 26 performs edge detection on the preprocessed data obtained in step 22, thereby extracting the contour and stroke information in the image. By performing edge detection in four dimensions (up, down, left, and right), the features of the strokes in different directions can be obtained. The specific operations include:
[0100] Up and down direction: Detect the edges of the image in the vertical direction to identify the contours of up and down strokes.
[0101] Left-right direction: Detect the edges of the image in the horizontal direction to identify the contours of left and right strokes.
[0102] By combining edge information in four directions, the system can reconstruct the complete direction and shape of the stroke.
[0103] Based on the detected edge information, the system calculates the directional features of each stroke for subsequent answer recognition. Through four-dimensional edge detection, the system can more accurately extract the stroke directions of the answers filled in by the examinees, thereby improving the accuracy of answer recognition. No matter what pen the examinees use to write the answers, edge detection and stroke direction extraction can effectively deal with complex situations, allowing the system to maintain stable recognition effects under a variety of actual conditions.
[0104] In a preferred embodiment of the present invention, the above step 26 may include:
[0105] Step 261, performing edge detection on the four dimensions of the preprocessed data and capturing the direction distribution of the edge pixels in the four dimensions to draw the x and y coordinate axes;
[0106] Step 262, by: ; In the formula, Dir (x, y) represents the directional gradient value of I (x, y), arctg () represents the direction calculation function, and I (x, y) represents the pixel coordinates. is the differential symbol, Indicates the distribution of x and y coordinate axes, thereby counting the direction distribution of each pixel point and displaying the distribution of each pixel point on the coordinate axis;
[0107] Step 263, obtaining the stroke texture direction according to the sparseness or density of pixel distribution on the coordinate axis.
[0108] In the embodiment of the present invention, the system performs edge detection in four directions (up, down, left, and right) on the image data preprocessed in step 22 through step 261. This process uses the Canny edge detection algorithm in image processing to extract edge pixels from the image. Edge detection in each direction can capture the most significant image changes in that direction (such as the starting point, end point, and outline of the stroke), and capture the directional distribution of edge pixels. Each edge pixel has a directional vector that points to the direction in which the image brightness changes most dramatically. By analyzing these directional vectors, the system can determine the specific direction of the stroke. By collecting and recording the directional distribution data of each edge pixel, the system can draw directional distribution maps of the pixels on the x-axis and y-axis respectively. The x-axis and y-axis correspond to the horizontal and vertical directions of the image, respectively. The edge detection in four dimensions can fully capture the details of the strokes in the image, so that the system can accurately perceive the handwriting characteristics of the examinee. By capturing the directional distribution of edge pixels on the x-axis and y-axis, the system provides basic data for subsequent directional analysis to ensure the accuracy of stroke direction analysis.
[0109] Through step 262, the system counts the directional information of each edge pixel and records their distribution on the x-axis and y-axis. The directional information of each pixel can be represented as a vector. The direction and length of the vector correspond to the specific direction and edge strength of the pixel. The statistical result of the directional distribution forms a directional distribution diagram, and each point in the diagram represents the directional vector of an edge pixel. The directional distribution diagram shows the degree of aggregation or dispersion of edge pixels on the x-axis and y-axis, and the system visualizes the directional distribution obtained by statistics on the x-axis and y-axis. This visualization process usually generates a two-dimensional graph. The point cloud in the graph represents the distribution of pixels in different directions. By visualizing the directional distribution, the system can intuitively display the directional characteristics of the strokes, which is helpful for analysis and recognition. The directional distribution of each pixel is counted, so that the system can understand the direction of the strokes more finely, thereby providing a reliable basis for the final answer recognition.
[0110] In step 263, the system analyzes the sparsity or density of these points based on the distribution of pixel points on the coordinate axes. The sparse or dense distribution is usually related to the directional characteristics of the strokes:
[0111] If the pixel points are densely distributed in a certain direction, it usually indicates that the stroke has strong texture characteristics in that direction; if the pixel points are sparsely distributed in a certain direction, it may indicate that the stroke is relatively smooth or has no significant change in that direction.
[0112] The system combines the directional information of sparse and dense distributions to infer the main texture direction of the stroke. This direction is usually consistent with the overall trend of the written stroke and is the key basis for identifying the candidate's option answer. Precise identification of the stroke direction: By analyzing the sparse or dense distribution of pixel points, the system can accurately identify the main texture direction of the stroke, thereby improving the recognition accuracy of the written answer. Improving recognition accuracy: Correctly identifying the stroke direction helps the system more accurately judge the candidate's choice, especially in the case of tilted or deformed writing, and still maintain a high recognition accuracy.
[0113] In a preferred embodiment of the present invention, the above step 263 may include:
[0114] Step 2631, based on the distribution of pixel points on the coordinate graph, decompose the four answers of "A, B, C, D" into seven stroke structures of " / , \, —, |, 3, C, and ";
[0115] Step 2632, map " / , \, —, |" onto the coordinate graph to represent the four directions of "↙, ↘, →, ↓" respectively, and the trend direction of "3" is from top to bottom, forming two connected curved lines with a clockwise direction; the trend direction of "C" is from top to bottom, forming a semi-circular arc with a counterclockwise direction; " " has a trend direction from top to bottom, forming a semi-circular arc with a clockwise direction;
[0116] Step 2633, according to the trend direction of each stroke, divide the judgment level into three types, namely "A", "B or D", and "C", to identify strokes that are unclear or have breaks;
[0117] Step 2634, represent the critical pixel points that are unclear or have breaks on the coordinate graph as (i, j), and integrate the accumulated pixel points of each stroke into a point set Gt. Starting from the pixel point (i, j), search for the adjacent point p (ip, jp) of the pixel point (i, j) in a cyclic manner in the up, down, left, and right directions along the pre-determined stroke trend direction.
[0118] In the embodiments of the present invention, according to each step of step 26, the system has drawn a coordinate map and marked the direction distribution of each pixel point. Based on these distributions, through step 2631, the system analyzes the pixel point clusters in each direction and classifies them into specific stroke structures, as follows:
[0119] “ / ” represents a stroke slanting upwards, usually appearing in the letter “A”.
[0120] “\” represents a stroke slanting downwards, usually appearing in the letter “A”.
[0121] “—” represents a horizontal stroke, usually appearing in the letter “A” or “B”.
[0122] “丨” represents a vertical stroke, usually appearing in the letter “B” or “D”.
[0123] “3” represents a curved structure similar to the number 3, usually appearing in the letter “B”.
[0124] “C” represents a semi-circular arc structure similar to the letter C, usually appearing in the letter “C”.
[0125] “ ” represents a semi-circular arc structure similar to an inverted C, usually appearing in the letter “D”.
[0126] By decomposing complex letter structures into basic strokes, the system can more accurately understand the writing intention of the examinee. In particular, the strokes shared by different letters can be clearly distinguished in this way. This decomposition method helps the system better distinguish between answer options with similar shapes (such as “A” and “D”) and avoid misjudgment.
[0127] Based on step 2631 and then through step 2632, the system maps the four straight-line strokes “ / , \, —, 丨” to four directions on the coordinate map respectively:
[0128] “ / ” is mapped to the ↙ direction.
[0129] “\” is mapped to the ↘ direction.
[0130] “—” is mapped to the → direction.
[0131] “丨” is mapped to the ↓ direction.
[0132] Mapping the curved strokes: The stroke trend of “3” is from top to bottom, forming two connected clockwise curved lines, and the system records its direction change on the coordinate map.
[0133] The stroke trend of “C” is from top to bottom, forming a counterclockwise semi-circular arc, and the system represents it as an arc from left to right on the coordinate map.
[0134] “ The stroke trend of "" goes from top to bottom, forming a clockwise semi-circular arc, and the system represents it as an arc from right to left on the coordinate graph;
[0135] By mapping different stroke directions, the system can more accurately identify the constituent parts of letters. Even if the writing has a certain inclination or deformation, this mapping can adapt. By distinguishing the curved lines in clockwise and counterclockwise directions, the system can better distinguish the different curve structures in letters "B", "C", "D", and avoid confusion.
[0136] Then, through step 2633, the system determines the specific trend of each stroke according to the stroke directions mapped in step 2632. By analyzing these trends, the system classifies the stroke structures into three main types:
[0137] Type "A": mainly composed of diagonal lines and horizontal lines, such as " / , \, —", and these strokes usually appear in the letter "A".
[0138] Type "B or D": composed of vertical lines and curves, such as "丨" and "3", " ", and these strokes usually appear in the letters "B" and "D".
[0139] Type "C": mainly composed of a counterclockwise semi-circular arc.
[0140] When the stroke trend direction is unclear or there are breaks, the system makes a judgment based on the above classification, infers the possible letter types through the overall stroke trend direction. By classifying the strokes, the system can more effectively handle the situation of fuzzy or interrupted writing, reduce misjudgment, improve the robustness of recognition, simplify the complex letter recognition into the judgment of the basic stroke trend direction, and enable the system to make recognition decisions faster, especially when dealing with complex or irregular writing.
[0141] Finally, using step 2634 for the fuzzy or interrupted strokes, the system marks the critical pixel points in these areas as (i, j) and displays them on the coordinate graph. These critical points are usually located at the stroke break points or the edges of the fuzzy areas. The system accumulates the identified pixel points in each stroke into a point set Gt. This point set contains all the valid pixel points in the stroke for further analysis. Starting from the critical pixel point (i, j), the system searches along the pre-determined stroke trend direction (up, down, left, right) to find the adjacent pixel point p (ip, jp).
[0142] Through this loop-expanded search, the system attempts to connect blurred or interrupted strokes, fill in the missing parts to form a complete stroke structure. By expanding the search for adjacent pixel points, the system can find potential connection points in blurred or interrupted strokes, thus completing the strokes and making them closer to the original writing form. When dealing with incomplete or blurred writing, this expanded search technology can significantly improve the recognition ability of the system, ensuring that the system can accurately recognize the answers even under不理想 writing conditions. This point-set-based expanded search method can adapt to a variety of irregular writing forms, ensuring consistent recognition effects on the answer sheets of different candidates.
[0143] In a preferred embodiment of the present invention, the above step 2634 may include:
[0144] Step 26341, when the angle between the line connecting adjacent points p(i p , j p ) and the positive direction of the y-axis is α, satisfying |tgα| ≤ θ, where θ is a constant, with a range of 0 ≤ θ < 0.5, by: ; determine that the adjacent point p(i p , j p ) is included in the " / " point set G t , and thus determine that the answer is "A";
[0145] Step 26342, by: ; determine that the adjacent point p(i p , j p ) is included in the "|" point set G t , and thus determine that the answer is "B or D";
[0146] Step 26343, because the difference between the strokes of "3" and " " lies in the existence or non-existence of the "→" direction stroke in the middle, then by: ; determine whether the middle part of the "|" contains adjacent points p(i p , j p ) in the "→" direction, and thus determine that the answer is "B", otherwise, if the middle part of the "|" does not contain adjacent points p(i p , j p ), the answer can be determined as "D";
[0147] Step 26344, by: ; determine that the adjacent point p(ip, jp) is included in the "C" point set Gt, and thus determine that the answer is "C".
[0148] In an embodiment of the present invention, the direction of the line connecting the current pixel point p(ip, jp) and the previous pixel point is determined through step 26341. Specifically, the angle α between this line and the positive direction of the y-axis is calculated, and its tangent value tgα is obtained. Through conditional judgment: if |tgα| ≤ θ, that is, the angle α is very small, indicating that this line is almost parallel to the y-axis. At this time, the direction of adjacent points can be considered close to the direction of the " / " stroke (diagonally upward or diagonally downward). The system classifies the adjacent point p(ip, jp) that satisfies the above conditions into the " / " point set Gt, that is, the diagonal stroke point set. When the system recognizes that most points among multiple points belong to the " / " point set Gt, the system determines that the answer is "A" because the letter A is mainly composed of diagonal lines, through angle judgment and point set classification;
[0149] However, considering that some candidates write irregularly and write "丨" as " / ", it is necessary to pass:
[0150] ; It is also obtained that the adjacent point p(ip, jp) is classified into the "\" point set Gt. Thus, it can be determined that the final answer is "A" based on the adjacent point p(ip, jp) that not only has the " / " point set Gt but also has the "\" point set Gt.
[0151] The system can accurately identify the diagonal strokes representing the letter A. This geometric analysis method helps to distinguish A from other options, especially when the strokes have a certain inclination. By setting a suitable θ range (0 ≤ θ < 0.5), it is ensured that the system can accurately capture the diagonal lines in the " / " direction while reducing the possibility of misjudging nearly vertical or horizontal strokes as diagonal lines.
[0152] Based on step 26341, through step 26342, the system identifies a group of continuous vertical strokes (i.e., the "丨" direction), and classifies these points into the "丨" point set Gt, specifically as follows:
[0153] When a certain adjacent point p(ip, jp) is distributed along the vertical direction (i.e., the direction parallel to the y-axis), and the direction of its connecting line conforms to the characteristics of a vertical line (i.e., α ≈ 0 or α ≈ π), the system classifies this point into the "丨" point set. Since the letters "B" and "D" both contain vertical line strokes, the system tentatively determines the answer as "B or D" and further analyzes to distinguish in subsequent steps. This judgment method can accurately identify the vertical strokes in "B" and "D", thereby effectively distinguishing these options from other options (such as "A" or "C"). By a clear vertical line determination standard, the system reduces the probability of misjudging strokes in other directions as vertical lines, especially in the case of short strokes or noise interference.
[0154] Then, through step 26343, the existence of a horizontal line (→) is judged:
[0155] The system checks whether the vertical stroke "丨" contains adjacent points of a horizontal line (in the → direction). For the letter "B", there is usually a connecting line in the → direction in the middle of the vertical line. Therefore, if a stroke in the "→" direction is found in the middle part, the system classifies it as the letter "B".
[0156] When no adjacent points in the "→" direction are found in the middle part of the "丨" stroke, it indicates that this vertical line stroke belongs to the letter "D" because "D" has no horizontal line.
[0157] Through the above judgment, the system can finally determine whether the answer is "B" or "D". By analyzing the existence of the horizontal line in the middle part, the system can effectively distinguish between "B" and "D", avoiding the drawback of relying solely on the vertical line for ambiguous judgment. This analysis method is particularly helpful for dealing with complex or discontinuous handwritten situations, ensuring that the system can still accurately identify the correct answer even when the stroke is interrupted or blurred.
[0158] Finally, through step 26344, the system determines whether these points conform to the characteristics of a "C"-shaped semi-circular arc by identifying the directions of a series of adjacent points p(ip, jp).
[0159] Specifically, the system searches for a set of pixel points that form a counterclockwise semi-circular arc on the coordinate graph and classifies these points as the "C" point set Gt. When the system identifies that most of the adjacent points p(ip, jp) conform to the "C" structure, the system determines the answer as "C", accurately identifying the curve structure: Through a dedicated curve structure recognition method, the system can effectively identify the stroke characteristics of the letter "C", avoiding confusion with other letters. This judgment method can handle the curve structures of different handwritten styles, ensuring that the system can correctly identify the letter "C" under different writing styles and improving the overall recognition accuracy.
[0160] In a preferred embodiment of the present invention, step 3 above may include:
[0161] Step 31, comparing the obtained final answer with the standard answer question by question to obtain a comparison result;
[0162] Step 32, judging the correctness of the answer to each question based on the comparison result, and marking it as "correct" or "wrong"; according to the correctness judgment result, calculate the score for each question and accumulate to generate a total score;
[0163] Step 33, output the marking content including the correctness, score, and total score of each question to obtain a marking result.
[0164] In an embodiment of the present invention, the final answer obtained according to a series of steps in step 2 is compared with the standard answer question by question, and the system compares the final answer of the examinee obtained in the early stage through image processing and recognition algorithm with the pre-stored standard answer question by question, and the comparison method is to check whether the examinee's answer is consistent with the standard answer one by one. For example, if the standard answer of a question is "B", and the examinee chooses "B", the comparison result of the question is correct, and the system records the comparison result (correct or wrong) of each question. The comparison results can be stored in an array or table, in which each element corresponds to the comparison status of a question (such as 1 for correct and 0 for wrong), accurate answer verification: question-by-question comparison ensures that each answer of the examinee is strictly verified. This method can capture the accuracy of each question, ensure the fairness and consistency of grading, and reduce the need for manual intervention through automated comparison, greatly improve the efficiency of grading, especially in large-scale examinations, it has a significant time advantage.
[0165] Then, in step 32, the system judges the correctness of the answer to each question based on the comparison result of step 31. The logic of the judgment is that if the comparison result is consistent (that is, the candidate's answer is the same as the standard answer), it is marked as "correct"; otherwise, it is marked as "wrong".
[0166] The results of the marking will be reflected in the output of the system, usually marked with Boolean values (such as True for "correct" and False for "incorrect"). The system assigns a corresponding score to each question based on the correctness of each question. Usually, a correct answer gets full marks (such as 1 point or a set score), and an incorrect answer gets 0 points. The scoring rules can be set according to the scoring criteria of the exam. When calculating the total score, the system accumulates the scores of all questions to form the total score of the examinee. The system ensures that each question can be accurately scored by judging the correctness and scoring rules. By accumulating the total score, the system can quickly generate the overall performance of the examinee. This automated scoring process allows the system to generate scores immediately after the comparison is completed, which can provide instant feedback to examinees and teachers. The scoring rules can be flexibly set and are applicable to various exam types (such as single-choice and multiple-choice questions), ensuring that the system is highly adaptable.
[0167] Finally, in step 33, the system organizes all the correction contents, including the correctness status of each question, the scores of individual questions and the total score, into a complete report. The report output can be in the form of a spreadsheet (such as Excel or CSV file), PDF document or displayed as a visual chart in the system interface. The system outputs the organized correction results to the user (such as a teacher, candidate or system administrator). The output content usually includes:
[0168] Correctness of each question: Show whether each question is right or wrong, usually with a symbol: express.
[0169] Score for each question: Displays the score for each question, making it easier for candidates to understand the basis for the score.
[0170] Total score: shows the total score of the candidate in the whole test paper. This data is the direct basis for performance evaluation.
[0171] The complete grading report ensures the transparency and traceability of the grading results. Candidates and teachers can clearly see the answer status and score of each question, which is convenient for subsequent performance feedback and teaching adjustments. The automated report generation and output process significantly reduces the time for manual statistics and collation, so that the grading results of large-scale examinations can be delivered in a short time. The system can provide a variety of result output methods according to user needs to adapt to different usage scenarios (such as online query, printed reports, etc.).
[0172] In a preferred embodiment of the present invention, the above step 4 may include:
[0173] Step 41, comparing each student's answer with the standard answer to obtain grading result data;
[0174] Step 42, generating a preliminary correction report based on the score, correctness and wrong questions included in the correction result data;
[0175] Step 43, counting the error rate according to the preliminary correction report to obtain the easy-to-make mistakes in the report and marking them;
[0176] Step 44, integrating the marked error-prone questions with the preliminary report to form a complete correction report.
[0177] In an embodiment of the present invention, according to the correction results obtained in step 3, the answer results of each student are compared with the standard answers one by one in step 41. Similar to the previous comparison of a single student, the student's answer is checked one by one to see if it is correct. The comparison results of each student will be stored, including the correctness mark, score and cumulative total score of each question. The system summarizes the correction results of each student to form a correction data set containing all students. These data sets include the answer situation, score and total score of each student for each question. Comprehensive result collection: By comparing the answer situation of each student, the system can comprehensively collect the answer data of all students and provide basic data for subsequent analysis.
[0178] Then, according to the correction results of each student, a preliminary report is generated in step 42, including the score of each question, the total score, the accuracy rate (i.e. the percentage of questions answered correctly by the student) and the list of wrong questions, which specifically includes the following contents:
[0179] Score: Calculate the score of each question and the total score based on the comparison results.
[0180] Correctness: Calculate the correctness of each question, that is, the proportion of students who answered the question correctly. For example, if 100 students answered a question and 80 answered it correctly, then the correctness is 80%.
[0181] Wrong Question List: List the questions that each student answered incorrectly to help students identify their weaknesses.
[0182] Error rate statistics: The system also counts the error rate of each question, that is, the proportion of students who answered the question incorrectly. For example, if 100 students answered a question and 20 answered it incorrectly, then the error rate is 20%.
[0183] Error rate statistics help identify which questions most students are prone to make mistakes on, providing data support for subsequent analysis of easy-to-make mistakes.
[0184] The preliminary report provides students and teachers with detailed feedback on scores, accuracy and incorrect questions, helping students understand their overall performance and specific weaknesses. Through the statistics of error rates, teachers can identify questions that students generally have difficulty with and provide targeted guidance for subsequent teaching.
[0185] Then, in step 43, according to the error rates of each question counted in step 42, the questions with higher error rates are screened out and organized into a dataset of easy-to-make mistakes. Usually, questions with error rates exceeding a certain threshold (such as 30% or 50%) are marked as easy-to-make mistakes. This dataset of easy-to-make mistakes summarizes the questions that are commonly problematic among all students, reflecting the questions that are more difficult or more complex in the exam. In each student's report, the system compares the questions they answered incorrectly. If these questions are in the dataset of easy-to-make mistakes, the system will specially mark them out. This marking may use special symbols, colors or additional instructions: for example, if student A got question 5 wrong, and question 5 is marked as an easy-to-make mistakes by the system, then question 5 will be specially marked in student A's report.
[0186] By marking the easy-to-make mistakes in the report, students can clearly know which difficult questions they have problems with, which helps with targeted review and improvement. Teachers can use this data to make targeted teaching adjustments to help students improve their mastery of easy-to-make mistakes knowledge points in subsequent learning.
[0187] Finally, the various elements (score, accuracy, wrong question list) and easy-to-error question marks in the preliminary report are integrated into a final complete correction report through step 44. This report should include the detailed correction results, scores and total scores, accuracy, wrong question list and easy-to-error question marks for each question.
[0188] Report Distribution:
[0189] Fully marked reports can be distributed to students in a variety of ways, including:
[0190] Email: The system can automatically generate the report into PDF or other format files and send it to the student's email address.
[0191] Online platform: If the school or educational institution has an online learning platform, the system can upload the report to the platform and students can log in to view it themselves.
[0192] Print distribution: For situations where electronic distribution is inconvenient, the report can be printed out and distributed manually by the teacher.
[0193] After receiving the report, students can review according to the feedback in the report. The specially marked easy-to-make mistakes and wrong questions list in the report provide students with clear review points to help them improve their weak points.
[0194] Through detailed correction reports, students can review in a targeted manner, focus on their weaknesses, and improve their learning efficiency. Students can understand their learning progress through reports and adjust their learning strategies in a timely manner based on feedback to achieve better learning results. This personalized report distribution method can help each student develop an improvement plan based on their own situation, thereby improving learning results in a more targeted manner.
[0195] like Figure 2 As shown, a multiple-choice question automatic marking system comprises:
[0196] Information storage module 201: used to pre-store multiple-choice question texts and standard answer information;
[0197] Answer recognition module 202: It is used to scan and collect answer data and recognize answer handwriting, specifically including: the first instruction collects the answer question number and the answer image corresponding to the question number, and recognizes the modified answer by expanding the answer writing box corresponding to the question number, and further performs edge detection in four dimensions of up, down, left, and right on the acquired answer image based on the first instruction through the second instruction to obtain the stroke texture direction to obtain the four answer structures of "A, B, C, D"; based on the second instruction and according to the four dimensions, draw the directional gradient distribution of edge pixel points on the x and y coordinate axes, and then judge the direction of adjacent pixel points of blurred or separated strokes through the third instruction to obtain the final answer;
[0198] Comparison and correction module 203: It is used to compare the answers one by one according to the handwriting of the answers, make corrections, and output the correction results;
[0199] Report generation module 204: It is used to prepare a correction report based on the correction results, and summarize and mark the easy-to-make mistakes.
[0200] An embodiment of the present invention further provides an electronic device according to a system and method for automatically correcting multiple-choice questions, including a memory, a processor, and a program for automatically correcting multiple-choice questions stored in the memory and executable on the processor. When the program for automatically correcting multiple-choice questions is executed by the processor, the steps of the method for automatically correcting multiple-choice questions are implemented. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0201] Those skilled in the art will also appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0202] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0203] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0206] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0207] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it can be understood that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including processors, storage media, etc.) or a network of computing devices, which can be achieved by those of ordinary skill in the art using basic programming skills after reading the description of the present invention.
[0208] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.
[0209] The above describes an embodiment of the present invention, but this embodiment is not limited to the above-mentioned specific implementation mode. The above-mentioned specific implementation mode is merely illustrative and not restrictive. Under the guidance of this embodiment, ordinary technicians in this field can also make more forms of equivalent embodiments, all of which are within the protection of this embodiment.
[0210] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for automatically correcting multiple-choice questions, characterized in that: The following steps are involved: Pre-store multiple-choice question text and standard answer information; Scan and collect answer data and identify answer handwriting, specifically including: the first instruction collects the answer question number and the answer image corresponding to the question number, and identifies the modified answer by expanding the answer writing box corresponding to the question number; based on the first instruction, the second instruction further performs edge detection on the acquired answer image in four dimensions of up, down, left, and right to obtain the stroke texture direction to obtain the four answer structures of "A, B, C, D"; based on the second instruction and according to the four dimensions, the directional gradient distribution of the edge critical pixel points is drawn on the x and y coordinate axes to count the directional gradient distribution of the edge critical pixel points, and then the third instruction is used to judge the direction of the adjacent critical pixel points of the blurred or separated strokes to obtain the final answer; Collect answer data and check question numbers and corresponding answers to locate answer images in answer writing boxes; Preprocessing the answer image to obtain preprocessing data; Identify the traces of erasure of preprocessed data in the answer writing box and determine the number of modifications; For answers that have been modified multiple times, the recognition area is expanded, and the areas above, below, left, and right of the answer writing box are scanned to detect and identify answers that may deviate from the writing box; Based on the distance recognition results between the answer writing box and the offset answer, the final valid answer is determined and corrected to the corresponding question position; Perform edge detection in four dimensions on the preprocessed data to obtain the stroke direction; Based on edge detection in four dimensions of preprocessed data, the directional distribution of edge critical pixels in four dimensions is captured to draw x and y coordinate axes; pass: ; In the formula, Dir (x, y) represents the directional gradient value of I (x, y), arctg () represents the direction calculation function, and I (x, y) represents the coordinates of the critical pixel point. is the differential symbol, Represents the distribution of x and y coordinate axes, thereby counting the direction distribution of each critical pixel point and displaying the distribution of each critical pixel point on the coordinate axis; According to the sparseness or density of the critical pixel points on the coordinate axis, the texture direction of the stroke is obtained; Based on the distribution of critical pixel points on the coordinate graph, the four answers of "A, B, C, D" are decomposed into seven stroke structures of " / , \, -, |, 3, C, and "; Map " / , \, -, |" on the coordinate graph to represent the four directions "↙, ↘, →, ↓", and the trend direction of "3" is from top to bottom, forming two connected curved lines in a clockwise direction; the trend direction of "C" is from top to bottom, forming a semi-circular arc in a counterclockwise direction; The trend direction of "" is from top to bottom, forming a semi-circular arc in a clockwise direction; According to the direction of each stroke, the judgment level is divided into three types, namely "A", "B or D" and "C", to identify unclear or interrupted strokes; The blurred or separated critical pixels are represented as (i, j) on the coordinate graph, and the accumulated critical pixels of each stroke are integrated into the point set G t , starting from the critical pixel point (i, j), along the predetermined stroke direction, circularly expand the search for the adjacent point p (i p , j p ); When the adjacent point p(i p , j p ) with the positive direction of the y-axis is at an angle α, satisfying |tgα|≤θ, where θ is a constant in the range of 0≤θ<0.5, through: ; Determine the adjacent point p (i p , j p ) is included in the " / " point set G t Therefore, the answer is determined to be "A"; Adopted by: ; Determine whether the adjacent point p(i p , j p ) is included in the point set G of "|", and thus determine that the answer is "B or D"; Since the stroke difference between "3" and " " lies in the presence or absence of a stroke in the "→" direction in the middle, then by: ; determining whether the middle part of "丨" contains adjacent points p in the "→" direction (i p , j p ), thereby determining that the answer is "B", and conversely, if the middle part of "丨" does not contain adjacent points p in the "→" direction (i p , j p ), the answer can be determined to be "D"; pass: ; Determine the adjacent point p (i p , j p ) is included in the point set G of "C" t Therefore, the answer is "C"; Compare the answers one by one according to the handwriting of the answers, make corrections, and output the correction results; Compare the final answers obtained with the standard answers question by question to obtain the comparison results; The correctness of the answer to each question is determined based on the comparison results and marked as "correct" or "wrong". Based on the correctness determination results, the score is calculated for each question and the total score is accumulated. Output the correction content including the correctness, score and total score of each question to obtain the correction result; Prepare a marking report based on the marking results, and summarize and mark the easy-to-make mistakes; Compare each student's answer with the standard answer to obtain the grading result data; Generate a preliminary grading report based on the scores, correct percentages and wrong questions contained in the grading result data; Count the error rate based on the preliminary correction report to get the easy-to-make mistakes in the report and mark them; Integrate the marked error-prone questions with the preliminary report to form a complete correction report.
2. A method for automatically correcting multiple-choice questions according to claim 1, characterized in that: Pre-store multiple-choice question text and standard answer information, including: Determine the storage format of the question number and text information of the question and enter it; Based on the entered question information, enter the four standard answers "A, B, C, D" corresponding to the question.
3. An automatic grading system for multiple choice questions, characterized in that: The system sets up an electronic device including a memory, a processor and a multiple-choice question automatic correction method program stored in the memory and executable on the processor. When the multiple-choice question automatic correction method program is executed by the processor, the steps of the multiple-choice question automatic correction method as described in any one of claims 1-2 are implemented.
4. The automatic marking system for multiple choice questions according to claim 3, characterized in that: The system includes: Information storage module: used to pre-store multiple-choice question text and standard answer information; Answer recognition module: It is used to scan and collect answer data and recognize answer handwriting, specifically including: the first instruction collects the answer question number and the answer image corresponding to the question number, and recognizes the modified answer by expanding the answer writing box corresponding to the question number. Based on the first instruction, the second instruction further performs edge detection on the acquired answer image in four dimensions of up, down, left, and right to obtain the stroke texture direction to obtain the four answer structures of "A, B, C, D"; based on the second instruction and according to the four dimensions, the directional gradient distribution of the edge critical pixel points of the x and y coordinate axes is drawn, and then the direction of the adjacent critical pixel points of the blurred or separated strokes is judged by the third instruction to obtain the final answer; Comparison and correction module: It is used to compare the answers one by one according to the handwriting of the answers, make corrections, and output the correction results; Report generation module: It is used to prepare a correction report based on the correction results, and summarize and mark the easy-to-make mistakes.
Citation Information
Patent Citations
An improved Canny image edge detection method with noise immunity
CN109410230A
Processing method and processing system for homework acquisition, identification and correction
CN116109808A
Method for collecting handwritten answer area in test paper
CN116486411A