Psychological general measurement paper answer sheet recognition method and system based on visual processing

By using 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, and the automation, accuracy and robustness of answer sheets of different formats have been improved.

CN120997862BActive Publication Date: 2026-02-06JIANGSU ZHUODUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511516654.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-02-06
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

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 robustness.

Method used

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 answer sheets of different formats, extracts identity information and question answers, and uses a deep learning model to handle complex image distortion.

Benefits of technology

It has achieved automation, improved accuracy and flexibility in paper-based psychological testing answer sheets, adapted to various scanning deviations and layout changes, reduced recognition costs, and improved the accuracy and reliability of information extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997862B_ABST
    Figure CN120997862B_ABST
Patent Text Reader

Abstract

The application discloses a psychological general measurement paper answer sheet recognition method and system based on visual processing. The method comprises the following steps: acquiring a target image and correcting it; positioning a specific region in the corrected target image; performing first image processing on the positioned identity identification region to extract identity identification information, including region binary processing and grid division, and completing grid and identity identification information mapping; counting the number of non-zero pixels of the grid to extract the identity identification information; performing second image processing on each question region to extract the answers of each question, including dynamically positioning the region of a single question and binary processing; performing morphological operation on the region of a single question, querying the contours of all options and mapping them to corresponding question numbers and options; acquiring the blackening confidence of each option, comparing the blackening confidence with each other and comparing the blackening confidence with a blackening confidence threshold, and determining the answers of the questions. The application can improve the flexibility and accuracy of psychological general measurement paper answer sheet recognition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition and data processing, in particular to a psychological mass testing paper answer sheet recognition method and system based on visual processing. BACKGROUND

[0002] In the field of psychological mass testing screening, accurately and efficiently obtaining the answer information of the testee on the paper answer sheet is crucial. With the development of education, psychological assessment and other industries, the demand for large-scale psychological mass testing is increasing, and the answer sheet recognition technology is also evolving. Its development promotes the automation and informatization process of psychological mass testing, improves work efficiency, reduces errors caused by manual intervention, provides more reliable data support for psychological assessment and analysis, and plays an important role in education and teaching quality evaluation, student psychological health screening, etc.

[0003] In traditional psychological mass testing paper answer sheet recognition, professional answer sheet scanners and matching special answer sheets are usually used for information collection. This method relies on pre-set, fixed answer sheet templates or corner point coordinates to read the filled information on the answer sheet through specific optical recognition technology. At the same time, the traditional algorithm needs to be highly coupled with the style of the answer sheet, such as the accurate position, number, size of the option box, which needs to be accurately matched with the algorithm.

[0004] However, the existing technology has many defects. First, professional answer sheet scanners are expensive and require special answer sheets, increasing the overall use cost. Second, the traditional solution relies heavily on pre-set templates and corner point coordinates, and when scanning appears rotation, offset, perspective distortion or uses different specifications of answer sheets, it is difficult to automatically and accurately correct, which can easily lead to positioning failure or subsequent recognition errors. Third, it has poor flexibility and generalization, and the algorithm cannot adaptively process answer sheets with multiple layouts, and any style change requires re-adjustment of parameters or templates, which has high maintenance cost. SUMMARY

[0005] In order to improve the robustness, flexibility and accuracy of psychological mass testing paper answer sheet information recognition, the present application provides a psychological mass testing paper answer sheet recognition method and system based on visual processing.

[0006] In a first aspect, the present application provides a psychological mass testing paper answer sheet recognition method based on visual processing, comprising:

[0007] obtaining a target image of a psychological mass testing paper answer sheet, and selecting a reference image of the psychological mass testing paper answer sheet;

[0008] The target image of the obtained psychological general measurement paper answer sheet is corrected, including: pre-processing and feature point extraction and matching of the reference image and the target image, estimating a homography matrix and performing perspective transformation through the homography matrix to correct the target image;

[0009] According to the pre-configured area parameters, the identity identification area and each question area in the corrected target image are located; the pre-configured area parameters are determined based on the format of the reference image center psychological general measurement paper answer sheet;

[0010] The first image processing is performed on the located identity identification area to extract the identity identification information; the first image processing includes: region binary processing; completing the parent-child grid division of the region and the mapping of the parent grid and the identity identification order, and each child grid is mapped with a single identity identification character; the number of non-zero pixels of the child grid is counted, the identity identification character corresponding to the child grid with the largest number of non-zero pixels in each parent grid is obtained, and the identity identification characters are combined;

[0011] The second image processing is performed on each question area to extract the answers of each question; the second image processing includes: dynamically positioning to the area of each question according to the pre-configured question area parameters; region binary processing; morphological operation is performed on each question area, the contours of all options are queried and mapped to the corresponding question number and option; the blackening confidence of each option is obtained, compared with the blackening confidence of other options in the question area, and compared with the blackening confidence threshold, and the question answer is determined according to the comparison result, including: single-choice question selects the option with the highest blackening confidence and not lower than the blackening confidence threshold, and multiple-choice question selects the option 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 area of the option to the total area of the contour; the pre-configured question area parameters are determined based on the format of the reference image center psychological general measurement paper answer sheet.

[0012] By using the above scheme, the target image of the psychological general measurement paper answer sheet is corrected, which is suitable for various scanning deviations, gets rid of the dependence on fixed templates, accurately locates the identity identification area and the question area, accurately extracts the identity identification information and the question answer, reduces the cost, and improves the robustness, flexibility and accuracy of identification.

[0013] Preferably, the second image processing is performed on each question area according to the blackening confidence threshold to extract the answers of each question, which further includes:

[0014] A dynamic blackening confidence threshold is set, and the dynamic blackening confidence threshold is obtained by presetting a blackening confidence threshold and a multi-marking influence factor threshold adjustment value; wherein the multi-marking influence factors include: an option type influence factor, an option content and question difficulty level influence factor, and a question position influence factor; the option type influence factor includes: a question type and an option marking range type; the option content and difficulty level influence factor includes: whether sensitive issues are involved and a question difficulty level; and the question position influence factor includes: a position of a question area on a test paper; each type of marking influence factor corresponds to a threshold adjustment value, and a final multi-marking influence factor threshold adjustment value is obtained by merging calculation.

[0015] In combination with a reference image of a psychological general test paper test paper, the multi-marking influence factors corresponding to the current question area and the marking influence factor threshold adjustment values corresponding thereto are determined, the blackening confidence threshold corresponding to the current question area is calculated, and comparison is completed.

[0016] By using the above scheme, a dynamic blackening confidence threshold is set, the option type, the option content and the question difficulty level, the question position and other multi-marking influence factors are considered, the marking influence factors corresponding to each question area and the threshold adjustment values corresponding thereto are determined in combination with a reference image to calculate the blackening confidence threshold, and the accuracy and reliability of answer recognition are further improved.

[0017] Preferably, it further includes: verifying the extracted identity information, including:

[0018] Obtaining a character setting rule based on the identity information, determining whether the characters of the current extracted identity information conform to the setting of the character setting rule, when it is determined that the characters do not conform to the setting of the character setting rule, obtaining the number of characters that do not conform to the character setting rule and triggering identity information verification; according to the size of the range in which the number of characters that do not conform to the character setting rule is located, different verification strategies are matched; including: a reacquired identity information strategy matched with a first number range, an identity information extraction strategy based on a multi-angle target image matched with a second number range, and an identity information extraction strategy based on a multi-angle target image and a multi-scale image matched with a third number range; wherein the first number range, the second number range, and the third number range increase in order.

[0019] By using the above scheme, the extracted identity information can be verified, and whether it conforms to the setting is determined according to the character setting rule; if it does not conform, different verification strategies are matched according to the range in which the number of characters that do not conform is located, the accuracy and reliability of identity information extraction are improved.

[0020] Preferably, it further includes: verifying the extracted answers of each question, including:

[0021] The extracted answers of each question are verified and corrected by using the user writing habits, including: when there are multiple options with the highest blackening confidence and the difference with the blackening confidence threshold is less than a preset difference, the user habit writing features obtained from the historical user writing habits are combined, including: the gray mean of the non-zero pixels in the outline area representing the writing force, and the outline area ratio of the non-zero pixel area representing the integrity; the writing features of the corresponding options are determined by combining the blackening confidence of the selected options, and the option with the highest similarity and greater than a preset similarity between the writing features in the corresponding option and the user habit writing features is obtained to correct the extracted question answers;

[0022] The extracted answers of each question are verified and corrected by using the association rule library between the answers of each question, including: the association rule library between the answers of each question is constructed in advance, including: the skip question logical rule, the conflict logical rule and the positive and negative correlation logical rule; whether the extracted answers of each question meet the skip question logical rule and the conflict logical rule is verified according to the skip question logical rule and the conflict logical rule in the association rule library, and when there are question answers that do not meet the skip question logical rule or the conflict logical rule, the corresponding question is marked and the blackening confidence threshold is adjusted, and the extraction of the corresponding question answers is performed again, and when the re-extracted question answers still have question answers that do not meet the skip question logical rule or the conflict logical rule, a manual correction prompt is generated; the correlation coefficient of the answers of several copies of each question is calculated, and when the correlation coefficient of the answers of each question is lower than a preset correlation coefficient value, the corresponding question is marked and the blackening confidence threshold is adjusted, and the extraction of the corresponding question answers is performed again, and when the re-extracted question answers still have question answers that do not meet the skip question logical rule or the conflict logical rule, a manual correction prompt is generated.

[0023] By using the above scheme, the extracted question answers are verified and corrected from multiple dimensions such as user writing habits and question association rules, the problems of single-choice questions with multiple highest blackening confidence options and question answers not meeting the rules are solved, and the accuracy and reliability of the answer extraction are improved.

[0024] Preferably, the image correction of the obtained target image of the psychological test paper answer sheet also includes:

[0025] The target image is input into an image correction level recognition model constructed by deep learning to obtain the correction level of the target image, including: primary correction based on rotation, offset and perspective distortion of the image, intermediate correction based on folding, tearing and light interference of the image, and advanced correction based on multi-page adhesion, shaking and blurring of the image; the image correction level recognition model selects a deep neural network and is generated by training historical labeled correction level images;

[0026] Based on the obtained correction level of the target image, a corresponding matching correction strategy is adapted, 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: pre-processing and feature point extraction and matching of the reference image and the target image, estimating the homography matrix and performing perspective transformation through the homography matrix calculation to correct the target image; the second correction strategy includes: pre-completing the target image using a deep learning algorithm or completing the target image light compensation using an optical correction technology, and then continuing to execute the first correction strategy; the third correction strategy includes: pre-identifying the overlapping answer sheet boundary through edge density detection, and combining connected component analysis to segment a single page; based on the blur kernel estimation and natural image prior technology, the blur area caused by shaking is restored, and then the first correction strategy is continued.

[0027] By adopting the above scheme, the image correction level recognition model constructed by deep learning is used to distinguish the correction level of the target image, and the correction strategy is matched and adapted according to different correction levels, so that the image has multiple problems, and the accuracy and adaptability of image correction are further improved.

[0028] Preferably, it further comprises:

[0029] The current answer sheet is obtained, and the recognition scene is divided according to the test object, including: a basic recognition scene for the general object, and a key recognition scene for the marked key focus group;

[0030] The target image of the obtained psychological general test paper answer sheet is determined, and it is judged whether it is a key recognition scene, and when it is judged to be a key recognition scene, a first image processing optimization strategy is selected to complete the first image processing optimization; the first image processing optimization strategy includes: in the process of mapping the parent grid and the identity mark in order, mark points are added on the leftmost and rightmost sides of the grid area according to the horizontal direction of the image, the mark points are positioned by reference image matching, the first parent grid according to the horizontal direction of the image is aligned with the left mark, and the last parent grid according to the horizontal direction of the image is aligned with the right mark; in the process of mapping each sub-grid and a single identity character, mark points are added on the top and bottom edges of the grid area according to the vertical direction of the image, the mark points are positioned by reference image matching, the first parent grid according to the vertical direction of the image is aligned with the top mark, and the last sub-grid according to the vertical direction of the image is aligned with the bottom mark.

[0031] By adopting the above scheme, the recognition scene is divided according to the test object of the answer sheet, the first image processing optimization strategy is used for the key recognition scene, the mark points are used to forcibly align the grid, and the accuracy and stability of the identity information extraction are improved.

[0032] Preferably, it also includes:

[0033] The recognition scene corresponding to the target image of the psychological test paper answer sheet is determined, and it is judged whether it is a key recognition scene. When it is judged as a key recognition 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 obtains the ratio of the total area of non-zero pixels in the contour area of the option to the total contour area and the gray uniformity value in the contour area of the option by weighted calculation.

[0034] By using the above scheme, the blackening confidence calculation method is optimized in the key recognition scene, the proportion of non-zero pixels in the contour of the option and the gray uniformity value are comprehensively considered, and the accuracy and reliability of answer recognition are further improved.

[0035] In a second aspect, the present application provides a psychological test paper answer sheet recognition system based on visual processing, comprising:

[0036] A target image acquisition model is used to acquire a target image of a psychological test paper answer sheet, and a reference image of the psychological test paper answer sheet is selected.

[0037] A target image correction model is used to correct the target image of the psychological test paper answer sheet, including: pre-processing and feature point extraction and matching of the reference image and the target image, estimating a homography matrix and performing perspective transformation through the homography matrix to correct the target image.

[0038] An image region positioning model is used to position 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 reference image of the psychological test paper answer sheet.

[0039] An identity identification information extraction module is used to perform first image processing on the positioned identity identification region to extract identity identification information; the first image processing includes: region binaryzation processing; completing parent-child grid division according to a preset identity identification quantity and completing mapping of the parent grid and the identity identification order, each child grid being mapped with a single identity identification character; counting the number of non-zero pixels of 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.

[0040] The title answer extraction module is configured to perform second image processing on each of the title regions to extract answers of each of the titles, wherein the second image processing comprises: dynamically positioning to the region of each of the titles according to preconfigured title region parameters; region binarization processing; performing morphological operation on each of the title regions to query the contours of all the options and map the contours to corresponding title numbers and options; obtaining the blackening confidence of each of the options, comparing the blackening confidence with the blackening confidence of other options in the title region, and comparing the blackening confidence with a blackening confidence threshold, and determining the title answer according to the comparison results, including: for a single-choice title, selecting the option with the highest blackening confidence and not lower than the blackening confidence threshold, and for a multiple-choice title, selecting the option 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 to the total area of the contour; and the preconfigured title region parameters are determined based on the format of the reference image center psychological paper-based answer sheet.

[0041] By using the above scheme, the target image is corrected to adapt to various scanning deviations, the identity identification region and the title region are accurately positioned, the identity identification information and the title answer are accurately extracted, and the automation degree, accuracy and reliability of recognition are improved, and the answer sheet of different formats can be adapted.

[0042] In a third aspect, a computer readable storage medium is provided, which includes a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to perform the method as described above when the computer program is run.

[0043] In a fourth aspect, a computer device is provided, which includes a memory, a processor and a program stored in the memory and executable by the processor, and the program is executed by the processor to implement the steps of the method as described above.

[0044] In summary, the present application has the following beneficial effects:

[0045] 1. Perspective transformation is performed by feature point matching and homography matrix calculation to adapt to various scanning deviations, to automatically correct the target image; meanwhile, region binarization processing, gridding and mapping processing, morphological operation, dynamic blackening confidence calculation and comparison, etc. are used to effectively exclude interference, improve information recognition accuracy and reliability; a configuration file is used to define the recognition region, different formats and layouts of answer sheets are adapted, and the flexibility of recognition is improved.

[0046] 2. Verify the extracted identity information, judge whether the extracted identity information meets the requirements according to the character setting rules, when it does not meet the requirements, match different verification strategies according to the range of the number of characters that do not meet the requirements, improve the accuracy and reliability of the extraction of identity information; use user writing habits, topic association rule base to verify and correct the extracted topic answer, improve the accuracy and reliability of the extraction of topic answer;

[0047] 3. According to the test object of the answer sheet, divide the recognition scene, can distinguish the basic recognition scene and the key recognition scene, for the key recognition scene, adopt the first image processing optimization strategy and the second image processing optimization strategy, improve the accuracy of image recognition. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 The flow chart of the psychological general measurement paper answer sheet recognition method based on visual processing in the specific embodiment is described.

[0049] Figure 2 The diagram of the answer sheet recognition using the psychological general measurement paper answer sheet recognition method based on visual processing in the specific embodiment is described.

[0050] Figure 3 The structure schematic diagram of the psychological general measurement paper answer sheet recognition system based on visual processing in the specific embodiment is described. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the 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.

[0052] As shown in Figure 1 The embodiment of the present application discloses a psychological general measurement paper answer sheet recognition method based on visual processing, which includes target image acquisition, target image correction, target image region positioning, identity information extraction and topic answer extraction and several links. Each link in the present application is described in further detail below.

[0053] S1, acquire the target image and the reference image of the psychological general measurement paper answer sheet.

[0054] Specifically, the image acquisition device is used to collect the target image of the psychological general measurement paper answer sheet. In order to further ensure the accuracy of the psychological general measurement paper answer sheet recognition, a plurality of image acquisition devices can be selected to collect the target image from multiple angles and multiple scales.

[0055] In order to abandon the dependence on fixed templates, a feature point matching and RANSAC algorithm are selected to automatically adapt to various scanning deviations, correct the target image, and then the reference image needs to be acquired; a reference answer sheet image gallery of different formats, sizes and types can be provided, and an operation interface is designed to allow users to select reference images from the reference answer sheet image gallery.

[0056] S2, image correction is performed on the acquired target image of the psychological general measurement paper answer sheet.

[0057] Specifically, in this embodiment, image geometric correction is taken as an example, and image correction includes preprocessing and feature point extraction and matching of the reference image and the target image, and perspective transformation is performed through homography matrix calculation to correct the target image.

[0058] In preprocessing, the image can be first converted into a grayscale image, and then Gaussian blur and bilateral filtering are used in sequence, Gaussian blur is used to smooth image noise, and bilateral filtering is used to smooth noise while preserving important edge features, or grayscale conversion is performed after filtering.

[0059] In feature point extraction, an ORB feature detector is used to detect key points and calculate their descriptors in the reference image and the target image. A brute force matcher is used for feature point matching, and Hamming distance is used as a similarity measure. Then, the RANSAC algorithm is used to estimate the homography matrix from the matched point pairs to eliminate false matches. Finally, the homography matrix is used to perform perspective transformation on the target image to align it to the coordinate system of the reference image, and the corrected standard image is obtained. The ORB feature detector can also be replaced by a SIFT (Scale-Invariant Feature Transform) feature detector, and the brute force matcher can also be replaced by a FLANN (Fast Library for Approximate Nearest Neighbors) matcher.

[0060] S3, according to the preconfigured region parameters, the identity identification region and each question region in the corrected target image are located.

[0061] Specifically, the region positioning step is to locate the identity identification region and each question region in the corrected target image according to the preconfigured region parameters. The preconfigured region parameters are determined based on the format of the reference image of the psychological general measurement paper answer sheet. These parameters can be marked on the reference image by manual operation, or automatically acquired by using image analysis algorithms.

[0062] S4, first image processing is performed on the located identity identification region to extract identity identification information.

[0063] Specifically, on the corrected image, the identity identification region can be accurately positioned according to the preconfigured coordinate region, such as the student number filling region; the first image processing is performed on the positioned identity identification region, including: first, binaryzation processing is performed to convert the image into a black and white binary image, which is convenient for subsequent processing. Then, the region parent-child grid division is completed according to the preset identity identification quantity. The identity identification region is generally arranged according to the quantity of identity identification information (horizontally), and the same identity identification filling options are set in each column to allow the user to select and fill a single identity identification information; for example, as shown in FIG. 8, taking the student number filling region as an example, the student number has a total of 10 digits, and each digit corresponds to a designed number or character (0-9 and X); correspondingly, the region parent grid is divided into a corresponding number (10) of parent grids according to the (preset) quantity of identity identification information filling, and each parent grid is divided into a corresponding number (10) of child grids according to the default option quantity of a single identity identification information. Figure 2

[0064] Then, the parent grid and the identity identification order mapping are completed, that is, each parent grid is one-to-one mapped with a single order of the identity identification, for example, the first parent grid is mapped to the first order of the identity identification according to the horizontal direction of the image (after geometric correction); each child grid and a single identity identification character are mapped, that is, each child grid is one-to-one mapped with a single default option (generally with a preset default option sequence) of the identity identification information, for example, the first child grid is mapped to the first default option (0) of the identity identification information according to the vertical direction of the image (after geometric correction).

[0065] Finally, the non-zero pixel quantity of the child grid is counted, which represents the effective information in the child grid, that is, the content filled by the user in the corresponding region. The more the non-zero pixel quantity is, the more the content filled by the user is. The identity identification information option mapped by this child grid is selected by the user. The identity identification character corresponding to the child grid with the largest non-zero pixel quantity in each parent grid is obtained and combined, that is, the mapped identity identification information is combined according to the parent grid mapping sequence, for example, the identity identification information: student number 202314052X is extracted.

[0066] S5, the second image processing is performed on each question region to extract the answers of each question.

[0067] Specifically, the region positioning, contour acquisition, confidence calculation and comparison are performed on each question region to determine the final answer; correspondingly

[0068] ​The second image processing comprises: firstly, dynamically positioning to 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 reference image centering on the paper answer sheet, and the parameters can be marked on the reference image manually or automatically acquired by using image analysis algorithm.

[0069] Then, after accurately positioning each question region according to the pre-configured question coordinate region, the region binarization processing is performed to convert the image into a black and white binary image, which is convenient for subsequent processing. Then, morphological operations are performed on each question region, such as closed operation to fill holes and open operation to remove noise points, and the contours of all options are queried. Then, for the contour of each option, the circumscribed rectangle and the centroid coordinates are calculated, and the positions of different question numbers and options in the reference image are mapped to the corresponding question numbers and options. Next, the calculation method of the blackening confidence of each option is set, and the blackening confidence of each option is calculated and acquired; wherein the blackening confidence is obtained by calculating the ratio of the total area of non-zero pixels in the contour region to the total area of the contour, such as: the total area of non-zero pixels in the current contour region accounts for 3 / 4 of the total area of the contour, and the blackening confidence is 0.75.

[0070] Finally, for the blackening confidence of each option, the blackening confidence of other options in the question region is compared and compared with the blackening confidence threshold, and the question answer is determined according to the comparison result. Wherein, the type of the current option is determined according to the question number corresponding to the current question region, and for different types of options, the single-choice question only selects the option with the highest blackening confidence, that is, the blackening confidence of each option in the corresponding question region is compared, and the option with the highest blackening confidence is selected, that is, the single answer written by the user of the corresponding question is obtained; the multiple-choice question selects the option not lower than the blackening confidence threshold, then ignores the comparison result, and only selects the option not lower than the blackening confidence threshold, that is, the multiple answers written by the user of the corresponding question are obtained.

[0071] In addition, in order to further guarantee the accuracy of the answers written by the user of the corresponding question, considering various writing factors, the dynamic blackening confidence threshold is set to more accurately judge whether the option is blackened,

[0072] The second image processing for the blackening confidence threshold of each question region to extract the answers of each question further comprises: setting a dynamic blackening confidence threshold; the blackening confidence threshold is obtained by combining the blackening confidence threshold reference value and the multiple writing influence factor threshold adjustment value.

[0073] Specifically, the multiple marking factors include: option type influencing factor, option content and question difficulty influencing factor, and question position influencing factor; the option type influencing factor includes: question type, option marking range type, etc.; the option content and question difficulty influencing factor includes: whether involving sensitive issues, question difficulty, etc.; the question position influencing factor includes: the position of the question area on the answer sheet, etc.; wherein, each type of marking influencing factor is provided with a threshold adjustment value, and the final multiple marking influencing factor threshold adjustment value is obtained by merging calculation or weighted calculation (weighting for each type).

[0074] In this embodiment, each type of marking influencing factor is provided with a threshold adjustment value, including: for single selection, usually single option is marked black, which is considered as a regular case, and the threshold adjustment value is 0; for multiple selection, there are multiple options to mark, and single option marking may be more hasty, and the threshold adjustment value is -1; for the option marking range type, if it is a preset large frame marking type, the threshold adjustment value is +2; if it is a preset regular frame marking type, the threshold adjustment value is +0; if it is a preset small frame marking type, the threshold adjustment value is -2; for the option content or difficult question (which can be determined according to the question number in advance) involving sensitive issues, marking will be more frequent, and the threshold adjustment value is -2; for the option content or easy question (which can be determined according to the question number in advance) not involving sensitive issues, marking will be more frequent, and the threshold adjustment value is 0; for the question area on the answer sheet, marking will not be hasty, and the threshold adjustment value is 0; for the question area in the latter half of the answer sheet, marking will be more hasty, and the threshold adjustment value is -2.

[0075] In combination with the reference image of the psychological test paper answer sheet, the multiple marking influencing factor corresponding to the current question area (determined according to the question number of the current question) and the corresponding marking influencing factor threshold adjustment value are determined, the black marking confidence threshold value corresponding to the current question area is calculated, and confidence comparison is assisted in subsequent processes.

[0076] By using the method described in the above embodiment, information extraction can be obtained from image through a series of image processing steps, and automatic and accurate recognition of the psychological test paper answer sheet is realized.

[0077] In one specific embodiment, in order to timely find and correct errors in the identity information extraction process or errors in the answer extraction process of each question, a process of extracting information verification and correction is further designed to improve the accuracy of recognition, and the method further includes:

[0078] First, the extracted identity information is verified from the aspects of whether the identity information is missing data and whether the identity information is inconsistent with the specified design, and the verification is specifically as follows:

[0079] Obtaining a character quantity rule based on the identity information, judging whether the character quantity of the current extracted identity information conforms to the setting of the character quantity rule, such as a preset character quantity rule of 10 characters; when judging that it does not conform to the setting of the character quantity rule, such as the character quantity of the current extracted identity information being 9 characters, obtaining the character quantity that does not conform to the character quantity rule and triggering identity information quantity verification; according to the size of the quantity range in which the obtained character quantity that does not conform to the character quantity rule is located, corresponding matching is performed on different verification strategies; including: matching a reacquired identity information strategy in a first quantity range (such as 1-5), matching an identity information extraction strategy based on a multi-angle target image in a second quantity range (such as 6-10), and matching an identity information extraction strategy based on a multi-angle target image and a multi-scale image in a third quantity range (such as greater than 10); such as the character quantity that does not conform to the character quantity rule being 1, corresponding to the first quantity range, matching the reacquired identity information strategy, and re-identifying the identity information; and after matching the verification strategy, if the re-identification of the identity information still triggers the identity information quantity verification, a manual correction prompt is generated.

[0080] Obtaining a character quantity rule based on the identity information, judging whether the character quantity of the current extracted identity information conforms to the setting of the character quantity rule, such as a preset character quantity rule of 10 characters; when judging that it does not conform to the setting of the character quantity rule, such as the character quantity of the current extracted identity information being 9 characters, obtaining the character quantity that does not conform to the character quantity rule and triggering identity information quantity verification; according to the size of the quantity range in which the obtained character quantity that does not conform to the character quantity rule is located, corresponding matching is performed on different verification strategies; including: matching a reacquired identity information strategy in a first quantity range (such as 1-5), matching an identity information extraction strategy based on a multi-angle target image in a second quantity range (such as 6-10), and matching an identity information extraction strategy based on a multi-angle target image and a multi-scale image in a third quantity range (such as greater than 10); such as the character quantity that does not conform to the character quantity rule being 1, corresponding to the first quantity range, matching the reacquired identity information strategy, and re-identifying the identity information; and after matching the verification strategy, if the re-identification of the identity information still triggers the identity information quantity verification, a manual correction prompt is generated.

[0081] Second, the answers to the extracted questions are verified and corrected, the answer verification and correction is completed from the user's writing habits, the logical association between the questions, and the multi-scale image verification, and the specific process is as follows:

[0082] The extracted answers of each question are verified and corrected by using the user's writing habits, including: when there are multiple options with the highest blackening confidence and the difference between the blackening confidence and the blackening confidence threshold is less than a preset difference (for example, the blackening confidence of options A and B of a question is the same, but both are closer to the blackening confidence threshold, and have a certain credibility), the user's writing habits are obtained by combining the user's writing habits obtained from the historical user's writing habits, including: the gray mean of the non-zero pixels in the contour area representing the writing force, and the contour area ratio of the non-zero pixels representing the integrity; by combining the blackening confidence of the selected corresponding option, the writing feature (such as: gray mean) of the corresponding option is determined by using image analysis technology, and the option with the highest similarity and greater than a preset similarity between the writing feature in the corresponding option and the user's writing habits is obtained, so as to correct the extracted question answer or; if there is no option with a preset similarity between the writing feature in the corresponding option and the user's writing habits, an artificial correction prompt is generated.

[0083] The extracted answers of each question are verified and corrected by using the association rule library between the answers of each question, including: according to the content of the question corresponding to the answer sheet, the association rule library between the answers of each question can be constructed in advance, including: skip question logic rules (such as: the logic between questions satisfies 1 (A) -3 (B) -6 (D)), conflict logic rules (such as: the logic between questions satisfies 1 (A) and 6 (C) cannot coexist), and positive and negative correlation logic (positive correlation: such as “headache” (Q3) and “muscle soreness” (Q8), represented as: (Q3, Q8, 0.8); negative correlation represented as: such as: (Q3, Q4, -0.7).

[0084] According to the skip question logic rules and the conflict logic rules in the association rule library, it is verified whether the extracted answers of each question meet the skip question logic rules and the conflict logic rules, and it is determined that there are question answers that do not meet the skip question logic rules or the conflict logic rules, the corresponding question is marked and the blackening confidence threshold is adjusted (which can be randomly selected to be increased or decreased), and the extraction of the corresponding question answers is performed again, and if the re-extracted question answers still have question answers that do not meet the skip question logic rules or the conflict logic rules, a manual correction prompt is generated; wherein, the neural network technology can be used to learn the answer sheet image data of the labeled question answers that meet and do not meet the skip question logic rules and the conflict logic rules, so as to construct a rule recognition neural network, to directly identify whether the currently extracted answers of each question meet the skip question logic rules and the conflict logic rules, and output the question answer combination that does not meet the skip question logic rules and the conflict logic rules.

[0085] According to the positive and negative correlation logical rules in the association rule base, the correlation coefficient is calculated for the extracted answers of each question (combined with the target parameters corresponding to the selected parameter image to extract the answers of each question), such as the answers between 3 Q3 and Q8. The Pearson correlation coefficient is calculated, and the correlation coefficient is 0.7. If the correlation coefficient of the answers of each question is lower than the preset correlation coefficient value (0.8), it indicates that the association between the two questions is weaker than the theoretical expectation, and there may be recognition errors. The corresponding question is marked (such as marked) and the blackening confidence threshold is adjusted (which can be randomly selected to increase or decrease). The answers of the corresponding questions are re-extracted or re-extracted for a preset number of times. If the re-extracted question answers still do not meet the positive and negative correlation logical rules, a manual correction prompt is generated.

[0086] In addition, in order to reduce the number of re-extracted answers, the corresponding question can be further focused on. According to the size of the blackening confidence of the marked question, the part of the question whose difference between the blackening confidence and the blackening confidence threshold is less than the preset difference is selected. It is assumed that this part of the question is the question that causes the recognition error. Focus on this part of the question and re-extract the answers of the corresponding questions.

[0087] The extracted answers of each question are verified by comparing the extracted answers based on target images of different scales. If the similarity of the extracted answers of each question based on target images of different scales is lower than the preset similarity, the blackening confidence threshold is adjusted. If the similarity of the extracted answers of each question based on target images of different scales is still lower than the preset similarity after re-extracting the question answers, a manual correction prompt is generated.

[0088] In one specific embodiment, in addition to rotation, shift, perspective distortion or use of different specifications of answer sheets during the target image correction process, there are other situations that need to be corrected, such as folding, partial tearing or exposure of the answer sheet; In order to better correct the image, the method further includes: correcting the target image of the obtained psychological test paper answer sheet, which further includes:

[0089] 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 image rotation, shift and perspective distortion, intermediate correction based on image (edge) folding, (edge) tearing and light interference, and advanced correction based on image multi-page adhesion, shaking and blur; The image correction level recognition model selects a deep neural network and is generated by training historical labeled correction level images.

[0090] Based on the obtained correction level of the target image, a corresponding matching correction strategy is adapted, including: a first correction strategy matched with initial correction, a second correction strategy matched with intermediate correction, and a third correction strategy matched with advanced correction; wherein the first correction strategy mainly applies to the case of geometric deviation such as image rotation, offset and perspective distortion, and the first correction strategy can be directly set to include: pre-processing and feature point extraction and matching of the reference image and the target image, estimation of the homography matrix, and execution of perspective transformation through the homography matrix calculation to correct the target image.

[0091] The second correction strategy mainly applies to the case of physical deformation or optical interference such as image folding, tearing and light interference, considers the deep learning completion technology for physical deformation correction and the dynamic light compensation strategy for optical interference correction, and correspondingly sets the second correction strategy to include: pre-completion of the target image using a deep learning algorithm (such as inputting the context pixels of the folded area to generate a repaired flat image, matching the residual pattern of the torn edge through SIFT feature points, and splicing to restore the complete area) or using optical correction technology (such as using Retinex algorithm enhancement, respectively performing brightness stretching and detail restoration on overexposed / underexposed areas) to complete light compensation of the target image, and then continuing to execute the first correction strategy, i.e. pre-processing and feature point extraction and matching of the reference image and the target image, estimation of the homography matrix, and execution of perspective transformation through the homography matrix calculation to correct the target image, to ensure elimination of basic geometric deformation deviation.

[0092] The third correction strategy mainly targets the case of multiple page adhesion and shaking blur of the image, considers using multi-page separation algorithm for page separation and shaking blur restoration technology for image blur area recovery, and correspondingly sets the third correction strategy, which specifically includes: pre-separation of the single page by edge density detection to identify the overlapping answer sheet boundary and combine connected component analysis; based on blur kernel estimation and natural image prior technology, the blurred area caused by shaking is restored, and then the first correction strategy is continued to be executed, i.e. pre-processing and feature point extraction and matching of the reference image and the target image, estimation of the homography matrix, and execution of perspective transformation through the homography matrix calculation to correct the target image, to ensure elimination of basic geometric deformation deviation.

[0093] A specific embodiment considers that the accuracy requirement of the test result recognition for the public-oriented basic psychological test is lower than that of the test result recognition for the clinic personnel, in order to further guarantee the high accuracy requirement of the test result recognition for the key population, the method further includes:

[0094] Obtaining the current test card facing the test object (the current test card facing the test object parameter can be pre-input artificially), and dividing and identifying the scene according to the test object, including: the basic identification scene facing the general object, and the key identification scene facing the marked key attention group; wherein the marked key attention group is a group of objects marked as key monitoring in advance, such as a group of employees in a large factory.

[0095] Determine the identification scene corresponding to the target image of the psychological test paper answer sheet, judge whether it is a key identification scene, and select a first image processing optimization strategy when it is judged as a key identification scene to complete the first image processing optimization; wherein the first image processing optimization strategy includes: completing the order mapping optimization, specifically including: in the process of mapping the parent grid and the identity mark, adding mark points on the leftmost and rightmost sides of the grid area according to the horizontal direction of the image (after geometric correction), positioning the mark points by referring to the image matching, aligning the left mark of the first parent grid according to the horizontal direction of the image, aligning the right mark of the last parent grid according to the horizontal direction of the image, and eliminating the order displacement; in the process of mapping each sub-grid and a single identity character, adding mark points on the top and bottom edges of the grid area according to the vertical direction of the image (after geometric correction), positioning the mark points by referring to the image matching, aligning the top mark of the first parent grid according to the vertical direction of the image, aligning the bottom mark of the last sub-grid according to the vertical direction of the image, and eliminating the order displacement.

[0096] In addition, the first image processing optimization strategy also includes: when the grid is divided, adaptive grid size calculation is adopted, specifically including: determining the size division of the sub-grid according to the size of the identity information writing area of the reference image, which can be selected within a range where the size difference is less than a preset size difference; determining the size division of the parent grid according to the interval size between the identity information writing areas of the reference image to realize that all identity information default options in the corresponding order containing identity information exist in a single order of identity information, and there is no range overlap of the all identity information default options in the corresponding order containing identity information corresponding to multiple single orders of identity information.

[0097] Determine the identification scene corresponding to the target image of the psychological test paper answer sheet, judge whether it is a key identification scene, and select a second image processing optimization strategy when it is judged as a key identification scene to complete the second image processing optimization; wherein the second image processing optimization strategy includes: optimizing the blackening confidence calculation method to replace the original blackening confidence calculation method, and obtaining the blackening confidence of each option by using the optimized blackening confidence calculation method; the optimized blackening confidence calculation method obtains the ratio of the total area of non-zero pixels in the outline area of the option to the total area of the outline and the gray uniformity value in the outline area of the option by weighted calculation.

[0098] In addition, the second image processing optimization strategy further comprises: when performing image binarization processing, a local adaptive threshold design is adopted, and a binarization threshold value adaptive to the region block size is dynamically selected; when performing option contour acquisition, multi-scale contour acquisition (such as double contour acquisition, that is, a double threshold value of a Canny operator is used to extract a contour) is further selected, one of the contour sizes is taken as a reference contour, contours of all options are acquired and mapped to corresponding question numbers and options; in a subsequent verification correction process, when re-performing identity identification information or question answer extraction, a contour size can be replaced to acquire contours of all options and map them to corresponding question numbers and options, and the design of replacing and adjusting the blackening confidence threshold value is selected.

[0099] As shown in Figure 3 The present application discloses a psychological test paper answer sheet recognition system based on visual processing, which specifically comprises:

[0100] A target image acquisition model 101 is used to acquire a target image of a psychological test paper answer sheet and select a reference image of the psychological test paper answer sheet.

[0101] A target image correction model 102 is used to perform image correction on the acquired target image of the psychological test paper answer sheet, including: performing preprocessing and feature point extraction and matching on the reference image and the target image, estimating a homography matrix and performing perspective transformation through the homography matrix calculation to correct the target image.

[0102] An image region positioning model 103 is used to position an identity identification region and each question region in the corrected target image according to preconfigured region parameters; the preconfigured region parameters are determined based on the format of the reference image of the psychological test paper answer sheet.

[0103] An identity identification information extraction module 104 is used to perform first image processing on the positioned identity identification region to extract identity identification information; the first image processing includes: region binarization processing; completing region parent-child grid division according to a preset identity identification quantity and completing mapping of the parent grid and the identity identification order, and each child grid is mapped with a single identity identification character; the number of non-zero pixels of the child grid is counted, the identity identification character corresponding to the child grid with the largest number of non-zero pixels in each parent grid is acquired, and the identity identification characters are combined.

[0104] The title answer extraction module 105 is configured to perform second image processing on each title area to extract the answer of each title, wherein the second image processing comprises: dynamically positioning to the area of each title according to a preconfigured title area parameter; region binaryzation processing; performing morphological operation on each title area, querying the contour of all options and mapping to the corresponding title number and options; obtaining the blackening confidence of each option, comparing the blackening confidence of each option with the blackening confidence of other options in the title area and comparing the blackening confidence with a blackening confidence threshold, and determining the title answer according to the comparison result, including: for a single-choice title, selecting the option with the highest blackening confidence and not lower than the blackening confidence threshold, and for a multiple-choice title, selecting the option 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 area of the option to the total area of the contour; and the preconfigured title area parameter is determined based on the reference image centering on the format of the psychological test paper-based answer sheet.

[0105] In one specific embodiment, the system further comprises:

[0106] The answer sheet object-oriented scene identification module 106 is configured to obtain that the current answer sheet faces the test object, divide and identify the scene according to the test object, including: a basic identification scene facing the general object, and a key identification scene facing the marked key focus group.

[0107] The identity information extraction optimization module 107 is configured to determine the identification scene corresponding to the target image of the psychological test paper-based answer sheet, judge whether it is a key identification scene, and when it is judged as a key identification scene, select a first image processing optimization strategy and complete the first image processing optimization; the first image processing optimization strategy comprises: in the process of mapping the parent grid and the identity identification in order, adding mark points on the leftmost and rightmost sides of the grid area according to the horizontal direction of the image, positioning the mark points by reference image matching, aligning the left mark with the first parent grid according to the horizontal direction of the image, and aligning the right mark with the last parent grid according to the horizontal direction of the image; in the process of mapping each child grid and a single identity character, adding mark points on the top and bottom edges of the grid area according to the vertical direction of the image, positioning the mark points by reference image matching, aligning the top mark with the first parent grid according to the vertical direction of the image, and aligning the bottom mark with the last child grid according to the vertical direction of the image.

[0108] The title answer extraction optimization module 108 is configured to determine a recognition scene corresponding to the target image of the psychological test paper answer sheet, determine whether the recognition scene is a key recognition scene, and select a second image processing optimization strategy to complete second image processing optimization when the recognition scene is determined to be a key recognition scene. The second image processing optimization strategy includes: optimizing a blackening confidence calculation method to replace an original blackening confidence calculation method, and obtaining a blackening confidence of each option by using the optimized blackening confidence calculation method. The optimized blackening confidence calculation method obtains a ratio of a total area of non-zero pixels in a contour area of the option to a total contour area and a grayscale uniformity value in the contour area of the option by weighted calculation.

[0109] The application further discloses a computer readable storage medium.

[0110] Specifically, the computer readable storage medium stores a computer program capable of being loaded and executed by the processor to implement the psychological test paper answer sheet recognition method based on visual processing. The computer readable storage medium includes, for example, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage program code media.

[0111] The application further discloses a computer device.

[0112] Specifically, the computer device includes a memory and a processor, and the memory stores a computer program capable of being loaded and executed by the processor to implement the psychological test paper answer sheet recognition method based on visual processing.

[0113] The above are preferred embodiments of the application, and are not intended to limit the protection scope of the application. Any feature disclosed in the specification (including the abstract and the drawings) can be replaced by other equivalent or similar features unless specifically described. That is, each feature is only an example of a series of equivalent or similar features unless specifically described.

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 according to claim 1, characterized in that, The second image processing for each question region to extract the answer to 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 according to 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; if the number of characters is in a first range, it matches a strategy to reacquire identity information; if the number of characters is in a second range, it matches an identity information extraction strategy based on multi-angle target images; if the number of characters is in a third range, it matches an identity information extraction strategy based on multi-angle target images and multi-scale images; wherein the values ​​of the first, second, and third ranges increase sequentially.

4. The method for recognizing paper answer sheets for psychological assessments based on visual processing according to 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 according to 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 according to 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 according to 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