Intelligent test paper scanning processing method for paper marking system

By segmenting the uniform light area and shadow area in the test paper image, analyzing and combining or splitting the character external rectangles, and calculating the enhanced repair coefficient, the shadow and uneven light problems caused by the shooting environment of the test paper image are solved, and the clarity of the image and the efficiency of the marking are improved.

CN119516568AActive Publication Date: 2025-02-25BEIJING XINTAI HAOYUE TRADE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411699242.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-25
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

In the online marking system, due to differences in the shooting environment, the test paper images are prone to shadow, too bright or too dark abnormalities, which affects the image quality and reduces the marking efficiency.

Method used

Through contour detection and clustering technology, the test paper images are divided into uniform light areas and shadow areas, the characteristics of each area are analyzed, the character external rectangles are merged or split, the image sharpness parameters of the uniform light areas and shadow areas of each similar character are obtained, the enhancement repair coefficient is calculated, and image enhancement and repair are performed.

Benefits of technology

Effectively distinguish each word under different writing habits, improve the recognizable content of the test paper, enhance image clarity, and improve the efficiency of marking papers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516568A_ABST
    Figure CN119516568A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, in particular to an intelligent test paper scanning processing method for a paper marking system, which comprises the following steps of: clustering pixel points in a test paper image to obtain a plurality of clusters, and obtaining a uniform illumination region and a shadow region; according to the size and the distance of the circumscribed rectangle of each character in the uniform illumination area, obtaining a final merging result of each row of characters after each merging, and further splitting to obtain a final splitting result of each row of characters; obtaining the same stroke state parameter according to the distribution of the contour pixel points, and further obtaining a plurality of similar characters; and obtaining image definition parameters of the uniform illumination region and the shadow region of each similar character according to the pixel difference of the similar characters in the uniform illumination region and the gradient direction of the contour pixel points, thereby obtaining an enhanced repair coefficient of each similar character of the test paper image. According to the extension trend of the characters in the test paper image, the definition of each character is enhanced after being analyzed, so that the content of the test paper can be identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to an intelligent scanning and processing method for examination papers used in an examination paper marking system. Background Art

[0002] With the continuous development of intelligent technology, the traditional manual marking method has gradually been replaced by a more efficient online marking system. In the online marking system, markers can view and score candidates' test papers anytime and anywhere, which not only improves the marking efficiency, but also optimizes the allocation of resources, making the entire examination marking process more convenient and intelligent.

[0003] During the process of photographing, scanning and uploading the test paper, due to differences in different shooting environments, such as light direction, mobile phone obstruction, etc., the position of the light source and obstructions will be affected, resulting in shadow areas in the test paper image, causing the uploaded test paper image to have large shadows, too bright or too dark and other abnormal phenomena. Excessively thick shadows will affect the test paper characters, reduce the quality of the test paper image, and affect the efficiency of marking. Summary of the invention

[0004] The present invention provides an intelligent scanning and processing method for examination papers in a paper marking system using the following technical solutions: An embodiment of the present invention provides a test paper intelligent scanning processing method for a test paper marking system, the method comprising the following steps: Acquire a number of test paper images, and obtain a number of contour pixel points of each test paper image through contour detection; The pixels in the test paper image are clustered to obtain several clusters. According to the pixel value differences of different pixels in each cluster, the pixel difference coefficient of each cluster is obtained; according to the pixel difference coefficient of each cluster, the uniform illumination area and the shadow area are obtained; Obtain the bounding rectangle of each character in the uniformly illuminated area, obtain the merged character difference value after each merge of each line of characters according to the size of each bounding rectangle and the distance between adjacent bounding rectangles, obtain the final merged result of each line of characters according to the merged character difference value, and further split each line of characters to obtain the split character difference value after each split, and finally obtain the final split result of each line of characters; According to the characters with non-rectangular circumscribed polygons in the uniformly illuminated area, combined with the shadow area, the semi-occluded characters in the uniformly illuminated area and the obscured characters in the shadow area are obtained; based on the distribution of contour pixels in the semi-occluded characters and the obscured characters, the same stroke state parameters of the semi-occluded characters in the uniformly illuminated area and the obscured characters in the shadow area are obtained, thereby obtaining a number of similar characters; According to the pixel difference coefficient of similar characters in the uniformly illuminated area and the gradient direction of the contour pixels, the image clarity parameters of the uniformly illuminated area of ​​each similar character are obtained; the image clarity parameters of the shadow area of ​​the similar characters are obtained; the enhanced restoration coefficient of each similar character in the test paper image is obtained through the image clarity parameters of the similar characters and the same stroke state parameters of the semi-occluded characters in the uniformly illuminated area and the occluded characters in the shadow area.

[0005] Furthermore, the step of obtaining the pixel difference coefficient of each cluster includes the following specific steps: The calculation method of the regional characteristic parameters of the kth cluster is:

[0006] The pixel difference coefficient of the kth cluster is calculated as:

[0007] in, represents the regional characteristic parameter of the kth cluster, represents the standard deviation of the pixel values ​​of all pixels in the kth cluster, represents the number of contour pixels in the kth cluster, represents the pixel difference coefficient of the kth cluster, represents the maximum value of the regional characteristic parameters in all clusters, represents the maximum value of the difference between the pixel values ​​of all pixels in the kth cluster, is a linear normalization function.

[0008] Furthermore, the step of obtaining the merged character difference value after each merge of each line of characters includes the following specific steps: Get the length of the bounding rectangle of each character in the X-axis direction , and simultaneously record the Euclidean distance between adjacent bounding rectangles in the same row ; According to the length of the circumscribed rectangle , and the Euclidean distance between adjacent bounding rectangles , respectively obtain the standard deviation of the length of the circumscribed rectangle of the entire line of characters and the standard deviation of the Euclidean distance , recorded as the length discrete parameter value and the distance discrete parameter value; For any whole line of characters, two adjacent bounding rectangles corresponding to the minimum Euclidean distance among the adjacent characters in the line are merged as the first merge, and the length of the bounding rectangle and the Euclidean distance between the adjacent bounding rectangles are recalculated, so as to obtain the length discrete parameter value and the distance discrete parameter value after the first merge; and so on, several merges are performed in the order of Euclidean distance from small to large, and the length discrete parameter value and the distance discrete parameter value after each merge of the whole line of characters are obtained; the merged character difference value of the whole line of characters after any merge is obtained. .

[0009] Furthermore, the step of obtaining the final merging result of each line of characters according to the merging character difference value includes the following specific steps: For any whole line of characters, the merge result corresponding to the minimum value of the merged character difference values ​​after all merges is selected as the final merge result of the whole line of characters.

[0010] Furthermore, the final splitting result of each line of characters is finally obtained, and the specific steps included are as follows: For any whole line of characters, under the final merged result of the whole line of characters, select the character with the longest length in the X-axis direction for splitting in turn, and take the position of the character with the least pixels under the Y-axis coordinate point in the bounding rectangle of each character as the character segmentation area, and so on, split the bounding rectangle of the character from large to small according to the length; obtain the standard deviation of the length of the bounding rectangle of the whole line of characters after each split , and the standard deviation of the Euclidean distance , and further obtain the split character difference value , select the split result corresponding to the minimum value of the split character difference value as the final split result of the entire line of characters.

[0011] Furthermore, the step of obtaining the semi-shielded characters in the uniformly illuminated area and the shielded characters in the shadow area includes the following specific steps: Characters in the uniformly illuminated area whose circumscribed polygons are not rectangles are regarded as semi-occluded characters. A rectangle is circumscribed to the circumscribed polygon of the semi-occluded character. The area with the maximum difference between the circumscribed rectangle and the polygon is the shaded part that is obscured, which is regarded as the obscured character.

[0012] Furthermore, the obtaining of a plurality of similar characters comprises the following specific steps: The distance between any two contour pixels with opposite gradient directions in the same part is recorded as the width of the character stroke. The same stroke state parameters of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area are calculated as follows:

[0013] in, is the same stroke state parameter of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area, is the stroke width of the blocked characters in the shadow area, is the character stroke width of the semi-occluded character in the uniformly illuminated area, is the same stroke influence factor of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area; use The function normalizes the result; A similarity threshold is set. If the state parameter of the same stroke is greater than or equal to the similarity threshold, the semi-occluded characters in the evenly illuminated area and the occluded characters in the shadow area are marked as similar characters.

[0014] Furthermore, the specific method of obtaining the same stroke influence factor is as follows: For the semi-occluded character b in the uniformly illuminated area, obtain the gradient direction of each contour pixel point of the semi-occluded character. For the character strokes of the examinee, obtain the fitting direction vector of the normal vector through the curve fitting algorithm. , recorded as the change direction vector of the character stroke; for the blocked character a in the shadow area, obtain the change direction vector of the character stroke ; By obtaining the character stroke change direction vector of the blocked character a and the semi-blocked character b , Angle , and used as the same stroke influence parameter of the semi-occluded characters in the uniform illumination area and the occluded characters in the shadow area. Use the linear normalization function to process and get the same stroke influence factor .

[0015] Furthermore, the step of obtaining the image clarity parameter of the uniformly illuminated area of ​​each similar character includes the following specific steps:

[0016] in, represents the image clarity parameter of the uniformly illuminated area of ​​the similar characters in the i-th row and j-th column, n represents the length of the semi-occluded characters in the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column in the X-axis direction, m represents the length of the semi-occluded characters in the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column in the Y-axis direction, It represents the pixel difference coefficient of the cluster of the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column. The coordinates of the similar characters in the uniform illumination area of ​​the i-th row and j-th column are The gradient direction of the contour pixel.

[0017] Furthermore, the step of obtaining the enhanced restoration coefficient of each similar character in the test paper image includes the following specific steps:

[0018] in, is the enhancement repair coefficient of similar characters in the i-th row and j-th column, represents the image clarity parameter of the uniformly illuminated area of ​​similar characters in the i-th row and j-th column, represents the image clarity parameter of the shadow area of ​​the similar character in the i-th row and j-th column, Indicates the same stroke state parameter of the semi-occluded character in the uniformly illuminated area and the obscured character in the shadow area corresponding to the similar character in the i-th row and j-th column.

[0019] The beneficial effects of the technical solution of the present invention are: obtaining a uniformly illuminated area and a shadow area so as to analyze characters by area; obtaining the final merging result of each row of characters after each merging according to the size and distance of the circumscribed rectangle of each character in the uniformly illuminated area, and further splitting to obtain the final splitting result of each row of characters, which is conducive to distinguishing the recognition of each character under different writing habits; obtaining the same stroke state parameters according to the distribution of contour pixels, and then obtaining several similar characters, and analyzing each similar character; obtaining the image clarity parameters of the uniformly illuminated area and the shadow area of ​​each similar character according to the difference in pixels of similar characters in the uniformly illuminated area and the gradient direction of the contour pixels, thereby obtaining the enhanced restoration coefficient of each similar character in the test paper image, enhancing and repairing the characters, facilitating the detection and recognition of the test paper content, and improving the recognizability of the test paper content. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A flowchart of the steps of an intelligent scanning and processing method for an examination paper used in a examination paper marking system according to the present invention; Figure 2 It is a schematic diagram of the character's circumscribed rectangle; Figure 3 Schematic diagram of the shadow area and uniformly illuminated area of ​​the character. DETAILED DESCRIPTION

[0022] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of an intelligent scanning and processing method for a test paper marking system proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0023] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0024] The following is a detailed description of a specific solution of an intelligent scanning and processing method for a test paper for a test paper marking system provided by the present invention in conjunction with the accompanying drawings.

[0025] See also Figure 1 , which shows a flowchart of a method for intelligent scanning and processing of test papers for a marking system provided by an embodiment of the present invention, the method comprising the following steps: Step S001: Acquire a number of test paper images, and obtain a number of contour pixel points of each test paper image.

[0026] The purpose of this embodiment is to ensure the integrity of characters and images in the blocked or shadowed area through the extension trend of font symbols in the test paper image, so as to detect and identify the test paper content; therefore, it is first necessary to upload the completed test paper to the marking system by photographing and scanning, and store the test paper image according to the test ID number in the teaching information module; Specifically, each uploaded test paper image is sharpened using the canny operator to improve the clarity of the image, and the image is denoised using the Gaussian filter to obtain the preprocessed test paper image. Each test paper image is contour detected using the findContours function to obtain several edge pixels as several contour pixels of each test paper image. A plane rectangular coordinate system is established with the upper left corner of each test paper image as the origin. The coordinates of each pixel point data in the test paper image are , the pixel value is ; Subsequently, any test paper image is processed.

[0027] Step S002: cluster the pixels in the test paper image to obtain several clusters, obtain the pixel difference coefficient of each cluster according to the pixel value difference of different pixels in each cluster; and obtain the uniformly illuminated area and the shadow area according to the pixel difference coefficient of each cluster.

[0028] It should be noted that in the process of uploading the test paper image and uploading it to the marking system, due to the influence of lighting and obstructions, there may be obvious shadow areas in the test paper image, resulting in unclear content in the shadow area, or some candidates may have lighter handwriting when answering questions due to insufficient pen ink or writing habits, which further exacerbates the blurring of handwriting, making the answer characters detected in the system abnormal, and thus affecting the scanning results of the test paper. In the uniformly illuminated area, the brightness difference between the written characters and the paper background is obvious, and when performing contour detection, a large number of contour pixels are detected, while in the shadow area, due to the low brightness of the shadow, the brightness difference between the written characters and the paper background is small, resulting in a small number of contour pixels being detected when performing contour detection; therefore, by analyzing the abnormal character area in the image, the character contour parameters are analyzed according to the changing trend of the image or character.

[0029] Specifically, for any pixel in an exam paper image, the K-means clustering algorithm is used to determine the best The distance metric uses the absolute value of the difference between the pixel values ​​of the pixels to obtain clusters; The calculation method of the regional characteristic parameters of the kth cluster is:

[0030] The pixel difference coefficient of the kth cluster is calculated as:

[0031] in, represents the regional characteristic parameter of the kth cluster, represents the standard deviation of the pixel values ​​of all pixels in the kth cluster, represents the number of contour pixels in the kth cluster, represents the pixel difference coefficient of the kth cluster, represents the maximum value of the regional characteristic parameters in all clusters, represents the maximum value of the difference between the pixel values ​​of all pixels in the kth cluster, is a linear normalization function, and the normalized object is all clusters .

[0032] It should be noted that when the pixel value standard deviation and the number of contour pixels are detected The larger the value is, the more likely it is the area where the candidate will fill in the characters. It represents the ratio of the regional characteristic parameter of the kth cluster to the regional characteristic parameters of all clusters. The larger the value, the more likely it is that the area is filled with characters by the examinee.

[0033] Furthermore, all clusters are traversed to obtain the pixel difference coefficient of each cluster; a difference threshold is set, and when the pixel difference coefficient of the kth cluster is greater than or equal to the difference threshold, several areas composed of pixels in the kth cluster are recorded as uniformly illuminated areas; when the pixel difference coefficient of the kth cluster is less than the difference threshold, several areas composed of pixels in the kth cluster are recorded as shadow areas; the difference threshold set in this embodiment is 0.6, and other embodiments may set other values, which are not specifically limited in this embodiment.

[0034] Step S003: Obtain the bounding rectangle of each character in the uniformly illuminated area, and obtain the merged character difference value after each merge of each line of characters based on the size of each bounding rectangle and the distance between adjacent bounding rectangles. Obtain the final merged result of each line of characters based on the merged character difference value, and further split each line of characters to obtain the split character difference value after each split, and finally obtain the final split result of each line of characters.

[0035] It should be noted that since different candidates have different writing habits during the writing process, there will be certain personalized differences in font selection, line spacing control, and the spacing between letters during the test. This is not only reflected in the size and clarity of the fonts, but also in multiple details such as the spacing between lines and the distance between characters. Due to the diversity of these writing habits, the content recognition of the test paper image is affected. Therefore, when recognizing the content in the test paper image, it is necessary to first obtain the spacing and size of the fonts on the test paper image.

[0036] It should be further explained that when candidates are writing, the inside of the character outline is filled with pen ink, and the brightness of the character area is lower than that of the paper background. At the same time, in the specific writing process, there are phenomena of connected strokes or left-right or up-down structures that cause the character width to be too long or too narrow. To avoid such phenomena, it is necessary to merge or split the circumscribed rectangles of adjacent characters.

[0037] Specifically, in the uniformly illuminated area, the boundingRect function in the image algorithm is used to calculate the bounding rectangle of the character, such as Figure 2 As shown, get the length of the bounding rectangle of each character in the X-axis direction , and simultaneously record the Euclidean distance between adjacent bounding rectangles in the same row ; According to the length of the circumscribed rectangle , and the Euclidean distance between adjacent bounding rectangles , respectively obtain the standard deviation of the length of the circumscribed rectangle of the entire line of characters and the standard deviation of the Euclidean distance , recorded as the length discrete parameter value and the distance discrete parameter value.

[0038] Furthermore, for any entire row of characters, two adjacent bounding rectangles corresponding to the minimum Euclidean distance among adjacent characters in the row are merged as the first merge, and the length of the bounding rectangle and the Euclidean distance between adjacent bounding rectangles are recalculated to obtain the length discrete parameter value and the distance discrete parameter value after the first merge; and so on, several merges are performed in the order of Euclidean distance from small to large to obtain the length discrete parameter value and the distance discrete parameter value after each merge of the entire row of characters; and the merged character difference value of the entire row of characters after any merge is obtained. ; Select the merge result corresponding to the minimum value of the merged character difference value after all merges as the final merge result of the entire line of characters.

[0039] It should be noted that due to the ligatures produced by candidates during the filling process, the length of the circumscribed rectangle of the characters is large, which makes the difference value of the merged characters large, which is not conducive to character detection, so the ligatures need to be split. In the writing process of ligatures, the last stroke of the previous character and the first stroke of the next character are connected. The strokes of the connected part are narrow and occupy fewer pixels.

[0040] Furthermore, under the final merged result of the entire line of characters, the bounding rectangles of the characters with the largest length in the X-axis direction are selected in turn for splitting, and the position of the character with the least pixels under the Y-axis coordinate point in the bounding rectangle of each character is used as the character segmentation area, and so on, the bounding rectangles of the characters are split from large to small according to length; after splitting, the standard deviation of the length of the bounding rectangle of the entire line of characters after each split is obtained in the same way as the merge operation , and the standard deviation of the Euclidean distance , and further obtain the split character difference value , select the split result corresponding to the minimum value of the split character difference value as the final split result of the entire line of characters.

[0041] Step S004: Based on the characters with non-rectangular circumscribed polygons in the uniformly illuminated area and combined with the shadow area, semi-obstructed characters in the uniformly illuminated area and obstructed characters in the shadow area are obtained; based on the distribution of contour pixels in the semi-obstructed characters and the obstructed characters, the same stroke state parameters of the semi-obstructed characters in the uniformly illuminated area and the obstructed characters in the shadow area are obtained, and then several similar characters are obtained.

[0042] It should be noted that, due to the low brightness of the shadow, it is difficult to obtain the contour parameters of the characters inside the shadow area through contour detection. Therefore, when identifying the shadow area where characters exist, it is necessary to analyze based on the performance of the shadow and the characters. For semi-obstructed characters, part of the area is in the uniformly illuminated area, and the rest is in the shadow area. The characters can be analyzed through the semi-obstructed characters.

[0043] It should be further explained that, under normal conditions, the circumscribed polygon of a character is a rectangle, but when it is blocked, the character is missing, resulting in the circumscribed polygon being a non-rectangle; the gradient change of the pixel value of the character outline pixel point toward the pixel value of the paper background is the most obvious, and the normal vector in the gradient direction is the direction of the character stroke at the pixel point. Because the font itself has non-straight strokes such as left and right strokes and the irregularity of the candidate's font, the font strokes are not horizontal or vertical; at the same time, during the writing process, there is continuity between the same strokes, so when they belong to the same stroke, the direction of change of the character strokes is similar or opposite.

[0044] Specifically, the characters whose circumscribed polygons in the uniformly illuminated area are not rectangular are regarded as semi-occluded characters. A rectangle is circumscribed to the circumscribed polygon of the semi-occluded character. The maximum difference area between the circumscribed rectangle and the polygon is the shaded part, which is regarded as the occluded character. Figure 3 As shown, part a is the shaded part, and part b is the evenly illuminated part; For the semi-occluded character b in the uniformly illuminated area, obtain the gradient direction of each contour pixel point of the semi-occluded character. For the character strokes of the examinee, obtain the fitting direction vector of the normal vector through the curve fitting algorithm. , recorded as the change direction vector of the character stroke. Similarly, for the blocked character a in the shadow area, obtain the change direction vector of the character stroke .

[0045] Furthermore, by obtaining the character stroke change direction vector of the blocked character a and the semi-blocked character b , Angle , and used as the same stroke influence parameter of the semi-occluded characters in the uniform illumination area and the occluded characters in the shadow area. Use the linear normalization function to process and get the same stroke influence factor , so that hour, , that is, the interval range before the linear normalization function is , the normalized interval range is .

[0046] Furthermore, the distance between any two contour pixels with opposite gradient directions in the same part is recorded as the width of the character stroke. The same stroke state parameters of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area are calculated as follows:

[0047] in, is the same stroke state parameter of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area, is the stroke width of the blocked characters in the shadow area, is the character stroke width of the semi-occluded character in the uniformly illuminated area, is the same stroke influence factor of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area; The closer it is to 1, the more similar part a and part b are. The function normalizes the result so that the closer the result value is to 0, The closer the value is to 1.

[0048] Furthermore, a similarity threshold is set. In this embodiment, the similarity threshold is described as 0.8. If the same stroke state parameter is greater than or equal to the similarity threshold, it means that the gradient directions of the uniformly illuminated area and the shadow area are similar, and the more likely they are the same stroke, the semi-occluded characters in the uniformly illuminated area and the occluded characters in the shadow area are marked as similar characters; if the same stroke state parameter is less than the similarity threshold, it means that the gradient directions of the uniformly illuminated area and the shadow area are less similar, and the more likely they are not the same stroke, and no marking is performed.

[0049] Step S005: Obtain the image clarity parameters of the uniformly illuminated area of ​​each similar character according to the pixel difference coefficient of the similar characters in the uniformly illuminated area and the gradient direction of the contour pixel points; obtain the image clarity parameters of the shadow area of ​​the similar characters; obtain the enhanced restoration coefficient of each similar character in the test paper image through the image clarity parameters of the similar characters and the same stroke state parameters of the semi-occluded characters in the uniformly illuminated area and the occluded characters in the shadow area.

[0050] It should be noted that the size and shape of the shadow part of the obscured area of ​​the test paper are random, and it is impossible to predict the area of ​​the test paper and the number of characters occupied by the obscured part. In order to ensure the integrity and clarity of the content of the test paper scanned by camera, it is necessary to predict and lay out the character circumscribed rectangle obtained from the answer box of the test paper in the same row direction.

[0051] Specifically, the bounding rectangles of similar characters corresponding to the semi-obstructed characters in the evenly illuminated area and the obstructed characters in the shadow area are used as the starting character bounding rectangles for laying out the starting character bounding rectangles. Starting with the starting character bounding rectangle, for the shadow areas of the same row of characters along the X-axis, the character bounding rectangles are laid out based on the average Euclidean distances and the average lengths of all adjacent bounding rectangles in the final split results of the entire row of characters until they are laid out to the boundary of the answer box. Similarly, for the shadow areas in the Y-axis direction, the laying ends at the boundary of the answer box.

[0052] The image clarity parameter of the uniformly illuminated area of ​​similar characters in the i-th row and j-th column is calculated as:

[0053] in, represents the image clarity parameter of the uniformly illuminated area of ​​the similar characters in the i-th row and j-th column, n represents the length of the semi-occluded characters in the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column in the X-axis direction, m represents the length of the semi-occluded characters in the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column in the Y-axis direction, It represents the pixel difference coefficient of the cluster of the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column. The coordinates of the similar characters in the uniform illumination area of ​​the i-th row and j-th column are The gradient direction of the contour pixel.

[0054] Similarly, based on the pixel difference coefficients of the pixels in the occluded characters in the shadow area corresponding to the similar characters and their clusters, the image clarity parameters of the similar characters in the i-th row and j-th column of the shadow area are obtained: .

[0055] Furthermore, the enhanced restoration coefficient of the test paper image The calculation method is:

[0056] in, is the enhancement repair coefficient of similar characters in the i-th row and j-th column, represents the image clarity parameter of the uniformly illuminated area of ​​similar characters in the i-th row and j-th column, represents the image clarity parameter of the shadow area of ​​the similar character in the i-th row and j-th column, is the ratio of the image clarity parameters between the uniformly illuminated area and the shadow area, indicating the difference parameter between the two areas. Indicates the same stroke state parameter of the semi-occluded character in the uniformly illuminated area and the obscured character in the shadow area corresponding to the similar character in the i-th row and j-th column.

[0057] Furthermore, the product of the pixel value of each pixel point in the shadow area of ​​each similar character and the enhancement restoration coefficient is used as the pixel value of each pixel point after enhancement, so as to complete the enhancement of the test paper image and realize the intelligent scanning processing of the test paper.

[0058] So far, the present invention is completed.

[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A test paper intelligent scanning processing method for a test paper marking system, characterized in that: The method comprises the following steps: Acquire a number of test paper images, and obtain a number of contour pixel points of each test paper image through contour detection; The pixels in the test paper image are clustered to obtain several clusters. According to the pixel value differences of different pixels in each cluster, the pixel difference coefficient of each cluster is obtained; according to the pixel difference coefficient of each cluster, the uniform illumination area and the shadow area are obtained; Obtain the bounding rectangle of each character in the uniformly illuminated area, obtain the merged character difference value after each merge of each line of characters according to the size of each bounding rectangle and the distance between adjacent bounding rectangles, obtain the final merged result of each line of characters according to the merged character difference value, and further split each line of characters to obtain the split character difference value after each split, and finally obtain the final split result of each line of characters; According to the characters with non-rectangular circumscribed polygons in the uniformly illuminated area, combined with the shadow area, the semi-occluded characters in the uniformly illuminated area and the obscured characters in the shadow area are obtained; based on the distribution of contour pixels in the semi-occluded characters and the obscured characters, the same stroke state parameters of the semi-occluded characters in the uniformly illuminated area and the obscured characters in the shadow area are obtained, thereby obtaining a number of similar characters; According to the pixel difference coefficient of similar characters in the uniformly illuminated area and the gradient direction of the contour pixels, the image clarity parameters of the uniformly illuminated area of ​​each similar character are obtained; the image clarity parameters of the shadow area of ​​the similar characters are obtained; the enhanced restoration coefficient of each similar character in the test paper image is obtained through the image clarity parameters of the similar characters and the same stroke state parameters of the semi-occluded characters in the uniformly illuminated area and the occluded characters in the shadow area.

2. According to claim 1, a test paper intelligent scanning processing method for a test paper marking system is characterized in that: The specific steps of obtaining the pixel difference coefficient of each cluster are as follows: The calculation method of the regional characteristic parameters of the kth cluster is: The pixel difference coefficient of the kth cluster is calculated as: in, represents the regional characteristic parameter of the kth cluster, represents the standard deviation of the pixel values ​​of all pixels in the kth cluster, represents the number of contour pixels in the kth cluster, represents the pixel difference coefficient of the kth cluster, represents the maximum value of the regional characteristic parameters in all clusters, represents the maximum value of the difference between the pixel values ​​of all pixels in the kth cluster, is a linear normalization function.

3. According to claim 1, a test paper intelligent scanning processing method for a test paper marking system is characterized in that: The specific steps of obtaining the merged character difference value after each merge of each line of characters are as follows: Get the length of the bounding rectangle of each character in the X-axis direction , and simultaneously record the Euclidean distance between adjacent bounding rectangles in the same row ; According to the length of the circumscribed rectangle , and the Euclidean distance between adjacent bounding rectangles , respectively obtain the standard deviation of the length of the circumscribed rectangle of the entire line of characters and the standard deviation of the Euclidean distance , recorded as the length discrete parameter value and the distance discrete parameter value; For any whole line of characters, two adjacent bounding rectangles corresponding to the minimum Euclidean distance among the adjacent characters in the line are merged as the first merge, and the length of the bounding rectangle and the Euclidean distance between the adjacent bounding rectangles are recalculated, so as to obtain the length discrete parameter value and the distance discrete parameter value after the first merge; and so on, several merges are performed in the order of Euclidean distance from small to large, and the length discrete parameter value and the distance discrete parameter value after each merge of the whole line of characters are obtained; the merged character difference value of the whole line of characters after any merge is obtained. .

4. According to claim 3, a test paper intelligent scanning processing method for a marking system is characterized in that: The specific steps of obtaining the final merging result of each line of characters according to the merging character difference value are as follows: For any whole line of characters, the merge result corresponding to the minimum value of the merged character difference values ​​after all merges is selected as the final merge result of the whole line of characters.

5. According to claim 3, a test paper intelligent scanning and processing method for a test paper marking system is characterized in that: The final splitting result of each line of characters is finally obtained, and the specific steps included are as follows: For any whole line of characters, under the final merged result of the whole line of characters, select the character with the longest length in the X-axis direction for splitting in turn, and take the position of the character with the least pixels under the Y-axis coordinate point in the bounding rectangle of each character as the character segmentation area, and so on, split the bounding rectangle of the character from large to small according to the length; obtain the standard deviation of the length of the bounding rectangle of the whole line of characters after each split , and the standard deviation of the Euclidean distance , and further obtain the split character difference value , select the split result corresponding to the minimum value of the split character difference value as the final split result of the entire line of characters.

6. According to claim 1, a test paper intelligent scanning and processing method for a test paper marking system is characterized in that: The specific steps of obtaining the semi-shielded characters in the uniformly illuminated area and the shielded characters in the shadow area are as follows: Characters in the uniformly illuminated area whose circumscribed polygons are not rectangular are regarded as semi-occluded characters. A rectangle is circumscribed to the circumscribed polygon of the semi-occluded character. The area with the maximum difference between the circumscribed rectangle and the polygon is the shaded part that is obscured, which is regarded as the obscured character.

7. According to claim 1, a test paper intelligent scanning processing method for a test paper marking system is characterized in that: The specific steps of obtaining a plurality of similar characters are as follows: The distance between any two contour pixels with opposite gradient directions in the same part is recorded as the width of the character stroke. The same stroke state parameters of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area are calculated as follows: in, is the same stroke state parameter of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area, is the stroke width of the blocked characters in the shadow area, is the character stroke width of the semi-occluded character in the uniformly illuminated area, is the same stroke influence factor of the semi-occluded character in the uniformly illuminated area and the occluded character in the shadow area; The function normalizes the result; A similarity threshold is set. If the state parameter of the same stroke is greater than or equal to the similarity threshold, the semi-occluded characters in the evenly illuminated area and the occluded characters in the shadow area are marked as similar characters.

8. The method for intelligent scanning and processing of examination papers for a paper marking system according to claim 7, characterized in that: The specific method of obtaining the same stroke influence factor is as follows: For the semi-occluded character b in the uniformly illuminated area, obtain the gradient direction of each outline pixel point of the semi-occluded character. For the character strokes of the examinee, obtain the fitting direction vector of the normal vector through the curve fitting algorithm. , recorded as the change direction vector of the character stroke; for the blocked character a in the shadow area, obtain the change direction vector of the character stroke ; By obtaining the character stroke change direction vector of the blocked character a and the semi-blocked character b , Angle , and used as the same stroke influence parameter of the semi-occluded characters in the uniform illumination area and the occluded characters in the shadow area. Use the linear normalization function to process and get the same stroke influence factor .

9. The method for intelligent scanning and processing of examination papers for a paper marking system according to claim 1, characterized in that: The specific steps of obtaining the image clarity parameter of the uniformly illuminated area of ​​each similar character are as follows: in, represents the image clarity parameter of the uniformly illuminated area of ​​the similar characters in the i-th row and j-th column, n represents the length of the semi-occluded characters in the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column in the X-axis direction, m represents the length of the semi-occluded characters in the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column in the Y-axis direction, It represents the pixel difference coefficient of the cluster of the uniformly illuminated area corresponding to the similar characters in the i-th row and j-th column. The coordinates of the similar characters in the uniform illumination area of ​​the i-th row and j-th column are The gradient direction of the contour pixel.

10. The method for intelligent scanning and processing of examination papers for a paper marking system according to claim 1, characterized in that: The specific steps of obtaining the enhancement restoration coefficient of each similar character in the test paper image are as follows: in, is the enhancement repair coefficient of similar characters in the i-th row and j-th column, represents the image clarity parameter of the uniformly illuminated area of ​​similar characters in the i-th row and j-th column, represents the image clarity parameter of the shadow area of ​​the similar character in the i-th row and j-th column, Indicates the same stroke state parameter of the semi-occluded character in the uniformly illuminated area and the obscured character in the shadow area corresponding to the similar character in the i-th row and j-th column.

Citation Information

Patent Citations

  • Shaded character recovery device and method thereof, shaded character recognition device and method thereof

    CN102208022A

  • Stroke width figure based method for extracting Chinese character data from image

    CN104598907A

  • Bank document character recognition method and device

    CN117095423A

  • Question identification method

    CN118781612A

  • Character region extraction device and program

    JP2016157155A