Answer sheet recognition method and device based on coded mark points and related medium thereof

By using an answer sheet recognition method based on coded marker points, the problems of low accuracy and poor robustness in existing technologies are solved, and high-precision answer sheet recognition and filling judgment are achieved at any angle.

CN116110069BActive Publication Date: 2026-03-27湛江科技学院
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing answer sheet recognition technologies suffer from low accuracy and poor robustness. In particular, when cameras capture images, they are prone to misidentification due to deformation and uneven lighting. Furthermore, answer sheets need to be placed at a specific angle.

Method used

An identification method based on coded markers is adopted. Through image preprocessing, coded marker recognition, geometric correction and region segmentation, the rotation invariance of coded markers is used to identify and correct answer sheets. The method includes image preprocessing, marker recognition, geometric correction, region segmentation and binarization.

Benefits of technology

It improves the accuracy and robustness of answer sheet recognition, can correctly identify answer sheets from any angle, reduces the impact of uneven lighting, and ensures the accuracy of filling and judging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116110069B_ABST
    Figure CN116110069B_ABST
Patent Text Reader

Abstract

The application discloses an answer sheet recognition method and device based on coding mark points and related media thereof, and the method comprises the following steps: performing image preprocessing on a detection image of the answer sheet; performing mark point recognition processing on the preprocessing result, and calculating coding mark points and corresponding code values; performing geometric correction on the preprocessing result to obtain an image correction result; performing region division on the image correction result to obtain a region division result; wherein the region division result comprises an information region and an answer region, and the answer region comprises a plurality of answer option regions; performing binaryzation processing and segmentation processing on each answer option region to obtain an answer sheet target region result; and judging whether the filling is correct according to the answer sheet target region result. The coding mark points and the corresponding code values are used for recognizing and correcting the detection image of the answer sheet, so that the accuracy and robustness of the answer sheet recognition are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, in particular to a method and device for identifying an answer sheet based on coded marker points and related media thereof. BACKGROUND

[0002] At present, with the rapid development of computer vision technology and artificial intelligence, some answer sheet identification systems based on digital image processing and artificial intelligence algorithms appear in the market; such systems only need an ordinary camera, are relatively cheap, do not have special requirements for paper and printing, and are relatively convenient to use.

[0003] However, when identifying an answer sheet, the answer sheet image collected by the camera may have a deformation problem caused by near-far and tilt; the answer sheet identification technology in the prior art obtains the coordinates of the corner points by using Hough transform straight line detection, and then performs geometric correction on the answer sheet image according to the principle of transmission transformation; the accuracy of the coordinates of the corner points extracted by this technology is not high enough, which affects the effect of geometric correction and thus affects the recognition accuracy; in addition, this technology performs global binaryzation processing on the answer sheet image, and uneven illumination may cause overexposure or overdarkness in some parts of the image, which may easily cause misrecognition; therefore, the answer sheet identification technology in the prior art has a low accuracy.

[0004] The answer sheet identification technology in the prior art also needs to put the answer sheet into the camera at a specific angle when collecting the answer sheet image; if the answer sheet is not put into the camera at the specific angle, the camera may fail to recognize the answer sheet, and therefore the robustness of this answer sheet identification technology is also poor. SUMMARY

[0005] The embodiments of the present application provide an answer sheet identification method and device based on coded marker points and related media thereof, and aim to solve the problems of low accuracy and poor robustness of the answer sheet identification in the prior art.

[0006] In a first aspect, the embodiments of the present application provide an answer sheet identification method based on coded marker points, which comprises the following steps:

[0007] An image of an answer sheet is acquired, and image preprocessing is performed on the image of the answer sheet to obtain a preprocessing result; wherein the answer sheet is provided with a plurality of coded marker points, and each coded marker point has a corresponding code value;

[0008] Marker point identification processing is performed on the preprocessing result, and coded marker points and corresponding code values are calculated;

[0009] Geometric correction is performed on the preprocessing result according to the coded marker points to obtain an image correction result;

[0010] According to the coding mark point and the corresponding code value, the image correction result is regionally divided to obtain a regionally divided result; wherein the regionally divided result comprises an information region and an answering region, and the answering region comprises a plurality of answering option regions;

[0011] Each of the answering option regions is subjected to binaryzation processing and segmentation processing to obtain an answer sheet target region result.

[0012] According to the answer sheet target region result, it is judged whether the filling and painting is correct; if the filling and painting region is greater than a threshold value, the filling and painting is correct; if the filling and painting region is less than the threshold value, the filling and painting is incorrect.

[0013] In a second aspect, an embodiment of the present application provides an answer sheet recognition device based on coding mark points, comprising:

[0014] An image processing unit is configured to acquire a detection image of an answer sheet, and perform image preprocessing on the detection image of the answer sheet to obtain a preprocessing result; wherein a plurality of coding mark points are arranged on the answer sheet, and each coding mark point has a corresponding code value.

[0015] A mark calculation unit is configured to perform mark point recognition processing on the preprocessing result to calculate coding mark points and corresponding code values.

[0016] A mark correction unit is configured to perform geometric correction on the preprocessing result according to the coding mark points to obtain an image correction result.

[0017] A regionally dividing unit is configured to perform regional division on the image correction result according to the coding mark points and the corresponding code values to obtain a regionally divided result; wherein the regionally divided result comprises an information region and an answering region, and the answering region comprises a plurality of answering option regions.

[0018] A region processing unit is configured to perform binaryzation processing and segmentation processing on each of the answering option regions to obtain an answer sheet target region result.

[0019] A region judging unit is configured to judge whether the filling and painting is correct according to the answer sheet target region result; if the filling and painting region is greater than a threshold value, the filling and painting is correct; if the filling and painting region is less than the threshold value, the filling and painting is incorrect.

[0020] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor; when the processor executes the computer program, the first aspect of the answer sheet recognition method based on coding mark points is realized.

[0021] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method for identifying an answer sheet based on a coded mark point according to the first aspect.

[0022] An embodiment of the present application provides a method for identifying an answer sheet based on a coded mark point, which comprises: performing image preprocessing on a detection image of the answer sheet; performing mark point identification processing on the preprocessing result to obtain a coded mark point and a corresponding code value; performing geometric correction on the preprocessing result to obtain an image correction result; performing region division on the image correction result to obtain a region division result; wherein the region division result comprises an information region and an answer region, and the answer region comprises a plurality of answer option regions; performing binarization processing and segmentation processing on each of the answer option regions to obtain an answer sheet target region result; and judging whether the answer sheet is filled and painted correctly according to the answer sheet target region result. The detection image of the answer sheet is identified and corrected by using the coded mark point and the corresponding code value, so that the accuracy and robustness of the answer sheet identification are greatly improved.

[0023] An embodiment of the present application also provides an answer sheet identification device based on a coded mark point, a computer device and a storage medium, which also have the beneficial effects described above. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0025] Figure 1 A flowchart of a method for identifying an answer sheet based on a coded mark point provided by an embodiment of the present application;

[0026] Figure 2 Another flowchart of a method for identifying an answer sheet based on a coded mark point provided by an embodiment of the present application;

[0027] Figure 3 An answer sheet template provided by an embodiment of the present application;

[0028] Figure 4 An effect diagram of a coded mark point provided by an embodiment of the present application;

[0029] Figure 5 An effect diagram of coded mark point identification in an answer sheet provided by an embodiment of the present application;

[0030] Figure 6 A geometric correction effect diagram of the answer sheet provided by the embodiment of the present application;

[0031] Figure 7 An area division effect diagram of the answer sheet provided by the embodiment of the present application;

[0032] Figure 8 A segmentation processing algorithm flowchart of the answer sheet provided by the embodiment of the present application;

[0033] Figure 9 A simulation error comparison diagram for circle center positioning and straight line detection positioning;

[0034] Figure 10 An error comparison diagram of the geometric correction method;

[0035] Figure 11 A traditional binarization processing effect diagram;

[0036] Figure 12 A binarization processing effect diagram provided by the embodiment of the present application;

[0037] Figure 13 A schematic block diagram of an answer sheet recognition device based on an encoding mark point provided by the embodiment of the present application. DETAILED DESCRIPTION

[0038] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of the present application.

[0039] It should be understood that the terms "comprising" and "including" as used in the specification and the appended claims indicate the presence of the described features, integers, steps, operations, elements, and / or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0040] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0041] It should be further understood that the term "and / or" as used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations thereof, and includes these combinations.

[0042] Please see the following Figure 1 , Figure 1 A flowchart of an answer sheet recognition method based on coding mark points is provided for an embodiment of the present application, and specifically comprises steps S101-S106.

[0043] S101, obtain a detection image of an answer sheet, perform image preprocessing on the detection image of the answer sheet to obtain a preprocessing result; wherein a plurality of coding mark points are provided on the answer sheet, and each coding mark point has a corresponding code value;

[0044] S102, perform mark point recognition processing on the preprocessing result to calculate the coding mark points and the corresponding code values;

[0045] S103, perform geometric correction on the preprocessing result according to the coding mark points to obtain an image correction result;

[0046] S104, perform region division on the image correction result according to the coding mark points and the corresponding code values to obtain a region division result; wherein the region division result includes an information region and an answer region, and the answer region includes a plurality of answer option regions;

[0047] S105, perform binarization processing and segmentation processing on each of the answer option regions to obtain an answer sheet target region result;

[0048] S106, determine whether the filling and coating is correct according to the answer sheet target region result; if the filling and coating region is greater than a threshold value, the filling and coating is correct; if the filling and coating region is less than the threshold value, the filling and coating is incorrect.

[0049] In combination with Figure 2 and Figure 3 As shown in step S101, first, a detection image of an answer sheet (such as shown in Figure 3 ) needs to be obtained, that is, the content of the answer sheet is read by a camera, and then the detection image of the answer sheet is preprocessed to obtain a preprocessing result. Specifically, the camera is more susceptible to factors such as light and viewing angle during reading of the answer sheet content, and the image obtained by reading usually has noise (noise refers to unnecessary or redundant interference information existing in image data, and the existence of noise seriously affects the quality of the image, so noise removal processing must be performed before image enhancement processing and classification processing, and the same applies below), so the image needs to be preprocessed to remove noise, thereby obtaining a good quality image (i.e., the preprocessing result); after obtaining the preprocessing result, the steps of coding mark point recognition, image geometric correction, answer sheet region division, and answer filling and coating recognition are performed.

[0050] In the image preprocessing, the image gray scale, Gaussian filter denoising and canny edge detection are combined in the embodiment, and other applicable preprocessing methods can also be used for the image preprocessing, which is not limited herein. The image preprocessing methods applied in the embodiment will be introduced as follows: the image gray scale is to convert the RGB color picture into a gray scale picture, and the weighted average gray scale method is used in the embodiment, that is, the red, green and blue channel values of each pixel in the detection image are obtained, and the gray scale value of the pixel in the detection image is calculated as Gray = Red * 0.3 + Green * 0.59 + Blue * 0.1. The Gaussian filter is a linear smoothing filter, that is, the weighted average process of the detection image, and the value of each pixel point in the detection image has its own and other pixel gray scale values in the neighborhood, which can be obtained after weighted average; the weight of each pixel in the neighborhood is determined by a Gaussian function, and the window size used in the embodiment is 7*7 pixels, and the standard deviation is set to 1.5 pixels. The algorithm flow of the canny edge detection is as follows: the image is smoothed by the Gaussian filter, the gradient amplitude and direction are calculated by the first-order difference, the non-maximum suppression is applied to the gradient amplitude, the double threshold algorithm is used to detect and connect the edges, and the morphological thinning is performed on the edges of the detection image.

[0051] In combination Figure 4 As shown in FIG. 1, in step S102, the position information of the encoding mark point is calculated, the center of the encoding mark point is a black circle, the center serves as a positioning function, the annular ring outside the center is an encoding ring, the encoding ring is equally divided into 8 parts, each part is an encoding bit, each encoding bit can be regarded as a binary bit, black represents 1 and white represents 0, and therefore each encoding mark point can correspond to an 8-bit binary value. In addition, the encoding ring includes a plurality of encoding segments, and the encoding segments are composed of the encoding bits; since the encoding ring has rotation invariance, the minimum value in all 8-bit binary values is taken as the code value. The 8-bit binary value corresponds to 256 encodings, and there are 34 code values with uniqueness after removing the repeated code values, that is, there are 34 encoding mark points, which is sufficient for the design and use of the answer sheet.

[0052] In combination Figure 5 As shown in FIG. 1, in an embodiment, the encoding mark point is circular, and the step S102 includes:

[0053] The edge of the encoding mark point is selected according to the edge perimeter, whether the edge is closed, the edge brightness and the fitting error of the encoding mark point;

[0054] The edge of the encoding mark point is positioned in a sub-pixel by using the curved surface fitting method, and a sub-pixel edge positioning result is obtained;

[0055] Performing least square fitting of an ellipse equation by using the sub-pixel edge positioning result to obtain equation coefficients;

[0056] Calculating the sub-pixel center coordinates of the encoding mark point by using the equation coefficients;

[0057] Calculating a first homography matrix of the encoding mark point according to the ellipse equation and the sub-pixel center coordinates, and correcting the encoding mark point to obtain a corrected encoding mark point.

[0058] Further, the encoding mark point is surrounded by an encoding ring band for indicating code values, and the mark point recognition processing of the preprocessing result, the calculation of the encoding mark point and the corresponding code values further includes:

[0059] Traversing the encoding ring band of the encoding mark point to obtain pixel values of each pixel of the encoding ring band;

[0060] Determining the encoding segment length of the encoding ring band and the code value bit number of the encoding segment length according to the pixel values, respectively;

[0061] Determining the code value of the encoding mark point according to the pixel values and the code value bit number.

[0062] In this embodiment, the circular encoding mark point is displayed as an ellipse in the detection image obtained after lens imaging, and needs to be corrected to realize accurate positioning of the center of the encoding mark point. First, the edge of the encoding mark point is selected according to the edge perimeter, whether the edge is closed, the edge brightness and the fitting error; then the sub-pixel edge positioning of the edge of the encoding mark point is performed by using a curved surface fitting method to obtain a sub-pixel edge positioning result, and the curved surface fitting method can suppress noise to a certain extent; then the least square fitting of the ellipse equation is performed by using the sub-pixel edge positioning result to obtain the coefficients of the ellipse equation; the general equation of the ellipse is as follows:

[0063] Ax 2 +2Bxy+Cy 2 +2Dx+F=0

[0064] Wherein, A, B, C, D, E, F are coefficients;

[0065] Finally, the five coefficients B, C, D, E, F of the general equation of the ellipse can be obtained by the fitting method, and the center coordinates of the ellipse are:

[0066]

[0067] It should be noted that the ellipse obtained at this time also needs to be corrected to restore it to the original circular shape; a first homography matrix of the encoding marker point is calculated according to the ellipse equation and the sub-pixel center coordinates, that is, the first homography matrix is calculated using the four end points of the long axis, the short axis and the edge intersection of the ellipse, and the center coordinates of the ellipse, and the ellipse is corrected to obtain the corrected encoding marker point (circular shape); the first homography matrix is expressed as follows:

[0068]

[0069] wherein, is an ideal coordinate; is an actual coordinate; i is the i-th coordinate.

[0070] Further, in the polar coordinate system, the encoding ring belt is traversed according to the rules, the pixel value corresponding to each pixel point of the encoding ring belt is obtained, then the length of each encoding segment on the encoding ring belt is judged according to the distribution of the pixel value, so as to determine the code value bit number of each encoding segment in the binary encoding sequence, and finally the code value of the encoding ring belt in the binary encoding sequence is determined by the pixel value of each encoding segment, forming a binary encoding sequence for representing the encoding value of the encoding marker point.

[0071] From Figure 5 it can be seen that the recognition effect of the encoding marker point in the actually collected test paper image, the center of the cross in the figure is the recognized encoding marker point, and the corresponding number beside the encoding marker point is the code value of the encoding marker point.

[0072] As shown in Figure 6 , in step S103, due to the influence of the camera angle of view, the collected test paper image will appear large near and small far and inclined, and the originally rectangular region becomes a trapezoid in the detection image, which will directly cause false recognition of image segmentation. As can be known from the camera model, the ideal image of the test paper and the actually collected detection image are planar to planar perspective projection transformation, therefore, a homography matrix (Homography Matrix, referred to as H matrix) is used to describe the transformation relationship between the two, so as to perform geometric correction on the preprocessing result and straighten the image.

[0073] In an embodiment, the step S103 comprises:

[0074] A second homography matrix of the preprocessing result is calculated according to the encoding marker point;

[0075] The second homography matrix is estimated according to the following formula to obtain an estimated homography matrix:

[0076]

[0077] wherein, is ideal coordinate; is actual coordinate; i is the i-th coordinate;

[0078] According to the estimated homography matrix, the pre-processed result is geometrically corrected according to the following formula to obtain the image correction result:

[0079] l p = H·l q

[0080] wherein, l p is the transformed orthographic image; l q is the perspective projection image before transformation.

[0081] In this embodiment, the center coordinates of the encoding mark points are taken as input coordinate points, the input coordinates are adjusted, the center coordinates of the four encoding mark points (i.e. the encoding mark points located at the four corners of the answer sheet) are set as the coordinates of the four vertices of a rectangle, and the adjusted coordinates are taken as output coordinate points. The second homography matrix can be calculated through the input coordinate points and the output coordinate points. Finally, the second homography matrix is estimated to obtain the estimated homography matrix, and then the pre-processed result is geometrically corrected according to the estimated homography matrix and the correction formula (l p = H·l q ) to obtain the image correction result.

[0082] As shown in Figure 7 , in step S104, the answer sheet image after geometric correction has been properly positioned, and the options in the same row and column are no longer inclined. At this time, according to the center coordinates and code values of the encoding mark points, the answer sheet can be divided into an information area and an answer area. The answer area can be further divided into small answer option areas according to the recognition information (center coordinates and code values) of the encoding mark points and the distance proportional relationship between the encoding mark points, and each answer option area contains 5 multiple-choice questions. The information area includes name filling, admission ticket number, subject, and matters needing attention, etc. The answer area is subdivided into 4*4 small blocks, each small block includes 5 multiple-choice questions ABCD options, and 12 encoding mark points are used for positioning. As shown in Figure 7As shown, one of the encoding mark points is arranged at each of the top and left vertices of the information region, one of the encoding mark points is arranged at each of the bottom and left vertices of the answer region, one of the encoding mark points is arranged at each of the left and right edges of the line gap between the information region and the answer region, and one of the encoding mark points is arranged at each of the right edge of each line gap and the lower edge of each column gap in the answer region. When the twelve encoding mark points are connected, the image correction result is obtained. It should be noted that the division of the information region and the answer region can be set according to actual conditions. In this embodiment, the answer region is subdivided into 4*4 small blocks and twelve encoding mark points are used, which are only examples.

[0083] In step S105, the binaryzation processing and the segmentation processing are performed on each of the answer option regions to obtain an answer card target region result including the processing results of the multiple answer option regions. After the answer card target region result is recognized, the answer judgment is performed subsequently.

[0084] In an embodiment, the step S105 includes:

[0085] The binaryzation processing is performed on each of the answer option regions to obtain a binaryzation image.

[0086] The segmentation processing is performed on each of the answer option regions according to the binaryzation image by using a morphological segmentation algorithm to obtain a single-choice question region result.

[0087] The option segmentation is performed on the single-choice question region result to obtain a single-choice question result. The answer card target region result includes multiple single-choice question results.

[0088] In this embodiment, in each of the answer option regions, the filled region and the original option are black, and the paper (background) is usually white or gray. The brightness of the paper is brighter than that of the filled region and the original option. Therefore, the filled region and the original option are distinguished from the paper background by using the binaryzation method. In this embodiment, the Otsu algorithm (OTSU) is used to perform the binaryzation processing on the answer option region to obtain the binaryzation image. The Otsu algorithm is based on the clustering idea of machine learning, and the segmentation threshold is determined by iteratively calculating the maximum inter-class variance and the minimum intra-class variance to realize the automatic binaryzation of the image, and has good adaptability. Then, the segmentation processing is performed on each of the answer option regions according to the binaryzation image by using the morphological segmentation algorithm to obtain a single-choice question region result. Finally, the option segmentation is performed on the single-choice question region result to obtain a single-choice question result.

[0089] In combination with Figure 8As shown, in an embodiment, the single-choice question region is segmented according to the binarized image by using a morphological segmentation algorithm to obtain a single-choice question region result, which includes:

[0090] The number of white pixels in the row direction of the binarized image is obtained.

[0091] The first non-zero element position is captured according to the number of white pixels in the row direction to obtain the upper range of the single-choice question.

[0092] The first zero element position is captured according to the upper range to obtain the lower range of the single-choice question.

[0093] The single-choice question region result is calculated by using the upper range and the lower range.

[0094] In this embodiment, after obtaining the binarized image of the answer option region, a morphological segmentation algorithm is used to segment one of the answer option regions. First, the number of white pixels in the row direction of the binarized image (bw) is counted, and the first non-zero element position pu is found from top to bottom in the counting, which is the upper range of the first single-choice question. The first zero element position pd is found from the upper range, which is the lower range of the first single-choice question. The first single-choice question region is obtained by cutting the rows from pu to pd. The other four single-choice question regions of the answer option region are segmented by using the same method. Figure 8

[0095] In an embodiment, the single-choice question region result is segmented to obtain a single-item selection question result, which includes:

[0096] The number of white pixels in the column direction of the binarized image is obtained.

[0097] The second non-zero element position is captured according to the number of white pixels in the column direction to obtain the right range of the single-item selection question.

[0098] The second zero element position is captured according to the right range to obtain the left range of the single-item selection question.

[0099] The single-item selection question result is calculated by using the right range and the left range.

[0100] In this embodiment, after the single-choice question region result is segmented, the single-choice question region result is further segmented to obtain the single-item selection question result (i.e., ABCD option). The segmentation process of the single-choice question region result can be referred to Figure 8 ​The number of white pixels in the column direction of the binary image is counted, and the first non-zero element position pr is found from right to left in the counting, which is the right range of the D option in the multiple-choice question. The first zero element position pl is found from the right range to the left, which is the left range of the D option. The ranges of the remaining ABC options can be found by using the same method. In addition, the identification of the encoding landmark points has high precision and high stability. The method of segmenting the single-item multiple-choice question result can also be used to achieve the segmentation effect according to the distance ratio between the encoding landmark points.

[0101] In step S106, the proportion of the number of pixels of the result of the target area of the answer sheet in the image is counted to identify whether the option is filled in. A proportion threshold can be set for judgment, such as setting the proportion threshold to 80% or more to be considered as correct filling. If multiple options are filled in for a single-choice question, it is directly determined that the question is incorrect.

[0102] In addition, in order to verify that the positioning accuracy of the encoding landmark points is higher than that of the traditional Hough transform straight line detection, combined with Figure 9 As shown in FIG. 6, a comparative experiment is performed: two point coordinates are randomly generated, a white line segment is generated in the first black image with the generated two point coordinates as end points, and two white circles are generated in the second black image of the same size with the generated two point coordinates as centers. The Hough transform straight line detection is performed on the first image to obtain the coordinates of the two end points of the straight line, and the coordinate error is calculated. The center detection is performed on the second image, the coordinate error is calculated, and the errors of the two algorithms are compared. Figure 9 A total of 100 groups of experiments are randomly generated in Figure 9 From the experimental results in FIG. 6, it can be seen that the accuracy of the center positioning is higher than that of the straight line detection positioning, and the standard deviation (0.212812 pixels) of the center positioning is less than the standard deviation (0.660354 pixels) of the straight line detection positioning, which indicates that the center positioning is more stable than the straight line detection positioning.

[0103] Further, combined with Figure 10 As shown in FIG. 7, another group of experiments are performed: four encoding landmark points are set in the four corners of an image, a straight line is set between each pair of horizontal encoding landmark point centers, and 15 rows and 10 columns of encoding landmark points are set in the middle area for error calculation. The collected images are geometrically corrected by two methods: the first method uses the center coordinates positioned by the four encoding landmark points in the corners, and the second method uses two line segments for straight line detection positioning point coordinates. Then the encoding landmark points are positioned in the images obtained by the two geometric correction methods, and the errors are analyzed and compared. The error comparison result is shown in FIG. 8. Figure 8As shown, the sum of the center errors for geometric correction based on coded markers is 170.371684, with an average of 1.135811 and a standard deviation of 0.501094; the sum of the center errors for geometric correction based on line detection and positioning is 288.192946, with an average of 1.921286 and a standard deviation of 0.921275. The error comparison results show that the sum of the center errors for geometric correction based on coded markers is smaller than that for geometric correction based on Hough transform line detection and positioning, indicating that geometric correction based on coded markers has higher accuracy and better performance. Furthermore, the standard deviation of the center errors for geometric correction based on coded markers is smaller than that for geometric correction based on Hough transform line detection and positioning, indicating that geometric correction based on coded markers has better stability.

[0104] In summary, this invention utilizes coded markers for answer sheet design and recognition. Compared to traditional geometric correction algorithms based on Hough transform line detection and localization, this invention offers higher accuracy and better robustness, providing better initial conditions for subsequent answer region segmentation and answer option recognition. Furthermore, the coded markers on the answer sheet can segment the answer region into smaller areas, which can then be binarized separately during later recognition. This approach is more efficient than binarizing the entire image (e.g., ...). Figure 11 As shown), this invention can better avoid the effects of uneven lighting (such as...). Figure 12 (As shown), thus better ensuring the accuracy of recognition. The coded markers used in this invention also have rotation invariance, meaning that coded markers taken from any angle can be correctly recognized; therefore, answer sheets designed based on coded markers can be correctly geometrically corrected and recognized by images taken from any angle, even inverted images.

[0105] Combination Figure 13 As shown, Figure 13 This is a schematic block diagram of an answer sheet recognition device based on coded marker points provided in an embodiment of the present invention. The answer sheet recognition device 1300 based on coded marker points includes:

[0106] Image processing unit 1301 is used to acquire the detection image of the answer sheet, perform image preprocessing on the detection image of the answer sheet, and obtain a preprocessing result; wherein, the answer sheet is provided with a plurality of coded marker points, each coded marker point having a corresponding code value;

[0107] The flag calculation unit 1302 is used to perform flag point recognition processing on the preprocessing result and calculate the encoded flag points and the corresponding code values.

[0108] The marker correction unit 1303 is used to perform geometric correction on the preprocessing result based on the encoded marker points to obtain the image correction result;

[0109] The region division unit 1304 is configured to divide the image correction result according to the coding mark point and the corresponding code value, to obtain a region division result; wherein the region division result comprises an information region and a test region, and the test region comprises a plurality of test option regions;

[0110] The region processing unit 1305 is configured to perform binaryzation processing and segmentation processing on each of the test option regions, to obtain a test card target region result.

[0111] The region judgment unit 1306 is configured to judge whether the filling is correct according to the test card target region result; if the filling region is greater than a threshold, the filling is correct; if the filling region is less than the threshold, the filling is incorrect.

[0112] In the embodiment, first, the image processing unit 1301 acquires a detection image of a test card, and performs image preprocessing on the detection image of the test card, to obtain a preprocessing result; wherein a plurality of coding mark points are arranged on the test card, and each coding mark point has a corresponding code value; the mark calculation unit 1302 performs mark point recognition processing on the preprocessing result, to calculate the coding mark point and the corresponding code value; the mark correction unit 1303 performs geometric correction on the preprocessing result according to the coding mark point, to obtain an image correction result; then, the region division unit 1304 divides the image correction result according to the coding mark point and the corresponding code value, to obtain a region division result; wherein the region division result comprises an information region and a test region, and the test region comprises a plurality of test option regions; the region processing unit 1305 performs binaryzation processing and segmentation processing on each of the test option regions, to obtain a test card target region result; finally, the region judgment unit 1306 judges whether the filling is correct according to the test card target region result; if the filling region is greater than a threshold, the filling is correct; if the filling region is less than the threshold, the filling is incorrect.

[0113] In an embodiment, the coding mark point is a circle, and the mark calculation unit comprises:

[0114] The brushing unit is configured to brush the edge of the coding mark point according to the edge perimeter of the coding mark point, whether the edge is closed, the edge brightness, and the fitting error.

[0115] The positioning unit is configured to perform sub-pixel edge positioning on the edge of the coding mark point by using a curved surface fitting method, to obtain a sub-pixel edge positioning result.

[0116] The fitting unit is configured to perform least square fitting of an elliptic equation by using the sub-pixel edge positioning result, to obtain equation coefficients.

[0117] a circle center unit configured to calculate a sub-pixel circle center coordinate of the encoding mark point by using the equation coefficients;

[0118] a correction unit configured to calculate a first homography matrix of the encoding mark point according to the ellipse equation and the sub-pixel circle center coordinate, and correct the encoding mark point to obtain a corrected encoding mark point.

[0119] In an embodiment, a periphery of the encoding mark point is provided with an encoding ring belt for representing a code value, and the mark calculation unit further comprises:

[0120] a traversal unit configured to traverse the encoding ring belt of the encoding mark point to obtain a pixel value of each pixel of the encoding ring belt;

[0121] a pixel unit configured to determine an encoding segment length of the encoding ring belt and a code value bit number of the encoding segment length according to the pixel value respectively;

[0122] a code value unit configured to determine a code value of the encoding mark point according to the pixel value and the code value bit number.

[0123] In an embodiment, the mark correction unit comprises:

[0124] a matrix unit configured to calculate a second homography matrix of the pre-processing result according to the encoding mark point;

[0125] an estimation unit configured to estimate the second homography matrix according to the following formula to obtain an estimated homography matrix:

[0126]

[0127] wherein, is an ideal coordinate; is an actual coordinate; i is an i-th coordinate;

[0128] a geometry unit configured to perform geometric correction on the pre-processing result according to the estimated homography matrix according to the following formula to obtain the image correction result:

[0129] l p = H·l q

[0130] wherein, l p is a transformed orthographic image; l q is a perspective projection image before transformation.

[0131] In an embodiment, the region processing unit comprises:

[0132] A binary unit is configured to binarize each of the answer option regions to obtain a binarized image.

[0133] A segmentation unit is configured to segment each of the single-choice question regions according to the binarized image by using a morphological segmentation algorithm to obtain a single-choice question region result.

[0134] An option unit is configured to segment the single-choice question region result to obtain a single-item selection question result. The target region result of the answer sheet includes a plurality of single-item selection question results.

[0135] In an embodiment, the segmentation unit includes:

[0136] A row direction unit is configured to obtain the number of white pixels in the row direction of the binarized image.

[0137] An upper unit is configured to capture the position of a first non-zero element according to the number of white pixels in the row direction to obtain an upper range of the single-choice question.

[0138] A lower unit is configured to capture the position of a first zero element according to the upper range to obtain a lower range of the single-choice question.

[0139] A clipping unit is configured to calculate the single-choice question region result by using the upper range and the lower range.

[0140] In an embodiment, the option unit includes:

[0141] A column direction unit is configured to obtain the number of white pixels in the column direction of the binarized image.

[0142] A right unit is configured to capture the position of a second non-zero element according to the number of white pixels in the column direction to obtain a right range of the single-item selection question.

[0143] A left unit is configured to capture the position of a second zero element according to the right range to obtain a left range of the single-item selection question.

[0144] An obtaining unit is configured to calculate the single-item selection question result by using the right range and the left range.

[0145] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part are described in the description of the embodiments of the method part, which are not described herein.

[0146] The embodiment of the present application further provides a computer readable storage medium, which has a computer program stored thereon, and the computer program can realize the steps provided by the above embodiment when being executed. The storage medium can include a U disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk and various storage medium capable of storing program codes.

[0147] The embodiment of the present application further provides a computer device, which can include a memory and a processor, the memory has a computer program stored therein, and the processor can realize the steps provided by the above embodiment when calling the computer program in the memory. Of course, the computer device can further include various network interfaces, power supplies and other components.

[0148] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system disclosed by the embodiments, the description is relatively simple because it corresponds to the method disclosed by the embodiments. The relevant parts can be referred to the method part. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

[0149] It should be further noted that, in the specification, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. An encoding mark point-based answer sheet recognition method, characterized by, The method comprises the following steps: acquiring a detection image of an answer sheet, and performing image preprocessing on the detection image of the answer sheet to obtain a preprocessing result; wherein a plurality of code mark points are arranged on the answer sheet, and each code mark point has a corresponding code value; performing mark point recognition processing on the preprocessing result to calculate the code mark points and the corresponding code values; performing geometric correction on the preprocessing result according to the code mark points to obtain an image correction result; performing region division on the image correction result according to the code mark points and the corresponding code values to obtain a region division result; wherein the region division result comprises an information region and an answer region, and the answer region comprises a plurality of answer option regions; performing binarization processing and segmentation processing on each answer option region to obtain an answer sheet target region result; judging whether the filling and coating are correct according to the answer sheet target region result; if the filling and coating region is greater than a threshold value, the filling and coating are correct; if the filling and coating region is less than the threshold value, the filling and coating are incorrect; the code mark points are circular, and the mark point recognition processing on the preprocessing result to calculate the code mark points and the corresponding code values comprises the following steps: according to the edge circumference, edge closure, edge brightness and fitting error of the code mark points, the edges of the code mark points are selected; the edge of the code mark points is positioned by a curved surface fitting method to obtain a sub-pixel edge positioning result; the least square fitting of an elliptic equation is performed by using the sub-pixel edge positioning result to obtain equation coefficients; the sub-pixel center coordinates of the code mark points are calculated by using the equation coefficients; the first homography matrix of the code mark points is calculated according to the elliptic equation and the sub-pixel center coordinates, and the code mark points are corrected to obtain the corrected code mark points.

2. The method of claim 1, wherein the method further comprises: a code ring belt for representing a code value is arranged around the periphery of the code mark points, and the mark point recognition processing on the preprocessing result to calculate the code mark points and the corresponding code values further comprises the following steps: traversing the code ring belt of the code mark points to obtain the pixel value of each pixel of the code ring belt; determining the code segment length and the code value bit number of the code segment length of the code ring belt according to the pixel value; determining the code value of the code mark points according to the pixel value and the code value bit number.

3. The method of claim 1, wherein the method further comprises: the geometric correction on the preprocessing result according to the code mark points to obtain the image correction result comprises the following steps: calculating the second homography matrix of the preprocessing result according to the code mark points; estimating the second homography matrix according to the following formula to obtain an estimated homography matrix: wherein is the ideal coordinate; is the actual coordinate; i is the ith coordinate; performing geometric correction on the preprocessing result according to the estimated homography matrix according to the following formula to obtain the image correction result: l p =H·l q wherein, l p is the transformed orthographic image; l q is the perspective projection image before transformation.

4. The method of claim 1, wherein the method further comprises: the binarization processing and segmentation processing on each answer option region to obtain the answer sheet target region result comprises the following steps: performing binarization processing on each answer option region to obtain a binarization image; segmenting each multiple-choice question region according to the binarization image by using a morphological segmentation algorithm to obtain a single multiple-choice question region result; The single-choice question area result is segmented by options to obtain a single-item selection question result.

5. The method of claim 4, wherein the method further comprises: The single-choice question area result is segmented by options to obtain a single-item selection question result. The number of white pixels in the row direction of the binary image is obtained. The first non-zero element position is captured according to the number of white pixels in the row direction to obtain the upper range of the single-choice question. The first zero element position is captured according to the upper range to obtain the lower range of the single-choice question. The single-choice question area result is calculated using the upper range and the lower range.

6. The method of claim 4, wherein the method further comprises: The number of white pixels in the row direction of the binary image is obtained. The second non-zero element position is captured according to the number of white pixels in the column direction to obtain the right range of the single-item selection question. The second zero element position is captured according to the right range to obtain the left range of the single-item selection question. The single-item selection question result is calculated using the right range and the left range. The image processing unit is configured to obtain a detection image of an answer sheet, and perform image preprocessing on the detection image of the answer sheet to obtain a preprocessing result.

7. A test sheet recognition device based on coded marker points, characterized in that, The marker calculation unit is configured to perform marker point identification processing on the preprocessing result to calculate the encoding marker points and the corresponding code values. The marker correction unit is configured to perform geometric correction on the preprocessing result according to the encoding marker points to obtain an image correction result. The region division unit is configured to perform region division on the image correction result according to the encoding marker points and the corresponding code values to obtain a region division result. The region processing unit is configured to perform binary processing and segmentation processing on each of the answer option regions to obtain an answer sheet target region result. The region judgment unit is configured to judge whether the filling and coating is correct according to the answer sheet target region result. The encoding marker points are circular, and the marker calculation unit is specifically configured to select the edges of the encoding marker points according to the edge circumference, edge closure, edge brightness, and fitting error of the encoding marker points. The equation coefficients are obtained by performing least squares fitting of the elliptic equation using the sub-pixel edge positioning result. The first homography matrix of the encoding marker points is calculated according to the elliptic equation and the sub-pixel center coordinates of the encoding marker points, and the encoding marker points are corrected to obtain the corrected encoding marker points.

8. A computer device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method for identifying the coding mark point-based answer sheet according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method for identifying the coding mark point-based answer sheet according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Answer card identification method and device

    CN106529541A