Specific embodiment
The embodiment of the invention provides a kind of recognition methods of answering card and devices, can be improved the accurate of answering card identification
Property.
In order to make those skilled in the art more fully understand the scheme of the embodiment of the present invention, below in conjunction with this hair
Attached drawing in bright embodiment, technical solution in the embodiment of the present invention are explicitly described, it is clear that described embodiment
It is the embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill
The model that the present invention protects all should belong in personnel's all other embodiment obtained under the premise of certain makes creative work
It encloses.
The term " first " that occurs in specification of the embodiment of the present invention, claims and attached drawing, " second ", " third " etc.
It is and to be not intended to describe specific sequence for distinguishing different objects.In addition, term " includes " and " having " and they
Any deformation, it is intended that cover and non-exclusive include.Such as it contains the process, method of some column step or units, be
System, product or equipment are not limited to listed step or unit, but optionally include the steps that not listing or unit,
It or optionally further include the other step or units intrinsic for these process, methods, product or equipment.
Referring to Fig. 1, Fig. 1 is the flow diagram of answer card identification method provided by one embodiment of the present invention.Wherein,
As shown in Figure 1, it includes the following contents that a kind of answering card that one embodiment of the present of invention provides, which knows method for distinguishing:
101, the scanning gray scale picture of answering card to be identified is obtained, includes single choice in the scanning gray scale picture of the answering card
Full-filling identification region, wherein including at least one full-filling unit area in the single choice full-filling identification region.
Answer sheet recognition device may include scanning module, directly be scanned by scanning module to answer card, generate
Scan gray scale picture.
Answer sheet recognition device can not also include scanning module, but receive the scanning that outside scanning module sends over
Picture.Specifically before carrying out answering card identification, other devices with scanning function first sweep the answering card of papery
It retouches, generates scanned picture.At this point it is possible to which the scanned picture of the directly generation, which is sent to identification device, carries out subsequent operation;?
Can original processing be carried out to the scanned picture, specifically include image denoising or ashing before transmitting, it then again will be former
Beginning, treated, and scanning gray scale picture is sent to identification device progress subsequent operation.
The answer rule of answering card, includes identification full-filling region, single choice full-filling region, multiple choice full-filling region
And multiple choice inscribes full-filling region.It in the actual operation process, may include one or more of the above-mentioned type.Its
Middle single choice full-filling unit area includes one of identification full-filling region, single choice full-filling region or two kinds, the list
Selecting full-filling identification region includes some or all of single choice full-filling unit area.It is wrapped in each answering card scanning gray scale picture
One or more full-filling unit area is included, the full-filling state of full-filling frame indicates examinee's full-filling in each full-filling unit area
Information, the identity information and answer result of examinee are determined by identifying the full-filling information of these full-filling frames.Such as lower Fig. 7
In, identification full-filling region 710, in include the full-fillings unit areas such as 711,712;It is wrapped in the full-filling region 720 of single choice
Contain the full-fillings unit areas such as 721,722.Two full-filling frames are included at least in each full-filling unit area, such as are known in identity
It include ten digital full-filling frames of 0-9 in the full-filling unit area 711 or 722 in other full-filling region 710.In single choice
It include " A ", " B ", " C " these three full-filling frames in the 721 or 722 full-filling unit areas in full-filling region 720.
The single choice identification region may include some or all of in identification region and single choice answer region
Full-filling unit area.
102, minimum gradation value in each of single choice full-filling identification region full-filling unit area is identified.
Answering card in the setting position of answering card, can will increase the positioning identifier of answering card as needed.For example, can be with
In the big fringe region of answer, the relatively low bar-shaped frame of some gray values is preset, by the coordinate position of these bar-shaped frames,
The reference coordinate of whole answering card grayscale image is reset or sets, to be positioned to the scanning gray scale picture.It is root
Pass through identification according to reference coordinate to determine examinee each full-filling unit area coordinate value or coordinate range on answering card
The gray value of pixel determines the gray value of full-filling frame in each full-filling unit area internal coordinate value or coordinate range.
In the gray value identified in each described full-filling unit area, picking out the minimum conduct of gray value, this is filled out
Apply the minimum gradation value in unit area.It, can be in identifying each full-filling unit area when the gray value of multiple full-filling frames
By the gray value of the smallest full-filling frame of gray value, as the minimum gradation value in corresponding full-filling unit area.
103, minimum gradation value in each full-filling unit area of the identification is compared, each by the identification is filled out
Apply the binaryzation gray threshold that the maximum gradation value in the minimum gradation value in unit area is set as the scanning gray scale picture.
The full-filling frame minimum gradation value determined in each of single choice identification region full-filling unit area is filled out with other
The full-filling frame minimum gradation value comparison determined in unit area is applied, the maximum gray value of gray value is picked out.It will be singled out
Maximum gradation value be determined as to it is described scanning gray scale picture binaryzation gray threshold.For example, answering card as shown in Figure 7,
In single choice identification region, the minimum gradation value of full-filling frame is 50 and 45 respectively in 711 and 712 two full-filling unit areas, can
Know that the minimum gradation value of full-filling frame in the full-filling frame minimum gradation value 50 to 712 in 711 is big.Just 50 are determined as this when
Final binaryzation gray threshold carries out binaryzation operation to the scanned picture.
104, according to the binaryzation gray threshold of the setting scanning gray scale picture, two are carried out to the scanning gray scale picture
Value operation.
The binaryzation of picture is to set 0 or 255 for the gray value of the pixel of above-mentioned scanning grayscale image on piece, and being will be whole
A scanning gray scale picture, which shows, significantly only has black and white visual effect.During carrying out binaryzation operation, setting
The gray threshold of binaryzation, the pixel for being greater than or equal to setting binaryzation gray threshold are set as 255, set for being less than
The pixel for determining binaryzation gray threshold is set as 0.
105, the scanning gray scale picture after the binaryzation operation is identified, forms answer result.
After gray value for making one and only one full-filling frame in single choice full-filling unit area is 0 binaryzation operation
Answering card grayscale image identified.Specifically, identifying that gray value is the coordinate value or seat of 0 or 255 full-filling frame
Range is marked, is compared according to the coordinate range of the coordinate range of full-filling frame and model answer, to determine the answer of corresponding topic
As a result correctness, and all topics are summarized, ultimately form the final result of all answering cards.
The embodiment of the present invention can be identified for the gray value of each full-filling unit area of answering card, according to
The gray value situation of full-filling adjusts binarization threshold, accuracy of identification can be improved, accurately finds suitable binaryzation gray scale
Threshold value.
Referring to Fig. 2, Fig. 2 is the flow diagram of answer card identification method provided by one embodiment of the present invention.Wherein,
As shown in Fig. 2, it includes the following contents that a kind of answering card that one embodiment of the present of invention provides, which knows method for distinguishing:
The scanning gray scale picture of answering card to be identified is obtained, includes single choice full-filling in the scanning gray scale picture of the answering card
Identification region, wherein including at least one full-filling unit area in the single choice full-filling identification region;
Identify the minimum gradation value in the single choice full-filling identification region in each full-filling unit area;
The minimum gradation value in each full-filling unit area of the identification is compared, by described each full-filling list of identification
Maximum gradation value in first region in minimum gradation value is set as the binaryzation gray threshold of the scanning gray scale picture;
According to the binaryzation gray threshold of the setting scanning gray scale picture, binaryzation is carried out to the scanning gray scale picture
Operation;
Scanning gray scale picture after the binaryzation operation is identified, answer result is formed.
It include wherein at least two full-filling frames in each described full-filling unit area, the identification single choice full-filling is known
Minimum gradation value includes: in the full-filling unit area of each of other region
201, the full-filling frame in each of single choice full-filling identification region full-filling unit area is identified.
Answering card in the setting position of answering card, can will increase the positioning identifier of answering card as needed.For example, can be with
In the big fringe region of answer, the relatively low bar-shaped frame of some gray values is preset, by the coordinate position of these bar-shaped frames,
The reference coordinate of whole answering card grayscale image is reset or sets, to be positioned to the scanning gray scale picture.It is root
According to reference coordinate, to determine the coordinate value or coordinate model of examinee's full-filling frame in each full-filling unit area on answering card
It encloses, is determined by identifying the gray value of pixel in full-filling frame coordinate value in each full-filling unit area or coordinate range
The gray value of full-filling frame.
When identification, the gray value of all pixels point in full-filling frame in each unit area can be identified;It can also
To be to select gray value than the pixel of more typical part or region to represent in each unit area in full-filling frame
Gray value;It is also possible to select multiple gray values than more typical pixel, then according to the operation rule of setting, such as
It is averaged, one of normal distribution value, minimum etc. operation rule or a variety of operation rules determine each unit
Gray value in region in full-filling frame.
202, the lowest gray value for identifying full-filling frame pixel in each full-filling unit area is extracted.
All gray values for identifying full-filling frame in each full-filling unit area are compared, in each described full-filling list
In the gray value identified in first region, pick out gray value it is minimum as the minimum gradation value in this full-filling unit area.
203, the minimum gradation value being determined as the lowest gray value of the full-filling frame in each full-filling unit area.
It, can be by the smallest full-filling of gray value in identifying each full-filling unit area when the gray value of multiple full-filling frames
The gray value of frame, as the minimum gradation value in corresponding full-filling unit area.
The embodiment of the present invention can be carried out for the gray value of the full-filling frame in each full-filling unit area of answering card
Identification, can be improved accuracy of identification, accurately finds suitable binaryzation gray threshold.
Referring to Fig. 3, Fig. 3 is the flow diagram of answer card identification method provided by one embodiment of the present invention.Wherein,
As shown in figure 3, it includes the following contents that a kind of answering card that one embodiment of the present of invention provides, which knows method for distinguishing:
The scanning gray scale picture of answering card to be identified is obtained, includes single choice full-filling in the scanning gray scale picture of the answering card
Identification region, wherein including at least one full-filling unit area in the single choice full-filling identification region;
Identify the minimum gradation value in the single choice full-filling identification region in each full-filling unit area;
The minimum gradation value in each full-filling unit area of the identification is compared, by described each full-filling list of identification
Maximum gradation value in first region in minimum gradation value is set as the binaryzation gray threshold of the scanning gray scale picture;
According to the binaryzation gray threshold of the setting scanning gray scale picture, binaryzation is carried out to the scanning gray scale picture
Operation;
Scanning gray scale picture after the binaryzation operation is identified, answer result is formed.
301, the positioning identifier in the scanning gray scale picture is identified, according to the positioning identifier to the scanning grayscale image
Piece is positioned.
Answering card in the setting position of answering card, can will increase the positioning identifier of answering card as needed.For example, can be with
In the big fringe region of answer, the relatively low bar-shaped frame of some gray values is preset, by the coordinate position of these bar-shaped frames,
The reference coordinate of whole answering card grayscale image is reset or sets, to be positioned to the scanning gray scale picture.According to
Reference coordinate, to determine the coordinate value or coordinate range of examinee's full-filling frame in each full-filling unit area on answering card,
By identifying that the gray value of pixel in full-filling frame coordinate value in each full-filling unit area or coordinate range is filled out to determine
Apply the gray value of frame.
302, according to the arranging rule of the answering card, the single choice is determined in the scanning gray scale picture after the positioning
Full-filling frame coordinate range in full-filling identification region in each full-filling unit area.
It, can be by the relative position of each full-filling frame, shape, size and face in answering card when designing answering card
One or more of color etc. sets a preliminary rule.According to the rule of this initial setting, after positioning described
Operation is carried out in scanning gray scale picture, and then determines the corresponding coordinate range of each full-filling frame.
Referring to Fig. 4, Fig. 4 is the structural schematic diagram of answer card identification method provided by one embodiment of the present invention.Wherein,
As shown in figure 4, a kind of device for answering card identification that one embodiment of the present of invention provides includes the following contents:
410, acquiring unit, for obtaining the scanning gray scale picture of answering card to be identified, the scanning gray scale of the answering card
It include single choice full-filling identification region in picture, wherein including at least one full-filling cellular zone in the single choice full-filling identification region
Domain.
Answer sheet recognition device may include scanning module, directly be scanned by scanning module to answer card, generate
Scan gray scale picture.
Answer sheet recognition device can not also include scanning module, but receive the scanning that outside scanning module sends over
Picture.Specifically before carrying out answering card identification, first the answering card of papery is scanned, generates scanned picture.At this point, can
Identification device, which is sent to, with the scanned picture of the direct generation carries out subsequent operation;It can also be swept before transmitting to described
The piece that traces designs carries out original processing, specifically includes image denoising or ashing, then again will original treated scans gray scale picture
It is sent to identification device and carries out subsequent operation.
The answer rule of answering card, includes identification full-filling region, single choice full-filling region, multiple choice full-filling region
And multiple choice inscribes full-filling region.It in the actual operation process, may include one or more of the above-mentioned type.Its
Middle single choice full-filling unit area includes one of identification full-filling region, single choice full-filling region or two kinds, described
Single choice full-filling identification region includes some or all of single choice full-filling unit area.Each answering card scans in gray scale picture
It include one or more full-filling unit area, the full-filling state of full-filling frame indicates that examinee fills out in each full-filling unit area
The information of painting determines the identity information and answer result of examinee by identifying the full-filling information of these full-filling frames.Under such as
In Fig. 7, identification full-filling region 710, in include the full-fillings unit areas such as 711,712;In the full-filling region 720 of single choice
It include the full-fillings unit areas such as 721,722.Two full-filling frames are included at least in each full-filling unit area, such as in identity
It include ten digital full-filling frames of 0-9 in the full-filling unit area 711 or 722 for identifying full-filling region 710.In single choice
Full-filling region 720 721 or 722 full-filling unit areas in include " A ", " B ", " C " these three full-filling frames.
The single choice identification region may include some or all of in identification region and single choice answer region
Full-filling unit area.
420, gray value recognition unit, for identification each of described single choice full-filling identification region full-filling unit area
Middle minimum gradation value.
Answering card in the setting position of answering card, can will increase the positioning identifier of answering card as needed.For example, can be with
In the big fringe region of answer, the relatively low bar-shaped frame of some gray values is preset, by the coordinate position of these bar-shaped frames,
The reference coordinate of whole answering card grayscale image is reset or sets, to be positioned to the scanning gray scale picture.It is root
Pass through identification according to reference coordinate to determine examinee each full-filling unit area coordinate value or coordinate range on answering card
The gray value of pixel determines the gray value of full-filling frame in each full-filling unit area internal coordinate value or coordinate range.
In the gray value identified in each described full-filling unit area, picking out the minimum conduct of gray value, this is filled out
Apply the minimum gradation value in unit area.It, can be in identifying each full-filling unit area when the gray value of multiple full-filling frames
By the gray value of the smallest full-filling frame of gray value, as the minimum gradation value in corresponding full-filling unit area.
430, comparison unit, minimum gradation value in each full-filling unit area for comparing the identification will be described
Maximum gradation value in each full-filling unit area of identification in minimum gradation value is set as the two of the scanning gray scale picture
Value gray threshold.
The full-filling frame minimum gradation value determined in each of single choice identification region full-filling unit area is filled out with other
The full-filling frame minimum gradation value comparison determined in unit area is applied, the maximum gray value of gray value is picked out.It will be singled out
Maximum gradation value be determined as to it is described scanning gray scale picture binaryzation gray threshold.For example, answering card as shown in Figure 7,
In single choice identification region, the minimum gradation value of full-filling frame is 50 and 45 respectively in 711 and 712 two full-filling unit areas, can
Know that the minimum gradation value of full-filling frame in the full-filling frame minimum gradation value 50 to 712 in 711 is big.Just 50 are determined as this when
Final binaryzation gray threshold carries out binaryzation operation to the scanned picture.
440, binaryzation arithmetic element, for the binaryzation gray threshold according to the setting scanning gray scale picture, to institute
It states scanning gray scale picture and carries out binaryzation operation.
The binaryzation of picture is to set 0 or 255 for the gray value of the pixel of above-mentioned scanning grayscale image on piece, and being will be whole
A scanning gray scale picture, which shows, significantly only has black and white visual effect.During carrying out binaryzation operation, setting
The gray threshold of binaryzation, the pixel for being greater than setting binaryzation gray threshold is set as 255, for being less than setting two-value
The pixel for changing gray threshold is set as 0.
450, result recognition unit, for identifying that formation is answered to the scanning gray scale picture after the binaryzation operation
Inscribe result.
After gray value for making one and only one full-filling frame in single choice full-filling unit area is 0 binaryzation operation
Answering card grayscale image identified.Specifically, identifying that gray value is the coordinate value or seat of 0 or 255 full-filling frame
Range is marked, is compared according to the coordinate range of the coordinate range of full-filling frame and model answer, to determine the answer of corresponding topic
As a result correctness, and all topics are summarized, ultimately form the final result of all answering cards.
The embodiment of the present invention can be identified for the gray value of each full-filling unit area of answering card, can be with
Accuracy of identification is improved, suitable binaryzation gray threshold is accurately found.
Referring to Fig. 5, Fig. 5 is the structural schematic diagram of answer card identification method provided by one embodiment of the present invention.Wherein,
As shown in figure 5, a kind of device for answering card identification that one embodiment of the present of invention provides includes the following contents:
It in the embodiment shown in fig. 4, include at least two full-filling frames in each described full-filling unit area.
The gray value recognition unit includes:
511, full-filling frame recognition unit, for identification each of described single choice full-filling identification region full-filling unit area
In full-filling frame.
Answering card in the setting position of answering card, can will increase the positioning identifier of answering card as needed.For example, can be with
In the big fringe region of answer, the relatively low bar-shaped frame of some gray values is preset, by the coordinate position of these bar-shaped frames,
The reference coordinate of whole answering card grayscale image is reset or sets, to be positioned to the scanning gray scale picture.It is root
According to reference coordinate, to determine the coordinate value or coordinate model of examinee's full-filling frame in each full-filling unit area on answering card
It encloses, is determined by identifying the gray value of pixel in full-filling frame coordinate value in each full-filling unit area or coordinate range
The gray value of full-filling frame.
When identification, the gray value of all pixels point in full-filling frame in each unit area can be identified;It can also
To be to select gray value than the pixel of more typical part or region to represent in each unit area in full-filling frame
Gray value;It is also possible to select multiple gray values than more typical pixel, then according to the operation rule of setting, such as
It is averaged, one of normal distribution value, minimum etc. operation rule or a variety of operation rules determine each unit
Gray value in region in full-filling frame.
512, extraction unit, for extracting the most low ash of full-filling frame pixel in described each full-filling unit area of identification
Angle value.
All gray values for identifying full-filling frame in each full-filling unit area are compared, in each described full-filling list
In the gray value identified in first region, pick out gray value it is minimum as the minimum gradation value in this full-filling unit area.
513, gray value determination unit, for the lowest gray value of the full-filling frame to be determined as each full-filling cellular zone
Minimum gradation value in domain.
It, can be by the smallest full-filling of gray value in identifying each full-filling unit area when the gray value of multiple full-filling frames
The gray value of frame, as the minimum gradation value in corresponding full-filling unit area.
The embodiment of the present invention can be carried out for the gray value of the full-filling frame in each full-filling unit area of answering card
Identification, can be improved accuracy of identification, accurately finds suitable binaryzation gray threshold.
Referring to Fig. 6, Fig. 6 is the structural schematic diagram of answer card identification method provided by one embodiment of the present invention.Wherein,
As shown in fig. 6, a kind of device for answering card identification that one embodiment of the present of invention provides includes the following contents:
The gray value recognition unit includes:
611, positioning unit, for identification it is described scanning gray scale picture in positioning identifier, according to the positioning identifier pair
The scanning gray scale picture is positioned.
Answering card in the setting position of answering card, can will increase the positioning identifier of answering card as needed.For example, can be with
In the big fringe region of answer, the relatively low bar-shaped frame of some gray values is preset, by the coordinate position of these bar-shaped frames,
The reference coordinate of whole answering card grayscale image is reset or sets, to be positioned to the scanning gray scale picture.According to
Reference coordinate, to determine the coordinate value or coordinate range of examinee's full-filling frame in each full-filling unit area on answering card,
By identifying that the gray value of pixel in full-filling frame coordinate value in each full-filling unit area or coordinate range is filled out to determine
Apply the gray value of frame.
612, coordinate determination unit, the scanning gray scale for the arranging rule according to the answering card, after the positioning
The full-filling frame coordinate range in the single choice full-filling identification region in each full-filling unit area is determined in picture.
It, can be by the relative position of each full-filling frame, shape, size and face in answering card when designing answering card
One or more of color etc. sets a preliminary rule.According to the rule of this initial setting, after positioning described
Operation is carried out in scanning gray scale picture, and then determines the corresponding coordinate range of each full-filling frame.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
In several embodiments provided herein, it should be understood that, disclosed device can be by another way
It realizes.For example, described above, there may be another division manner, such as multiple units or components can combine or can be with
It is integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed mutual
Coupling or direct-coupling or communication connection be can through some interfaces, the INDIRECT COUPLING or communication link of device or unit
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or can also be with branch to multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can integrate in one processing unit, it is also possible to
Each unit physically exists alone, and can also be integrated in one unit with two or more units.Above-mentioned integrated unit
It can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the embodiment of the present invention
Essential the part that contributes to existing technology in other words or all or part for changing technical solution can be with software products
Form embodies, which is stored in a storage medium, including some instructions are used so that a meter
It calculates machine equipment (being personal computer, server or network equipment etc.) and executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, read-only memory (ROM, Read-Only Memory), deposits at random
The various storage program codes such as access to memory (RAM, Random Access Memory), mobile hard disk, magnetic or disk
Medium.
The above, above embodiments are only to illustrate the technical solution of the embodiment of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify to technical solution documented by foregoing individual embodiments, or part of technical characteristic is equally replaced
It changes;And these are modified or replaceed, each embodiment technical solution of the present invention that it does not separate the essence of the corresponding technical solution
Range.