CN100485714C - Method and device for recognizing test paper score - Google Patents

Method and device for recognizing test paper score Download PDF

Info

Publication number
CN100485714C
CN100485714C CN 200710039969 CN200710039969A CN100485714C CN 100485714 C CN100485714 C CN 100485714C CN 200710039969 CN200710039969 CN 200710039969 CN 200710039969 A CN200710039969 A CN 200710039969A CN 100485714 C CN100485714 C CN 100485714C
Authority
CN
China
Prior art keywords
layer
volume
input
output
recognition
Prior art date
Application number
CN 200710039969
Other languages
Chinese (zh)
Other versions
CN101038626A (en
Inventor
冯运亮
彭之威
雷 薛
Original Assignee
上海大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海大学 filed Critical 上海大学
Priority to CN 200710039969 priority Critical patent/CN100485714C/en
Publication of CN101038626A publication Critical patent/CN101038626A/en
Application granted granted Critical
Publication of CN100485714C publication Critical patent/CN100485714C/en

Links

Abstract

本发明涉及一种试卷卷面分数识别方法和装置。 The present invention relates to a paper identification method and apparatus juanmian fraction. 本发明的试卷卷面分数识别方法是采用多层感知网络对数字手写体进行识别,识别通过学习训练过程和识别过程来实现。 Identification papers juanmian score invention is the use of a multilayer perceptron network digital handwriting recognition, the recognition is achieved by training the learning process and the recognition process. 本发明的试卷卷面分数识别装置包括一个放置试卷的台面,台面上设置3~4根可调立柱支撑着一块与台面平行安置的上面板,上面板上装有:一个摄像头对准试卷卷面分数、一个激光灯照射试卷卷面分数区域和1~4个辅助灯光照亮试卷卷面;摄像头经数据采集卡连接一台电脑。 Paper juanmian score recognition apparatus according to the present invention comprises a mesa paper placement table provided three to four adjustable supporting column disposed parallel to the table with a panel, upper panel provided with: a camera at papers fraction Juanmian , a fraction of the laser light irradiated area and the beginning of a book papers 1 to 4 Juanmian auxiliary lighting to illuminate papers; camera is connected via a data acquisition card of a computer. 本装置易于构建,操作方便,能对试卷卷面手写体分数进行准确、高效识别,满足实际运用要求。 This device is easy to construct, easy to operate, capable of accurate handwriting juanmian paper fraction, identification efficient, practical use to meet requirements.

Description

试巻巻面分数识别方法和装置 Volume Volume test method and apparatus for face recognition score

技术领域 FIELD

本发明涉及一种手写体数字识别方法和装置,特别是一种试巻巻面分数识别方法和装置。 The present invention relates to a handwritten digit recognition method and apparatus, and particularly to a method of identification scores Volume Volume and surface test apparatus. 背景技术 Background technique

现在教学过程中对试巻巻面分数进行处理的方法可分为两类,一类是人工处理方法, 一类是利用光反射原理对答题卡进行扫描的方法。 The method will now test scores Volume Volume surface treatment teaching process can be divided into two categories, one is a manual processing method, one is a method of scanning answer sheets using light reflection principle. 前者利用人工的方法对试巻巻面的分数进行教学处理,消耗大量的人力和物力,效率低,容易出错。 The former use of artificial methods of test scores Volume Volume face teaching process, consumes a lot of manpower and material resources, inefficient, error-prone. 后者利用光反射原理对答题卡扫描识别,要求用特定的笔进行涂写,虽然目前有广泛应用,识别率高,但对答题卡样式和涂写工具要求固定,成本高,实际应用不易实现,其试巻格式单一,只适合于标准化试巻。 The latter use of light reflection on the principle of scanning identification cards answer, graffiti requires a specific pen, although there are widely applied, recognition rate, but the answer sheet form and fixed graffiti tools require, high cost, easy to achieve practical application, which Volume format single test, a standardized test is only suitable for Volume. 发明内容 SUMMARY

本发明的目的在于针对已有技术存在的缺陷,提供一种识别率高、易于应用的试巻巻面分数识别方法和装置,满教学的需要。 Object of the present invention is the presence of the defects of the prior art, to provide a high recognition rate, easy test scores Volume Volume face recognition method and apparatus of the applications required full teaching.

为达到上述的发明目的,本发明的构思是:试巻巻面分数为手写体数字,本发明对手写体数字的识别采用的是BP神经网络,也称为多层层感知网络,具有三层结构, 即:输入层、隐含层(也称中间层)和输出层,如图1所示。 To achieve the above object of the present invention, the inventive concept is: Volume Volume test surface fraction of handwritten digits, recognition of handwritten digits of the present invention uses BP neural network, also known as multi-layer perception networks, having a three-layer structure, That is: the input layer, a hidden layer (also called intermediate layer) and an output layer, as shown in FIG.

图中的圆圈表示神经元,相邻层之间的各神经元实现全连接,即下一层的每一个神经元都与上一层的每个神经元实现全连接,但是每层中各神经元之间无连接。 FIG circles represent neurons, each neural element between adjacent layers to achieve fully connected, i.e., a lower layer of each neuron to realize a fully connected to each neuron on a layer, but each layer of each neural no connection element.

利用多层感知网络进行模式识别必须要有一个过程。 There must be a pattern recognition process uses multi-layer perception network. 该过程以一种"学习"的方式进行。 This process is carried out in a "learn" mode. 首先对每一种输入模式(即手写体图像)设定一个期望输出值。 First, for each input pattern (i.e. handwritten image) setting a desired output value. 然后对网络输入记忆模式,并由输入层经中间层向输出层传播(称为"模式顺传播")。 Memory mode is then input to the network, the input layer to the output layer, by propagation (referred to as "the forward propagating mode") via an intermediate layer. 实际输出与期望输出的差即是误差。 The actual output and the desired output error that is a difference. 按照误差平方最小这一规则,由输出层往中间层逐层修正连接权值,此过程称为"误差逆传播"。 Rule according to the minimum square error, the correction layer by layer by the connection weight output layer to the middle layer, a process known as "back propagation." 随着"模式顺传播"和"误差逆传播"过程的交替反复进行。 With the "forward propagating mode" and the "error back propagation" process are alternately repeated. 网络的实际输出逐渐向各自所对应的期望输出逼近,网络对输入模式的响应的正确率也不断上升。 The actual output of the network corresponding to each gradually to approach a desired output, network input mode correct response rate is also rising. 通过此学习过程,确定和保存各层间的连接权值之后就可以识别输入的图像了。 By this learning process, and save the connection after determining the weights between the layers can identify the input image.

BP网络学习算法是最小均方差的学习方式。 BP learning algorithm is the smallest variance of all learning. 先假设BP网络每层有N个处理单元,每个处理单元为非线性输入输出关系,采用的输出函数为: BP assume each network with N processing units, each processing unit is a nonlinear input-output relations, the output function is used:

<formula>formula see original document page 5</formula> (1) <Formula> formula see original document page 5 </ formula> (1)

训练集包含M个样本模式对(J^,K) (A: = l,2,...,m),对第P个样本单元j的输 Training set comprising M samples mode (J ^, K) (A: = l, 2, ..., m) transmission, the first sample element j P

入总和记为朋^.,单元j的输出记作C^,贝IJ: Four referred to as the sum ^, j output unit referred to as ^ C, Pui IJ.:

<formula>formula see original document page 5</formula>(2) <Formula> formula see original document page 5 </ formula> (2)

<formula>formula see original document page 5</formula> (3) 其中^,为神经元i, j间联系的权值。 <Formula> formula see original document page 5 </ formula> (3) where ^, is the neuron i, the value of contact between the weight j.

若任意设置网络初始权值,那么对每个输入模式P,网络的实际输入与期望输出之间有一定误差,定义网络误差: If arbitrarily set initial network weights, then for each input mode P, a certain error, the error between the actual definition of the network input and the desired output of the network:

<formula>formula see original document page 5</formula>(4)<formula>formula see original document page 5</formula> (5) <Formula> formula see original document page 5 </ formula> (4) <formula> formula see original document page 5 </ formula> (5)

式中4/表示第p个输入模式,输出单元j的期望输出。 In the formula 4 / p represents the desired output of the first input mode, the output unit j.

这种基本的BP网络具有很强的信息处理能力。 This basic BP network has a strong information processing ability. 根据上述的发明构思,本发明采用下述技术方案: According to the inventive concept, the present invention adopts the following technical scheme:

一种试巻巻面识别方法,其特征在于采用多层感知网络对数字手写体进行识别, Volume Volume test surface one kind of identification method, characterized in that a multi-layer perceptron network digital handwriting recognition,

其识别通过学习训练过程和识别过程来实现: (1)学习训练过程步骤: Which is achieved by the learning identification training process and recognition process: (1) learning and training process steps:

① 输入样本:首先将印在试巻上分数图像由图像采集卡的模数转换变成数字信号输入计算机; ① input sample: First printed test image becomes Volume fraction of the ADC image acquisition card digital signal input into the computer;

② 预处理:然后对拍摄得到的数字图像进行去噪声、倾斜调整、宽高归一化等预处理; ② Pretreatment: capturing a digital image and then was subjected to de-noise, tilt adjustment, the aspect preprocessing such as normalization;

◎特征提取:对数字图像取出它的点阵构成特征值样本对(A,;^),作为BP网 ◎ feature extraction: take it out on the digital image dot constituting the feature values ​​of the samples (A,; ^), as a BP network

络的输入值。 Input value envelope. 即把数字图像上的一个象素的值都作为一个特征值保存在数组中; © BP网络训练:BP网络训练过程分为"模式顺传播""误差逆传播": I.e., the value of a pixel of the digital image as a feature value are stored in the array; © BP network training: BP network training process is divided into "forward propagating mode", "back propagation":

(a)"模式顺传播"的前向别隊开始工作时,先初始化"输入层——隐含层"和"隐含 When the former (a) "mode shun communication" to the other team started working, first initialize "input layer - hidden layer" and "implied

层——输出层"等权值参数;对样本逐个扫描,对样本中的单个数字图像提取特征向量,将它们输送到输入层, 根据神经元间连接的权值R,计算"e^、 C^,得到该层的理想输出;该数据作为隐 Layer - output layer "parameter values ​​such as the right; individual scans the sample, a single digital image of the sample feature vectors are extracted, they are conveyed to the input layer, according to a weight value R connected between neurons, is calculated" e ^, C ^, obtained over the output layer; the data as hidden

含层的输入,同样得到隐含层的理想输出;再从隐含层传到输出层,得到结果; Input-containing layer, to obtain the same output over the hidden layer; and then spread from the hidden layer and output layer, the results obtained;

⑨"误差逆传播"是将输出层的结果与理想输出比较,计算输出层每个结点上的权值误差,根据输出层结点上的误差计算隐层每个节点上的误差;再分别计算隐含层、 输入层的误差,对每一个神经元间的权值修正; ⑨ "error back propagation" is the result of the comparison with the ideal output layer, the error value calculated on the weight of each node output layer, the hidden layer error is calculated for each node based on the error in the output layer node; then were calculating hidden layer, the error in the input layer of each of the weights between neurons correction;

误差逆传播中要对误差进行统计,计算出均方误差,如果均方误差满足期望值, 而且不超过最大循环次数则跳出循环。 In error back propagation error statistics to calculate the mean square error, mean square error if meet expectations, but does not exceed the maximum number of cycles is out of the loop. 如果达不到预期的误差值,或者超过了最大的循环次数,需要改变训练参数。 If not achieve the desired error value or exceeds the maximum number of cycles required to change the training parameters. 直到训练结束。 Until the end of the training.

⑤训练结束后,会在样本图片所在的目录下生成3组数据,分别以计算机文件的形式存储。 ⑤ After the training, three sets of data will be generated in the directory where the sample image, are stored in the form of computer files. 即"win.dat"、 "whi.dat"、 "m皿.dat',。保存着输入层与隐层之间的权值、 隐层与输出层之间的权值和各层结点的个数信息,供下面的识别使用。 I.e. "win.dat", "whi.dat", "m dish .dat ',. holds the weights between the input layer and the hidden layer, the weights of each layer and the junction between the hidden layer and the output layer number information for identifying the use of the following.

(2)识别过程步骤: (2) identify the process steps:

① 输入待识别数字图像:采集待识别的包含手写体数字的图片; ① input digital image to be recognized: capture images of handwritten digits to be identified;

② 预处理:同步骤(l)中的预处理方法一样; ② Pretreatment: The same pretreatment as in step (l) in;

③ 特征提取:同前步骤(l)中学习训练过程中特征提取方法一样,对数字图像取出它的点阵构成特征值样本对(Xk,Yk); ③ feature extraction: learning during training feature extraction as in previous step (l), the extracted dot which constitutes the digital image feature values ​​of sample (Xk, Yk);

© BP网络识别:把提取到的特征向量输送到输入层,根据权值信息激活模式顺传播的前向输入处理通道,在神经元输出结点上得到判别输出结果,即完成该手写体图像的识别。 © BP network identification: The extracted feature vector is supplied to the input layer, according to the forward input processing channel weight information an active mode of the forward propagating obtain discrimination output in the neuron output node, is completed to identify the handwriting image .

一种试巻巻面分数识别装置,采用上述的试巻巻面分数识别方法进行操作运用, 包括一个放置试巻的台面,其特征在于所述的台面上设置3〜4根可调立柱支撑着一块与台面平行安置的上面板;所述的上面板上装有: 一个摄像头对准试巻的巻面分数、 一个激光灯照射试巻的巻面分数区域和1〜4个辅助灯光照亮试巻巻面;所述的摄像头经数据采集卡连接一台电脑。 Volume Volume fraction of one kind of face recognition device again operates using the above-described test scores Volume Volume surface recognition method, comprising placing a sample of the Volume table, wherein said table is provided with a support column 3 to 4 adjustable root and an upper panel disposed parallel to the table; said upper panel provided with: a camera at the test scores Volume Volume surface, the irradiation of a laser light test Volume Volume fraction of surface area and the auxiliary lights illuminate again ~ 4 Volume Volume surface; the camera is connected via a data acquisition card of a computer. 摄像头获取试巻巻面中分数区域的图像,经数据采集卡送入电脑,电脑对图像进行处理和分数识别,并生成报表。 Camera to obtain an image Volume Volume test surface area fraction, the data acquisition card into the computer, the image processing computer to identify and score, and report.

本发明与现有技术相比较,具有如下显而易见的突出实质性特点和显著优点:本发明的试巻巻面分数识别方法是采用多层感知网络对数字手写体进行识别,对图像处理和识别,能够准确高效识别试巻上的分数。 Compared with the prior art the present invention has the following prominent substantive features and obvious significant advantages: Volume Volume test scores plane identification method of the present invention is the use of a multilayer perceptron network digital handwriting recognition, image processing and recognition can score on the accurate and efficient identification Volume test. 本发明的试巻巻面分数识别装置,可调节支立柱的高度,调节摄像头的焦距,达到识别不同大小样式的试巻,结构简单,易 Volume Volume fraction of test face recognition apparatus according to the present invention, the adjustable height column savings, adjust the focus of the camera, to identify Volume test patterns of different sizes, simple structure, easy

6于构建,成本低,便于操作,能满足实际运用要求。 6 to build, low cost, ease of operation, to meet the requirements of practical use. 附图说明 BRIEF DESCRIPTION

图l是三层感知网络模型图。 Figure l is a three-aware network model diagram.

图2是手写数字图像的七段投影图。 FIG 2 is a projection view of seven handwritten digital image.

图3是手写数字图像划分成想3X4子块示图。 Figure 3 is a digital image into a hand 3X4 sub-blocks like shown in FIG.

图4是笔划密度特征提取的示意图。 4 is a schematic density stroke feature extraction.

图5是数字识别结果的学号部分示图。 FIG 5 is a digital number recognition result learning section shown in FIG.

图6是数字识别结果的分数部分示图。 FIG 6 is a fractional portion of the number recognition result shown in FIG.

图7是识别学号示图。 FIG 7 is a diagram of the identification number of school.

图8是识别分数示图。 FIG 8 is a diagram of recognition score.

图9是本发明的一个试巻巻面分数识别装置的结构示意图。 FIG 9 is a schematic view of a test surface of Volume Volume fraction recognition apparatus of the present invention. 具体实施方式实施例h DETAILED DESCRIPTION Example embodiments h

本试巻巻面分数识别方法操作步骤如下: This test Volume Volume fraction surface recognition method steps are as follows:

1、 样本训练前的预处理步骤: 1, pre-treatment step before the training samples:

首先将印在试巻上感兴趣的区域(ROI)经过视频采集卡产生模拟信号,再通过 First printed on the test area Volume of interest (ROI) generates an analog signal through the video capture card, and then by

模数转换变成256色的数字信号输入计算机。 Analog to digital converter 256 into a digital color signal input into the computer. 试巻纸张薄厚、洁白度、光洁度、书写 Volume test paper thickness, whiteness, smoothness, writing

力度、笔划质量以及拍摄时光线的明暗乃至角度都要造成字形的变化,产生污点、飞白、断笔、交连等干扰。 Strength, quality, and stroke even when shooting dark angle of the light to be caused by changes in shape, smear, white fly, broken pen, cross-linked and other interference. 因此, 一般由拍摄得到的数值化的字符还需要多种进一步的处理。 Thus, the general value of the character obtained by shooting also requires more further processing.

处理过程包括256色转灰度图、将灰度图二值化、边缘锐化和去噪、对待识别数字部分的整体倾斜调整、分割出单个数字、标准宽高归一化和紧缩重排归一化的过程。 Process including color to grayscale 256, the gray image binarization, noise removal and edge sharpening, the overall treatment of the tilt adjustment section identification number, a single digital division, the standard width and height normalized and normalized tightening rearrangement of a process.

2、 特征提取方法 2, feature extraction

一个好的特征提取方案是整个识别系统中的关键一环,要对字型畸变和位移变化有很强的抗干扰能力。 A good solution is a whole feature extraction recognition system a key ring, to have a strong anti-interference ability shaped distortion and displacement. 在本发明中是对每个数字取它的16*32维特征值,并作为BP 网络的输入值。 In the present invention, it is taken 16 * 32-dimensional feature values ​​for each digit, and as an input value BP network. 在确定特征值取法时,经过下面三个阶段: In determining the characteristic value emulated, through the following three stages:

第一阶段:宏观特征的抽取。 First Stage: Extraction of the macroscopic characteristics. 宏观特征的使用,能全面反映手写数字图像各方面 Use the macro feature, can fully reflect all aspects of handwritten digital images

的特征,提高手写数字识别系统的性能。 Features to improve the performance of digital handwriting recognition system.

宏观特征的抽取必须遵循以下原则: (1)易于提取;(2) 具有较强的分类能力,即该特征对不同的数字应表现出较大的差异,对相同的数字则表现出尽可能小的差异- Macro features must be extracted following principles: (1) easy to extract; (2) has a strong ability of classification, i.e., the characteristics of different numbers should exhibit a greater difference, the same numbers as small as possible showed a differences -

(3) 具有较高的稳定性,尽量减少笔划断裂和粘连的影响。 (3) high stability, minimize the impact of stroke and adhesion breaking. 在图像规格化和二值化后,根据以上原则选取下述几种宏观特征: After the image binarization and normalization, the following selection of several of the above principles macroscopic characteristics:

(1) 7'段框架投影值 (1) 7 'frame segment projection value

7段框架投影形状如图2所示,投影方法是将任一点向最近的框边投影,最后统计每个框边的投影点数,这样就形成了7个数,归一化后作为一个数字的特征向量。 7 segment frame shape shown in FIG projection, the projection method according to any one o'clock projection 2 to the nearest edge of the frame, the final count of the projection point of each side frame, thus forming a number of 7, as a post-normalized number Feature vector. 抽取7段投影特征的实质是信息压縮,即将m*n维的信息压縮成七维的信息。 Wherein the projection section 7 extracts the essence of data compression, i.e. m * n dimensional information is compressed into a seven-dimensional information.

(2) 粗网格特征 (2) coarse mesh feature

在对手写体数字图像进行剪裁之后,将手写数字图像划分成大小相等的3*4个子块(如图3所示),求出每块中黑像素所占比例P ,构成一个向量x^Pl, P2,……, P12}。 After the handwritten digital image cropping, handwritten digital image into equal size 3 * 4 sub-block (FIG. 3), each obtained in the proportion of black pixels P, constituting a vector x ^ Pl, P2, ......, P12}. 这样就将图像压縮成了12维的信息。 Such image compression information will become 12-dimensional.

第二阶段,对笔划密度特征的提取。 The second phase, the density of the stroke feature extraction. 笔划密度特征对字形畸变和位移变化有较好的抗干扰能力,由于书写风格不同,手写数字的字形差异较大,采用笔划密度特征作为手写数字的识别特征能得到较高的识别率。 Density stroke displacement and distortion of the shape have better anti-jamming capability, due to the different writing styles, font handwritten numeral differences, characterized in using as the stroke recognition feature density handwritten digits high recognition rate can be obtained. 对1XW的标准窗格,从水平、垂直、 45'、 135'4个方向扫描数字,每个方向取n个特征,形成有4n个分量的特征向量G: 1XW pane of standard, horizontal, vertical, 45 ', 135'4 digital scanning direction, each direction taking n features, 4n is formed with a feature vector component G:

0 = ( C„ tq »'" *., 1"3,,,效, 0 = (C "tq» ' "*., 1" 3 ,,, effect,

,g縱,'","》 , G vertical, "", ""

为了减少特征向量中分量的个数,以减少BP网络输入层的节点数,可以将几个像素行归并为个扫描行。 In order to reduce the number of feature vector components, to reduce the number of nodes of the input layer BP, several rows may be merged into the pixel scan lines. 这种降维处理能有效降低BP网络的规模,提高识别的实时性。 This dimensionality reduction can effectively reduce the size of BP network, improve real-time recognition. 经实验,在每个方向上取16个扫描行,形成16X4=64个分量的特征向量G。 The experiment, take 16 scanning lines in each direction, is formed 16X4 = 64 feature vector component G. 对于二值图像只需对扫描行扫描到的数字黑像素点的个数做累加计算即可得到G,为此,需要把窗格4个方向的坐标都量化为1〜16,函数g用于计算一个像素行中黑像素点的个数。 For binary image only on the number of scanning lines scanned digital black pixels do cumulative calculation to obtain G, for this purpose, it is necessary to coordinate the direction of the pane 4 are quantized to 1~16, for the function g count the number of black pixels in a pixel row. 设P为沿某个方向的像素点总数,则一个扫描行中像素行的行数为Pn =p /16;设任意一个扫描行的起始像素行的行号为Pn,则一个扫描行中的黑像素点数为,其中s4、 2、 3、 4, t=l、 2、…、16。 Let P be the total number of pixels in a certain direction, the number of rows of pixels in a scan line is the line Pn = p / 16; the line number of the start pixel rows is provided for any one scan line Pn, the one scan line the number of pixels to black, wherein s4, 2, 3, 4, t = l, 2, ..., 16.

图4为笔划密度特征提取的示意图(水平方向)。 4 is a schematic view of the density of feature extraction stroke (the horizontal direction).

第三阶段,全扫描法的特征提取法。 The third stage, full scan feature extraction method. 本发明使用的是,把一张含数字图片通过行列扫描,把每一个象素上的值都作为一个特征值保存data[]这个数组中,具体VC实现代码如下-double** code (BYTE* lpDIBBits, int num' LONG lLineByte,LONG lSwidth'LONG ISheight) Used in the present invention, the digital image comprising a line scan through, the value of each pixel are stored as a characteristic value Data [] array in this particular VC code looks -double ** code (BYTE * lpDIBBits, int num 'LONG lLineByte, LONG lSwidth'LONG ISheight)

〃循环变量 〃 loop variable

int i, j, k: int i, j, k:

BYTE* IpSrc; 〃建立保存特征向量的二维数组double林data; BYTE * IpSrc; 〃 establish a two-dimensional array of double forest data stored feature vectors;

〃为这个数组申请二维存储空间 〃 apply for this two-dimensional array of storage space

data = alloc_2d_dbl(num, lSwidth本lSheight); data = alloc_2d_dbl (num, lSwidth present lSheight);

〃将归一化的样本的每个象素作为一个特征点提取出来 〃 The normalized samples per pixel extracted as a feature point

〃逐个数据扫描 〃 individually scan data

for(k=0;k<num;k++) for (k = 0; k <num; k ++)

〃对每个数据逐行扫描for(i=0;i<lSheight;i++) 〃 progressive scan for each data for (i = 0; i <lSheight; i ++)

〃对每个数据逐列扫描 〃 scanned column by column for each data

for(j=k*lSwidth;j〈(k+1)*lSwidth;j++) for (j = k * lSwidth; j <(k + 1) * lSwidth; j ++)

〃指向图像第i行第j列个象素的指针IpSrc = lpDIBBits + i氺比ineByte + j; 〃如果这个象素是黑色的if(*(lpSrc) ==0) 〃 pointing image i-th row j-th column pixel pointer IpSrc = lpDIBBits + i Shui than ineByte + j; 〃 if the pixel is black if (* (lpSrc) == 0)

9〃将特征向量的相应位置填1 The eigenvector corresponding position 9〃 filled 1

data[k][i*lSwidth+jk*lSwidth]=l; data [k] [i * lSwidth + jk * lSwidth] = l;

〃如果这个象素是其他的if(*(lpSrc) !=0) 〃将特征向量的相应位置填0 data[k][i*lSwidth+jk*lSwi dth]=0; If the pixels are 〃 other if (! * (LpSrc) = 0) corresponding to the position of the feature vector 〃 fill 0 data [k] [i * lSwidth + jk * lSwi dth] = 0;

return(data); return (data);

3、利用BP算法训练前向网络,使网络完成函数逼及模式识别。 3, before use of BP algorithm to train the network, forcing the network to complete the function and pattern recognition. 训练前先初始化输入层-隐层和隐层-输出层的权值以及一些参数-bprm—randomize—weights( input—weights, n—in, n—hidden); Initialized before training input layer - hidden layer and the hidden layer - and the output layer weights parameters -bprm-randomize-weights (input-weights, n-in, n-hidden);

bpnn—randomize—weights( hidden—weights, n—hidden, n—out); bpnn-randomize-weights (hidden-weights, n-hidden, n-out);

分别对应的是输入层-隐层权值、隐层-输出层权值的随机在区间(-0.1, 0.1) 内赋值。 Respectively corresponding to the input layer - hidden layer weights hidden layer - the output layer weights assigned randomly in the interval (-0.1, 0.1).

double moment薩二BpPa. m—a; double min—ex=BpPa. m—ex; int n—hidden二BpPa. m_hn; double eta=BpPa,m—eta; . M-eta double eta = BpPa,; double moment +3 BpPa m-a; double min-ex = BpPa m-ex;.. Int n-hidden two BpPa m_hn;

这四个变量依次为相关系数、最小均方误差、隐层结点数目和学习效率赋初始值。 This is followed by four variable correlation coefficient, minimum mean square error, the number of hidden layer nodes and the initial value assigned learning efficiency. 在本发明中是这样取值的: BpPa. m—a=0; In the present invention, is a value: BpPa m-a = 0;

BpPa. m—eta=0. 015; .. BpPa m-eta = 0 015;

BpPa. m—ex=0. 001;BpPa.m—hn=10; 下面以一组0-9的数字为例开始进行训练。 . BpPa m-ex = 0 001;. BpPa.m-hn = 10; below to a set of numbers 0-9 as an example to begin training.

对样本逐个扫描,对样本中的单个数字提取特征向量,将它输送到输入层,将预定的理想输出输送到BP网络的理想输出单元。 Individually scanning the sample, a single digital sample feature vectors are extracted, delivering it to the input layer, to a predetermined ideal output supplied to the output unit BP over the network. 这里的理想输出矩阵如下: Here follows an ideal output matrix:

double out [] [4] = {0. 1, 0. 1, 0. 1, 0.1, double out [] [4] = {0. 1, 0. 1, 0. 1, 0.1,

0. 1,0. 1,0. 1,0. 9, 0. 1,0. 1,0. 1,0. 9,

0. 1,0.1,0, 9, 0.1, 1,0.1,0 0.5, 9, 0.1,

0. 1,0. l'O. 9,0. 9, 0. 1,0. L'O. 9,0. 9,

0. 1,0.9,0. l,O. 1, 0. 1,0.9,0. L, O. 1,

0, l,O. 9, 0. 1,0. 9' 0, l, O. 9, 0. 1,0. 9 '

0. 1,0.9,0. 9, 0. 1, 0. 1,0.9,0. 9, 0.1,

0.1,0.9, 0.9,0.9, 0.1, 0.9, 0.9, 0.9,

0. 9,0. 1,0.1,0.1, 0. 9,0. 1,0.1,0.1,

0.9,0. l,O. 1,0.9}; IO行分别对应IO个阿拉伯数字"0"到"9"。 0.9,0 l, O 1,0.9};.. IO line IO corresponding Arabic numerals "0" to "9."

前向传输开始工作,将数据从输入层传到隐层,再从隐层传到输出层,将输出层的输出与理想输出比较计算输出层每个结点上的误差,根据输出层结点上的误差计算隐层每个节点上的误差。 Transmissions before the start of work, the data transmitted from the input layer, hidden layer and output layer and then spread from the hidden layer and output layer over comparing the calculated output error of each node on the output layer, the output layer nodes according to the hidden layer error is calculated on the error on each node.

然后分别调整权值,根据输出层每个节点上的误差来调整隐层与输出层之间的权值,根据隐层每个节点上的误差来调整隐层与输入层之间的权值。 Then weights were adjusted to adjust the weights between the hidden layer and the output layer the error on each node in the output layer, to adjust the weights between the input layer and the hidden layer the error on each node in the hidden layer.

对误差进行统计,计算出均方误差,如果均方误差满足期望值,而且不超过最大循环次数(这里设为15000)则跳出循环。 Error statistics calculated mean square error, mean square error if meet expectations, but does not exceed the maximum number of cycles (here set to 15,000) is out of the loop.

如果达不到预期的误差值,或者超过了最大的循环次数(15000),需要改变训练参数。 If not achieve the desired error value or exceeds the maximum number of cycles (15,000), training parameters need to be changed. 直到训练结束。 Until the end of the training.

当一次训练结束后,会在样本图片所在的目录下生成3个文件,分别是"win争dat" 、 "whi.dat"、"画.dat",里面分别保存着输入层与隐层之间的权值、隐层与输出层之间的权值和各层结点的个数信息,供后面的识别工作使用。 After the end of the first training, will generate three files in the same directory where the sample image, are "win contend dat", "whi.dat", "painting .dat", which were preserved between the input layer and the hidden layer information about the number and weight of each layer of the junction between the weights, hidden layer and output layer, for later use to identify the work. 4、数字识别的过程及效果 4, the process of identification and digital effects

经过前期的预处理和样本训练工作,找到了比较合适的权重值,就可以进行接下去的识别工作了。 After pretreatment and sample pre-training work, find a more appropriate weight value, it can be carried out to identify the next work.

首先,系统会读取一张待识别的图片,用三个句柄CDIB、 CDIB1、 CDIB2和CDIB3 来分别指示原图、学号部分、分数部分。 First, the system reads an image to be identified, with three handle CDIB, CDIB1, CDIB2 and CDIB3 respectively indicate picture, student number part, the fractional part.

学号部分和分数部分放大后分别如图7、图8所示。 Student number and a fractional portion of the rear portion 7 are enlarged, as shown in FIG.

开始识别时首先读取训练时保存的权值文件,然后对数字逐个逐个扫描,把提取到的特征向量输送到输入层,根据权值信息激活前向输入,在每一位输出结点上判别输出结果,大于0.5就在这一输出位上置1, 一共十个输出结点,如果判定的结果小于"9",认为识别合理,如果判定的结果大于"9",则认为识别错误,将不合理的结果固定为特殊值20。 When reading the stored first recognition at the start of training weights file, then one by one by the digital scan, the extracted feature vectors supplied to the input layer, according to the input value information right before activation, is determined on each output node output, set greater than 0.5 to 1 on the output bits, a total of ten output node, if the determination result is less than "9", the identification is reasonable that, if the determination result is larger than "9", a recognition error is considered, the unreasonable results 20 fixed to a special value.

最后,将识别的结果保存到与识别图片同一目录下的"result.txt"中,对定为特殊值20的输出,显示为"无法判断"。 Finally, save the results to be identified with "result.txt" in identifying images in the same directory as the special value of the output 20, shown as "can not determine."

对图5和图6分别进行学号和分数的识别,识别的结果如图7和图8。 FIG 5 and 6 are identified and scores of the student number, and the identification results are shown in FIG. 8. 实施例2: Example 2:

参见图9,本试巻巻面分数识别装置,采用上述的试巻巻面分数识别方法进行操作使用,包括一个放置试巻9的台面8,台面8上设置4根可调立柱5支撑着一块与台面8平行安置的上面板1;上面板1上装有: 一个摄像头2对准试巻9的巻面分数、 一个激光灯3照射试巻9的巻面分数区域和4个辅助灯光照亮试巻9巻面;摄像头2 经数据采集卡6连接一台电脑7。 Referring to Figure 9, the surface of the test scores Volume Volume recognition apparatus, the above-described test Volume Volume face recognition score using the method of operating, Volume 9 comprising a test table 8 is placed, is provided four uprights 8 adjustable table 5 supporting a 8 is disposed parallel with the table on the display panel 1; upper panel 1 is equipped with: a second alignment camera surface test scores Volume Volume 9, a laser light is irradiated again Volume 3 Volume fraction of the surface region 9 and the auxiliary lighting to illuminate the sample 4 Volume Volume 9 surface; camera 2 via the data acquisition card 6 is connected to a computer 7. 摄像头2获取试巻巻面9中分数区域的图像,经数据采集卡6送入电脑7,电脑7对图像进行处理和分数识别,并生成报表。 Camera 2 acquires the image plane test scores Volume Volume region 9, the data acquisition card 6 into the computer 7, the image processing computer 7 and the identification score, and report.

本装置的操作步骤如下: Procedure of this device is as follows:

(1) 把待识别的试巻9放置到台面8上,调节可调立柱5,改变上面板l和台面8之间的距离,使摄像头2获得最佳的焦距。 (1) The sample to be identified Volume 9 placed on the table 8, the adjustable column 5, changing the distance between the panel 8 and the table l, the imaging head 2 to get the best focus.

(2) 拍摄试巻巻面图像,经数据采集卡6,把图像送入电脑7。 (2) Volume Volume test surface image captured by data acquisition card 6, 7 the image into the computer.

(3) 利用电脑,对获取的试巻巻面图像进行矫正处理。 (3) the use of computers, Volume Volume of sample acquisition surface of the image correcting process is performed.

(4) 对校正后的试巻巻面图像中的手写体分数进行识别。 (4) Volume of Volume handwriting sample fraction in the corrected image plane is identified.

(5) 把识别出来的数字自动送入到数据库,待识别任务完成后,做相应处理并生成报表。 (5) out of the identification number is automatically fed into the database, to be identified after the task is completed, the processing and report accordingly.

Claims (2)

1. 一种试卷卷面分数识别方法,其特征在于采用多层感知网络对数字手写体进行识别,其识别通过学习训练过程和识别过程来实现:(1)学习训练过程步骤:①输入样本:首先将印在试卷上分数图像由图像采集卡的模数转换变成数字信号输入计算机;预处理:对拍摄得到的数字图像进行噪声、倾斜的调整和宽高归一化预处理;③特征提取:对数字图像取出它的点阵构成特征值样本对(XK,YK),作为BP网络的输入值,即把数字图像上的一个象素的值都作为一个特征值存在数组中,其中k=1,2,…,m;④BP网络训练:BP网络训练过程分为模式顺传播和误差逆传播:(a)模式顺传播:先初始化“输入层----隐含层”和“隐含层----输出层”权值参数;然后对样本逐个扫描,对样本中的单个权字图像提取特征向量,将它们输送到输入层,根据神经元间连接的权值Wji计 CLAIMS 1. A method of identification papers juanmian fraction, characterized in that a multi-layer perceptron network digital handwriting recognition, which identifies the training process is achieved by learning and recognition process: (1) learning and training processes: ① From input samples: firstly the fraction of the image printed on the paper by the analog to digital conversion into image acquisition card digital signal input into the computer; pretreatment: capturing a digital image obtained noise, tilt adjustment and the width and height normalization preprocessing; ③ feature extraction: for (XK, YK), BP network as input values ​​take it out on the digital image dot constituting the feature values ​​of the samples, i.e. the value of a pixel of the digital image as a feature value are present in the array, where k = 1 , 2, ..., m; ④BP network training: BP network training process is divided into forward propagating mode and back propagation: (a) forward propagating modes: first initialize "---- input layer hidden layer" and "hidden layer ---- output layer "parameter weights; and individually scan the sample, the right word of a single image feature vector is extracted samples, transport them to the input layer, according to the weight of neuronal connections between the count value Wji netpj、Opj,netpj为对第P个样本单元j的输入总和,Opj为单元j的输出,得到该层的理想输出;该数据作为隐含层的输入,同样得到隐念层的理想输出;再从隐念层传到输出层,得到结果;(b)误差逆传播:将输出层的结果与理想输出比较,计算输出层每个结点上的权值误差,根据输出层结点上的误差计算隐含层每个节点上的误差;再分别计算隐念层、输入层的误差,对每个神经元间的权值修正;误差逆传播中要对误差进行统计,计算出均方误差,如果均方误差满足期望值,而且不超过最大循环次数则跳出循环;如果达不到预期的误差值,或者超过了最大的循环次数,需要改变训练参数,直到训练结束;⑤训练结束后,今在样本图片所在的目录下生成3组数据,分别以计算机文件的形式存储,即“win.dat”、“whi.dat”和“num.dat”,保存着输入层与隐念层之 netpj, Opj, netpj the sum of the P-th input sample cell j, j output OPj units, the output layer is obtained over; the hidden layer as input data, output over the hidden layer is read to obtain the same; and then read from the hidden layer output layer spread results were obtained; (b) back propagation: the comparison result over the output layer, the error value calculated on the weight of each output layer node the node on the output layer error hidden layer error is calculated on each node; recalculated hidden layer are read, the error in the input layer of each of the weights between neuron correction; back propagation of the error statistics to calculate the mean square error, If the mean square error to meet expectations, and do not exceed the maximum number of cycles is out of the loop; if not achieve the desired error value or exceeds the maximum number of cycles, training parameters need to be changed until the end of the training; ⑤ after the training, now in generate three sets of data samples where the picture directory, files are stored in a form of a computer, i.e. "win.dat", "whi.dat" and "num.dat", holds the input layer and the hidden layer is read 间的权值、隐含层与输出层之间的权值和各层结点的个数信息,供下面的识别使用;(2)识别过程步骤:①输入待识别数字图像:采集待识别的包含手写体数字的图片;②预处理:同步骤(1)中的预处理方法一样;③特征提取:同前步骤(1)中学习训练过程中特征提取方法一样,对数字图像取出它的点阵构成特征值样本对(XK,YK);④BP网络识别:把提取到的特征向量输送到输入层,根据权值信息激活模式顺传播的前向输入处理通道,在神经元输出结点上得到判别输出结果,即完成该手写体图像的识别。 Between the weights, the number of information layers and the weights of the junction between the hidden layer and output layer, for identifying use of the following; (2) the identification procedure: ① From the input digital image to be recognized: the acquisition to be identified images of handwritten numbers; ② pretreatment: same as step pretreatment process (1); ③ feature extraction: before the step of the training process the same feature extraction method (1) in the same study, it is taken out of the digital image dot constituting the characteristic values ​​of the samples of (XK, YK); ④BP network identification: the extracted feature vector is supplied to the input layer, according to the forward input processing channel weight information an active mode of the forward propagating obtain determined on the neuron output node output, identifying the handwriting image is complete.
2. —种试巻巻面分数识别装置,采用根据权利要求1所述的试巻巻面分数识别方法进行操作运用,包括一个放置试巻(9)的台面(8),其特征在于所述的台面(8)上设置3〜4根可调立柱(5)支撑着一块与台面(8)平行安置的上面板(1);所述的上面板(l) 上装有: 一个摄像头(2)对准试巻(9)的巻面分数、 一个激光灯(3)照射试巻(9)的巻面分数区域和1〜4个辅助灯光(4)照亮试巻巻面;所述的摄像头(2)经数据采集卡(6)连接一台电脑(7);摄像头(2)获取试巻巻面(9)中分数区域的图像,经数据采集卡问送入电脑(7),电脑(7)对图像进行处理和分数识别,并生成报表。 2. - Test Species Volume Volume fraction surface recognition apparatus, according to the test using Volume Volume fraction of surface recognition method according to claim 1 operating use, comprising placing a sample Volume (9) of the mesa (8), characterized in that said is provided on the mesa (8) 3 to 4 root adjustable upright (5) and a supporting table (8) arranged in parallel on the panel (1); on the panel (l) containing the: a camera (2) Volume fraction aligned surface sample Volume (9), a laser light (3) irradiating again Volume (9) Volume fraction of the surface area and the auxiliary lighting ~ 4 (4) Volume Volume illuminated sample surface; the camera (2) by the data acquisition card (6) connected to a computer (7); a camera (2) Get test Volume Volume face image score region (9), via a data acquisition card Q into the computer (7), the computer ( 7) the image processing and recognition scores, and generate reports.
CN 200710039969 2007-04-25 2007-04-25 Method and device for recognizing test paper score CN100485714C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710039969 CN100485714C (en) 2007-04-25 2007-04-25 Method and device for recognizing test paper score

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710039969 CN100485714C (en) 2007-04-25 2007-04-25 Method and device for recognizing test paper score

Publications (2)

Publication Number Publication Date
CN101038626A CN101038626A (en) 2007-09-19
CN100485714C true CN100485714C (en) 2009-05-06

Family

ID=38889515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710039969 CN100485714C (en) 2007-04-25 2007-04-25 Method and device for recognizing test paper score

Country Status (1)

Country Link
CN (1) CN100485714C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009193429A (en) 2008-02-15 2009-08-27 Mitsubishi Electric Corp Image reading device
CN102974089A (en) * 2012-11-09 2013-03-20 沈豪杰 Competition quickly correcting scoring system
CN105869085A (en) * 2016-03-29 2016-08-17 河北师范大学 Transcript inputting system and method for processing images
CN106503711A (en) * 2016-11-16 2017-03-15 广西大学 A kind of character recognition method
CN106503712A (en) * 2016-11-16 2017-03-15 广西大学 One kind is based on stroke density feature character recognition method
CN106778752A (en) * 2016-11-16 2017-05-31 广西大学 A kind of character recognition method
CN107038438A (en) * 2017-03-16 2017-08-11 上海电机学院 It is a kind of that method is read and appraised based on image recognition
CN107016417A (en) * 2017-03-28 2017-08-04 青岛伟东云教育集团有限公司 A kind of method and device of character recognition

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5672060A (en) 1992-07-08 1997-09-30 Meadowbrook Industries, Ltd. Apparatus and method for scoring nonobjective assessment materials through the application and use of captured images
CN1278629A (en) 1999-06-22 2001-01-03 施霖 Secret computerized score registering method
CN1553359A (en) 2003-05-30 2004-12-08 伟 刘 Test paper score counting intelligent system
CN1598845A (en) 2004-09-03 2005-03-23 深圳市海云天科技有限公司 Network exanmination paper go-over method for subjective question
CN1932795A (en) 2006-10-10 2007-03-21 青岛中科恒信信息技术有限公司 Examination paper intelligent setting questions and organizing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5672060A (en) 1992-07-08 1997-09-30 Meadowbrook Industries, Ltd. Apparatus and method for scoring nonobjective assessment materials through the application and use of captured images
CN1278629A (en) 1999-06-22 2001-01-03 施霖 Secret computerized score registering method
CN1553359A (en) 2003-05-30 2004-12-08 伟 刘 Test paper score counting intelligent system
CN1598845A (en) 2004-09-03 2005-03-23 深圳市海云天科技有限公司 Network exanmination paper go-over method for subjective question
CN1932795A (en) 2006-10-10 2007-03-21 青岛中科恒信信息技术有限公司 Examination paper intelligent setting questions and organizing system

Also Published As

Publication number Publication date
CN101038626A (en) 2007-09-19

Similar Documents

Publication Publication Date Title
Pradeep et al. Diagonal based feature extraction for handwritten character recognition system using neural network
Lee et al. Nonlinear shape normalization methods for the recognition of large-set handwritten characters
Lu et al. Deep multi-patch aggregation network for image style, aesthetics, and quality estimation
Hui et al. Fast and accurate single image super-resolution via information distillation network
KR100601957B1 (en) Apparatus for and method for determining image correspondence, apparatus and method for image correction therefor
US20040017944A1 (en) Method for character recognition based on gabor filters
CN101267493B (en) Correction device and method for perspective distortion document image
Gatos et al. Automatic table detection in document images
CN104573731B (en) Fast target detection method based on convolutional neural networks
CN101447017B (en) Method and system for quickly identifying and counting votes on the basis of layout analysis
CN102006425B (en) Method for splicing video in real time based on multiple cameras
Mowlaei et al. Feature extraction with wavelet transform for recognition of isolated handwritten Farsi/Arabic characters and numerals
Kussul et al. Improved method of handwritten digit recognition tested on MNIST database
JP2003323622A (en) Image recognition system and method and its program
Fang et al. Offline signature verification with generated training samples
CN1737822A (en) Low resolution optical character recognition for camera acquired documents
CN100543764C (en) A face feature extraction method with illumination robustness
CN104866810B (en) A kind of face identification method of depth convolutional neural networks
Karami et al. Persian sign language (PSL) recognition using wavelet transform and neural networks
Li et al. Leaf vein extraction using independent component analysis
CN101739712B (en) Video-based 3D human face expression cartoon driving method
CN105095833B (en) For the network establishing method of recognition of face, recognition methods and system
CN104504376A (en) Age classification method and system for face images
CN100568264C (en) Seal identification and controlling method
CN101615252A (en) Method for extracting text information from adaptive images

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted
C17 Cessation of patent right