Psychological general survey paper answer sheet identification method and system based on visual processing
By employing visual processing technology and deep learning models, the problems of high cost and poor flexibility in the recognition of paper answer sheets for psychological assessments have been solved. Adaptive recognition of various layouts and scanning deviations has been achieved, improving the accuracy and reliability of answer sheet information.
Patent Information
- Application Number
- CN202511516654.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing technologies for recognizing paper answer sheets in psychological assessments suffer from high costs, heavy reliance on fixed templates, poor flexibility, and difficulty in adapting to various layouts and scanning deviations, resulting in insufficient recognition accuracy and flexibility.
A vision-based approach is adopted, which performs image correction through feature point matching and homography matrix calculation. Combined with region binarization, gridding and dynamic blackening confidence calculation, it adapts to various scanning deviations, accurately locates the identity marker and question area, uses a deep learning model to handle complex image interference, and combines user writing habits and question association rules to verify and correct answers.
It achieves efficient and accurate recognition of paper answer sheets for psychological assessments, reduces costs, improves the robustness and flexibility of recognition, adapts to various answer sheet formats and scanning deviations, and enhances the accuracy and reliability of answer extraction.
Smart Images

Figure CN120997862A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition and data processing technology, specifically to a method and system for recognizing paper answer sheets for psychological assessments based on visual processing. Background Technology
[0002] In the field of psychological screening, accurately and efficiently obtaining test takers' answers on paper answer sheets is crucial. With the development of education, psychological assessment, and other industries, the demand for large-scale psychological screening is increasing, and answer sheet recognition technology is constantly evolving. This development has promoted the automation and informatization of psychological screening work, improved work efficiency, reduced errors that may be caused by manual intervention, and provided more reliable data support for psychological assessment and analysis, playing an important role in areas such as educational quality assessment and student mental health screening.
[0003] In traditional psychological testing paper answer sheet recognition, specialized answer sheet scanners and dedicated answer sheets are typically used for information collection. This method relies on preset, fixed answer sheet templates or corner coordinates, using specific optical recognition technology to read the filled-in information on the answer sheet. Furthermore, traditional algorithms require a high degree of coupling with the answer sheet style; for example, the precise position, number, and size of the option boxes need to be accurately matched with the algorithm.
[0004] However, existing technologies have several drawbacks. First, professional answer sheet scanners are expensive and require dedicated answer sheets, increasing overall operating costs. Second, traditional solutions heavily rely on preset templates and corner coordinates, making it difficult to automatically and accurately correct for rotation, offset, perspective distortion, or the use of answer sheets of different sizes, easily leading to positioning failures or subsequent recognition errors. Furthermore, they lack flexibility and generalization; the algorithm cannot adaptively handle answer sheets with various layouts, and any style change requires readjusting parameters or templates, resulting in high maintenance costs. Summary of the Invention
[0005] To improve the robustness, flexibility, and accuracy of information recognition for paper answer sheets in psychological assessments, this application provides a method and system for recognizing paper answer sheets in psychological assessments based on visual processing.
[0006] Firstly, this application provides a method for recognizing paper answer sheets in psychological assessments based on visual processing, including: Obtain the target image of the psychological test paper answer sheet, and select the reference image of the psychological test paper answer sheet; Image correction is performed on the target image of the obtained psychological test paper answer sheet, including: preprocessing and feature point extraction and matching of the reference image and the target image, estimating the homography matrix and performing perspective transformation through homography matrix calculation to correct the target image; Based on the pre-configured region parameters, the identity identification region and each question region in the corrected target image are located; the pre-configured region parameters are determined based on the format of the psychological test paper answer sheet in the reference image; A first image processing is performed on the located identity identification area to extract identity identification information; the first image processing includes: region binarization processing; completing the region parent-child grid division according to the preset number of identity identifications and completing the sequential mapping of the parent grid with the identity identifications, and mapping each child grid with a single identity identification character; counting the number of non-zero pixels in the child grid, obtaining the identity identification character corresponding to the child grid with the most non-zero pixels in each parent grid and combining them. A second image processing step is performed on each question region to extract the answers to each question. This second image processing includes: dynamically locating the region of each question based on pre-configured question region parameters; region binarization; performing morphological operations on each question region to query the contours of all options and map them to the corresponding question number and option; obtaining the blackening confidence score of each option, comparing it with the blackening confidence scores of other options within the same question region, and comparing it with a blackening confidence score threshold; determining the question answer based on the comparison results, including: for single-choice questions, selecting the option with the highest blackening confidence score and not lower than the blackening confidence score threshold; for multiple-choice questions, selecting the option with a blackening confidence score not lower than the blackening confidence score threshold; the blackening confidence score is obtained by calculating the ratio of the total area of non-zero pixels within the contour region of the option to the total area of the contour region; the pre-configured question region parameters are determined based on the format of a psychological assessment paper answer sheet in a reference image.
[0007] By adopting the above scheme, the target image of the paper answer sheet for psychological testing is corrected, adapting to various scanning deviations, eliminating the dependence on fixed templates, accurately locating the identity identification area and question area, accurately extracting identity identification information and question answers, reducing costs, and improving the robustness, flexibility and accuracy of recognition.
[0008] Preferably, the second image processing for each question region based on the blackened confidence threshold to extract the answer to each question further includes: A dynamic blackening confidence threshold is set; the dynamic blackening confidence threshold is calculated by combining a preset blackening confidence threshold with an adjustment value for multiple writing influencing factors; wherein, multiple writing influencing factors include: option type influencing factors, option content and question difficulty influencing factors, and question location influencing factors; the option type influencing factors include: question type and option marking range type; the option content and difficulty influencing factors include: whether it involves sensitive issues and the difficulty level of the question; the question location influencing factors include: the location of the question area on the answer sheet; each type of writing influencing factor has a corresponding threshold adjustment value, and the final multiple writing influencing factor threshold adjustment value is obtained by combining the calculations; By combining the reference image of the paper answer sheet for the psychological test, we can determine the multiple writing influencing factors corresponding to the current question area and their corresponding writing influencing factor threshold adjustment values, calculate the blackening confidence threshold corresponding to the current question area, and then complete the comparison.
[0009] By adopting the above scheme, a dynamic blackening confidence threshold is set, taking into account multiple writing influencing factors such as option type, option content and question difficulty, and question location. The blackening confidence threshold is calculated by combining the reference image to determine the corresponding writing influencing factors and threshold adjustment values for each question area, thereby further improving the accuracy and reliability of answer recognition.
[0010] Preferably, it also includes: verifying the extracted identity information, including: The system acquires character setting rules based on identity information, determines whether the characters in the currently extracted identity information conform to the character setting rules, and if it determines that they do not conform to the character setting rules, acquires the number of characters that do not conform to the character setting rules and triggers identity information verification; based on the size of the range of the acquired number of characters that do not conform to the character setting rules, it matches different verification strategies, including: a strategy to reacquire identity information if it matches the first range, a strategy to extract identity information based on multi-angle target images if it matches the second range, and a strategy to extract identity information based on multi-angle target images and multi-scale images if it matches the third range; wherein the first range, the second range, and the third range increase sequentially.
[0011] By adopting the above scheme, the extracted identity information can be verified. It can be judged whether it meets the settings according to the character setting rules. If it does not meet the settings, different verification strategies are matched according to the range of the number of non-compliant characters, thereby improving the accuracy and reliability of identity information extraction.
[0012] Preferably, it also includes: verifying and correcting the answers to the extracted questions, including: The answers to each question are verified and corrected using user writing habits. This includes: when there are multiple options for a single-choice question with the highest blackening confidence and a difference of less than a preset difference from the blackening confidence threshold, the writing characteristics of user habits obtained from historical user writing habits are combined, including: the average gray value of non-zero pixels in the contour region representing writing intensity, and the area of non-zero pixels and contour proportion in the contour region representing completeness; combined with the blackening confidence of the selected option, the writing characteristics of the corresponding option are determined, and the option with the highest similarity to the writing characteristics of user habits and greater than a preset similarity is obtained to correct the extracted question answers. The process involves verifying and correcting the extracted answers to each question using a rule base for association between the answers. This includes: pre-constructing a rule base for association between the answers to each question, including rules for skipping questions, conflicting rules, and positive / negative correlation rules; verifying whether the extracted answers conform to these rules based on the rule base; marking questions that do not conform to these rules and adjusting the confidence threshold for blackening them, and re-extracting the answers; generating a manual correction prompt if the re-extracted answers still do not conform to these rules; calculating the correlation coefficient for each of the extracted answers; marking questions that do not conform to the preset correlation coefficient value and adjusting the confidence threshold for blackening them, and re-extracting the answers; generating a manual correction prompt if the re-extracted answers still do not conform to these rules; and calculating the correlation coefficient for each question among several sets of answers.
[0013] By adopting the above scheme, the extracted question answers are verified and corrected from multiple dimensions such as user writing habits and question association rules, which solves the problems of multiple-choice questions having several options with the highest confidence level of blackening and question answers not conforming to the rules, thereby improving the accuracy and reliability of answer extraction.
[0014] Preferably, image correction of the target image of the acquired psychological assessment paper answer sheet further includes: The target image is input into an image correction level recognition model constructed using deep learning to obtain the correction level of the target image, including: primary correction based on the presence of rotation, offset and perspective distortion in the image, intermediate correction based on the presence of folding, tearing and lighting interference in the image, and advanced correction based on the presence of multiple pages sticking together and jitter blur in the image; the image correction level recognition model uses a deep neural network and is generated by training on images with historically labeled correction levels. Based on the correction level of the acquired target image, a corresponding correction strategy is matched, including: a first correction strategy matching the initial correction, a second correction strategy matching the intermediate correction, and a third correction strategy matching the advanced correction. The first correction strategy includes: preprocessing and extracting and matching feature points for the reference image and the target image, estimating the homography matrix, and performing perspective transformation to correct the target image by calculating the homography matrix. The second correction strategy includes: pre-completing the target image using a deep learning algorithm or completing the target image illumination compensation using optical correction technology before continuing to execute the first correction strategy. The third correction strategy includes: pre-identifying the overlapping answer sheet boundaries through edge density detection, segmenting single pages by combining connected component analysis, and restoring the blurred areas caused by jitter based on fuzzy kernel estimation and natural image prior technology before continuing to execute the first correction strategy.
[0015] By adopting the above scheme, an image correction level recognition model built using deep learning is used to distinguish the correction level of the target image. Appropriate correction strategies are matched for different correction levels to handle various problems in the image, thereby further improving the accuracy and adaptability of image correction.
[0016] Preferred options also include: Obtain the current test subject of the answer sheet, and divide the recognition scenario according to the test subject, including: basic recognition scenario for the general public and key recognition scenario for the marked key groups of interest; The system determines the recognition scene corresponding to the target image of the psychological assessment paper answer sheet, judges whether it is a key recognition scene, and selects a first image processing optimization strategy to complete the first image processing optimization when it is judged to be a key recognition scene. The first image processing optimization strategy includes: in the process of mapping the parent grid with the identity identifier, adding marker points on the leftmost and rightmost sides of the grid area according to the horizontal direction of the image, locating the marker points by matching the reference image, aligning the first parent grid with the left marker according to the horizontal direction of the image, and aligning the last parent grid with the right marker according to the horizontal direction of the image; in the process of mapping each sub-grid with a single identity identifier character, adding marker points on the topmost and bottommost sides of the grid area according to the vertical direction of the image, locating the marker points by matching the reference image, aligning the first parent grid with the top marker according to the vertical direction of the image, and aligning the last sub-grid with the bottom marker according to the vertical direction of the image.
[0017] By adopting the above scheme, the recognition scenarios are divided according to the test subjects to which the answer sheet is intended. For key recognition scenarios, the first image processing optimization strategy is adopted, which uses marker points to force grid alignment to improve the accuracy and stability of identity information extraction.
[0018] Preferred options also include: The identification scene corresponding to the target image of the psychological test paper answer sheet is determined, and it is judged whether it is a key identification scene. If it is judged to be a key identification scene, a second image processing optimization strategy is selected to complete the second image processing optimization. The second image processing optimization strategy includes: optimizing the blackening confidence calculation method to replace the original blackening confidence calculation method, and using the optimized blackening confidence calculation method to obtain the blackening confidence of each option. The optimized blackening confidence calculation method is obtained by weighted calculation of the ratio of the total area of non-zero pixels in the contour area of the option to the total area of the contour and the gray uniformity value in the contour area of the option.
[0019] By adopting the above scheme, the calculation method of blackening confidence is optimized in key recognition scenarios. By combining the proportion of non-zero pixels in the option outline and the grayscale uniformity, the accuracy and reliability of answer recognition are further improved.
[0020] Secondly, this application provides a vision-processing-based paper-based answer sheet recognition system for psychological assessments, including: A target image acquisition model is used to acquire the target image of the psychological test paper answer sheet and select the reference image of the psychological test paper answer sheet; The target image correction model is used to correct the target image of the acquired psychological test paper answer sheet. It includes: preprocessing the reference image and the target image and extracting and matching the feature points, estimating the homography matrix and performing perspective transformation through the homography matrix to correct the target image. An image region localization model is used to locate the identity identification region and each question region in the corrected target image according to pre-configured region parameters; the pre-configured region parameters are determined based on the format of the psychological test paper answer sheet in the reference image; The identity information extraction module is used to perform first image processing on the located identity region to extract identity information; the first image processing includes: region binarization processing; completing the region parent-child grid division according to the preset number of identity identifiers and completing the sequential mapping of the parent grid with the identity identifiers, and mapping each child grid with a single identity identifier character; counting the number of non-zero pixels in the child grids, obtaining the identity identifier character corresponding to the child grid with the most non-zero pixels in each parent grid and combining them. The question answer extraction module is used to perform second image processing on each question region to extract the answer to each question. The second image processing includes: dynamically locating the region of each question according to pre-configured question region parameters; region binarization processing; performing morphological operations on each question region, querying the contours of all options and mapping them to the corresponding question number and option; obtaining the blackening confidence of each option, comparing it with the blackening confidence of other options in the same question region and comparing it with the blackening confidence threshold, and determining the question answer based on the comparison result, including: for single-choice questions, selecting the option with the highest blackening confidence and not lower than the blackening confidence threshold, and for multiple-choice questions, selecting the option with a blackening confidence not lower than the blackening confidence threshold; the blackening confidence is obtained by calculating the ratio of the total area of non-zero pixels in the contour region of the option to the total area of the contour; the pre-configured question region parameters are determined based on the format of the psychological test paper answer sheet in the reference image.
[0021] By adopting the above scheme, the target image is corrected to adapt to various scanning deviations, accurately locates the identity identification area and the question area, and accurately extracts the identity identification information and question answers, thereby improving the automation, accuracy and reliability of recognition, and making it compatible with answer sheets of different formats.
[0022] Thirdly, this application provides a computer-readable storage medium including a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to perform the method described above.
[0023] Fourthly, this application provides a computer device, the computer device including a memory, a processor and a program stored in the memory and executable thereon, the program being executed by the processor to implement the steps of the method described above.
[0024] In summary, this application has the following beneficial effects: 1. Perspective transformation is performed through feature point matching and homography matrix calculation to automatically correct target images by adapting to various scanning deviations. At the same time, interference is effectively eliminated and the accuracy and reliability of information recognition are improved through region binarization, meshing and mapping, morphological operations, dynamic blackening confidence calculation and comparison, etc. Recognition areas are defined through configuration files to adapt to answer sheets of different formats and layouts, thereby improving the flexibility of recognition. 2. Verify the extracted identity information. Determine whether the extracted identity information meets the requirements based on the character setting rules. If it does not meet the requirements, match different verification strategies according to the range of the number of non-compliant characters to improve the accuracy and reliability of identity information extraction. Utilize user writing habits and question association rule base to verify and correct the extracted question answers to improve the accuracy and reliability of question answer extraction. 3. Based on the test subjects targeted by the answer sheet, the recognition scenarios can be divided into basic recognition scenarios and key recognition scenarios. For key recognition scenarios, the first image processing optimization strategy and the second image processing optimization strategy are adopted to improve the accuracy of image recognition. Attached Figure Description
[0025] Figure 1 This is a flowchart of the paper answer sheet recognition method for psychological assessment based on visual processing described in a specific embodiment; Figure 2 An illustration of the paper answer sheet recognition method for psychological assessment based on visual processing described in a specific embodiment; Figure 3 This is a schematic diagram of the structure of the vision-processing-based psychological assessment paper answer sheet recognition system described in a specific embodiment. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] like Figure 1 As shown in the figure, this application discloses a method for recognizing paper answer sheets for psychological assessment based on visual processing, including several steps such as target image acquisition, target image correction, target image region localization, identity information extraction, and question answer extraction. Each step in this application is described in further detail below.
[0028] S1. Obtain the target image and reference image of the paper answer sheet for the psychological assessment.
[0029] Specifically, image acquisition devices are used to acquire target images of paper answer sheets for psychological assessments. To further ensure the accuracy of recognition of paper answer sheets for psychological assessments, several image acquisition devices can be selected to acquire target images from multiple angles and at multiple scales.
[0030] To avoid relying on fixed templates, we choose to automatically adapt to various scanning deviations and correct the target image through feature point matching and the RANSAC algorithm. This requires the acquisition of reference images. We can provide a library of reference answer sheets in different formats, sizes, and types, and design an interface that allows users to select reference images from the library.
[0031] S2. Perform image correction on the target image of the obtained psychological test paper answer sheet.
[0032] Specifically, in this embodiment, image geometric correction is taken as an example. The image correction design includes preprocessing and feature point extraction and matching of the reference image and the target image, and performing perspective transformation through homography matrix calculation to correct the target image.
[0033] During preprocessing, the image can be converted to grayscale first, and then Gaussian blur and bilateral filtering can be applied in sequence. Gaussian blur can be used to smooth image noise, while bilateral filtering can be used to retain important edge features while smoothing noise, or grayscale conversion can be performed after filtering.
[0034] The ORB feature detector is used for feature point extraction to detect keypoints and calculate their descriptors on both the reference and target images. A brute-force matcher is used for feature point matching, employing Hamming distance as the similarity metric. Then, the RANSAC algorithm is used to estimate the homography matrix from the matched point pairs to eliminate incorrect matches. Finally, the homography matrix is used to perform a perspective transformation on the target image, aligning it to the coordinate system of the reference image to obtain the corrected standard image. The ORB feature detector can be replaced by a SIFT (Scale Invariant Feature Transform) feature detector, and the brute-force matcher can be replaced by a FLANN (Fast Nearest Neighbor) matcher.
[0035] S3. Based on the pre-configured region parameters, locate the identity identification region and each question region in the corrected target image.
[0036] Specifically, the region localization step involves locating the identity marker region and each question region within the corrected target image based on pre-configured region parameters. These pre-configured region parameters are determined based on the format of the psychological assessment paper answer sheet in the reference image. These parameters can be manually marked on the reference image or automatically obtained by analyzing the reference image using image analysis algorithms.
[0037] S4. Perform first image processing on the located identity identification area to extract identity identification information.
[0038] Specifically, on the corrected image, the identification area, such as the student ID number field, can be accurately located based on the pre-configured coordinate region. The first image processing step for the located identification area includes: firstly, binarization, converting the image into a black and white binary image for subsequent processing; then, dividing the area into parent and child grids according to the preset number of identification identifiers. The identification areas are generally arranged horizontally according to the number of identification identifiers to be filled in, and each column has the same identification identifier filling options for users to select and fill in individual identification identifier information; for example... Figure 2 As shown, taking the student ID filling area as an example, the student ID has a total of 10 digits, and each digit corresponds to a number or character (0-9 and X); accordingly, the parent grid of the area is divided into a corresponding number (10) of parent grids according to the number of (preset) identity information filled in, and within each parent grid, it is divided into a corresponding number (10) of sub-grids according to the number of default options for a single identity information.
[0039] Next, the mapping between parent grids and identity identifiers is completed, that is, each parent grid is mapped to a single identifier in a one-to-one correspondence. For example, the first parent grid is mapped to the first identifier in the horizontal direction of the image (after geometric correction). The mapping between each child grid and a single identifier character is completed, that is, each child grid is mapped to a single default option of the identifier information (generally with a preset default option order). For example, the first child grid is mapped to the first default option (0) of the identifier information in the vertical direction of the image (after geometric correction).
[0040] Finally, the number of non-zero pixels in the sub-grid is counted to represent the effective information in the sub-grid, that is, the content that the user has blackened in the corresponding area. The more non-zero pixels there are, the more content the user has blackened. The identity information option mapped to this sub-grid is selected by the user. The identity character corresponding to the sub-grid with the most non-zero pixels in each parent grid is obtained and combined. That is, the mapped identity information is combined according to the mapping order of the parent grids. For example, extract the identity information: student ID 202314052X.
[0041] S5. Perform second image processing on each question area to extract the answer to each question.
[0042] Specifically, the purpose of each question area is to output the corresponding answer for each question. For each question, the process involves area localization, outline acquisition, confidence calculation, and comparison to determine the final answer; accordingly... The second image processing includes: first, dynamically locating the region of each question according to pre-configured question region parameters; wherein, the pre-configured question region parameters are determined based on the format of the psychological test paper answer sheet in the reference image; similarly, these parameters can be manually marked on the reference image or automatically obtained by analyzing the reference image using image analysis algorithms.
[0043] Then, based on the pre-configured question coordinate regions, each question region can be accurately located and binarized to convert the image into a black and white binary image for subsequent processing. Next, morphological operations are performed on each question region, such as closing operations to fill holes and opening operations to remove noise, and the contours of all options are queried. Then, for each option's contour, its bounding rectangle and centroid coordinates are calculated and mapped to the corresponding question number and option based on the different question and option positions in the reference image. Following this, the calculation method for the blackening confidence of each option is set, and the blackening confidence of each option is calculated and obtained. The blackening confidence is obtained by calculating the ratio of the total area of non-zero pixels within the option's contour region to the total area of the contour. For example, if the total area of non-zero pixels within the current contour region is 3 / 4 of the total contour area, the corresponding blackening confidence is 0.75.
[0044] Finally, for each option's blackening confidence level, it is compared with the blackening confidence levels of other options within the same question area and then compared with a blackening confidence threshold. The answer is determined based on the comparison results. Specifically, the type of the current option is pre-determined based on the question number corresponding to the current question area. For different option types, for single-choice questions, only the option with the highest blackening confidence level is selected; that is, the blackening confidence levels of each option within the corresponding question area are compared, and the option with the highest blackening confidence level is selected, thus obtaining the single answer filled in by the user for that question. For multiple-choice questions, options with a blackening confidence level not lower than the blackening confidence threshold are selected; the comparison results are ignored, and only options with a blackening confidence level not lower than the blackening confidence threshold are selected, thus obtaining the multiple answers filled in by the user for that question.
[0045] Furthermore, to further ensure the accuracy of the answers filled in by users for the corresponding questions, various factors affecting the filling in of answers are considered. By setting a dynamic blackening confidence threshold, the system can more accurately determine whether an option has been blacked out. The second image processing for each question region based on the blackening confidence threshold to extract the answer to each question also includes: setting a dynamic blackening confidence threshold; the blackening confidence threshold is calculated by combining the blackening confidence threshold baseline value and the threshold adjustment value (combined) of multiple writing influencing factors.
[0046] Specifically, the factors influencing multiple markings include: option type, option content and question difficulty, and question location. Option type factors include question type and option marking range type. Option content and difficulty factors include whether the question involves sensitive issues and the difficulty level of the question. Question location factors include the location of the question area on the answer sheet. Each type of marking factor has a corresponding threshold adjustment value, and the final threshold adjustment value for multiple marking factors is obtained through combined calculation or weighted calculation (each type has a weight).
[0047] In this embodiment, each type of writing influencing factor has a corresponding threshold adjustment value, including: for single-selection, where a single option is usually blacked out, the threshold adjustment value is 0 (considered normal); for multi-selection, where multiple options are written and a single option may be written hastily, the threshold adjustment value is -1; for the option writing range type being a preset large-frame writing type, the threshold adjustment value is +2; for the option writing range type being a preset regular-frame writing type, the threshold adjustment value is +0; and for the option writing range type being a preset small-frame writing type... The threshold adjustment value is set to -2; for options involving sensitive issues or difficult questions (which can be determined in advance based on the question number), the marking will be more frequent, so the threshold adjustment value is set to -2; for options not involving sensitive issues or easy questions (which can be determined in advance based on the question number), the marking will be more frequent, so the threshold adjustment value is set to 0; for questions in the answer sheet area, the marking will not be rushed, so the threshold adjustment value is set to 0; for questions in the latter half of the answer sheet, the marking will be more rushed, so the threshold adjustment value is set to -2.
[0048] By combining the reference image of the paper answer sheet for the psychological test, we determine the multiple writing influencing factors corresponding to the current question area (the influencing factors of option type are determined according to the question number of the current question) and the corresponding writing influencing factor threshold adjustment value, and calculate the blackening confidence threshold corresponding to the current question area, thereby assisting in subsequent confidence comparison.
[0049] Using the method described in the above embodiments, it is possible to achieve automatic and accurate recognition of paper answer sheets for psychological assessments through a series of image processing steps, from image acquisition to information extraction.
[0050] In a specific embodiment, to promptly detect and correct errors in the process of extracting identity information or answers to questions, a further process for verifying and correcting extracted information is designed to improve the accuracy of identification. The method also includes: First, the extracted identity information is verified, including whether there is missing data in the identity information and whether the identity information does not conform to the prescribed design. The specific verification is as follows: The system retrieves the character count rules based on identity information and determines whether the number of characters in the currently extracted identity information conforms to the character count rule settings. For example, the preset character count rule is 10 characters. If it is determined that the character count does not conform to the character count rule settings, such as when the number of characters in the currently extracted identity information is 9 characters, the system retrieves the number of characters that do not conform to the character count rule and triggers identity information count verification. Based on the size of the range of the number of characters that do not conform to the character count rule, different verification strategies are matched accordingly. These include: a strategy to re-acquire identity information when matching the first range (e.g., 1-5), a strategy to extract identity information based on multi-angle target images when matching the second range (e.g., 6-10), and a strategy to extract identity information based on multi-angle target images and multi-scale images when matching the third range (e.g., greater than 10). For example, if the number of characters that do not conform to the character count rule is 1, which corresponds to the first range, the system matches the strategy to re-acquire identity information and re-identifies the identity information. If, after matching the verification strategy, the system re-identifies the identity information and still triggers identity information count verification, a manual correction prompt is generated.
[0051] The system acquires character setting rules based on identity information and determines whether the characters in the currently extracted identity information conform to the character setting rules. For example, the preset character setting rule is that the first two characters are fixed as 00. When it is determined that the character setting rules are not met, such as when the first two extracted identity information characters are 11, the system acquires the number of characters that do not conform to the character setting rules and triggers identity information verification. Based on the size of the range of the number of characters that do not conform to the character setting rules, different verification strategies are matched accordingly. These include: a strategy to reacquire identity information that matches the first range, a strategy to extract identity information based on multi-angle target images that matches the second range, and a strategy to extract identity information based on multi-angle target images and multi-scale images that matches the third range. The first, second, and third ranges increase sequentially, meaning that the higher the number, the lower the recognition accuracy, and the more optimization of the information extraction strategy is required. The identity information extraction strategy for multi-angle and / or multi-scale target images is to extract identity information from multi-angle and / or multi-scale target images to obtain the characters with the highest similarity that conform to the identity information character settings or number rules.
[0052] Second, the answers to each extracted question are verified and corrected. This verification and correction is performed from the perspectives of user writing habits, logical connections between questions, and multi-scale image verification, as detailed below: The system verifies and corrects the answers to each question by utilizing user writing habits. This includes: when multiple options in a single-choice question have the highest blackening confidence level and the difference between these options and the blackening confidence threshold is less than a preset difference (e.g., options A and B in the same question have the same blackening confidence level, but are both close to the blackening confidence threshold, thus possessing a certain degree of credibility), the system combines the writing characteristics of user habits obtained from historical user writing habits, including: the average gray value of non-zero pixels in the contour region representing writing intensity, and the area of non-zero pixels and contour proportion in the contour region representing completeness; combining the blackening confidence level of the selected option, the system uses image analysis technology to determine the writing characteristics (e.g., average gray value) of the corresponding option, and obtains the option whose writing characteristics have the highest similarity to the user's writing habits and are greater than a preset similarity, to correct the extracted question answers; if no option has a preset similarity between its writing characteristics and the user's writing habits, a manual correction prompt is generated.
[0053] The system utilizes a rule base for association between the answers to each question to verify and correct the extracted answers. This includes: based on the content of the corresponding questions on the answer sheet, a rule base for association between the answers to each question can be pre-constructed, including: skipping question logic rules (e.g., the logic between questions satisfies 1(A)-3(B)-6(D)), conflict logic rules (e.g., the logic between questions satisfies 1(A) and 6(C) cannot coexist), and positive and negative correlation logic (positive correlation: e.g., "headache" (Q3) and "muscle soreness" (Q8), represented as: (Q3, Q8, 0.8); negative correlation is represented as: e.g., (Q3, Q4, -0.7).
[0054] Based on the skip-question logic rules and conflict logic rules in the association rule base, the system verifies whether the extracted question answers conform to these rules. If any question answers do not conform to these rules, the corresponding questions are marked and the blackening confidence threshold is adjusted (randomly selected to be increased or decreased). The corresponding question answers are then extracted again. If, after re-extraction, question answers still do not conform to these rules, a prompt requiring manual correction is generated. Neural network technology can be used to learn and label answer sheet image data that conforms to and does not conform to the skip-question logic rules and conflict logic rules, thereby constructing a rule recognition neural network. This network directly identifies whether the currently extracted question answers conform to the skip-question logic rules and conflict logic rules and outputs combinations of question answers that do not conform to these rules.
[0055] Based on the positive and negative correlation logic rules in the association rule base, the correlation coefficient is calculated for several extracted answers to each question (combined with the answers to several questions extracted from images with the same parameter corresponding to the target parameters). For example, for the three answers between Q3 and Q8, the Pearson correlation coefficient is calculated to be 0.7. If the correlation coefficient of each question's answer is lower than the preset correlation coefficient value (0.8), it indicates that the association between the questions is weaker than theoretically expected, and there may be an identification error. The corresponding questions are marked (e.g., marked) and the blackening confidence threshold is adjusted (it can be randomly selected to be increased or decreased). The answers to the corresponding questions are extracted again or extracted a preset number of times. If there are still questions that do not conform to the positive and negative correlation logic rules after re-extracting the answers, a prompt that manual correction is required is generated.
[0056] In addition, to reduce the number of answers that need to be re-extracted, we can further focus on the marked questions. Based on the blackening confidence level of the marked questions, we can select a portion of questions whose blackening confidence level is less than the blackening confidence level threshold. We can then assume that these questions are the ones causing the recognition error and focus on these questions to re-extract the answers to the corresponding questions.
[0057] The system utilizes multi-scale target image extraction to compare and verify the answers to each question, including: comparing the answers to each question extracted from target images at different scales; if the similarity of the answers to each question extracted from target images at different scales is lower than a preset similarity, the blackening confidence threshold is adjusted; if the similarity of the answers to each question extracted from target images at different scales is still lower than the preset similarity after re-extracting the answers, a prompt requiring manual correction is generated.
[0058] In a specific embodiment, considering that in the process of target image correction, in addition to rotation, offset, perspective distortion, or the use of answer sheets of different sizes, there are other situations that require correction, such as answer sheets being folded, partially torn, or exposed; to better perform image correction, this method further includes: image correction of the target image of the acquired psychological assessment paper answer sheet, which also includes: The target image is input into an image correction level recognition model constructed using deep learning to obtain the correction level of the target image, including: primary correction based on the presence of rotation, offset and perspective distortion in the image; intermediate correction based on the presence of (edge) folding, (edge) tearing and lighting interference in the image; and advanced correction based on the presence of multiple pages sticking together and jitter blur in the image. The image correction level recognition model uses a deep neural network and is generated by training on images with historically labeled correction levels.
[0059] Based on the correction level of the acquired target image, a corresponding correction strategy is matched, including: a first correction strategy matched with the initial correction, a second correction strategy matched with the intermediate correction, and a third correction strategy matched with the advanced correction; wherein, the first correction strategy is mainly applied when the image has geometric deviations such as rotation, offset, and perspective distortion, and can be directly set. The first correction strategy includes: preprocessing the reference image and the target image and extracting and matching feature points, estimating the homography matrix, and performing perspective transformation through homography matrix calculation to correct the target image.
[0060] The second correction strategy is mainly applied to situations where images have physical deformations or optical interference, such as folding, tearing, and lighting interference. Considering deep learning completion technology to deal with physical deformation correction and dynamic lighting compensation strategy to deal with optical interference correction, the second correction strategy includes: pre-completing the target image using deep learning algorithms (e.g., inputting context pixels of the folded area to generate a repaired flat image, matching residual patterns of the torn edge through SIFT feature points, and stitching to restore the complete area) or using optical correction technology (e.g., using the Retinex algorithm to enhance the brightness and restore details of overexposed / underexposed areas respectively) to complete the lighting compensation of the target image, and then continuing to execute the first correction strategy, that is, preprocessing and extracting and matching feature points for the reference image and the target image, estimating the homography matrix and performing perspective transformation through homography matrix calculation to correct the target image, ensuring that the basic geometric deformation deviation is eliminated.
[0061] The third correction strategy is mainly aimed at situations where images have multiple pages stuck together or are blurred due to jitter. It considers using multi-page separation algorithms to separate pages and jitter blur repair techniques to restore blurred areas in the image. The corresponding third correction strategy includes: firstly identifying the boundaries of overlapping answer sheets through edge density detection, and segmenting single pages by combining connected component analysis; restoring the blurred areas caused by jitter based on fuzzy kernel estimation and natural image prior techniques, and then continuing to execute the first correction strategy, that is, preprocessing and extracting and matching feature points for the reference image and the target image, estimating the homography matrix, and performing perspective transformation through homography matrix calculation to correct the target image, ensuring that the basic geometric deformation deviation is eliminated.
[0062] In a specific embodiment, considering that the accuracy requirements for identifying test results from basic psychological tests for the general public are lower than those for identifying test results from patients, the method further includes the following to ensure the high accuracy requirements for identifying test results from key populations: Obtain the target audience of the current answer sheet (the target audience parameter can be manually input in advance), and divide the recognition scenarios according to the target audience, including: basic recognition scenarios for the general public and key recognition scenarios for marked key groups of concern; among them, the marked key groups of concern are pre-marked groups of people to be monitored, such as: employees of large companies.
[0063] The system determines the recognition scene corresponding to the target image of the psychological assessment paper answer sheet, identifies whether it is a key recognition scene, and selects a first image processing optimization strategy to complete the first image processing optimization when it is identified as a key recognition scene. The first image processing optimization strategy includes: completing sequence mapping optimization, specifically including: in the process of mapping the parent grid to the identity identifier, adding marker points on the leftmost and rightmost sides of the grid area according to the horizontal direction of the image (after geometric correction), locating the marker points by matching the reference image, aligning the first parent grid in the horizontal direction of the image with the left marker, and aligning the last parent grid in the horizontal direction of the image with the right marker, thus eliminating sequence misalignment; in the process of mapping each sub-grid to a single identity identifier character, adding marker points on the topmost and bottommost sides of the grid area according to the vertical direction of the image (after geometric correction), locating the marker points by matching the reference image, aligning the first parent grid in the vertical direction of the image with the top marker, and aligning the last sub-grid in the vertical direction of the image with the bottom marker, thus eliminating sequence misalignment.
[0064] Furthermore, the first image processing optimization strategy also includes: when dividing the grid, an adaptive grid size calculation is adopted, specifically including: determining the size division of the sub-grid based on the size of the identification information writing area of the reference image, which can be selected within a range where the difference between the identification information writing area size and the size of the sub-grid is less than a preset size difference; determining the size division of the parent grid based on the spacing size between the identification information writing areas of the reference image, so as to realize the default option of all identification information under a single priority of identification information, and there is no overlap between the ranges of the default options of all identification information under the corresponding priority of multiple single priorities of identification information.
[0065] The identification scene corresponding to the target image of the psychological test paper answer sheet is determined, and it is judged whether it is a key identification scene. If it is judged to be a key identification scene, a second image processing optimization strategy is selected to complete the second image processing optimization. The second image processing optimization strategy includes: optimizing the blackening confidence calculation method to replace the original blackening confidence calculation method, and using the optimized blackening confidence calculation method to obtain the blackening confidence of each option. The optimized blackening confidence calculation method is obtained by weighted calculation of the ratio of the total area of non-zero pixels in the contour area of the option to the total area of the contour and the gray uniformity value in the contour area of the option.
[0066] Furthermore, the second image processing optimization strategy also includes: when performing image binarization, a local adaptive threshold design is adopted, dynamically selecting a binarization threshold that matches the region block size; when acquiring option contours, multi-scale contour acquisition is selected (such as dual contour acquisition, using the Canny operator's dual threshold to extract contours), using one contour size as the baseline contour to complete the query of all option contours and map them to the corresponding question number and option; in the subsequent verification and correction process, when re-extracting identity information or question answers, a single contour size can be selected to complete the query of all option contours and map them to the corresponding question number and option, replacing the design of adjusting the blackening confidence threshold.
[0067] like Figure 3 As shown, this application discloses a paper-based answer sheet recognition system for psychological assessments based on visual processing, specifically including: Target image acquisition model 101 is used to acquire the target image of the psychological test paper answer sheet and select the reference image of the psychological test paper answer sheet; The target image correction model 102 is used to correct the target image of the acquired psychological test paper answer sheet, including: preprocessing the reference image and the target image and extracting and matching the feature points, estimating the homography matrix and performing perspective transformation through the homography matrix to correct the target image; Image region localization model 103 is used to locate the identity identification region and each question region in the corrected target image according to pre-configured region parameters; the pre-configured region parameters are determined based on the format of the psychological test paper answer sheet in the reference image; The identity information extraction module 104 is used to perform first image processing on the located identity region to extract identity information; the first image processing includes: region binarization processing; completing the region parent-child grid division according to the preset number of identity identifiers and completing the sequential mapping of the parent grid with the identity identifiers, and mapping each child grid with a single identity identifier character; counting the number of non-zero pixels in the child grids, obtaining the identity identifier character corresponding to the child grid with the most non-zero pixels in each parent grid and combining them. The question answer extraction module 105 is used to perform second image processing on each question region to extract the answer to each question. The second image processing includes: dynamically locating the region of each question according to pre-configured question region parameters; region binarization processing; performing morphological operations on each question region, querying the contours of all options and mapping them to the corresponding question number and option; obtaining the blackening confidence of each option, comparing it with the blackening confidence of other options in the same question region and comparing it with the blackening confidence threshold, and determining the question answer based on the comparison result, including: for single-choice questions, selecting the option with the highest blackening confidence and not lower than the blackening confidence threshold, and for multiple-choice questions, selecting the option with a blackening confidence not lower than the blackening confidence threshold; the blackening confidence is obtained by calculating the ratio of the total area of non-zero pixels in the contour region of the option to the total area of the contour; the pre-configured question region parameters are determined based on the format of the psychological test paper answer sheet in the reference image.
[0068] In one specific embodiment, the system further includes: The answer sheet object-oriented scene recognition module 106 is used to obtain the current answer sheet's target test object and divide the recognition scene according to the target test object, including: basic recognition scene for the general public and key recognition scene for the marked key attention group; The identity information extraction and optimization module 107 is used to determine the recognition scene corresponding to the target image of the psychological test paper answer sheet, determine whether it is a key recognition scene, and when it is determined to be a key recognition scene, select a first image processing optimization strategy to complete the first image processing optimization; the first image processing optimization strategy includes: in the process of mapping the parent grid with the identity identifier, according to the horizontal direction of the image, select to add marker points on the leftmost and rightmost sides of the grid area, locate the marker points by matching the reference image, align the first parent grid with the left marker according to the horizontal direction of the image, and align the last parent grid with the right marker according to the horizontal direction of the image; in the process of mapping each sub-grid with a single identity identifier character, according to the vertical direction of the image, select to add marker points on the topmost and bottommost sides of the grid area, locate the marker points by matching the reference image, align the first parent grid with the top marker according to the vertical direction of the image, and align the last sub-grid with the bottom marker according to the vertical direction of the image. The question answer extraction optimization module 108 is used to determine the recognition scene corresponding to the target image of the psychological test paper answer sheet, determine whether it is a key recognition scene, and select a second image processing optimization strategy when it is determined to be a key recognition scene to complete the second image processing optimization; the second image processing optimization strategy includes: optimizing the blackening confidence calculation method to replace the original blackening confidence calculation method, and using the optimized blackening confidence calculation method to obtain the blackening confidence of each option; the optimized blackening confidence calculation method is obtained by weighted calculation of the ratio of the total area of non-zero pixels in the contour area of the option to the total area of the contour and the gray uniformity value in the contour area of the option.
[0069] This application also discloses a computer-readable storage medium.
[0070] Specifically, the computer-readable storage medium stores a computer program that can be loaded by a processor and executed, such as the vision-based psychological assessment paper answer sheet recognition method described above. The computer-readable storage medium includes, for example, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0071] This application also discloses a computer device.
[0072] Specifically, the computer device includes a memory and a processor. The memory stores a computer program that can be loaded by the processor and executed to perform the aforementioned vision-based psychological assessment paper answer sheet recognition method.
[0073] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.
Claims
1. A method for recognizing paper answer sheets in a psychological assessment based on visual processing, characterized in that, include: Obtain the target image of the psychological test paper answer sheet, and select the reference image of the psychological test paper answer sheet; Image correction is performed on the target image of the obtained psychological test paper answer sheet, including: preprocessing and feature point extraction and matching of the reference image and the target image, estimating the homography matrix and performing perspective transformation through homography matrix calculation to correct the target image; Based on the pre-configured region parameters, the identity identification region and each question region in the corrected target image are located; the pre-configured region parameters are determined based on the format of the psychological test paper answer sheet in the reference image; A first image processing is performed on the located identity identification area to extract identity identification information; the first image processing includes: region binarization processing; completing the region parent-child grid division according to the preset number of identity identifications and completing the sequential mapping of the parent grid with the identity identifications, and mapping each child grid with a single identity identification character; counting the number of non-zero pixels in the child grid, obtaining the identity identification character corresponding to the child grid with the most non-zero pixels in each parent grid and combining them. A second image processing step is performed on each question region to extract the answers to each question. This second image processing includes: dynamically locating the region of each question based on pre-configured question region parameters; region binarization; performing morphological operations on each question region to query the contours of all options and map them to the corresponding question number and option; obtaining the blackening confidence score of each option, comparing it with the blackening confidence scores of other options within the same question region, and comparing it with a blackening confidence score threshold; determining the question answer based on the comparison results, including: for single-choice questions, selecting the option with the highest blackening confidence score and not lower than the blackening confidence score threshold; for multiple-choice questions, selecting the option with a blackening confidence score not lower than the blackening confidence score threshold; the blackening confidence score is obtained by calculating the ratio of the total area of non-zero pixels within the contour region of the option to the total area of the contour region; the pre-configured question region parameters are determined based on the format of a psychological assessment paper answer sheet in a reference image.
2. The method for recognizing paper answer sheets for psychological assessments based on visual processing as described in claim 1, characterized in that, The second image processing for extracting the answers to each question by blackening the confidence threshold for each question also includes: A dynamic blackening confidence threshold is set; the dynamic blackening confidence threshold is calculated by combining a preset blackening confidence threshold with an adjustment value for multiple writing influencing factors; wherein, multiple writing influencing factors include: option type influencing factors, option content and question difficulty influencing factors, and question location influencing factors; the option type influencing factors include: question type and option marking range type; the option content and difficulty influencing factors include: whether it involves sensitive issues and the difficulty level of the question; the question location influencing factors include: the location of the question area on the answer sheet; each type of writing influencing factor has a corresponding threshold adjustment value, and the final multiple writing influencing factor threshold adjustment value is obtained by combining the calculations; By combining the reference image of the paper answer sheet for the psychological test, we can determine the multiple writing influencing factors corresponding to the current question area and their corresponding writing influencing factor threshold adjustment values, calculate the blackening confidence threshold corresponding to the current question area, and then complete the comparison.
3. The method for recognizing paper answer sheets for psychological assessments based on visual processing as described in claim 1, characterized in that, Also includes: Verification of extracted identity information includes: The system acquires character setting rules based on identity information, determines whether the characters in the currently extracted identity information conform to the character setting rules, and if it determines that they do not conform to the character setting rules, acquires the number of characters that do not conform to the character setting rules and triggers identity information verification; based on the size of the range of the acquired number of characters that do not conform to the character setting rules, it matches different verification strategies, including: a strategy to reacquire identity information if it matches the first range, a strategy to extract identity information based on multi-angle target images if it matches the second range, and a strategy to extract identity information based on multi-angle target images and multi-scale images if it matches the third range; wherein the first range, the second range, and the third range increase sequentially.
4. The method for recognizing paper answer sheets for psychological assessments based on visual processing as described in claim 1, characterized in that, Also includes: The answers to each extracted question are verified and corrected, including: The answers to each question are verified and corrected using user writing habits. This includes: when there are multiple options for a single-choice question with the highest blackening confidence and a difference of less than a preset difference from the blackening confidence threshold, the writing characteristics of user habits obtained from historical user writing habits are combined, including: the average gray value of non-zero pixels in the contour region representing writing intensity, and the area of non-zero pixels and contour proportion in the contour region representing completeness; combined with the blackening confidence of the selected option, the writing characteristics of the corresponding option are determined, and the option with the highest similarity to the writing characteristics of user habits and greater than a preset similarity is obtained to correct the extracted question answers. The process involves verifying and correcting the extracted answers to each question using a rule base for association between the answers. This includes: pre-constructing a rule base for association between the answers to each question, including rules for skipping questions, conflicting rules, and positive / negative correlation rules; verifying whether the extracted answers conform to these rules based on the rule base; marking questions that do not conform to these rules and adjusting the confidence threshold for blackening them, and re-extracting the answers; generating a manual correction prompt if the re-extracted answers still do not conform to these rules; and calculating the correlation coefficient for each extracted set of answers based on the positive / negative correlation rules in the rule base. If the correlation coefficient for each question is lower than a preset value, marking the question and adjusting the confidence threshold for blackening them, and re-extracting the answers; generating a manual correction prompt if the re-extracted answers still do not conform to these rules.
5. The method for recognizing paper answer sheets for psychological assessments based on visual processing as described in claim 1, characterized in that, Image correction for the target image of the obtained psychological assessment paper answer sheet also includes: The target image is input into an image correction level recognition model constructed using deep learning to obtain the correction level of the target image, including: primary correction based on the presence of rotation, offset and perspective distortion in the image, intermediate correction based on the presence of folding, tearing and lighting interference in the image, and advanced correction based on the presence of multiple pages sticking together and jitter blur in the image; the image correction level recognition model uses a deep neural network and is generated by training on images with historically labeled correction levels. Based on the correction level of the acquired target image, a corresponding correction strategy is matched, including: a first correction strategy matching the initial correction, a second correction strategy matching the intermediate correction, and a third correction strategy matching the advanced correction. The first correction strategy includes: preprocessing and extracting and matching feature points for the reference image and the target image, estimating the homography matrix, and performing perspective transformation to correct the target image by calculating the homography matrix. The second correction strategy includes: pre-completing the target image using deep learning algorithms or completing the target image illumination compensation using optical correction techniques before continuing to execute the first correction strategy. The third correction strategy includes: pre-identifying the boundaries of overlapping answer sheets through edge density detection, segmenting single pages by combining connected component analysis, restoring the blurred areas caused by jitter based on fuzzy kernel estimation and natural image prior techniques, and then continuing to execute the first correction strategy.
6. The method for recognizing paper answer sheets for psychological assessments based on visual processing as described in claim 1, characterized in that, Also includes: Obtain the current test subject of the answer sheet, and divide the recognition scenario according to the test subject, including: basic recognition scenario for the general public and key recognition scenario for the marked key groups of interest; The system determines the recognition scene corresponding to the target image of the psychological assessment paper answer sheet, judges whether it is a key recognition scene, and selects a first image processing optimization strategy to complete the first image processing optimization when it is judged to be a key recognition scene. The first image processing optimization strategy includes: in the process of mapping the parent grid with the identity identifier, adding marker points on the leftmost and rightmost sides of the grid area according to the horizontal direction of the image, locating the marker points by matching the reference image, aligning the first parent grid with the left marker according to the horizontal direction of the image, and aligning the last parent grid with the right marker according to the horizontal direction of the image; in the process of mapping each sub-grid with a single identity identifier character, adding marker points on the topmost and bottommost sides of the grid area according to the vertical direction of the image, locating the marker points by matching the reference image, aligning the first parent grid with the top marker according to the vertical direction of the image, and aligning the last sub-grid with the bottom marker according to the vertical direction of the image.
7. The method for recognizing paper answer sheets for psychological assessments based on visual processing as described in claim 6, characterized in that, Also includes: Determine the recognition scene corresponding to the target image of the psychological test paper answer sheet, determine whether it is a key recognition scene, and if it is a key recognition scene, select the second image processing optimization strategy to complete the second image processing optimization. The second image processing optimization strategy includes: optimizing the blackening confidence calculation method to replace the original blackening confidence calculation method, and using the optimized blackening confidence calculation method to obtain the blackening confidence of each option; The optimized blackening confidence calculation method is obtained by weighting the ratio of the total area of non-zero pixels in the outline region of the option to the total outline area and the grayscale uniformity value in the outline region of the option.
8. A paper-based answer sheet recognition system for psychological assessment based on visual processing, characterized in that, include: A target image acquisition model is used to acquire the target image of the psychological test paper answer sheet and select the reference image of the psychological test paper answer sheet; The target image correction model is used to correct the target image of the acquired psychological test paper answer sheet. It includes: preprocessing the reference image and the target image and extracting and matching the feature points, estimating the homography matrix and performing perspective transformation through the homography matrix to correct the target image. An image region localization model is used to locate the identity identification region and each question region in the corrected target image according to pre-configured region parameters; the pre-configured region parameters are determined based on the format of the psychological test paper answer sheet in the reference image; The identity information extraction module is used to perform first image processing on the located identity region to extract identity information; the first image processing includes: region binarization processing; completing the region parent-child grid division according to the preset number of identity identifiers and completing the sequential mapping of the parent grid with the identity identifiers, and mapping each child grid with a single identity identifier character; counting the number of non-zero pixels in the child grids, obtaining the identity identifier character corresponding to the child grid with the most non-zero pixels in each parent grid and combining them. The question answer extraction module is used to perform second image processing on each question region to extract the answer to each question. The second image processing includes: dynamically locating the region of each question according to pre-configured question region parameters; region binarization processing; performing morphological operations on each question region, querying the contours of all options and mapping them to the corresponding question number and option; obtaining the blackening confidence of each option, comparing it with the blackening confidence of other options in the same question region and comparing it with the blackening confidence threshold, and determining the question answer based on the comparison result, including: for single-choice questions, selecting the option with the highest blackening confidence and not lower than the blackening confidence threshold, and for multiple-choice questions, selecting the option with a blackening confidence not lower than the blackening confidence threshold; the blackening confidence is obtained by calculating the ratio of the total area of non-zero pixels in the contour region of the option to the total area of the contour; the pre-configured question region parameters are determined based on the format of the psychological test paper answer sheet in the reference image.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the method as described in any one of claims 1 to 7.
10. A computer device, characterized in that, The computer device includes a memory, a processor, and a program stored in and executable on the memory, the program being executed by the processor to implement the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Recognition method and system for image without positioning points in intelligent examination paper appraisal system
CN107506746A
Automatic paper marking method and system based on feature recognition
CN110689013A
Automatic paper marking method based on computer vision
CN111666864A
Objective question marking method and device based on answer sheet, equipment and storage medium
CN113033480A
Answer sheet identification method and system based on deep learning
CN113657354A