Mark information positioning method and device, computer equipment and readable storage medium
By dividing the answer sheet image into image units and analyzing the matching degree of the target image unit, the position of the mark information on the answer sheet is determined, which solves the problem of inaccurate mark position caused by printing offset and scanning deformation in traditional technology, and improves recognition accuracy. sex.
Patent Information
- Application Number
- CN202411470104.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-21
AI Technical Summary
When traditional image recognition technology recognizes mark information on the answer sheet, the marking position is inaccurate due to factors such as printing offset and scanning paper deformation, which affects the identification accuracy.
By obtaining the answering card image to be processed, it is divided into multiple image units based on the target division rules, determine the target image unit in these units, and use the first option marker and preset reference template in the target image unit. The matching degree is determined to determine the position of the second option, so as to determine the position of the options in each image unit.
It improves the accuracy of mark information positioning, reduces recognition errors caused by printing offset and scanning deformation, and improves the overall accuracy of image recognition.
Smart Images

Figure CN119339383A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a marking information positioning method, device, computer equipment and readable storage medium. Background Art
[0002] With the development of image processing technology, the requirements for image recognition accuracy are getting higher and higher. For the scenario of identifying the mark information on the answer sheet, traditional image recognition technology, such as OMR (Optical Mark Recognition) technology, relies on matching the preset template with the precise mark position to identify the mark information. However, in actual applications, due to factors such as printing offset and scanning paper deformation, there may be a problem that the identified mark position is inconsistent with the actual mark position, which in turn affects the final mark information recognition accuracy. Therefore, the traditional method has the problem of low accuracy in positioning the mark information. Summary of the invention
[0003] Based on this, it is necessary to provide a marking information positioning method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of marking information positioning in response to the above technical problems.
[0004] In a first aspect, the present application provides a method for locating marking information, comprising:
[0005] Get the answer sheet image to be processed;
[0006] Based on the target division rule, the answer sheet image is divided into multiple image units;
[0007] Determine a target image unit among the plurality of image units, and determine the position of a second option mark in the target image unit according to a positional relationship between a plurality of first option marks in the target image unit and a reference positional relationship between a plurality of reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value;
[0008] The position of each option mark in the remaining image units is determined according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
[0009] In one embodiment, determining the position of each option mark in the remaining image units according to the position of the first option mark, the position of the second option mark, and the reference position relationship in the target image unit includes:
[0010] Obtaining positions of a plurality of first option marks in image units adjacent to the target image unit;
[0011] Determine the position of the second option mark in the adjacent image unit based on the position of the first option mark in the target image unit, the position of the second option mark, the positions of the plurality of first option marks in the adjacent image unit, and the reference position relationship;
[0012] Based on the target image unit, the position of the first option mark in the adjacent image units, the position of the second option mark, and the reference position relationship, the position of each option mark in the remaining image units is determined.
[0013] In one of the embodiments, determining a target image unit among a plurality of image units comprises:
[0014] Determine a candidate image unit from among the plurality of image units, and determine a degree of match between the candidate image unit and a corresponding reference unit in a preset reference template;
[0015] When the matching degree is greater than a second preset value, taking the candidate image unit as the target image unit;
[0016] When the matching degree is not greater than the second preset value, the candidate image unit and the adjacent image unit are taken as the target image unit.
[0017] In one embodiment, the step of determining the target partitioning rule includes:
[0018] Get the question card type corresponding to the answer sheet image;
[0019] The preset mapping relationship is queried, and the division rule corresponding to the question card type is used as the target division rule; the preset mapping relationship is used to characterize the correspondence between the question card type and the division rule.
[0020] In one embodiment, based on the target segmentation rule, the answer sheet image is divided into a plurality of image units, including:
[0021] Preprocessing the answer sheet image, wherein the preprocessing includes at least one of noise removal, edge detection and image enhancement;
[0022] Based on the target segmentation rule, the preprocessed answer sheet image is divided into multiple image units.
[0023] In one embodiment, the marking information positioning method further includes:
[0024] Based on the positions of the option marks of the multiple image units, the mark information of the answer sheet image is recognized.
[0025] In a second aspect, the present application also provides a marking information positioning device, comprising:
[0026] An acquisition module, used for acquiring the answer sheet image to be processed;
[0027] A division module, used for dividing the answer sheet image into a plurality of image units based on a target division rule;
[0028] A first determination module is used to determine a target image unit among multiple image units, and determine the position of a second option mark in the target image unit according to a positional relationship between multiple first option marks in the target image unit and a reference positional relationship between multiple reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value;
[0029] The second determining module is used to determine the position of each option mark in the remaining image units according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0031] Get the answer sheet image to be processed;
[0032] Based on the target division rule, the answer sheet image is divided into multiple image units;
[0033] Determine a target image unit among the plurality of image units, and determine the position of a second option mark in the target image unit according to a positional relationship between a plurality of first option marks in the target image unit and a reference positional relationship between a plurality of reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value;
[0034] The position of each option mark in the remaining image units is determined according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0036] Get the answer sheet image to be processed;
[0037] Based on the target division rule, the answer sheet image is divided into multiple image units;
[0038] Determine a target image unit among the plurality of image units, and determine the position of a second option mark in the target image unit according to a positional relationship between a plurality of first option marks in the target image unit and a reference positional relationship between a plurality of reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value;
[0039] The position of each option mark in the remaining image units is determined according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
[0040] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0041] Get the answer sheet image to be processed;
[0042] Based on the target division rule, the answer sheet image is divided into multiple image units;
[0043] Determine a target image unit among the plurality of image units, and determine the position of a second option mark in the target image unit according to a positional relationship between a plurality of first option marks in the target image unit and a reference positional relationship between a plurality of reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value;
[0044] The position of each option mark in the remaining image units is determined according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
[0045] The above-mentioned marking information positioning method, device, computer equipment, computer-readable storage medium and computer program product divide the answer sheet image to be processed into multiple image units based on the target division rule. Since the option marks in the answer sheet image are usually distributed in multiple area blocks according to certain rules, dividing the answer sheet image into multiple image units based on the target division rule is conducive to positioning and analyzing each image unit separately; the reference position relationship between multiple reference option marks in the preset reference template is known, and the matching degree between each first option mark in the target image unit and the corresponding reference option mark is greater than the first preset value. Therefore, the position of the second option mark in the target image unit determined by the position relationship between the first option marks and the reference position relationship has a higher accuracy; after the position of each option mark in the target image unit is determined, the position of each option mark in the remaining image units is further determined based on the position of each option mark in the target image unit and the reference position relationship. As the position information is continuously determined, it is conducive to further improving the positioning accuracy of each option mark in the remaining image units. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0047] FIG1 is a diagram showing an application environment of a method for locating marking information in one embodiment;
[0048] FIG2 is a schematic diagram of a flow chart of a method for locating marking information in one embodiment;
[0049] FIG3 is a schematic diagram of a sub-flow chart of step 208 in one embodiment;
[0050] FIG4 is a schematic diagram of a sub-flow chart of step 206 in one embodiment;
[0051] FIG5 is a structural block diagram of a marking information locating device in one embodiment;
[0052] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] The marking information positioning method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1. The terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Taking the application of the method to the terminal 102 as an example, the terminal 102 obtains the answer sheet image to be processed; based on the target division rule, the answer sheet image is divided into multiple image units; the target image unit is determined in the multiple image units, and the position of the second option mark in the target image unit is determined according to the position relationship between the multiple first option marks in the target image unit and the reference position relationship between the multiple reference option marks in the preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than the first preset value; according to the position of the first option mark in the target image unit, the position of the second option mark, and the reference position relationship, the position of each option mark in the remaining image units is determined. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0055] In an exemplary embodiment, as shown in FIG2 , a method for locating marking information is provided, which is described by taking the method applied to the terminal 102 in FIG1 as an example, and includes the following steps 202 to 208. Among them:
[0056] Step 202, obtaining the answer sheet image to be processed.
[0057] The answer sheet refers to an information card with multiple option marks for users to fill in. The format of the answer sheet is not specifically limited in this application. Exemplarily, the answer sheet can be a standardized test answer sheet.
[0058] The answer sheet image refers to the image obtained by capturing the answer sheet through an image acquisition device. For example, the image acquisition device can be a camera, a scanning device, etc. In the answer sheet image, some option marks may be filled in, and some option marks may not be filled in. Among them, the filled option marks may not be filled in completely, the filling is not clear, multiple option marks are filled in together, etc., or the answer sheet image is printed offset, the scanning deformation causes the option mark to be deformed, etc. These filling situations will cause inaccurate recognition of the option mark position information.
[0059] Step 204: divide the answer sheet image into a plurality of image units based on the target division rule.
[0060] Among them, the target division rule refers to the rule for dividing the answer sheet image into units. The option marks in the answer sheet are usually distributed in multiple areas. For example, the answer sheet includes a question card type area, a user identification code area, and an answer area, wherein the answer area may also include multiple sub-answer areas. Each area in the answer sheet includes multiple option marks, and the spatial position and spatial size occupied by each area may be different, and the layout of the option marks in each area may be different. For example, the answer area includes option marks corresponding to 100 questions, and each sub-answer area consists of option marks for 5 questions.
[0061] The terminal divides the answer sheet image into multiple image units according to the actual situation of each area in the answer sheet, and each image unit can correspond to one or more areas in the answer sheet. The target division rule can be flexibly determined according to actual needs. Exemplarily, the terminal can determine the target division rule based on the position information of each area in the answer sheet, and divide the answer sheet image into multiple image units based on the target division rule. For example, the image unit includes a question card type unit, a user identification code unit, and an answer unit, wherein the answer unit can also include multiple sub-answer units.
[0062] Step 206, determine the target image unit among multiple image units, and determine the position of the second option mark in the target image unit based on the position relationship between multiple first option marks in the target image unit and the reference position relationship between multiple reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value.
[0063] The target image unit may be one or more image units in the answer sheet image.
[0064] The preset reference template refers to a reference template with the same style as the answer sheet image. In some embodiments, the preset reference template is divided into multiple reference units according to the target division rule, the multiple reference units correspond to the multiple image units one by one, and the positional relationship between the multiple reference units is consistent with the positional relationship between the multiple image units.
[0065] Each reference unit has multiple reference option marks, some of which are filled in and some of which are unfilled. For example, each question corresponds to four reference option marks A, B, C, and D, and each question may correspond to one or more filled in reference option marks, or all of which are unfilled reference option marks.
[0066] The matching degree is used to represent the probability that two tags are the same option tags in the same question. If the two tags are the same option tags in the same question, the matching degree is the maximum value.
[0067] The matching degree can be determined by comparing the feature values of the two to-be-matched marks. The feature value of each to-be-matched mark can be determined by multiple mark features, for example, the mark features can include the vertex position relationship between the to-be-matched mark and the adjacent mark, the spacing size, the size of the to-be-matched mark, etc.
[0068] The degree of match between the first option mark and the corresponding reference option mark is greater than a first preset value, indicating that the first option mark is clearer in the answer sheet image and is less deformed than the corresponding reference option mark. The position information of the first option mark in the answer sheet image can be directly used as the position information of the first option mark.
[0069] The degree of match between the second option mark and the corresponding reference option mark is not greater than the first preset value, indicating that the second option mark may be unclear or deformed. The reference position relationship between multiple reference option marks in the preset reference template is known, the position relationship between multiple first option marks has been determined, and the position of the second option mark can be determined by the position relationship between multiple first option marks in the target image unit and the reference position relationship. For example, the position relationship between the three first option marks in the same row is the same as the position relationship between the corresponding three reference option marks in the preset reference template. If there are four reference option marks in the same row, the position relationship between the corresponding three reference option marks in the row and another reference option mark in the row can be determined. Based on the position relationship and the position relationship between the three first option marks, the position of the second option mark is determined.
[0070] Step 208, determining the position of each option mark in the remaining image units according to the position of the first option mark and the second option mark in the target image unit and the reference position relationship.
[0071] Among them, each option mark in the target image unit includes a first option mark and a second option mark. After the position of the first option mark and the position of the second option mark in the target image unit are determined, the mark positioning in the target image unit is realized. The remaining image units have a certain positional relationship with the target image unit. The positions of the remaining image units can be determined by the positions of the option marks in the target image unit. The positions of the option marks in the remaining image units can be gradually determined in combination with the reference positional relationship and the positional relationship between the option marks and the option marks in the target image unit.
[0072] In the above-mentioned marking information positioning method, the answer sheet image to be processed is divided into multiple image units based on the target division rule. Since the option marks in the answer sheet image are usually distributed in multiple area blocks according to certain rules, dividing the answer sheet image into multiple image units based on the target division rule is conducive to positioning and analyzing each image unit separately; the reference position relationship between multiple reference option marks in the preset reference template is known, and the matching degree between each first option mark in the target image unit and the corresponding reference option mark is greater than the first preset value. Therefore, the position of the second option mark in the target image unit determined by the position relationship between the first option marks and the reference position relationship has high accuracy; after the position of each option mark in the target image unit is determined, the position of each option mark in the remaining image units is further determined based on the position of each option mark in the target image unit and the reference position relationship. As the position information is continuously determined, it is conducive to further improving the positioning accuracy of each option mark in the remaining image units.
[0073] In an exemplary embodiment, as shown in FIG3 , determining the position of each option mark in the remaining image units according to the position of the first option mark and the second option mark in the target image unit and the reference position relationship includes:
[0074] Step 302: Acquire positions of a plurality of first option marks in image units adjacent to the target image unit.
[0075] Step 304, based on the position of the first option mark in the target image unit, the position of the second option mark, the positions of multiple first option marks in adjacent image units, and the reference position relationship, determine the position of the second option mark in the adjacent image unit.
[0076] Step 306, based on the position of the first option mark in the target image unit, the position of the second option mark in the adjacent image units, and the reference position relationship, determine the position of each option mark in the remaining image units.
[0077] Among them, the adjacent image unit refers to the image unit adjacent to the target image unit in multiple image units. After the positioning of each mark information in the target image unit is completed, the position of each mark information in the adjacent image unit is further determined, and then the positioning of the mark information of all image units is gradually expanded, which is conducive to improving the accuracy of the positioning of the mark information.
[0078] Adjacent image units are often composed of a first option mark and a second option mark. The degree of match between the first option mark and the corresponding reference option mark is greater than a first preset value. In some embodiments, if the adjacent image unit does not contain the first option mark, the range of the adjacent image unit can be expanded, and two or more image units adjacent to the target image unit can be used as adjacent image units. For example, the target image unit refers to an image unit composed of option marks corresponding to questions 1-5, and an image unit composed of option marks corresponding to questions 6-10 can be used as an adjacent image unit. If the first option mark does not exist in the option marks corresponding to questions 6-10, an image unit composed of option marks corresponding to questions 6-15 can be used as an adjacent image unit until the first option mark is contained in the adjacent image unit.
[0079] Since the first option mark has a high degree of match with the corresponding reference option mark in the preset reference template, the position of the first option mark can be determined according to the position of the corresponding reference option mark.
[0080] The terminal determines the positional relationship between these option marks based on the position of the first option mark in the target image unit, the position of the second option mark, and the positions of multiple first option marks in adjacent image units. Based on these positional relationships and the reference positional relationship, the position of the second option mark in the adjacent image unit can be determined.
[0081] After the option marks of the target image unit and the adjacent image units are located, the determination range of the mark information in the answer sheet image continues to expand. According to this method, the mark information of the remaining image units continues to be located, which is conducive to improving the accuracy of mark information positioning.
[0082] In this embodiment, by obtaining the positions of multiple first option marks in adjacent image units of the target image unit, combining the positional relationship between the first option mark and other option marks, the position of each option mark in the target image unit, and the reference positional relationship, the position of the second option mark can be determined, thereby achieving accurate positioning of the marking information in the adjacent image units. This method is then continuously expanded to the positioning of the marking information of the remaining image units, which is beneficial to improving the accuracy of positioning the marking information.
[0083] In an exemplary embodiment, as shown in FIG4 , determining a target image unit from a plurality of image units includes:
[0084] Step 402: determine a candidate image unit from a plurality of image units, and determine a matching degree between the candidate image unit and a corresponding reference unit in a preset reference template.
[0085] Step 404: When the matching degree is greater than a second preset value, the candidate image unit is used as a target image unit.
[0086] Step 406: When the matching degree is not greater than the second preset value, the candidate image unit and the adjacent image unit are taken as the target image unit.
[0087] Among them, the image unit usually contains option marks corresponding to multiple questions. In some embodiments, each image unit can be sorted according to the order of the questions contained in each image unit. For example, the image units corresponding to questions 1-5 can be taken as the first-ranked image units, and the image units corresponding to questions 6-10 can be taken as the second-ranked image units, and so on. Exemplarily, the candidate image unit can be any image unit in the image units, and can also be the first-ranked image unit.
[0088] In some other embodiments, the reference unit refers to a partition obtained by dividing a preset reference template based on a target partitioning rule, and multiple reference units correspond to multiple image units one by one. Each image unit can be sorted according to the matching degree between each image unit and the corresponding reference unit. Exemplarily, the candidate image can be the image unit with the largest matching degree among the multiple image units.
[0089] The degree of match between the candidate image unit and the corresponding reference unit in the preset reference template is greater than the second preset value, indicating that the candidate image unit is relatively clear and less deformed than the corresponding preset reference template. The processor can directly use the candidate image unit as the target image unit. In this way, the positioning analysis of the marking information can be started starting from the target image unit, which is conducive to improving the positioning accuracy of the marking information.
[0090] If the degree of match between the candidate image unit and the corresponding reference unit in the preset reference template is not greater than the second preset value, it means that the candidate image unit is relatively blurred or is more deformed than the corresponding preset reference template. If the candidate image unit is used as the target image unit for marking information positioning, there may be a large positioning error. Therefore, the embodiment of the present application proposes to use the candidate image unit and the adjacent image unit as the target image unit to expand the range of the target image unit to ensure that the target image unit has an area where the degree of match between the corresponding reference units is greater than the second preset value, which is conducive to improving the accuracy of marking information positioning.
[0091] In this embodiment, a candidate image unit is determined from a plurality of image units, and a target image unit is determined based on the degree of match between the candidate image unit and a corresponding reference unit in a preset reference template. When the degree of match is greater than a second preset value, the candidate image unit is used as the target image unit. When the degree of match is not greater than the second preset value, the candidate image unit and an adjacent image unit are used together as the target image unit, ensuring that the target image unit has an area where the degree of match between the corresponding reference units is greater than the second preset value. This is beneficial to improving the accuracy of positioning the marking information.
[0092] In an exemplary embodiment, the step of determining the target division rule includes: obtaining the question card type corresponding to the answer sheet image; querying the preset mapping relationship, and taking the division rule corresponding to the question card type as the target division rule; the preset mapping relationship is used to characterize the correspondence between the question card type and the division rule.
[0093] The question card type refers to the layout type of the answer sheet image. Different answer sheets may have different layout structures. For example, some question card types may only include answer units, while some question card types may include answer units and user identification code units. In some question card types, each sub-answer unit has a different composition structure. For example, in some sub-answer units, one question corresponds to four option marks, while in some sub-answer units, one question corresponds to an indefinite number of option marks.
[0094] Different division rules can be used for different question card types to ensure that each option mark in each image unit has a fixed structural feature.
[0095] In some embodiments, a preset mapping relationship is pre-set in the processor to characterize the correspondence between the question card type and the division rule. By querying the preset mapping relationship, the division rule corresponding to the question card type can be determined and used as the target division rule.
[0096] In this embodiment, by querying the preset mapping relationship, the division rules corresponding to the question card types are queried and used as the target division rules, which is beneficial for dividing the image units for different question card types using the corresponding division rules, and is beneficial for improving the accuracy of marking information positioning.
[0097] In an exemplary embodiment, based on the target division rule, the answer sheet image is divided into multiple image units, including: preprocessing the answer sheet image, the preprocessing includes at least one of noise removal, edge detection and image enhancement; based on the target division rule, the preprocessed answer sheet image is divided into multiple image units.
[0098] Among them, since the answer sheet image is acquired by an image acquisition device, it is limited by the acquisition environment and the state of the answer sheet itself, so the answer sheet image may have a certain degree of deformation and other problems. The embodiment of the present application proposes that before dividing the answer sheet image, the answer sheet image can be pre-processed to enhance the clarity of the answer sheet image, thereby facilitating the improvement of the accuracy of the positioning of the marking information.
[0099] The preprocessing method includes but is not limited to at least one of noise removal, edge detection and image enhancement.
[0100] In some embodiments, the preprocessing method may further include offset correction. The answer sheet image generally has a plurality of positioning marks at preset positions, for example, at the four corners of the answer sheet image, or on one side of the answer sheet image. The processor may perform offset correction on the answer sheet image by affine transformation or other methods based on the positions of the plurality of positioning marks and the reference positions corresponding to the positioning marks.
[0101] In some embodiments, the processor may pre-process the offset-corrected answer sheet image, and divide the pre-processed answer sheet image into a plurality of image units based on a target division rule.
[0102] In this embodiment, by preprocessing the answer sheet image and then dividing the preprocessed answer sheet image, it is helpful to improve the matching degree between the image unit and the corresponding reference unit, thereby helping to improve the accuracy of positioning the marking information.
[0103] In an exemplary embodiment, the marking information locating method further includes: identifying the marking information of the answer sheet image based on the positions of the option marks of the plurality of image units.
[0104] Among them, after the positions of the option marks of the multiple image units are determined, since the various mark information is accurately positioned, the mark information of the answer sheet image is identified based on the positions of the option marks of the multiple image units, which is conducive to improving the accuracy of the mark information recognition. For example, when the mark information is identified using OMR technology, since the preset template can be matched with the precise mark information position, the processor can further identify and process the mark information in each mark information position separately, avoiding the influence of factors such as printing offset and scanning paper deformation, which is conducive to improving the accuracy of mark information recognition.
[0105] In this embodiment, the mark information of the answer sheet image is identified based on the positions of the option marks of each of the multiple image units. Since each mark information is accurately positioned, the mark information of the answer sheet image is identified based on the positions of the option marks of each of the multiple image units, which is conducive to improving the accuracy of mark information recognition.
[0106] To explain the marking information positioning method and effect in detail in this solution, a most detailed embodiment is described below:
[0107] The following description is made by taking the scenario of identifying the marking information in the answer sheet as an example. To ensure the accuracy of the marking information recognition, this can be achieved by improving the accuracy of the marking information positioning. The marking information positioning method can be applied to the marking information positioning system. In some embodiments, the marking information positioning system includes an input module, a preprocessing module, a division module, a processing module, an adjustment module, and an output module. Among them, the input module is used to obtain the answer sheet image; the preprocessing module is used to preprocess the answer sheet image, and the preprocessing includes at least one of noise removal, edge detection and image enhancement; the division module is used to divide the answer sheet image into multiple image units based on the target division rule; the processing module is used to use template matching technology to independently process each image unit and conduct joint analysis with other adjacent image units; the adjustment module is used to adjust the position of each image unit according to the result of the joint analysis; the output module is used to output the position of the optimized option mark; the system also includes a noise removal module, an edge detection module and an image enhancement module to further improve the image quality; the division module divides the image unit according to the information in the preset reference template, and each image unit corresponds to the option mark of one or more questions on the answer sheet; the processing module determines the position information of the image unit through template matching technology; the adjustment module compares the position relationship between adjacent image units and adjusts the position of each image unit based on the position relationship.
[0108] Accordingly, the marking information positioning method includes the following steps:
[0109] Input the answer sheet image into the mark information positioning system; pre-process the answer sheet image; divide the answer sheet image into multiple image units based on the target division rule; use template matching technology to independently process each image unit and conduct joint analysis with other adjacent image units; adjust the position of each image unit according to the result of the joint analysis; output the position of the optimized option mark; pre-processing, including but not limited to at least one of noise removal, edge detection and image enhancement; the image unit is divided according to the information in the preset reference template, and each image unit corresponds to the option mark of one or more questions on the answer sheet; template matching technology includes but is not limited to correlation matching, feature point matching, etc. The joint analysis includes comparing the positional relationship between adjacent image units, and adjusting the position of each image unit based on the positional relationship.
[0110] The above-mentioned marking information positioning method divides the answer sheet image to be processed into multiple image units based on the target division rule. Since the option marks in the answer sheet image are usually distributed in multiple area blocks according to certain rules, dividing the answer sheet image into multiple image units based on the target division rule is conducive to positioning and analyzing each image unit separately; the reference position relationship between multiple reference option marks in the preset reference template is known, and the matching degree between each first option mark in the target image unit and the corresponding reference option mark is greater than the first preset value. Therefore, the position of the second option mark in the target image unit determined by the position relationship between the first option marks and the reference position relationship has a high accuracy; after the position of each option mark in the target image unit is determined, the position of each option mark in the remaining image units is further determined based on the position of each option mark in the target image unit and the reference position relationship. As the position information is continuously determined, each option mark can be correctly associated with the corresponding reference option mark, which is conducive to further improving the positioning accuracy of each option mark in the remaining image units.
[0111] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0112] Based on the same inventive concept, the embodiment of the present application also provides a marking information locating device for implementing the marking information locating method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more marking information locating device embodiments provided below can refer to the limitations of the marking information locating method above, and will not be repeated here.
[0113] In an exemplary embodiment, as shown in FIG5 , a marking information positioning device 500 is provided, comprising: an acquisition module 520, a division module 540, a first determination module 560 and a second determination module 580, wherein:
[0114] An acquisition module 520 is used to acquire the answer sheet image to be processed;
[0115] A division module 540, for dividing the answer sheet image into a plurality of image units based on a target division rule;
[0116] A first determination module 560 is used to determine a target image unit from among the plurality of image units, and determine the position of a second option mark in the target image unit according to a positional relationship between a plurality of first option marks in the target image unit and a reference positional relationship between a plurality of reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value;
[0117] The second determining module 580 is used to determine the position of each option mark in the remaining image units according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
[0118] The above-mentioned marking information positioning device divides the answer sheet image to be processed into multiple image units based on the target division rule. Since the option marks in the answer sheet image are usually distributed in multiple area blocks according to certain rules, dividing the answer sheet image into multiple image units based on the target division rule is conducive to positioning and analyzing each image unit separately; the reference position relationship between multiple reference option marks in the preset reference template is known, and the matching degree between each first option mark and the corresponding reference option mark in the target image unit is greater than the first preset value. Therefore, the position of the second option mark in the target image unit determined by the position relationship between the first option marks and the reference position relationship has high accuracy; after the position of each option mark in the target image unit is determined, the position of each option mark in the remaining image units is further determined based on the position of each option mark in the target image unit and the reference position relationship. As the position information is continuously determined, it is conducive to further improving the positioning accuracy of each option mark in the remaining image units.
[0119] In one embodiment, the position of each option mark in the remaining image units is determined based on the position of the first option mark, the position of the second option mark, and a reference position relationship in the target image unit, and the second determination module 580 is further used to: obtain the positions of multiple first option marks in the adjacent image units of the target image unit; determine the position of the second option mark in the adjacent image unit based on the position of the first option mark in the target image unit, the position of the second option mark, the positions of multiple first option marks in the adjacent image units, and a reference position relationship; determine the position of each option mark in the remaining image units based on the target image unit, the position of the first option mark in the adjacent image units, the position of the second option mark, and the reference position relationship.
[0120] In one embodiment, a target image unit is determined among multiple image units, and the first determination module 560 is further used to: determine a candidate image unit among the multiple image units, and determine the degree of match between the candidate image unit and the corresponding reference unit in a preset reference template; when the degree of match is greater than a second preset value, use the candidate image unit as the target image unit; when the degree of match is not greater than the second preset value, use the candidate image unit and the adjacent image unit together as the target image unit.
[0121] In one embodiment, in terms of determining the target division rule, the division module 540 is also used to: obtain the question card type corresponding to the answer sheet image; query the preset mapping relationship, and use the division rule corresponding to the question card type as the target division rule; the preset mapping relationship is used to characterize the correspondence between the question card type and the division rule.
[0122] In one embodiment, based on the target division rule, the answer sheet image is divided into multiple image units, and the division module 540 is also used to: preprocess the answer sheet image, the preprocessing includes at least one of noise removal, edge detection and image enhancement; based on the target division rule, divide the preprocessed answer sheet image into multiple image units.
[0123] In one embodiment, the marking information locating device 500 further includes a recognition module, and the recognition module is used to: recognize the marking information of the answer sheet image based on the positions of the option marks of the multiple image units.
[0124] Each module in the above-mentioned marking information positioning device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0125] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for locating marking information is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0126] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0127] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0128] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0129] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0131] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0132] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0133] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A marking information positioning method, characterized in that: The method comprises: Get the answer sheet image to be processed; Based on the target division rule, the answer sheet image is divided into a plurality of image units; Determine a target image unit among a plurality of image units, and determine the position of a second option mark in the target image unit according to a positional relationship between a plurality of first option marks in the target image unit and a reference positional relationship between a plurality of reference option marks in a preset reference template; the matching degree between each first option mark and the corresponding reference option mark is greater than a first preset value; The position of each option mark in the remaining image units is determined according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
2. The method according to claim 1, characterized in that Determining the position of each option mark in the remaining image units according to the position of the first option mark and the second option mark in the target image unit and the reference position relationship includes: Acquire positions of a plurality of first option marks in image units adjacent to the target image unit; Determine the position of the second option mark in the adjacent image unit based on the position of the first option mark in the target image unit, the position of the second option mark, the positions of the plurality of first option marks in the adjacent image unit, and the reference position relationship; Based on the target image unit, the position of the first option mark in the adjacent image units, the position of the second option mark, and the reference position relationship, the position of each option mark in the remaining image units is determined.
3. The method according to claim 1, characterized in that The step of determining a target image unit from a plurality of image units comprises: Determine a candidate image unit from a plurality of image units, and determine a degree of match between the candidate image unit and a corresponding reference unit in the preset reference template; When the matching degree is greater than a second preset value, taking the candidate image unit as a target image unit; When the matching degree is not greater than a second preset value, the candidate image unit and the adjacent image unit are taken together as the target image unit.
4. The method according to claim 1, characterized in that: The step of determining the target division rule includes: Obtaining the type of answer sheet corresponding to the answer sheet image; The preset mapping relationship is queried, and the division rule corresponding to the question card type is used as the target division rule; the preset mapping relationship is used to characterize the corresponding relationship between the question card type and the division rule.
5. The method according to claim 1, characterized in that The step of dividing the answer sheet image into a plurality of image units based on the target division rule includes: Preprocessing the answer sheet image, wherein the preprocessing includes at least one of noise removal, edge detection and image enhancement; Based on the target segmentation rule, the preprocessed answer sheet image is divided into multiple image units.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Based on the positions of the option marks of the multiple image units, the mark information of the answer sheet image is identified.
7. A marking information positioning device, characterized in that: The device comprises: An acquisition module, used for acquiring the answer sheet image to be processed; A division module, used for dividing the answer sheet image into a plurality of image units based on a target division rule; a first determination module, configured to determine a target image unit among a plurality of image units, and determine a position of a second option mark in the target image unit according to a positional relationship between a plurality of first option marks in the target image unit and a reference positional relationship between a plurality of reference option marks in a preset reference template; a matching degree between each first option mark and a corresponding reference option mark being greater than a first preset value; The second determining module is used to determine the position of each option mark in the remaining image units according to the position of the first option mark, the position of the second option mark in the target image unit, and the reference position relationship.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.