Answer sheet objective question intelligent identification method, device and equipment and storage medium

Through an intelligent identification method based on the answer sheet template and question number identification model, the problems of cumbersome operation, position error and inaccurate identification during the objective answer sheet identification process are solved, and the automatic positioning and high accuracy recognition effect is achieved.

CN119418029AInactive Publication Date: 2025-02-11BEIJING HEQIJULI EDUCATION TECH CO LTD

Patent Information

Application Number
CN202510025610.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the process of identifying objective questions in the answer sheet, there are problems such as cumbersome operation, position error, deformation and distortion, lack of automatic adaptation capabilities and fixed thresholds in the process of identifying objective questions of the answer sheet.

Method used

By obtaining the target answer sheet image, determining the question number based on the answer sheet template and question number identification model, area expansion and projection identification of the question area, using rectangular template to match the capture option area, and dynamically adjusting the filling standard value according to the proportion of black pixels Identify.

Benefits of technology

The automatic positioning of objective questions on the answer sheet is realized, which reduces user operation steps and improves the adaptability and accuracy of identification of different questions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418029A_ABST
    Figure CN119418029A_ABST
Patent Text Reader

Abstract

The invention provides an answer sheet objective question intelligent identification method and device, equipment and a storage medium, and the method comprises the steps: determining question numbers in an answer sheet image based on an answer sheet template and a question number identification model; the question number area of each question number is expanded to obtain an initial question area, horizontal projection and vertical projection of different sequences are carried out on transverse and vertical questions to determine a target question area, and then the target question area is equally divided to obtain equally divided areas; performing template matching in each equally divided region by using a rectangular template to obtain a target option region, performing binarization processing, calculating a black pixel ratio of the target option region, and determining a dynamic filling standard value; and comparing the black pixel ratio of each target option area with a filling standard value to determine the filled options in the target answer sheet image. By adopting the scheme, automatic positioning of the objective questions on the answer sheet is realized, user operation steps during objective question filling identification are reduced, and the adaptive capacity of different objective questions and the accuracy of objective question filling identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer image processing, and in particular to a method, device, equipment and storage medium for intelligently identifying objective questions on an answer sheet. Background Art

[0002] In the prior art, when performing objective question recognition on the answer sheet, the user is required to mark the specific position of each objective question and its options in detail on the template. However, this step is not only cumbersome to operate, but also greatly increases the user's time cost. Even so, the manually marked position may still have errors, which will affect the subsequent recognition accuracy. Secondly, the answer sheet often undergoes a certain degree of deformation during the scanning process, such as distortion, scaling, etc. This deformation will cause the pre-marked position on the template to deviate from the actual position on the scanned copy, thereby posing a challenge to the subsequent cutting and recognition steps, and easily causing the problem of misrecognition. Furthermore, the prior art often lacks the ability to automatically adapt to objective questions in different directions. Whether it is a horizontal or vertical objective question, the traditional method requires the user to manually adjust or select the corresponding template according to the specific situation, which undoubtedly increases the complexity of the user's operation. Finally, the objective question recognition method usually uses a fixed value when setting the threshold, which cannot effectively deal with the differences caused by the filling habits of different candidates. For example, some candidates fill in lightly, which may result in an insufficient proportion of black pixels; while some candidates may fill in too heavily, exceeding the normal recognition range. This fixed threshold recognition method obviously cannot adapt well to these differences, thus affecting the accuracy of recognition. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a method, device, equipment and storage medium for intelligent recognition of objective questions on an answer sheet, so as to realize automatic positioning of objective questions on an answer sheet, reduce the user operation steps when filling in and identifying objective questions, and improve the adaptability to different objective questions and the accuracy of filling in and identifying objective questions.

[0004] In a first aspect, an embodiment of the present application provides a method for intelligently identifying objective questions on an answer sheet, the method comprising: Acquire a target answer sheet image, and determine the question number in the target answer sheet image based on the answer sheet template and the question number recognition model; Expand the question number area where each question number is located to obtain the initial question area where the question corresponding to each question number is located, and perform horizontal and vertical projection on each initial question area to determine each target question area; For each target question area, the target question area is divided into several equal areas, and a rectangular template is used to perform template matching in each equal area to obtain a target option area; Binarization is performed on each target option area and its black pixel ratio is calculated. Based on the black pixel ratio of each target option area, it is determined whether it is filled in, so as to determine the filled options in the target answer sheet image.

[0005] Optionally, determining the question number in the target answer sheet image based on the answer sheet template and the question number recognition model includes: Determining a question recognition area in the target answer sheet image using the answer sheet template; The question number recognition model is used to perform question number recognition on the question recognition area to obtain the question number in the target answer sheet image.

[0006] Optionally, the step of performing region expansion on the question number region where each question number is located to obtain an initial question region where the question corresponding to each question number is located includes: Determine in sequence whether there are other question numbers above, below, left, and right of each question number; If yes, then expand the area around the question number area where the question number is located until the next question number is encountered, and then stop the area expansion to obtain the initial question area where the question corresponding to the question number is located; If not, the area is expanded from the question number area where the question number is located in a specific direction to a preset position.

[0007] Optionally, performing horizontal projection and vertical projection on each initial topic area to determine each target topic area includes: Obtaining the width and height of each initial question area, and determining the question type of each initial question area based on the width and height of each initial question area, wherein the question type is a horizontal question or a vertical question; For the initial question area whose question type is horizontal question, first perform horizontal projection and then perform vertical projection on it to determine its corresponding target question area; For the initial question area whose question type is a vertical question, a vertical projection is first performed and then a horizontal projection is performed to determine the corresponding target question area.

[0008] Optionally, for each target topic area, the target topic area is equally divided into a plurality of equally divided areas, including: Sequentially divide each target question area into equal parts by n, where n is a preset positive integer; The maximum width and maximum height of the black pixels in each target question area are counted each time when the equal division is performed, and the mean square error of each maximum width and the mean square error of each maximum height are calculated; Calculate the mean / sum of the mean square errors of the maximum widths and the maximum heights, and determine the equal fraction m corresponding to the mean square errors corresponding to the minimum mean / minimum sum, where m∈n; The target question area is divided into a plurality of equally divided areas by a number m.

[0009] Optionally, the step of performing template matching in each equally divided area using a rectangular template to obtain a target option area includes: Constructing a rectangular template with the same size as the standard option, and using the rectangular template to perform template matching in each equally divided area; The area with the highest matching value with the rectangular template in each equally divided area is selected as the target option area.

[0010] Optionally, determining whether each target option area is filled based on a black pixel ratio value thereof includes: Determine the fill standard value based on the black pixel ratio of each target option area; Compare the black pixel ratio of each target option area with the filling standard value; Determine the target option area where the proportion of black pixels is above the standard filling value as being filled; The target option area whose black pixel ratio is below the filling standard value is determined as not being filled.

[0011] In a second aspect, an embodiment of the present application provides an intelligent recognition device for objective questions on an answer sheet, the device comprising: A question number recognition module is used to obtain a target answer sheet image and determine the question number in the target answer sheet image based on the answer sheet template and the question number recognition model; A question identification module is used to expand the question number area where each question number is located to obtain the initial question area where the question corresponding to each question number is located, and to perform horizontal and vertical projection on each initial question area to determine each target question area; The option recognition module is used to divide each target question area into several equally divided areas, and use a rectangular template to perform template matching in each equally divided area to obtain a target option area; The filled-in recognition module is used to binarize each target option area and calculate its black pixel ratio value, and determine whether it is filled in based on the black pixel ratio value of each target option area, so as to determine the filled-in options in the target answer sheet image.

[0012] Optionally, determining the question number in the target answer sheet image based on the answer sheet template and the question number recognition model includes: Determining a question recognition area in the target answer sheet image using the answer sheet template; The question number recognition model is used to perform question number recognition on the question recognition area to obtain the question number in the target answer sheet image.

[0013] Optionally, the step of performing region expansion on the question number region where each question number is located to obtain an initial question region where the question corresponding to each question number is located includes: Determine in sequence whether there are other question numbers above, below, left, and right of each question number; If yes, then expand the area around the question number area where the question number is located until the next question number is encountered, and then stop the area expansion to obtain the initial question area where the question corresponding to the question number is located; If not, the area is expanded from the question number area where the question number is located in a specific direction to a preset position.

[0014] Optionally, performing horizontal projection and vertical projection on each initial topic area to determine each target topic area includes: Obtaining the width and height of each initial question area, and determining the question type of each initial question area based on the width and height of each initial question area, wherein the question type is a horizontal question or a vertical question; For the initial question area whose question type is horizontal question, first perform horizontal projection and then perform vertical projection on it to determine its corresponding target question area; For the initial question area whose question type is a vertical question, a vertical projection is first performed and then a horizontal projection is performed to determine the corresponding target question area.

[0015] Optionally, for each target topic area, the target topic area is equally divided into a plurality of equally divided areas, including: Sequentially divide each target question area into equal parts by n, where n is a preset positive integer; The maximum width and maximum height of the black pixels in each target question area are counted each time when the equal division is performed, and the mean square error of each maximum width and the mean square error of each maximum height are calculated; Calculate the mean / sum of the mean square errors of the maximum widths and the maximum heights, and determine the equal fraction m corresponding to the mean square errors corresponding to the minimum mean / minimum sum, where m∈n; The target question area is divided into a plurality of equally divided areas by a number m.

[0016] Optionally, the step of performing template matching in each equally divided area using a rectangular template to obtain a target option area includes: Constructing a rectangular template with the same size as the standard option, and using the rectangular template to perform template matching in each equally divided area; The area with the highest matching value with the rectangular template in each equally divided area is selected as the target option area.

[0017] Optionally, determining whether each target option area is filled based on a black pixel ratio value thereof includes: Determine the fill standard value based on the black pixel ratio of each target option area; Compare the black pixel ratio of each target option area with the filling standard value; Determine the target option area where the proportion of black pixels is above the standard filling value as being filled; The target option area whose black pixel ratio is below the filling standard value is determined as not being filled.

[0018] In a third aspect, an embodiment of the present application provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for intelligently identifying objective questions on an answer sheet described in any one of the optional implementations of the first aspect are performed.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for intelligently identifying objective questions on an answer sheet described in any optional implementation manner of the first aspect above are executed.

[0020] The technical solution provided by this application includes but is not limited to the following beneficial effects: This application can quickly and accurately locate each question number on the answer sheet through the question number determination step based on the answer sheet template and the question number recognition model, avoiding the tedious process of manual search and significantly improving the recognition efficiency. Then, the question number area where each question number is located is expanded to obtain the initial question area where the question corresponding to each question number is located, and each initial question area is horizontally projected and vertically projected to determine each target question area, which can automatically identify the area where each question is located in the answer sheet image, effectively eliminate interference information, and improve the accuracy of the target question area identified. In the option area recognition stage, a rectangular template is used for template matching, which can accurately capture each option area, providing a reliable basis for subsequent binarization processing and filling judgment. By calculating the black pixel ratio value to determine whether the filling standard value recognition option is filled, it not only improves the adaptability of different filling habits, but also avoids the misjudgment caused by factors such as light and noise in traditional methods, and improves the accuracy of recognition.

[0021] The intelligent recognition method for objective questions on answer sheets provided in the present application quickly locates question numbers based on answer sheet templates and question number recognition models, automatically identifies question areas through area expansion and projection technology, accurately captures options using rectangular template matching, and finally dynamically adjusts the judgment criteria based on the proportion of black pixels to perform filling status recognition. This can achieve automatic positioning of objective questions on answer sheets, reduce the number of user operation steps during objective question filling and recognition, and improve the adaptability to different objective questions and the accuracy of objective question filling and recognition.

[0022] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 A flow chart of an intelligent recognition method for objective questions on an answer sheet provided by the first embodiment of the present invention is shown; Figure 2 A flowchart of a question number recognition method provided by the first embodiment of the present invention is shown; Figure 3 A flow chart of a method for determining an initial topic area provided by the first embodiment of the present invention is shown; Figure 4 A schematic diagram showing a horizontal question and a vertical question provided by the first embodiment of the present invention; Figure 5 A flow chart of a method for determining a target topic area provided by the first embodiment of the present invention is shown; Figure 6 A flow chart of a method for determining equally divided regions provided in the first embodiment of the present invention is shown; Figure 7 A flow chart of a method for determining a target option area provided by the first embodiment of the present invention is shown; Figure 8 A flow chart of a method for determining a filling standard value provided by the first embodiment of the present invention is shown; Fig. 9 A flow chart of objective question filling and recognition in different stages provided by the first embodiment of the present invention is shown; Fig.10 A schematic diagram showing the structure of an intelligent recognition device for objective questions on an answer sheet provided by a second embodiment of the present invention is shown; Fig.11 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention is shown. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0026] Embodiment 1 To facilitate understanding of this application, Figure 1 The flowchart of a method for intelligently identifying objective questions on an answer sheet provided by the first embodiment of the present invention is described to provide a detailed description of the first embodiment of the present application.

[0027] See also Figure 1 As shown, Figure 1 A flowchart of an intelligent recognition method for objective questions on an answer sheet provided by the first embodiment of the present invention is shown, wherein the method comprises steps S101 to S105: S101: Acquire a target answer sheet image, and determine the question number in the target answer sheet image based on an answer sheet template and a question number recognition model.

[0028] Specifically, the image of the answer sheet is obtained by scanning, photographing or other digital imaging technologies, and the target answer sheet image is parsed using the pre-designed answer sheet template and question number recognition model. The answer sheet template contains the structural information of the answer sheet, such as the distribution of questions, the position of question numbers, etc., while the question number recognition model can recognize the question number characters in the image. The combination of the two can accurately determine the question numbers of each question in the target answer sheet image.

[0029] S102: Expand the question number area where each question number is located to obtain the initial question area where the question corresponding to each question number is located, and perform horizontal and vertical projection on each initial question area to determine each target question area.

[0030] Specifically, the area where each question number is located is expanded to form an initial question area that contains the complete content of the question. These initial question areas are then projected horizontally and vertically. Horizontal projection refers to scanning the image in the horizontal direction and counting the pixel value or color change of each row; vertical projection is to perform the same operation in the vertical direction. Through these two projection methods, the boundaries of the question area are identified, thereby determining a more accurate target question area.

[0031] S103: For each target question area, the target question area is divided into several equally divided areas, and a rectangular template is used to perform template matching in each equally divided area to obtain a target option area.

[0032] Specifically, each determined target question area is divided into several equal-sized areas so that each area corresponds to a possible option. Then, a rectangular template is used for matching in these equally divided areas. The size of the rectangular template is determined according to the size of the option box. The target option area in each equally divided area is identified through template matching.

[0033] S104: Binarize each target option area and calculate its black pixel ratio value, and determine the filling standard value based on the black pixel ratio value of each target option area.

[0034] Specifically, these areas are binarized to convert the image into black and white images, and then the black pixel ratio of each target option area is calculated. The black pixel ratio refers to the proportion of black pixels in the entire option area. Since the black pixel ratios of each target option area are different, the standard value for filling is determined based on the black pixel ratios of each target option area, which can realize dynamic adjustment and setting of the standard value to better adapt to the filling conditions of different answer sheets.

[0035] S105: Compare the black pixel ratio of each target option area with the filling standard value, and determine whether it is filled according to the comparison result, so as to determine the filled options in the target answer sheet image.

[0036] Specifically, the black pixel ratio of each target option area is compared with the filling standard value, and the target option area with a black pixel ratio above the filling standard value is determined to be filled, and the target option area with a black pixel ratio below the filling standard value is determined to be unfilled.

[0037] Through steps S101 to S105, the filled options in the target answer sheet image can be accurately identified, thereby completing the automatic marking process of the answer sheet.

[0038] In an alternative embodiment, see Figure 2 As shown, Figure 2 A flowchart of a question number recognition method provided in Embodiment 1 of the present invention is shown, wherein the method of determining the question number in the target answer sheet image based on the answer sheet template and the question number recognition model comprises steps S201 to S202: S201: Determine a question recognition area in the target answer sheet image using the answer sheet template.

[0039] Specifically, answer sheet templates are pre-designed, and the peripheral areas of the objective questions on these templates have been clearly marked. These marks provide the system with important information about the location and shape of the questions. When the target answer sheet image is obtained, the image is first globally rectified. Then, the position of each question is preliminarily located in the rectified image based on the peripheral areas of the objective questions marked on the template to obtain the question recognition area.

[0040] S202: Using the question number recognition model to perform question number recognition on the question recognition area to obtain the question number in the target answer sheet image.

[0041] Specifically, we first build a question number recognition model based on a deep learning algorithm, such as the YOLOv8 model. The question number recognition model can extract rich feature information from the image and accurately identify the location of the question number. The rectified image is input into the question number recognition model, which will output the question number in the target answer sheet image and the location information of each question number.

[0042] In an alternative embodiment, see Figure 3 As shown, Figure 3 A flowchart of a method for determining an initial question area provided by the first embodiment of the present invention is shown, wherein the method of performing area expansion on the question number area where each question number is located to obtain the initial question area where the question corresponding to each question number is located includes steps S301 to S303: S301: Determine in sequence whether there are other question numbers above, below, left, and right of each question number.

[0043] Specifically, in order to determine whether the current question number is at the edge of the question or is surrounded by other questions, it is checked in turn whether there are other question numbers in the four directions of up, down, left, and right of each question number.

[0044] S302: If yes, then expand the area around the question number area where the question number is located until the next question number is encountered and the area expansion is stopped to obtain the initial question area where the question corresponding to the question number is located.

[0045] Specifically, if it is found that there are other question numbers around a certain question number (that is, there are adjacent question numbers in at least one of the four directions of up, down, left, and right), then the area is expanded from the question number area where the question number is located to the surrounding areas until the next question number is encountered and the expansion stops.

[0046] S303: If not, then expand the area from the question number area where the question number is located in a specific direction to a preset position.

[0047] Specifically, for a question number that is judged to have no other question numbers around it (i.e., a question number that is at the edge of the question or in an independent position), the area is expanded in a specific direction (usually downward or rightward) starting from the question number area where the question number is located.

[0048] More specifically, for these question numbers, first determine the direction of the questions in the answer sheet image based on the initial question area obtained in step S302 where the questions corresponding to the question numbers that have other question numbers above, below, left and right are located, that is, determine whether it is a horizontal question or a vertical question based on the aspect ratio of the initial question area.

[0049] See also Figure 4 As shown, Figure 4 A schematic diagram of horizontal questions and vertical questions provided in Example 1 of the present invention is shown, wherein the upper portion of the figure is horizontal objective questions, a total of 15 questions, the question numbers are integers between 1 and 15, and each question number corresponds to four options A, B, C, and D; the lower portion of the figure is vertical objective questions, a total of 10 questions, the question numbers are integers between 1 and 10, and each question number corresponds to four options A, B, C, and D.

[0050] Assume that the width of the initial question area is , Gao Wei , then: ; Then, after determining whether the question is a horizontal or vertical question, if it is a horizontal question, if there is no question number above or below, it will be fixedly expanded 20 pixels upward and downward, and if there is no question number on the left, the question number position will be used as the basis, and if there is no question number on the right, it will be expanded to the right boundary of the entire outer area of ​​the objective question; if it is a vertical question, if there is no question number on the left or right, it will be fixedly expanded 20 pixels to the left and right, and if there is no question number on the upper side, the question number position will be used as the basis, and if there is no question number on the lower side, it will be expanded to the lower boundary of the entire outer area of ​​the objective question, and the area of ​​each question will be preliminarily determined to obtain the initial question area where the question corresponding to the question number is located.

[0051] In an alternative embodiment, see Figure 5 As shown, Figure 5A flow chart of a method for determining a target topic area provided by the first embodiment of the present invention is shown, wherein the method of determining each target topic area by horizontally projecting and vertically projecting each initial topic area includes steps S501 to S503: S501: Obtain the width and height of each initial question area, and determine the question type of each initial question area based on the width and height of each initial question area, wherein the question type is a horizontal question or a vertical question.

[0052] Specifically, the question types can be divided into horizontal questions and vertical questions. Horizontal questions refer to question areas with a width greater than a height, and vertical questions refer to question areas with a height greater than a width. Each initial question area is traversed, its width and height are calculated, and the type of each question area is determined based on these size information.

[0053] S502: For an initial question area whose question type is a horizontal question, first perform a horizontal projection and then a vertical projection on it to determine its corresponding target question area.

[0054] Specifically, for horizontal questions, do horizontal projection first. Horizontal projection is to accumulate the pixel values ​​in the image along the horizontal direction to obtain a curve representing the change in pixel density in the horizontal direction. Through this curve, the left and right boundaries of the horizontal question area can be identified. Next, do vertical projection. Vertical projection is to accumulate the pixel values ​​in the image along the vertical direction to obtain a curve representing the change in pixel density in the vertical direction. Through this curve, the upper and lower boundaries of the horizontal question area are further determined. By combining the results of horizontal projection and vertical projection, the position and range of the horizontal question area can be accurately determined, which is the target question area.

[0055] S503: For the initial question area whose question type is a vertical question, first perform a vertical projection and then a horizontal projection on it to determine its corresponding target question area.

[0056] Specifically, the processing process for vertical questions is similar to that for horizontal questions, but in reverse order. Since the height of a vertical question is greater than its width, vertical projection is first performed to determine its upper and lower boundaries, and then horizontal projection is performed to determine its left and right boundaries. By combining the results of vertical and horizontal projections, the position and range of the vertical question area, i.e., the target question area, is accurately determined.

[0057] In an alternative embodiment, see Figure 6 As shown, Figure 6 A flowchart of a method for determining equally divided regions provided in the first embodiment of the present invention is shown, wherein for each target topic region, the target topic region is equally divided to obtain a plurality of equally divided regions, including steps S601 to S604: S601: Divide each target question area into equal parts by a number n, where n is a preset positive integer.

[0058] Specifically, preferably .

[0059] S602: Count the maximum width and maximum height of black pixels in each target question area when equally divided each time, and calculate the mean square error of each maximum width and the mean square error of each maximum height.

[0060] Specifically, the maximum width and maximum height of all black pixels in each target question area are counted for each n-equal division. The maximum width refers to the distance between the leftmost black pixel and the rightmost black pixel in the target question area, and the maximum height refers to the distance between the topmost black pixel and the bottommost black pixel in the target question area. The mean square error of the maximum width and maximum height of black pixels when the area is divided into different equal numbers is calculated.

[0061] S603: Calculate the mean / sum of the mean square errors of the maximum widths and the maximum heights, and determine the equal number m of mean square errors corresponding to the minimum mean / minimum sum, where m∈n.

[0062] Specifically, the mean / sum of the mean square error of each maximum width and the mean square error of the maximum height is calculated to obtain the mean / sum corresponding to different values ​​of n. The n corresponding to the minimum mean / sum is selected as the value of m, and the equal fraction n at this time is the optimal equal fraction m to be found.

[0063] S604: Divide the target question area into equal parts by a number m to obtain a plurality of equally divided areas.

[0064] Specifically, the determined optimal fraction m is the number of options for each question, and a number of equally divided areas are obtained by dividing the question into equal parts using the fraction m.

[0065] In an alternative embodiment, see Figure 7 As shown, Figure 7 A flow chart of a method for determining a target option region provided by a first embodiment of the present invention is shown, wherein the method of using a rectangular template to perform template matching in each equally divided region to obtain the target option region comprises steps S701 to S702: S701: Construct a rectangular template with the same size as the standard option, and use the rectangular template to perform template matching in each equally divided area.

[0066] Specifically, a rectangular template with the same size as the standard option is constructed. This template will serve as the basis for subsequent template matching. Before constructing the rectangular template, first calculate the average value of the width and height of all option areas in the answer sheet image to obtain the standard width and standard height as the standard option size ( ), For standard width, The standard width and standard height may be the width and height of each option in the answer sheet template; or may be the average of the maximum width and maximum height of black pixels in each target question area when the area is divided into equal parts by m in step S502.

[0067] Construct a pure black rectangular template that is consistent with the standard size. The size is ( ), use the pure black rectangular template to perform template matching in each equally divided area, and calculate the matching value between the template and the area. The matching value is the similarity between the template and the area. In practical applications, one or more matching algorithms are selected to calculate the matching value.

[0068] S702: Selecting the area with the highest matching value with the rectangular template in each equally divided area as the target option area.

[0069] Specifically, a matching value with the rectangular template is obtained for each equally divided area, the highest one is selected from these matching values, and the corresponding area is used as the target option area.

[0070] In an alternative embodiment, see Figure 8 As shown, Figure 8 A flow chart of a method for determining a fill standard value provided by the first embodiment of the present invention is shown, wherein the fill standard value is determined based on the black pixel ratio value of each target option area, including steps S801-S802: S801: Count the black pixel ratio values ​​of each target option area in a histogram, wherein the horizontal axis of the histogram represents different black pixel ratio value ranges, and the vertical axis of the histogram represents the number of target option areas falling within each black pixel ratio value range.

[0071] Specifically, a histogram of the black pixel ratio of each target option area is calculated. The horizontal axis of the histogram represents the range of different black pixel ratios, and the vertical axis represents the number of target option areas falling within each black pixel ratio range. The black pixel ratio corresponding to the midpoint of the two peaks in the histogram is selected as the filling standard value T. In order to ensure the reasonable selection of the filling standard value T, a minimum threshold is set. (preferably 0.6), corresponding to all unfilled cases, it is necessary to ensure that the standard value is filled , otherwise the default value is used as the standard value for filling.

[0072] S802: Taking the black pixel proportion value corresponding to the midpoint of the two peaks in the histogram as the filling standard value.

[0073] Specifically, find the midpoint of the two peaks (the highest peak and the lowest peak) in the histogram, and the black pixel ratio corresponding to this midpoint is used as the filling standard value. This value can be used as a threshold to distinguish between filled and unfilled option areas. If the black pixel ratio of an option area is higher than this standard value, then it can be considered that the option is correctly filled; if it is lower than this standard value, it is considered that the option is not filled or is incompletely filled.

[0074] See also Fig. 9 As shown, Fig. 9 A flowchart of the phased recognition of objective question filling provided by the first embodiment of the present invention is shown, wherein the entire process of intelligent recognition of objective questions on the answer sheet provided by the present application can be divided into the following two stages.

[0075] The first stage is the automatic positioning of objective questions. In this stage, the model is first used to identify the question number and the corresponding position on the copy, and then the approximate position of each question is obtained by cutting out the position between the question numbers. Next, the horizontal and vertical objective questions are judged according to the aspect ratio, and the exact position of each question is cut out using different projection orders according to the objective question type. Then, different sizes of averages are made within the exact position of each question, and the width and height of the black options inside the average are counted. The average score with the smallest mean square error is selected to obtain the number of options. In this stage, the question number and the position of each objective question and its options can be automatically identified in the entire objective question area, which reduces the time for users to mark templates, improves the adaptability to different horizontal and vertical layouts, and ensures the accuracy of the positioning of the question area.

[0076] The second stage is the automatic recognition stage of objective questions. First, the standard size of the options is obtained by averaging all widths and heights. Then, a black rectangular frame of the standard size of the options is constructed and template matching is performed in the evenly divided small area to obtain the option position. Next, a black rectangular frame of the standard size of the options is constructed and template matching is performed in the evenly divided small area to obtain the option position. Finally, the middle of the two peaks of the histogram is selected as the threshold, and the minimum threshold limit is set for recognition. In this stage, the dynamic threshold method is used to improve the adaptability to different filling habits, thereby improving the accuracy of objective question recognition.

[0077] Through the entire process of intelligent recognition of objective questions on the answer sheet provided by this application, based on the pre-marked objective question area, the question number recognition model is trained using models such as YOLOv8, the question number is located on the corrected copy and the area is expanded until the next question number is encountered, the approximate position of each question is determined, and horizontal and vertical objective questions are distinguished according to the aspect ratio of the expansion box. Through horizontal and vertical projection, the accurate area of ​​the question is obtained; then the area is divided into equal parts, the equal parts with the minimum mean square error are selected, and the mean is calculated as the standard size. Use a pure black rectangular template to match the option position, cut the option area for binarization, calculate the proportion of black pixels, and combine the midpoint of the histogram peak and the lowest threshold to accurately identify the option filling status.

[0078] Embodiment 2 Embodiment 2 of the present invention provides an intelligent recognition device for objective questions on an answer sheet, see Fig.10 As shown, Fig.10 The structure diagram of an intelligent recognition device for objective questions on an answer sheet provided by the second embodiment of the present invention is shown, wherein the device comprises: The question number recognition module 1001 is used to obtain a target answer sheet image and determine the question number in the target answer sheet image based on the answer sheet template and the question number recognition model; The question identification module 1002 is used to expand the question number area where each question number is located to obtain the initial question area where the question corresponding to each question number is located, and perform horizontal and vertical projection on each initial question area to determine each target question area; The option recognition module 1003 is used to divide each target topic area into several equally divided areas, and use a rectangular template to perform template matching in each equally divided area to obtain a target option area; The filling standard value determination module 1004 is used to perform binarization processing on each target option area and calculate its black pixel ratio value, and determine the filling standard value based on the black pixel ratio value of each target option area; The filling identification module 1005 is used to compare the black pixel ratio of each target option area with the filling standard value, and determine whether it is filled according to the comparison result, so as to determine the filled options in the target answer sheet image.

[0079] In an optional implementation, determining the question number in the target answer sheet image based on the answer sheet template and the question number recognition model includes: Determining a question recognition area in the target answer sheet image using the answer sheet template; The question number recognition model is used to perform question number recognition on the question recognition area to obtain the question number in the target answer sheet image.

[0080] In an optional implementation manner, the region expansion of the question number region where each question number is located to obtain the initial question region where the question corresponding to each question number is located includes: Determine in sequence whether there are other question numbers above, below, left, and right of each question number; If yes, then expand the area around the question number area where the question number is located until the next question number is encountered, and then stop the area expansion to obtain the initial question area where the question corresponding to the question number is located; If not, the area is expanded from the question number area where the question number is located in a specific direction to a preset position.

[0081] In an optional implementation manner, the determining each target topic area by horizontally projecting and vertically projecting each initial topic area includes: Obtaining the width and height of each initial question area, and determining the question type of each initial question area based on the width and height of each initial question area, wherein the question type is a horizontal question or a vertical question; For the initial question area whose question type is horizontal question, first perform horizontal projection and then perform vertical projection on it to determine its corresponding target question area; For the initial question area whose question type is a vertical question, a vertical projection is first performed and then a horizontal projection is performed to determine the corresponding target question area.

[0082] In an optional implementation manner, for each target topic area, the target topic area is equally divided into a plurality of equally divided areas, including: Sequentially divide each target question area into equal parts by n, where n is a preset positive integer; The maximum width and maximum height of the black pixels in each target question area are counted each time when the equal division is performed, and the mean square error of each maximum width and the mean square error of each maximum height are calculated; Calculate the mean / sum of the mean square errors of the maximum widths and the maximum heights, and determine the equal fraction m corresponding to the mean square errors corresponding to the minimum mean / minimum sum, where m∈n; The target question area is divided into a plurality of equally divided areas by a number m.

[0083] In an optional implementation, the method of using a rectangular template to perform template matching in each equally divided area to obtain a target option area includes: Constructing a rectangular template with the same size as the standard option, and using the rectangular template to perform template matching in each equally divided area; The area with the highest matching value with the rectangular template in each equally divided area is selected as the target option area.

[0084] In an optional implementation manner, determining the filling standard value based on the black pixel ratio value of each target option area includes: A histogram of the black pixel ratio values ​​of each target option area is counted, wherein the horizontal axis of the histogram represents different black pixel ratio value ranges, and the vertical axis of the histogram represents the number of target option areas falling within each black pixel ratio value range; The black pixel ratio corresponding to the midpoint of the two peaks in the histogram is used as the filling standard value.

[0085] Embodiment 3 Based on the same application concept, see Fig.11 As shown, Fig.11 FIG. 4 shows a schematic diagram of the structure of a computer device provided by Embodiment 3 of the present invention, wherein: Fig.11 As shown, a computer device 1100 provided in Embodiment 3 of the present application includes: A processor 1101, a memory 1102 and a bus 1103, wherein the memory 1102 stores machine-readable instructions executable by the processor 1101. When the computer device 1100 is running, the processor 1101 communicates with the memory 1102 via the bus 1103. When the processor 1101 is running, the machine-readable instructions execute the steps of the method for intelligently identifying objective questions on an answer sheet as shown in the first embodiment.

[0086] Embodiment 4 Based on the same application concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for intelligently identifying objective questions on an answer sheet described in any of the above embodiments are executed.

[0087] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0088] The computer program product for intelligently identifying objective questions on an answer sheet provided in an embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0089] The intelligent recognition device for objective questions on the answer sheet provided in the embodiment of the present invention can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0090] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. 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. For example, 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 communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0091] 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.

[0092] In addition, each functional unit in the embodiment provided by 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.

[0093] 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 to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0094] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0095] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or perform equivalent replacements on some of the technical features thereof; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. They should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for intelligently identifying objective questions on an answer sheet, characterized in that: The method comprises: Acquire a target answer sheet image, and determine the question number in the target answer sheet image based on the answer sheet template and the question number recognition model; Expand the question number area where each question number is located to obtain the initial question area where the question corresponding to each question number is located, and perform horizontal and vertical projection on each initial question area to determine each target question area; For each target question area, the target question area is divided into several equal areas, and a rectangular template is used to perform template matching in each equal area to obtain a target option area; Binarize each target option area and calculate its black pixel ratio value, and determine the filling standard value based on the black pixel ratio value of each target option area; The black pixel ratio of each target option area is compared with the filling standard value, and whether it is filled is determined based on the comparison result, so as to determine the filled options in the target answer sheet image.

2. The method according to claim 1, characterized in that The step of determining the question number in the target answer sheet image based on the answer sheet template and the question number recognition model includes: Determining a question recognition area in the target answer sheet image using the answer sheet template; The question number recognition model is used to perform question number recognition on the question recognition area to obtain the question number in the target answer sheet image.

3. The method according to claim 1, characterized in that The step of performing region expansion on the question number region where each question number is located to obtain the initial question region where the question corresponding to each question number is located includes: Determine in sequence whether there are other question numbers above, below, left, and right of each question number; If yes, then expand the area around the question number area where the question number is located until the next question number is encountered, and then stop the area expansion to obtain the initial question area where the question corresponding to the question number is located; If not, the area is expanded from the question number area where the question number is located in a specific direction to a preset position.

4. The method according to claim 1, characterized in that: The step of performing horizontal and vertical projection on each initial topic area to determine each target topic area includes: Obtaining the width and height of each initial question area, and determining the question type of each initial question area based on the width and height of each initial question area, wherein the question type is a horizontal question or a vertical question; For the initial question area whose question type is horizontal question, first perform horizontal projection and then perform vertical projection on it to determine its corresponding target question area; For the initial question area whose question type is a vertical question, a vertical projection is first performed and then a horizontal projection is performed to determine the corresponding target question area.

5. The method according to claim 1, characterized in that For each target topic area, the target topic area is equally divided to obtain a number of equally divided areas, including: Sequentially divide each target question area into equal parts by n, where n is a preset positive integer; The maximum width and maximum height of the black pixels in each target question area are counted each time when the equal division is performed, and the mean square error of each maximum width and the mean square error of each maximum height are calculated; Calculate the mean / sum of the mean square errors of the maximum widths and the maximum heights, and determine the equal fraction m corresponding to the mean square errors corresponding to the minimum mean / minimum sum, where m∈n; The target question area is divided into a plurality of equally divided areas by a fraction m.

6. The method according to claim 1, characterized in that The method of using a rectangular template to perform template matching in each equally divided area to obtain a target option area includes: Constructing a rectangular template with the same size as the standard option, and using the rectangular template to perform template matching in each equally divided area; The area with the highest matching value with the rectangular template in each equally divided area is selected as the target option area.

7. The method according to claim 1, characterized in that The method of determining the filling standard value based on the black pixel ratio value of each target option area includes: A histogram of the black pixel ratio values ​​of each target option area is counted, wherein the horizontal axis of the histogram represents different black pixel ratio value ranges, and the vertical axis of the histogram represents the number of target option areas falling within each black pixel ratio value range; The black pixel ratio corresponding to the midpoint of the two peaks in the histogram is used as the filling standard value.

8. An intelligent recognition device for objective questions on an answer sheet, characterized in that: The device comprises: A question number recognition module is used to obtain a target answer sheet image and determine the question number in the target answer sheet image based on the answer sheet template and the question number recognition model; A question identification module is used to expand the question number area where each question number is located to obtain the initial question area where the question corresponding to each question number is located, and to perform horizontal and vertical projection on each initial question area to determine each target question area; The option recognition module is used to divide each target question area into several equally divided areas, and use a rectangular template to perform template matching in each equally divided area to obtain a target option area; The filled-in recognition module is used to binarize each target option area and calculate its black pixel ratio value, and determine whether it is filled in based on the black pixel ratio value of each target option area, so as to determine the filled-in options in the target answer sheet image.

9. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate via the bus. When the machine-readable instructions are executed by the processor, the steps of the method for intelligently identifying objective questions on an answer sheet as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for intelligently identifying objective questions on an answer sheet as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Recognition processing method and device for answer sheet

    CN108537218A

  • Answer sheet reading method and device and computer readable storage medium

    CN110458014A

  • Objective question template detection method based on component detection

    CN110728233A

  • Method and device for identifying answer sheet template, readable medium and electronic equipment

    CN115546804A

  • Method and device for determining answering condition of objective questions in answer sheet

    CN117831037A

Cited By

  • Psychological general survey paper answer sheet identification method and system based on visual processing

    CN120997862A