Non-landmark-based test paper recognition and correction method

By binarizing blank test paper templates and detecting sliding window edges, combined with template matching functions, test papers without positioning points are automatically identified and corrected, solving the problems of difficult identification and large computational load in existing technologies, and achieving efficient and accurate test paper identification.

CN112597868BActive Publication Date: 2026-01-16SICHUAN CAIZI SOFTWARE INFORMATION NETWORK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011496539.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-17
Publication Date
2026-01-16
Estimated Expiration
2040-12-17

AI Technical Summary

Technical Problem

Existing test paper recognition systems without positioning points have difficulty recognizing complex data or data lacking rectangular borders, and require pre-learning, which leads to a significant time consumption.

Method used

Using blank test papers as templates, the system automatically locates and corrects test paper samples by binarization and filtering, utilizing sliding window edge detection and contour extraction, combined with template matching functions and normalized correlation matching methods.

Benefits of technology

It achieves pointless test paper recognition with simple logic, low computational cost, and strong adaptability, reducing computation time and improving recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112597868B_ABST
    Figure CN112597868B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on no positioning point's paper identification and correction method, comprising: template paper is divided into left upper, right upper, left lower and right lower image phase;The image of template paper is binarized and filtered;In phase, transverse sliding window is carried out;The region in transverse sliding window is carried out edge detection and contour extraction;The scoring mechanism of template matching function is used to obtain the lowest block of score, and as the positioning block of phase;According to the coordinates of the positioning block of phase corresponding in template paper, find the identified area in paper sample;The identified area is enlarged, and the positioning block corresponding to the phase of template paper is used as template graph, using template matching function, the best matching coordinates are obtained, to obtain the positioning block of paper sample;Select the positioning block of the most data covering objective question and examination number area, using affine matrix and affine transformation function to carry out affine correction to paper sample;Objective question and examination number identification are carried out using the image after affine correction.
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, in particular to a test paper recognition and correction method based on no positioning points. BACKGROUND

[0002] With the improvement of social education system and the increasing standardization of examination system, the types and methods of examination are also increasing, but the paper examination in the prior art is still the mainstream. In order to facilitate the examination and correction, various automatic correction systems appear in the market, which are mainly divided into optical mark reading machines and image processing-based correction systems. At present, the test paper in the prior art mainly has positioning points, while the test paper without positioning points accounts for a small proportion, and manual paper correction is mostly used.

[0003] At present, there are also no fixed point-based test paper recognition systems in the prior art, such as the Chinese invention patent with patent application number "201610938847.3" and the name "a method for identifying rectangular positioning frame in no positioning point test paper". It is through: (1) reading the test paper, performing binaryzation and skew correction processing; (2) reading the rectangular region information recorded in the template, using the "maximum contour finding" method to get the maximum contour of the region, and fitting the contour with the smallest rectangle; (3) judging whether the size of the fitted rectangle is consistent with the size of the recorded rectangle, which is to set an error range and compare the length and height errors of the two rectangles respectively; if it is within the set range, then the fitted rectangle is the rectangle to be identified; if it is not within the set range, then step (4) is performed; (4) use Hough transform to detect the line segments of the region information, and preprocess the detected line segments, including classification and merging; (5) weighted sorting of the preprocessed line segments; after calculating the weight value of each line segment, the line segments are sorted according to the weight value from large to small; (6) extract the line segments with the top three weight values, and discard the rest; (7) take out one line segment from the upper, lower, left and right four directions for fitting, the fitting method is: find the intersection point Point1 of the upper line segment and the left line segment, and the intersection point Point2 of the lower line segment and the right line segment, the length of the fitted rectangle is: Point2.x-Point1.x; the height is: Point2.y-Point1.y; (8) compare the length and height of the rectangle recorded in the template, if the errors are within the set range, it is considered that the identification is successful, the coordinates and length and height of the fitted rectangle are returned, and the fitted rectangle is the rectangle to be identified; if the length or height error exceeds the set range, the next step is performed; (9) take out the next candidate line segment from the upper line segment set and fit again; (10) when all the upper line segment sets are tested and no suitable rectangle is found, reset the line segment index in this direction and move the line segment permission to the next direction in the order of "upper, left, lower, right"; (11) after all the line segment sets in the four directions are tested and fitted, if no suitable rectangle is found, output "rectangle not found". This method mainly uses the matching method of rectangular frame fitting, which cannot be matched in the case of complex data line or no rectangular frame in the objective question area.

[0004] For example, the Chinese invention patent with patent application number "201710807657.2" and titled "Intelligent Marking System Image Recognition Method and System Without Positioning Points" includes: acquiring a sample of test papers to be processed; performing learning processing on the test paper sample to obtain a learning result, wherein the learning result includes: the test number area information, objective question area information, and subjective question area information of the test paper sample; acquiring a target test paper to be processed; and, based on the learning result, adaptively employing at least one of multiple processing algorithms to recognize the target test paper to obtain a recognition result of the target test paper, wherein the recognition result includes: the test number area information, objective question area information, and subjective question area information of the target test paper. This alleviates the technical problem in the prior art that it cannot adaptively employ multiple positioning methods to achieve accurate positioning and recognition of test paper images. This method uses a pre-learning approach, requiring advance learning of the test paper for new exams, which consumes a significant amount of time in the early stages.

[0005] Therefore, there is an urgent need for a test paper recognition and correction method based on non-location points that is logically simple, computationally efficient, and highly adaptable. Summary of the Invention

[0006] To address the above problems, the purpose of this invention is to provide a test paper recognition and correction method based on non-localization point identification. The technical solution adopted by this invention is as follows:

[0007] The test paper recognition and correction method based on non-locator points includes the following steps:

[0008] The first stage involves finding the location blocks for locating information from the template exam paper:

[0009] Select a blank test paper as a template test paper;

[0010] The front and back images of the template test paper are divided into the upper left image phase, the upper right image phase, the lower left image phase, and the lower right image phase, respectively.

[0011] The image of the template test paper is binarized and filtered to remove image noise and small ink spots;

[0012] In the top-left, top-right, bottom-left, and bottom-right image phases, a horizontal sliding window is applied row by row from the top corner of the image towards the center; the size of the horizontal sliding window is L×L px, and the horizontal step size and the vertical step size are both l px; L and l are both integers greater than 1;

[0013] Edge detection and contour extraction are performed on the area within the horizontal sliding window to locate the area of ​​the positioning block;

[0014] The lowest-scoring tile is obtained using a template matching function scoring mechanism and is used as the phase location tile.

[0015] In the second stage, the positioning block is identified in the sample paper, and the image of the sample paper is corrected using the positioning block:

[0016] According to the coordinates of the positioning block corresponding to the upper-left image phase, the upper-right image phase, the lower-left image phase, and the lower-right image phase in the template paper, the identified area is found in the sample paper;

[0017] The identified area is enlarged to K px, and the positioning block corresponding to the phase of the template paper is used as a template image. A template matching function is used to obtain the best matching coordinates. The l1x l1 px block with the best matching coordinates as the top-left corner vertex is used as the positioning block of the sample paper.

[0018] Repeat and obtain any positioning block of the sample paper. Select the positioning block that covers the most data of the objective question and the exam number area. Affine matrix and affine transformation function are used to perform affine correction on the sample paper.

[0019] The image after affine correction is used for objective question and exam number recognition.

[0020] Preferably, the value of L is 300, and the value of l is 20.

[0021] Further, the positioning block based on the positioning block free paper recognition and correction method further comprises: if the back of the template paper has no objective question and exam number recognition area, only the front image of the template paper is obtained.

[0022] Further, the positioning block based on the positioning block free paper recognition and correction method further comprises: counting the contours with a length or / and width greater than 10px. If the number of target contours is greater than 4, the horizontal sliding window meets the meta information, and the horizontal sliding window is used as the positioning block area and the sliding search is stopped.

[0023] Further, the scoring mechanism using the template matching function obtains the block with the lowest score and uses it as the positioning block of the phase, comprising:

[0024] Starting from the left upper corner of the positioning block area, an 80pxx80px block is used, and a normalized correlation matching method is used to obtain a 220x200 floating point matrix. The value corresponding to the point in the floating point matrix is the matching degree of the 80pxx80px block with the left upper corner as the pixel point in the image and the template paper.

[0025] The block with the lowest score is obtained by sliding window with horizontal step and vertical step of 10px, and the coordinate information of the positioning block in the template paper is recorded.

[0026] Preferably, the value of K is 272x272.

[0027] Compared with the prior art, the present application has the following beneficial effects:

[0028] (1) The present application ingeniously uses a blank test paper as a template test paper and automatically identifies and obtains a positioning block, which does not need to set a positioning block on the test paper and can also obtain a virtual positioning block, which does not need to print a positioning point of a specific shape and specific area on the test paper, and an algorithm finds image features suitable for matching reference by itself;

[0029] (2) The present application ingeniously uses binarization and filtering to process the image of the template test paper to filter out image noise and small ink dots;

[0030] (3) The present application realizes automatic finding of the region of the positioning block by edge detection and contour extraction on the sliding window region, and by selecting the region to be found in advance, the calculation amount can be greatly reduced, and the subsequent calculation time of a single phase can be greatly shortened.

[0031] (4) The present application selects the most suitable template matching block in the region of the automatically found positioning block, uses a template matching function and a normalized correlation matching method to obtain the highest matching degree, and the advantage is that there is no strong restriction on the features of the block to be matched.

[0032] (5) The present application uses a scoring mechanism, which can use an algorithm to find the positioning block in the region that is most beneficial to subsequent test paper recognition, reducing manual intervention.

[0033] (6) The present application magnifies the recognition region of the test paper sample, uses a template matching function to obtain the most matched coordinates, and obtains the positioning block of the test paper sample, which can improve the fault tolerance of the algorithm and reduce the calculation amount.

[0034] In summary, the present application has the advantages of simple logic, accurate recognition, less calculation workload, strong adaptability and the like, and has high practical value and popularization value in the field of image recognition technology. BRIEF DESCRIPTION OF DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments, and it should be understood that the following drawings only show some embodiments of the present application, and should not be regarded as a limitation to the protection scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0036] Figure 1 The logic flow chart of the present application. DETAILED DESCRIPTION

[0037] For the purposes of the present application, the technical solutions and advantages thereof are more clearly understood, the present application is further described below in conjunction with the drawings and examples, the embodiments of the present application include but are not limited to the following examples. Based on the examples in the present application, all other examples obtained by those of ordinary skill in the art without making creative efforts fall within the scope of the present application.

[0038] Embodiments

[0039] As Figure 1 shown, the present embodiment provides a non-point-based test paper recognition and correction method, specifically comprising the following steps:

[0040] The first stage, find the positioning block for positioning from the template test paper:

[0041] (1) select a blank test paper as a template test paper;

[0042] (2) the front image and back image of the template test paper are divided into left upper image phase, right upper image phase, left lower image phase and right lower image phase respectively; the positioning block correction method of the present embodiment is mainly to ensure that the image of the objective question and the examination number area in the test paper sample and the template image remain consistent, so as to facilitate subsequent identification, therefore, if the test paper back is not marked with objective question identification and examination number identification area during template making, only the front is automatically searched for positioning block.

[0043] (3) the image of the template test paper is binarized and filtered to filter out image noise and small ink dots;

[0044] (4) since the traditional automatic positioning block searching algorithm is relatively time-consuming, the image needs to be preprocessed in advance to reduce the search area. Therefore, in the left upper image phase, right upper image phase, left lower image phase and right lower image phase, the horizontal sliding window is performed row by row from the top corner to the center of the image; the size of the horizontal sliding window is 300px×300px, and the horizontal step length and the vertical step length are both 20px.

[0045] (5) the edge detection algorithm and findContours contour algorithm are used to detect the edge and extract the contour of the region in the horizontal sliding window, and find the region of the positioning block; count all contours with length or width greater than 10px, if the number of target contours is greater than 4, it is considered that the sliding window region has the required graphic element information, which can be used as the region for automatic positioning block searching. Select the 300px×300px region as the region for subsequent processing, and stop the sliding window search.

[0046] (6) the scoring mechanism of the template matching function is used to obtain the lowest scoring block, which is used as the positioning block of the phase.

[0047] Determine the 300px*300px area to locate the block automatic selection. The ultimate goal is to select the most characteristic (best suited to template matching) 80px*80px size block in the area as the positioning block of the phase. We think that the block that is most different from other elements in the area is the most characteristic block, so we use a scoring mechanism to select the block.

[0048] The scoring mechanism mainly uses a template matching function to achieve it. The 80px*80px block starting from the top left corner of the 300px*300px area is used as the template image. The normalized correlation matching method is used. The running result is a 220*220 floating point matrix. The value of each matrix point corresponds to the matching degree of the 80px*80px block with the template image with the pixel point as the top left corner. The higher the value, the closer to the template image. The matching value of the template image itself is 1. We remove the matching degree of the template top left corner coordinate itself and its surrounding 8 pixels. From the remaining values, we select the highest matching degree as the score of the position.

[0049] Repeat the above steps by sliding the window, but because template matching takes a long time, if you slide the window pixel by pixel, you need to run 220*220 times of template matching, so we use a way of horizontal and vertical step length of 10px to slide the window. Finally, we get the scores of all positions. We select the block with the lowest score as our final positioning block because the lowest score indicates that the block is most different from other blocks in the area.

[0050] Repeat the above steps until the positioning blocks of the four phases are found. Record the coordinate information of the positioning blocks relative to the template image and upload and save it for subsequent test paper sample recognition.

[0051] In the second stage, identify the positioning block in the test paper sample and use the positioning block to correct the image of the test paper sample:

[0052] (1) According to the coordinates of the positioning blocks corresponding to the top left image phase, the top right image phase, the bottom left image phase, and the bottom right image phase in the template test paper, find the identified area in the test paper sample;

[0053] (2) Enlarge the identified area to (80+80*1.2*2)px*(80+80*1.2*2)px, use the positioning block corresponding to the phase of the template test paper as the template image, use the template matching function, and get the best matching coordinates. The 80px*80px block with the best matching coordinates as the top left vertex is used as the positioning block of the test paper sample identified by the phase;

[0054] (3) Repeat and obtain any positioning block of the test paper sample, select three positioning blocks covering the objective questions and the examination number region most, take the center point coordinates of the three positioning blocks in the test paper sample and the center point coordinates of the three positioning blocks corresponding to the template, total six coordinate points, establish a ternary linear equation to calculate the affine matrix of 3*2, take the matrix as a parameter, adopt the affine matrix and the affine transformation function to perform affine correction on the test paper sample;

[0055] (4) Use the affine corrected image to identify the objective questions and the examination number.

[0056] The above examples are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any change made on the basis of the design principle of the present application and non-creative labor shall belong to the protection scope of the present application.

Claims

1. A method for test paper identification and correction based on no-locus, characterized in that, The method comprises the following steps: A first stage, finding a positioning block for positioning from a template test paper: Select a blank test paper as a template test paper; Divide the front image and the back image of the template test paper into a left upper image phase, a right upper image phase, a left lower image phase and a right lower image phase respectively; Carry out binarization and filtering processing on the images of the template test paper to filter out image noise and small ink dots; In the left upper image phase, the right upper image phase, the left lower image phase and the right lower image phase, carry out horizontal sliding window from the top corner to the center of the image row by row; the size of the horizontal sliding window is LxL px, and the horizontal step length and the vertical step length are both l px; L and l are both integers greater than 1; Carry out edge detection and contour extraction on the region in the horizontal sliding window to find the region of the positioning block; Use the scoring mechanism of the template matching function to obtain the lowest scoring image block, and take it as the positioning block of the phase; A second stage, identifying the positioning block in the test paper sample, and using the positioning block to correct the image of the test paper sample: According to the coordinates of the positioning blocks corresponding to the left upper image phase, the right upper image phase, the left lower image phase and the right lower image phase in the template test paper, find the identified region in the test paper sample; Enlarge the identified region to K px, take the positioning block corresponding to the phase of the template test paper as a template image, use the template matching function to obtain the best matching coordinates, and take the l1x l1 px image block with the best matching coordinates as the top left corner vertex as the positioning block of the test paper sample; Repeat and obtain any positioning block of the test paper sample, select the positioning block covering the most data of the objective questions and the examination number area, use the affine matrix and the affine transformation function to perform affine correction on the test paper sample; Use the image after affine correction to identify the objective questions and the examination number.

2. The non-fix-point based test paper recognition and correction method according to claim 1, wherein, The value of L is 300, and the value of l is 20.

3. The non-fixel based test paper identification and correction method according to claim 1, wherein, It also includes obtaining only the front image of the template test paper if the back of the template test paper has no objective question and examination number identification area.

4. The non-fixel based test paper identification and correction method according to claim 1, wherein, It also includes counting the contours with a length or / and width greater than 10 px, if the number of target contours is greater than 4, the horizontal sliding window meets the meta information, and the horizontal sliding window is taken as the positioning block region and the sliding search is stopped.

5. The non-locus based test paper recognition and correction method according to any one of claims 1 to 4, characterized in that, The use of the scoring mechanism of the template matching function to obtain the lowest scoring image block and take it as the positioning block of the phase comprises: Starting from the left upper corner of the positioning block region, taking 80 px x 80 px as the image block, using the normalized correlation matching method to obtain a 220x200 floating point matrix; the value corresponding to the point in the floating point matrix is the matching degree of the 80 px x 80 px image block with the left upper corner as the pixel point in the image and the template test paper; Use the image block with a horizontal step length and a vertical step length of 10 px to carry out sliding window, obtain the lowest scoring image block, and record the coordinate information of the positioning block in the template test paper.

6. The non-fixel based test paper identification and correction method according to claim 1, wherein, The value of K is 272x272.

Citation Information

Patent Citations

  • Recognition method and system for image without positioning points in intelligent examination paper appraisal system

    CN107506746A

  • Test paper automatic test paper marking processing method and system without answer sheet

    CN104143094A

  • Identification method for rectangle locating frame in test paper without locating points

    CN106650608A