CN106778717A - A kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor - Google Patents
A kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor Download PDFInfo
- Publication number
- CN106778717A CN106778717A CN201610995573.1A CN201610995573A CN106778717A CN 106778717 A CN106778717 A CN 106778717A CN 201610995573 A CN201610995573 A CN 201610995573A CN 106778717 A CN106778717 A CN 106778717A
- Authority
- CN
- China
- Prior art keywords
- image
- test
- region
- filling
- appraisal table
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/146—Aligning or centring of the image pick-up or image-field
- G06V30/1475—Inclination or skew detection or correction of characters or of image to be recognised
- G06V30/1478—Inclination or skew detection or correction of characters or of image to be recognised of characters or characters lines
Abstract
The invention discloses a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor, comprise the following steps:1st, design test and appraisal table;2nd, the printing of test and appraisal table and scene test and appraisal;3rd, test and appraisal table scan storage;4th, image preprocessing;5th, bar code and extracted region of filling in a form, after to image skew correction, judge bar code and the particular location in region of filling in a form go forward side by side row information extraction;6th, bar code recognition;7th, fill in a form region recognition.The present invention proposes the examination test and appraisal table recognition methods of RANDOM OPTION setting and image recognition, when test and appraisal table is created, examination object, performance assessment criteria and content of examination are randomly provided, content is identical between each test and appraisal table, but display order is different, it is to avoid interacted between the adjacent people that participates in evaluation and electing;The lateral cross feature and crossed longitudinally feature of glyph image are extracted, proposes that k nearest neighbor method carries out Symbol recognition, recognition accuracy is high.
Description
Technical field
The invention belongs to image procossing and Data Mining, more particularly to a kind of survey based on image recognition and k nearest neighbor
Comment table recognition methods.
Background technology
The Fourth Plenary Sessions of its Sixteenth Central Committee of party is proposed and " loses no time in formulating the cadre for embodying the Scientific Outlook on Development and correct political effect point requirement
The requirement of actual achievement checking evaluation standard ".In order to carry out the examination and evaluation of leading cadre, constituent parts need to be set with reference to actual conditions
Determine examination, index, approach, method that scientific offering is realized, and correctly use appraisal result, so as to produce variety classes
Test and appraisal table and statistical analysis technique.Therefore, in the urgent need to one is improved and efficient wire examination method enters to various test and appraisal contents
Test and appraisal data are carried out statistical analysis by row identification.
At present, examination test and appraisal implement mainly have following four method:(1) manual wire examination method.By the personnel of participating in evaluation and electing in papery
Given a mark in test and appraisal table, test and appraisal table is collected by examination establishment officer, then is manually counted by establishment officer, draws by examination people
The score of member.Manual wire examination method needs manually to be counted, if the personnel that participate in evaluation and electing, many by examination object and content of examination,
Then workload is huge, and efficiency is low, while easily error;(2) semi-automatic wire examination method.Beaten on test and appraisal table by the personnel of participating in evaluation and electing
Point, then organize professional to be entered into spreadsheet (such as Office, WPS) or other information system to carry out phase
The treatment answered.Semi-automatic method is compared to manual Assessment, then the statistical summaries in later stage can improve efficiency.But
It is, due to needing artificial participation typing, there is a problem of with manual Assessment same.(3) on-line examination method is used.Set up
Network checking system, the personnel login system of participating in evaluation and electing is given a mark, and is then collected automatically by system and is counted, and is drawn
The result of appraisal.The method efficiency high, but the subject matter for existing is, it is impossible to and unique difference of distinguishing participates in evaluation and electing personnel and the people that participates in evaluation and electing
The anonymous problem of member;Simultaneously because lacking stub, it is impossible to which open ticket checking, its confidence level is under suspicion, and its security and can
Fail to solve well always by sex chromosome mosaicism.(4) based on image recognition wire examination method.It is specific in such as Fig. 1 by the personnel of participating in evaluation and electing
Given a mark on papery test and appraisal table, the scan image of papery test and appraisal table is then obtained using equipment such as high speed scanners, known using image
Other algorithm quick fill message for recognizing the personnel that participate in evaluation and electing from these images, and test and appraisal data are deposited using database technology
Storage and management, are rapidly completed the statistics to data of testing and assessing, analyze and report generation.
Wherein, the wire examination method based on image recognition mainly has based on OMR and based on OCR two ways.(1) based on OMR
(Optical Mark Recognition) technology.OMR typically uses photoelectric tube reading technique, consolidates by the difference of test and appraisal table
Positioning puts painting mark to represent to being agreed or disagreed with by examination object, test and appraisal table is allowed by special collecting device, by sending out
The illumination that light pipe sends is mapped in " paint point ", then receives the reflected light from " paint point " position by photosensitive tube.Because scribbling mark
Note it is local reflective weak, be not coated with the local reflective strong of mark, the optical signal representative of varying strength has unmarked two states.Pass through
Light-to-current inversion principle, carries out high speed acquisition, subsequently into computer disposal to content of the full-filling on test and appraisal table.At present, use
OMR technologies are primarily present following problem:
Test and appraisal table paper and printing quality requirement are too high, and limitation is too many.Some units are in different examinations, it is necessary in advance
Test and appraisal table is designed, submits to special company to be printed, it is relatively costly;
The personnel of participating in evaluation and electing are scribbled with requirement too high, limitation is too many.Rectangular bar is filled if desired for using pencil special, must not be applied out
Outside rectangular bar, whole test and appraisal table is scribbled and wants the depth consistent etc.;
Folding line, ink dot, dirt etc. are all there may be misrecognition phenomenon;
Due to above-mentioned 3 points limitations, cause examination process to there may be mistake, cause statistics to there is error;
Special identification equipment mechanical transmission mechanism is complicated, and service life is short, relatively costly.
(2) character recognition based on OCR (Optical Character Recognition) technology, such as to license plate
The identification of numeral.The test and appraisal table scan that OCR will be recognized first enters computer, the pretreatment of image is then carried out, by image
Gray processing, binaryzation and normalization, then extract character characteristics of image and be identified, be changed into the word that computer is capable of identify that
Symbol information.OCR and OMR technologies are a difference in that the quality of paper used, printing technology are less demanding, reduce operating cost.
Examination test and appraisal implementation method general flow based on OCR technique includes:
(1) design test and appraisal table.The need for according to examination, it is determined that examination object, performance assessment criteria (such as diligent, honest and clean, moral, energy, achievement)
And examination grade (such as excellent, good, in, poor) content, then design test and appraisal table, general test and appraisal table is bivariate table, such as Fig. 1.
(2) examination test and appraisal table is provided, the personnel of participating in evaluation and electing carry out filling in marking.On demand at fill in beat in column √, × or zero.
(3) test and appraisal table is reclaimed, during papery test and appraisal table is converted into internal memory by high-velocity scanning equipment or CCD camera
Scan image.
(4) scan image pretreatment.Gray processing, binaryzation and Slant Rectify etc. generally are carried out to the image for scanning
Reason.
(5) region of filling in a form is positioned.Position region of filling in a form and generally include two kinds of thinkings:One is, in design, to fix each
Region fill in a form relative to form or so or upper and lower relative distance and stores, in scan image, calculated according to the relative distance
The position in each region of filling in a form, operation requirement when the method is to design is higher.Two is that image is scanned for, and searches certain
Special position, and scanned for as starting point carries out other relation defined locations with the position.The such as search lower left corner
Crosspoint, and each bar transverse direction straight line is searched for as starting point, upwards with the point, the position of each bar vertical line is searched for the right.It is horizontal and perpendicular
It is exactly region of filling in a form to the intersection region between straight line.The angle of inclination of table is found and determined during search, carries out Slant Rectify.
(6) area symbology of filling in a form is recognized.Fill in a form area symbology identification include two kinds, one is only to identify whether fill in
Content, the method is directly filled in a form black picture element proportion in region by calculating, higher than certain threshold value, then it is assumed that fill in interior
Hold, but the concrete form of content can not be recognized, such as be √, × or zero etc..Two is to recognize specific symbol in region of filling in a form
Classification, extracts region of filling in a form, and region of filling in a form is normalized (rectangular image for such as normalizing to N × M sizes), extracts figure
The feature of picture, Symbol recognition is carried out using housebroken disaggregated model;To the symbol that can not be recognized, extract foreground and allow user
Manual identified, and feed back to Sample Storehouse, re -training disaggregated model before examination next time, to improve recognition accuracy.
The present invention proposes the examination test and appraisal table recognition methods of RANDOM OPTION setting and image recognition, is creating test and appraisal table
When, examination object, performance assessment criteria and content of examination are randomly provided, content is identical between each test and appraisal table, but display
Order is different, it is to avoid interacted between the adjacent people that participates in evaluation and electing;The lateral cross feature and crossed longitudinally feature of glyph image are extracted,
Propose that k nearest neighbor method carries out Symbol Recognition, recognition accuracy is high.
The content of the invention
Goal of the invention:For problems of the prior art, the present invention provide one kind can improve unit to employee or
The efficiency of leading cadre's examination, reduces the test and appraisal table recognition methods based on image recognition and k nearest neighbor of human resource management cost.
Technical scheme:In order to solve the above technical problems, the present invention provides a kind of test and appraisal table based on image recognition and k nearest neighbor
Recognition methods, comprises the following steps:
Step one:Design test and appraisal table.Essential element in test and appraisal table includes examination object, performance assessment criteria and examination grade,
The wherein test and appraisal table of the display location of examination object, performance assessment criteria and examination grade every is all different;
Step 2:The printing of test and appraisal table and scene test and appraisal.The test and appraisal table bulk print that will be generated, is issued to the personnel of participating in evaluation and electing,
For example drawn by additional character √, × or zero grade symbolic formulation participate in evaluation and electing the opinion of personnel;
Step 3:Test and appraisal table scan storage.Batch scanning storage is carried out to the test and appraisal table for reclaiming using high speed scanner, is swept
Gray processing treatment is carried out while retouching, while carrying out edge treated using scanner, removes the black surround produced during scanning;
Step 4:Image preprocessing.Image preprocessing includes binary conversion treatment and the Slant Rectify treatment of image;
Step 5:Bar code and extracted region of filling in a form, after to image skew correction, judge bar code and region of filling in a form
Particular location go forward side by side row information extraction;
Step 6:Bar code recognition.Bar code image is carried out by bar code and Quick Response Code the identification bag increased income
Identification, it is automatic to retrieving the test and appraisal table display sequence information of association in external memory according to the unique code for identifying, and it is associated with test and appraisal
Table image, combined with the fill in a form content in region of the test and appraisal table for identifying below, is obtained examination object, performance assessment criteria and is filled in feelings
Condition;
Step 7:Fill in a form region recognition.By judging whether to fill in symbol, image being expanded and micronization processes, enter
The reorientation of row symbol, image normalization and the Symbol recognition based on k nearest neighbor, to carry out overall identification to region of filling in a form.
Wherein, table specific design step of being tested and assessed in step one is as follows:
Step 1.1:Design test and appraisal table overall structure.Test and appraisal table is divided into examination subject area, performance assessment criteria region, examination
Hierarchical region, region of filling in a form, the barcode size or text field, top dashed region and the right dashed region;
Step 1.2:Dotted line at the top of being set in the dashed region of top, sets the right dotted line on the right in dashed region.Top
The width in the region of filling in a form of the region of filling in a form below every section of correspondence of portion's dotted line, i.e. line width and horizontal start-stop position and lower section
And transverse direction start-stop position is identical, the thickness of dotted line is set, after scanning, in image preprocessing, can be by setting one
Individual threshold filtering falls noise, while not influenceing the treatment of dotted line;The right dotted line first paragraph is from first first of examination object
Examination grade starts, then interval setting;Every section of region of filling in a form on the correspondence left side of the right dotted line, i.e. line segment height and longitudinal direction is risen
Stop bit puts identical with the height in the region of filling in a form on the left side and longitudinal start-stop position, sets the thickness of dotted line, after scanning,
During image preprocessing, noise can be fallen by setting a threshold filtering, while the treatment of dotted line is not influenceed, it is every in the dotted line of the right
Blank between section end position and next section of beginning also corresponds to the region of filling in a form on the left side;
Step 1.3:It is random to determine examination object, examination item and examination hierarchal order.It is random to upset examination object, examination
Item and examination hierarchal order, examination object, performance assessment criteria and examination hierarchical region to being filled into test and appraisal table are created respectively
Build unique code;
Step 1.4:Information writes storehouse.It is written to the suitable of examination object in test and appraisal table, performance assessment criteria and examination grade
Sequence information is stored with unique code by auxiliary storage;
Step 1.5:Generation bar code image.Coding generation bar code image is carried out to unique code;
Step 1.6:Test and appraisal table element is set.Examination object, performance assessment criteria, examination grade and generation after upsetting
Bar code image is set to corresponding region;
Step 1.7:Judge whether to generate sufficient amount of test and appraisal table, if not enough, continuing to go to step 1.3, if raw
Into sufficient amount of table then end-of-job of testing and assessing.
Wherein, in step 4 image binaryzation treatment concretely comprise the following steps:Calculated using global threshold binarization method OSTU
Method carries out binary conversion treatment, and wherein image binaryzation refers to by choosing a certain threshold value by a width greyscale image transitions only to include
There is 0 and 255 high-contrast black and white binary image.
Wherein, image skew correction treatment is and carries out straight line plan respectively using top dotted line and the right dotted line in step 4
Close and determine inclination angle, then carry out Slant Rectify, comprise the following steps that:
Step 4.1:Extract top dashed region.The top dashed region determined during according to design accounts for test and appraisal table and highly compares
Example, extracts corresponding top area image imgTseg in scan image;
Step 4.2:Search phantom line segments start-stop abscissa.The longitudinal black pixels of detection image imgTseg, set threshold value by column
The row if there is at least w1 continuous black pixel, are then labeled as 1 by w1, if in the absence of w1 continuous black pixel, should
Row are labeled as 0, and wherein threshold value w1 is less than scan image middle conductor longitudinal direction pixel count, it is proposed that and the three of the longitudinal pixel count of line taking section/
Two;Search 0,1 from left to right is gone here and there, and the subscript position of each section continuous 1 of part is the horizontal start-stop coordinate of correspondence line segment, treatment
During, it is necessary to reject the too short line segment of length;
Step 4.3:Calculate phantom line segments point midway.According to the lateral coordinates of each line segment, the horizontal seat at line segment midpoint is calculated
Mark, fixes abscissa in image imgTseg, and longitudinal searching is carried out from top to bottom, stops when running into w1 continuous black pixel
Search, the w1 for searching ordinate of black pixel now determines the transverse and longitudinal at line segment midpoint as the ordinate at midpoint
Coordinate, point coordinates in being determined using the method to all line segments;
Step 4.4:Using midpoint fitting a straight line, angle of inclination is determined.Using all line segment midpoint coordinate fitting straight lines, lead to
The slope for crossing the straight line determines the angle of inclination A1 of image.
Step 4.5:The angle of inclination A2 of image is determined using longitudinal dotted line.Using with determine angle of inclination A1 identical sides
Method, the angle of inclination A2 of image is determined using longitudinal dotted line again.
Step 4.6:The average of A1, A2 is calculated as the angle of inclination of image.
Wherein, bar code and extracted region of filling in a form are concretely comprised the following steps in step 5:After to image skew correction, weight
The new dashed region according on the right of the ratio determined when designing extraction and top, and using identical side in being processed with Slant Rectify
Method determines the abscissa start-stop position of top line segment, the ordinate of orthogonal axes start-stop position of the right vertical direction line segment;Wherein x wire
The region that section and longitudinal line segment intersect is region of filling in a form, while each vertical line segment intermediate blank region intersects with horizontal line segment
It is region of filling in a form;If the barcode size or text field intersects determination by last line segment of vertical direction and top main section.
Wherein, filled in a form in step 7 the concretely comprising the following steps of region recognition:
7.1:It is first determined whether filling in symbol.According to the ratio that black pixel in area image of filling in a form is accounted for, the area is judged
Whether domain fill in symbol;If black pixel ratio is less than the threshold value p of setting, then it is assumed that do not fill in symbol, terminate identification;
If above the threshold value p of setting, then it is further processed and recognizes;
The average of handwriting samples symbol pixel proportion in region of filling in a form in Sample Storehouse is calculated, it is equal that threshold value p takes this
/ 5th of value.
7.2:Image expansion and refinement.Area image of filling in a form is expanded and micronization processes, the picture after being refined.
7.3:Symbol is relocated.Region longitudinally black pixel of filling in a form is detected by column, if without black pixel on ordinate,
The row are denoted as 0, have, and are denoted as 1.Threshold value w2, w2 are set and take 1/10th of peak width of filling in a form, searched to center respectively from left and right
Rope, when running into w2 continuous 1, it is believed that reach the horizontal right boundary of symbol, i.e., detect area image laterally black picture of filling in a form line by line
Vegetarian refreshments, if without black pixel on abscissa, the row is denoted as 0, has, and is denoted as 1;From respectively to center search, running into w2 up and down
Individual 1 consecutive hours, it is believed that reach longitudinal right boundary of symbol;
7.4:Image normalization.The image normalization that will be extracted in step 7.3 is the fixed size image of N × M, all of
Glyph image all fixed sizes;
7.5:Symbol recognition based on k nearest neighbor.Picture by after normalized, character feature being extracted first, to character
Discriminant classification is carried out, by training and recognizing two stages, character is finally identified.
Wherein, test and appraisal table Symbol recognition flow is comprised the following steps that in the step 7.5:
Step 7.5.1:Extract sample characteristics.It is, it is necessary to select sample before pattern match is carried out and special to sample extraction
Levy, wherein extracting the horizontal and vertical cross feature for being characterized as symbol;The shape after extracting sample characteristics from sample image storehouse
Into sample characteristics storehouse;
Wherein lateral cross feature, as transversal scanning glyph image, leftmost black picture element that certain a line runs into and
The distance between rightmost black picture element is the lateral cross feature of the row, the lateral cross feature obtained after each image zooming-out
It is the vector of N-dimensional;
Wherein crossed longitudinally feature, as longitudinal scanning glyph image, the black picture element of the top that a certain row run into and
The distance between black picture element is the crossed longitudinally feature of the row, the crossed longitudinally feature obtained after each image zooming-out bottom
It is the vector of M dimensions;
Step 7.5.2:Extract the symbolic feature in region of filling in a form.By from the glyph image in region of filling in a form extract laterally and
Crossed longitudinally feature forms symbolic feature to be identified;
Step 7.5.3:The character class in region of filling in a form is determined using k nearest neighbor algorithm.Symbol lateral cross to be identified is special
Levying carries out the k nearest neighbor based on DTW distances in the feature in sample transverse features storehouse and searches for;By the crossed longitudinally feature of symbol to be identified
The k nearest neighbor based on DTW distances is carried out in the feature of sample longitudinal direction feature database to search for, in 2*K neighbour, sample number is most
Sample class as area image symbol of filling in a form classification.
Compared with prior art, the advantage of the invention is that:
Propose that examination object, performance assessment criteria and examination grade are randomly provided so that between the adjacent people that participates in evaluation and electing when filling in a form
Do not disturb mutually;Increase the markings on top and the right, the excessive space of examination test and appraisal table will not be taken, Slant Rectify can be improved
Accuracy rate, improves the accuracy rate of region segmentation of filling in a form;Increase unique code to be identified as test and appraisal table, and create unique code corresponding
Dimension bar image, when storage is scanned, the unique mark of test and appraisal table is gone out by automatic identification bar code recognition, sets up examination test and appraisal
Associating between table and examination test and appraisal table structural information in external memory, unique code can avoid examination test and appraisal table multiple scanning from entering
Storehouse;Symbol recognition is carried out based on DTW distances and k nearest neighbor, it is possible to achieve the identification in region of filling in a form efficiently and accurately.Based on image
Identification and the examination test and appraisal table recognition methods of k nearest neighbor are applied in practice, and Symbol recognition rate reaches 98%, carries significantly
The operating efficiency that unit high is examined.
Brief description of the drawings
Fig. 1 is common examination test and appraisal table sample table in background technology;
Fig. 2 is the examination test and appraisal sample table of present invention design;
Fig. 3 is the test and appraisal table identification process figure searched for based on image recognition and k nearest neighbor;
Fig. 4 is the flow chart of design test and appraisal table in Fig. 3;
Fig. 5 is each region sign picture of test and appraisal table designed in Fig. 4;
Fig. 6 is the flow chart for determining image inclination angle in Fig. 1 in image preprocessing on treatment top dotted line;
Fig. 7 is to search plain virtual top line segment transverse direction start-stop position view in embodiment;
Fig. 8 be embodiment in angle of inclination schematic diagram is determined based on virtual top line segment;
Fig. 9 is test and appraisal table bar code and extracted region schematic diagram of filling in a form in embodiment;
Figure 10 resets bitmap for area symbology of being filled in a form in embodiment;
Figure 11 is the flow chart of Symbol recognition in Fig. 1;
Figure 12 is √, × and zero lateral cross feature in embodiment;
Figure 13 is hand-written symbol sample schematic diagram in embodiment;
Figure 14 is √, × and zero crossed longitudinally feature in embodiment;
Figure 16 is the lateral cross characteristic pattern of √ hand-written symbol various modifications in embodiment;
Figure 17 is the matching schematic diagram of DTW distances in embodiment.
Specific embodiment
With reference to the accompanying drawings and detailed description, the present invention is furture elucidated.
A kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor proposed by the present invention, by designing test and appraisal table, examines
Verification is randomly provided as, performance assessment criteria and examination grade, and overall structure is identical between every test and appraisal table, but examination object,
The display order of performance assessment criteria and examination grade is different, is not disturbed mutually when filling in a form between the so adjacent people that fills in a form.It is every
The measurement design information such as display order is saved in external storage (such as relevant database), and creates unique code as mark,
Using unique code as encoded content generate one-dimensional bar code image, be shown to test and appraisal table FX, with set up test and appraisal table with
The association of measurement design information.Test and appraisal table top and the setting phantom line segments of right part, for region and the bar code image positioning of filling in a form
And Slant Rectify.After test and appraisal table scan storage, fitting a straight line is carried out using phantom line segments, determine angle of inclination, realized inclining and rectify
Just, filled in a form region and bar code image by top and the right phantom line segments cross bearing.Bar code figure is carried out using open source software
As parsing.Fill in a form the identification in region, the region that will fill in a form first is normalized to the rectangular image of N × M, and region black picture element accounting surpasses
When crossing threshold value, Symbol recognition is carried out, otherwise it is assumed that not filling in symbol;When carrying out Symbol recognition, histogram after normalization is extracted
The horizontal and vertical cross linear feature of picture, Symbol recognition is carried out using the k nearest neighbor based on DTW distances, judges fill substance.
The present invention carries out test and appraisal table identification with the mode of image recognition for test and appraisal appraisal problem, realizes to employee or dry
Portion carries out efficient test and appraisal examination, reduces cost of human resources.Design test and appraisal table when, to examination test and appraisal table in examination object,
The content such as performance assessment criteria and examination grade carries out upsetting display, and the basic structure of every examination test and appraisal table is identical, but every
Display order is all different, it is to avoid interacted between the adjacent people that participates in evaluation and electing;Structural information storage in examination test and appraisal table is deposited in outside
In storage (such as relational database), and unique code is set up as mark, generation bar code image is carried out to unique code and is set
To in test and appraisal table, foundation test and appraisal table is associated with measurement design information.Set and position dotted line with the right at the top of test and appraisal table, pass through
Dotted line midpoint carries out fitting a straight line and realizes Slant Rectify, using bar code image and the positioning in region of filling in a form;By in table of testing and assessing
The automated graphics identification of one-dimensional coding content, realizes the auto-associating with table structural information of being tested and assessed in external memory;Midpoint by a dotted line
Fitting a straight line carry out Slant Rectify;The transverse and longitudinal straight line cross feature in region of filling in a form is extracted, it is near by the K based on DTW distances
Neighbour's search fill in a form the identification of region content.Implementation process includes:The design of test and appraisal table, the printing of test and appraisal table and scene test and appraisal,
Test and appraisal table scan storage, image preprocessing, bar code and extracted region of filling in a form, bar code recognition and Symbol recognition.Such as Fig. 3 institutes
The examination test and appraisal table identification process figure searched for based on image recognition and k nearest neighbor is shown as, each step process is as follows:
Step 110:Design test and appraisal table.Essential element in test and appraisal table is including examination object, performance assessment criteria and examination etc.
Level.Test and appraisal table design cycle is as shown in Figure 4.Test and appraisal table design cycle is described in detail below.
Step 111:Design test and appraisal table overall structure.According to the number of examination object, performance assessment criteria and examination grade, if
Meter integral evaluation table structure, generally one bivariate table structure of table of testing and assessing, such as Fig. 5.Examination subject area, performance assessment criteria area
Domain, examine hierarchical region, region of filling in a form, the barcode size or text field, top dashed region and the right dashed region all to leave a blank, record
Top dashed region accounts for the ratio of test and appraisal table height, and record the right dashed region accounts for test and appraisal table width ratio.Last column bar shaped
The height in code region is equal to 1.5 times of height in region of filling in a form, or other fixed relationships.The width of the barcode size or text field can be selected
The width shared by two performance assessment criteria, or other width are selected, if bar code image can be allowed correctly to show, and it is convenient
Intersected by top and the right phantom line segments and determine position.
Step 112:Top and the right dotted line are set.The tableau format of the centre of the test and appraisal table according to design, sets top
With the dotted line on the right.Region of filling in a form below every section of correspondence of top dotted line, i.e. line width and horizontal start-stop position and lower section
Region of filling in a form width and horizontal start-stop position it is identical, the appropriate thickness for setting dotted line (is typically provided to other ordinary lines
4 times it is thick), after scanning, in image preprocessing, noise can be fallen by setting a threshold filtering, while not influenceing
The treatment of dotted line.The right dotted line first paragraph examines first of object examination grade since first, then interval setting.It is right
Every section of region of filling in a form on the correspondence left side of side dotted line, the i.e. height in the region of filling in a form on line segment height and longitudinal start-stop position and the left side
And longitudinal direction start-stop position is identical, thickness identical with horizontal dotted line is set, after scanning, in image preprocessing, Neng Goutong
Cross threshold filtering and fall noise, while not influenceing the treatment of dotted line.In the dotted line of the right between every section of end position and next section of beginning
Blank also correspond to the left side region of filling in a form.
Step 113:It is random to determine examination object, examination item and examination hierarchal order.It is random to upset examination object, examination
Item and examination hierarchal order, are filled into the examination object in test and appraisal table, performance assessment criteria and examination hierarchical region, create unique
Code.Unique code needs the format match with the one-dimensional bar code for using below, i.e., unique code is required to what is used using system
Bar code carries out coding generation image.Common bar code has EN13, EN8, UPCE, CODE128 etc., the code of different bar code
Value form and span are all different.
Step 114:Information writes storehouse.Examination object in test and appraisal table, performance assessment criteria and examination grade will be shown to
Order information is stored in external storage, and using unique code as major key.
Step 115:Generation bar code image.Coding generation bar code image is carried out to unique code, it is possible to use various to open
The software kit in source, such as zXing.
Step 116:Test and appraisal table element is set.Examination object, performance assessment criteria, examination grade and generation after upsetting
Bar code image is set to test and appraisal table respective regions.
Step 117:Whether terminate to generate test and appraisal table.Judge whether to generate sufficient amount of test and appraisal table, if not enough, after
It is continuous to go to step 113.
Step 120:The printing of test and appraisal table and scene test and appraisal.The test and appraisal table bulk print that will be generated, is issued to the personnel of participating in evaluation and electing,
Filled in.The step is implemented by examining organizer.
Step 130:Test and appraisal table scan.Batch scanning storage is carried out to the test and appraisal table for reclaiming using high speed scanner, typically
During scanning, select by image scanning into black white image, that is, to be carried out at gray processing while scanning by the state modulator of scanner
Reason, while carrying out edge treated using scanner, removes the black surround produced during scanning.
Step 140:Image preprocessing.Image preprocessing is processed including the binary conversion treatment and Slant Rectify of image etc..
(1) binary conversion treatment.Binary Sketch of Grey Scale Image refers to be by a width greyscale image transitions by choosing a certain threshold value
Only include 0 and 255 high-contrast black and white binary image.Because the gray level image of table of testing and assessing is relatively simple, therefore adopt
Binary conversion treatment is carried out with global threshold binarization method OSTU algorithms.
(2) Slant Rectify.The image of scanning is it is possible that inclined situation, it is therefore necessary to advanced line tilt correction, so
After could extract and corresponding fill in a form region and bar code image is identified.The present invention is distinguished using top dotted line and the right dotted line
Carry out fitting a straight line and determine inclination angle, then carry out Slant Rectify.Flow such as Fig. 6 institutes at angle of inclination are determined by top dotted line
Show, flow is described in detail below.
Step 141:Extract top dashed region.The top dashed region determined during according to design accounts for test and appraisal table and highly compares
Example, extracts corresponding top area image imgTseg in scan image.
Step 142:Search phantom line segments start-stop abscissa.Longitudinal black pixels of detection image imgTseg by column, if there is
W1 continuous black pixel, then be labeled as 1 by the row, if in the absence of w1 continuous black pixel, the row are labeled as 0, such as scheme
7。
It is that, in order to filter possible noise data, w1 values are less than scan image middle conductor height pixel count to set threshold value w1
H, is traditionally arranged to be 2*h/3,.Search 0,1 from left to right is gone here and there, and the subscript position of each section continuous 1 of part is correspondence line segment
Horizontal start-stop coordinate.As in Fig. 7, the abscissa start-stop position of the 1st line segment is respectively the 5,10, the 2nd abscissa of line segment and rises
Stop bit puts respectively 16,22., it is necessary to reject the too short line segment of length first in processing procedure, it may be possible to noise data, such as
The people that participates in evaluation and electing has drawn a vertical line at top unintentionally.
Step 143:Calculate phantom line segments point midway.According to the lateral coordinates of each line segment, the horizontal seat at line segment midpoint is calculated
Mark, fixes the abscissa in image imgTseg, and longitudinal searching is carried out from top to bottom, stops when running into w1 continuous black pixel
Only search for, the w1 for searching ordinate of black pixel now determines the horizontal stroke at line segment midpoint as the ordinate at midpoint
Ordinate.Point coordinates in being determined using the method to all line segments.
Step 144:Using midpoint fitting a straight line, angle of inclination is determined.Using all line segment midpoint coordinate fitting straight lines, lead to
The slope for crossing the straight line determines the angle of inclination A1 of image, as shown in figure 8, the white point in figure in the middle of black line segment is (for the ease of aobvious
Show and process, actually should be black pixel) it is each line segment midpoint.Using point coordinates in each line segment, by linear regression
Fitting a straight line, the angle of inclination of the straight line is the angle of inclination of image.
Treatment to the right phantom line segments is similar with the treatment of top phantom line segments.The right phantom line segments area image imgRseg is extracted,
The horizontal black pixel of detection image, if there is w1 continuous black pixel, is then designated as 1, if not existing w1 by the rower line by line
Individual continuous black pixel, then the rower be designated as 0.Search 0,1 from top to bottom is gone here and there, and the subscript position of each section continuous 1 of part is
Longitudinal start-stop coordinate of correspondence line segment., it is necessary to reject the too short line segment of length in processing procedure, it may be possible to noise data, than
The people that such as participates in evaluation and electing has drawn unintentionally a horizontal line on the right.Abscissa according to line segment end points calculates line segment midpoint abscissa, fixed
Abscissa, searches for the abscissa at midpoint to the left.Using all line segment midpoints fitting a straight line, image inclination angle A2 is determined.Image
Angle of inclination be the average (A1+A2)/2 of angle determined in both direction, image is rotated according to angle of inclination.
Step 150:Bar code and extracted region of filling in a form.After to image skew correction, the right is extracted again with top
Dashed region, and using the abscissa start-stop position with identical method determination top line segment in Slant Rectify treatment, the right is erected
The ordinate of orthogonal axes start-stop position of straight direction line segment.The region that horizontal line segment and longitudinal line segment intersect is region of filling in a form (such as C), together
When to intersect with horizontal line segment be also region (such as D) of filling in a form in each vertical line segment intermediate blank region.The barcode size or text field E is by vertical direction
If last line segment intersects determination with top main section, and in particular to top line segment quantity by specifically examining when examine
The number and width of item are determined.When it is even number to examine number of objects × examination grade quantity, bar code the right is without dotted line
Section, it is necessary to according to design test and appraisal table when determine the barcode size or text field height and region height of filling in a form between relation, from last
Individual longitudinal line segment is extended downwardly.In order to avoid the influence in sideline, the area image of filling in a form of extraction is than bottom left on actual intersection region
Right one value r of setting of each diminution, such as 2 pixels.Such as, it is assumed that the start-stop abscissa of horizontal line segment is x1, x2, longitudinal line segment
Start-stop ordinate be y1, y2, then the coordinate of the region upper left corner and the lower right corner in test and appraisal table image point of filling in a form of actual extracting
Wei (x1+r, y1+r) and (x2-r, y2-r).
Step 160:Bar code recognition.Can be carried out by bar code image identification bag (such as zXing) increased income
Bar code image recognizes, identifies unique code of test and appraisal table, shows to the test and appraisal table that association is retrieved in external memory according to unique code is automatic
Show order information, combined with the fill in a form content in region of the test and appraisal table for identifying below, obtain examination object, performance assessment criteria and fill in
Situation.
Step 170:Fill in a form region recognition.Region recognition of filling in a form includes:Judge whether to fill in symbol, image expansion and thin
Change, symbol reorientation, image normalization, the Symbol recognition based on k nearest neighbor.Processing procedure is introduced by taking √ as an example below, other symbols
It is number similar.
(1) judge whether to fill in symbol.According to the ratio that black pixel in area image of filling in a form is accounted for, whether the region is judged
Fill in symbol.If black pixel ratio is less than the threshold value of setting, then it is assumed that do not fill in symbol, terminate identification;If high
In the threshold value of setting, then it is further processed and recognizes.
The black pixel of handwriting samples symbol in Sample Storehouse is calculated filling in the average of shared ratio in region,
(2) image expansion and refinement.Area image of filling in a form is expanded and micronization processes, the picture after being refined,
Can be realized by the open source software such as OpenCV bag.
(3) symbol reorientation.The symbol size for actually filling out is likely less than the area image of filling in a form for extracting, in order to improve
The accuracy rate of identification is, it is necessary to remove white space up and down.Region longitudinally black pixel of filling in a form is detected by column, if ordinate
On without black pixel, then the row are denoted as 0, have, and are denoted as 1.From left and right respectively to center search, when running into w2 continuous 1, it is believed that
Reach the horizontal right boundary of symbol.It is similar, area image laterally black pixel of filling in a form is detected line by line, if without black on abscissa
Pixel, then the row be denoted as 0, have, be denoted as 1.When respectively to center search, running into w2 continuous 1 up and down, it is believed that reach symbol
Number longitudinal right boundary, be the influence in order to avoid some noise spots using w2 continuous 1.
(4) image normalization.The image normalization that will be extracted in (3) is the fixed size image of N × M, all of symbol
Image all fixed sizes, are so convenient for extracting feature and compare.
(5) Symbol recognition is carried out based on k nearest neighbor.Picture is carried out by after normalized, extracting character feature to character
Discriminant classification, by training and recognizing two stages, finally identifies character.Training stage, examination organization gathers this list
The hand-written √ of position employee, × and zero be sample, Sample Storehouse is set up by artificial screening, the character of symbol is special in sample drawn storehouse
Levy, so that character to be identified is classified and recognized.Cognitive phase, symbolic feature to be identified is set up eventually with the training stage
Master sample feature compare, retrieval k most like sample, the most classification of classification number is the hand-written symbol in preceding k sample
Classification belonging to number.Identification process is as shown in figure 11.
Step 171:Extract sample characteristics., it is necessary to select sample before pattern match is carried out, and to sample extraction feature.
√ that the people that participates in evaluation and electing fills in, × and zero grade symbol, it is ever-changing, to accurately identify these symbols, it is necessary to carry out charcter topology feature
Extract, extraction best embodies the architectural feature of the character feature and intercharacter difference, the present invention extracts the horizontal and vertical of symbol
Cross feature.
(1) lateral cross feature.Transversal scanning glyph image, leftmost black picture element and rightmost that certain a line runs into
The distance between black picture element is the lateral cross feature of the row.The lateral cross obtained after each image zooming-out is characterized as N-dimensional
Vector.√, × there is larger difference with 03 symbol lateral cross features, nominally, √ symbols were a large amount of before this
0, then turn up full blast suddenly, then gradually decrease to 0;The lateral cross feature of × glyph image highest before this, then by
Gradually decline, until 0, then gradually rise;The image lateral cross feature of zero symbol gradually rises from 0 (may maintain first
One section of parallel high position), it is then gradually falls 0.If these N-dimensionals vector is drawn as one-dimensional curve, general form
Such as Figure 12.
Wherein, symbol × be typically likely to occur two kinds of situations, Figure 12 (2) is the situation of very standard, but actually submits a written statement to a higher authority
When writing, two strokes can not be equally long, such as Figure 13 (1), then the lateral cross feature for Figure 12 (3) occur.
Symbol zero is general it is possible that such as Figure 12 (3) lateral cross feature in the case of three kinds of situations, complete standard, such as
Hand-written zero symbol of Figure 13 (2) is then likely to occur the lateral cross feature of similar Figure 12 (4).Some zero symbols, can when writing
Can completely not close, such as Figure 13 (3), then be likely to occur the lateral cross feature of similar Figure 12 (5).Carried in actual identification process
The lateral cross feature got, usually increased various noises in the feature base of several standards above.
(2) crossed longitudinally feature.Longitudinal scanning glyph image, the black picture element of the top that a certain row run into and bottom
The distance between black picture element is the crossed longitudinally feature of the row.Obtained after each image zooming-out it is crossed longitudinally be characterized as M tie up
Vector.√, × and 03 crossed longitudinally features of symbol there is larger difference, nominally, √ glyph images it is vertical
It is substantially substantial amounts of 0 to cross feature;The crossed longitudinally feature of × glyph image was very high before this, was then gradually reduced, until
0, then gradually rise again;The crossed longitudinally feature of image of zero symbol gradually rise from 0 first (may maintain one section it is parallel
It is high-order), 0 is then gradually decreased to again.If drawn using these M dimensional vectors as one-dimensional curve, general form such as Figure 14.
Wherein, symbol √ is typically likely to occur two kinds of situations, and Figure 14 (1) is the situation of very standard, but actually submits a written statement to a higher authority
When writing, usually such as Figure 13 (4), then there is the crossed longitudinally feature of Figure 14 (2).Symbol × and zero crossed longitudinally feature and transverse direction
Cross feature is similar to.The crossed longitudinally feature extracted in actual identification process, the usually feature base of several standards of the above
On, increased various noises.
Step 172:Extract symbolic feature.Extract the horizontal and vertical cross feature of glyph image in region of filling in a form.
Step 173:K nearest neighbor search based on DTW distances.Sample lateral cross feature database is arrived respectively and sample is crossed longitudinally
K nearest neighbor search is carried out in feature database, in 2*K neighbour, the classification of the most sample of sample number is used as rectangular image symbol
Classification.General K takes 3.Any K nearest neighbor search method of similarity searching in data mining can be taken to scan for.
Similarity measure uses DTW (Dynamic TimeWrapping:Dynamic time warping) distance, DTW distances are to two
Characteristic vector to be calculated, solves the minimum range for obtaining an overall situation by the way of Dynamic Programming on the whole.DTW distances
Used in field of speech recognition first, a same pronunciation can be solved, but duration asynchronous similarity measure is asked
Topic.√, × relatively simple with 03 hand-written symbol structures, but the situation for various flex points skews occur is likely to, than
Such as, for √ symbols, it is possible to which various just like Figure 15 are write.
The lateral cross feature that correspond to three kinds of literary styles is shown as one-dimensional curve, may be such as Figure 16.It can be seen that, although it is each
The persistence length of section is different, but these are all considered as the transverse features of √ symbols.Similarity distance is carried out using DTW distances
During calculating, the distance between Figure 16 (1) and Figure 16 (2) feature are calculated can be calculated using pointwise matching way as shown in figure 17.
Embodiments of the invention is the foregoing is only, is not intended to limit the invention.It is all in principle of the invention
Within, the equivalent made should be included within the scope of the present invention.The content category that the present invention is not elaborated
In prior art known to this professional domain technical staff.
Claims (8)
1. a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor, it is characterised in that:Comprise the following steps:
Step one:Design test and appraisal table, the essential element in test and appraisal table includes examination object, performance assessment criteria and examination grade, wherein
The test and appraisal table of display location every of examination object, performance assessment criteria and examination grade is all different;
Step 2:The printing of test and appraisal table and scene test and appraisal, the test and appraisal table bulk print that will be generated, are issued to the personnel of participating in evaluation and electing, and pass through
It is special meet carry out filling in marking;
Step 3:Test and appraisal table scan storage, batch scanning storage is carried out using high speed scanner to the test and appraisal table for reclaiming, scanning
Gray processing treatment is carried out simultaneously, while carrying out edge treated using scanner, removes the black surround produced during scanning;
Step 4:Image preprocessing, image preprocessing includes binary conversion treatment and the Slant Rectify treatment of image;
Step 5:Bar code and extracted region of filling in a form, after to image skew correction, judge bar code and the tool in region of filling in a form
Body position go forward side by side row information extraction;
Step 6:Bar code recognition, the identification of bar code image is carried out by bar code and Quick Response Code the identification bag increased income,
It is automatic to retrieving the test and appraisal table display sequence information of association in external memory according to the unique code for identifying, and it is associated with test and appraisal table figure
Picture, combined with the fill in a form content in region of the test and appraisal table for identifying below, is obtained examination object, performance assessment criteria and is filled in situation;
Step 7:Fill in a form region recognition, by judging whether to fill in symbol, image being expanded and micronization processes, accord with
Number reorientation, image normalization and the Symbol recognition based on k nearest neighbor, to carry out overall identification to region of filling in a form.
2. a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor according to claim 1, it is characterised in that:
Table specific design step of being tested and assessed in the step one is as follows:
Step 1.1:Design test and appraisal table overall structure, examination subject area, performance assessment criteria region, examination grade are divided into by test and appraisal table
Region, region of filling in a form, the barcode size or text field, top dashed region and the right dashed region;
Step 1.2:Dotted line at the top of being set in the dashed region of top, sets the right dotted line on the right in dashed region.Top is empty
The width in the region of filling in a form below every section of correspondence of line, i.e. line width and horizontal start-stop position and the region of filling in a form of lower section and
Horizontal start-stop position is identical, sets the thickness of dotted line, after scanning, in image preprocessing, and can be by setting a threshold
Value filters out noise, while not influenceing the treatment of dotted line;The right dotted line first paragraph is examined from first first of examination object
Grade starts, then interval setting;Every section of region of filling in a form on the correspondence left side of the right dotted line, i.e. line segment height and longitudinal start stop bit
Put identical with the height in the region of filling in a form on the left side and longitudinal start-stop position, the thickness of dotted line is set, after scanning, in image
During pretreatment, noise can be fallen by setting a threshold filtering, while the treatment of dotted line is not influenceed, every section of knot in the dotted line of the right
Blank between beam position and next section of beginning also corresponds to the region of filling in a form on the left side;
Step 1.3:It is random to determine examination object, examination item and examination hierarchal order, upset at random examination object, examination item with
And examination hierarchal order, examination object, performance assessment criteria and examination hierarchical region to being filled into test and appraisal table are respectively created only
One yard;
Step 1.4:Information writes storehouse, the order letter of the examination object, performance assessment criteria and examination grade that are written in test and appraisal table
Breath is stored with unique code by auxiliary storage;
Step 1.5:Generation bar code image, coding generation bar code image is carried out to unique code;
Step 1.6:Test and appraisal table element is set, the bar shaped of examination object, performance assessment criteria, examination grade and generation after upsetting
Code image is set to corresponding region;
Step 1.7:Judge whether to generate sufficient amount of test and appraisal table, if not enough, continuing to go to step 1.3, if generation foot
The test and appraisal table of enough amounts then end-of-job.
3. a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor according to claim 1, it is characterised in that:
Image binaryzation treatment concretely comprises the following steps in the step 4:Two-value is carried out using global threshold binarization method OSTU algorithms
Change is processed, and it by choosing a certain threshold value by a width greyscale image transitions is only to include 0 and 255 that wherein image binaryzation refers to
High-contrast black and white binary image.
4., according to a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor that one of claims 1 to 3 is described, it is special
Levy and be:Image skew correction treatment is and carries out fitting a straight line respectively using top dotted line and the right dotted line in the step 4
Determine inclination angle, then carry out Slant Rectify, comprise the following steps that:
Step 4.1:Top dashed region is extracted, the top dashed region determined during according to design accounts for test and appraisal table height ratio,
Corresponding top area image imgTseg is extracted in scan image;
Step 4.2:Search phantom line segments start-stop abscissa.The longitudinal black pixels of detection image imgTseg, set threshold value w1 by column,
If there is at least w1 continuous black pixel, then the row are labeled as 1, if in the absence of w1 continuous black pixel, the row
Labeled as 0, wherein threshold value w1 is less than scan image middle conductor longitudinal direction pixel count, 2/3rds of the longitudinal pixel count of line taking section;
Search 0,1 from left to right is gone here and there, and the subscript position of each section continuous 1 of part is the horizontal start-stop coordinate of correspondence line segment, is treated
, it is necessary to reject the too short line segment of length in journey;
Step 4.3:Phantom line segments point midway is calculated, according to the lateral coordinates of each line segment, the lateral coordinates at line segment midpoint is calculated,
Abscissa is fixed in image imgTseg, longitudinal searching is carried out from top to bottom, stopped search when running into w1 continuous black pixel,
The w1 ordinate of black pixel for searching now determines the transverse and longitudinal coordinate at line segment midpoint as the ordinate at midpoint,
Point coordinates in being determined using the method to all line segments;
Step 4.4:Using midpoint fitting a straight line, angle of inclination is determined, using all line segment midpoint coordinate fitting straight lines, by this
The slope of straight line determines the angle of inclination A1 of image;
Step 4.5:The angle of inclination A2 of image is determined using longitudinal dotted line, using with determine angle of inclination A1 identical methods,
Determine the angle of inclination A2 of image again using longitudinal dotted line;
Step 4.6:The average of A1, A2 is calculated as the angle of inclination of image.
5. a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor according to claim 4, it is characterised in that:
Bar code and extracted region of filling in a form are concretely comprised the following steps in the step 5:After to image skew correction, again according to setting
The ratio of timing determination extracts the dashed region at the right and top, and determines top using with identical method in Slant Rectify treatment
The abscissa start-stop position of portion's line segment, the ordinate of orthogonal axes start-stop position of the right vertical direction line segment;Wherein horizontal line segment and longitudinal direction
The region that line segment intersects is region of filling in a form, while it be also area of filling in a form that each vertical line segment intermediate blank region intersects with horizontal line segment
Domain;If the barcode size or text field intersects determination by last line segment of vertical direction and top main section.
6. a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor according to claim 4, it is characterised in that:
Filled in a form in the step 7 the concretely comprising the following steps of region recognition:
7.1:It is first determined whether filling in symbol, according to the ratio that black pixel in area image of filling in a form is accounted for, judge that the region is
It is no to fill in symbol, if black pixel ratio is less than the threshold value p of setting, then it is assumed that do not fill in symbol, terminate identification;If
Higher than the threshold value p of setting, then it is further processed and recognizes;
The average of handwriting samples symbol pixel proportion in region of filling in a form in Sample Storehouse is calculated, threshold value p takes the average
1/5th;
7.2:Image expansion and refinement, are expanded and micronization processes to area image of filling in a form, the picture after being refined;
7.3:Symbol is relocated, and region longitudinally black pixel of filling in a form is detected by column, if without black pixel on ordinate, the row
0 is denoted as, is had, be denoted as 1, threshold value w2, w2 are set and takes 1/10th of peak width of filling in a form, from left and right respectively to center search, met
During to w2 continuous 1, it is believed that reach the horizontal right boundary of symbol, i.e., area image laterally black pixel of filling in a form is detected line by line,
If without black pixel on abscissa, the row is denoted as 0, has, and is denoted as 1;Connect from respectively to center search, running into w2 up and down
When continuous 1, it is believed that reach longitudinal right boundary of symbol;
7.4:Image normalization, the image normalization that will be extracted in step 7.3 is the fixed size image of N × M, all of symbol
Image all fixed sizes;
7.5:Symbol recognition based on k nearest neighbor, picture is carried out by after normalized, character feature being extracted first to character
Discriminant classification, by training and recognizing two stages, finally identifies character.
7. a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor according to claim 6, it is characterised in that:
Test and appraisal table Symbol recognition flow is comprised the following steps that in the step 7.5:
Step 7.5.1:Sample characteristics are extracted, it is necessary to select sample before pattern match is carried out, and to sample extraction feature, its
It is middle to extract the horizontal and vertical cross feature for being characterized as symbol;Sample is formed after extracting sample characteristics from sample image storehouse
Feature database;
Wherein lateral cross feature, as transversal scanning glyph image, leftmost black picture element that certain a line runs into and most right
The distance between side black picture element is the lateral cross feature of the row, and the lateral cross obtained after each image zooming-out is characterized as N
The vector of dimension;
Wherein crossed longitudinally feature, as longitudinal scanning glyph image, the black picture element of the top that a certain row run into and most under
The distance between side black picture element is the crossed longitudinally feature of the row, and what is obtained after each image zooming-out crossed longitudinally is characterized as M
The vector of dimension;
Step 7.5.2:The symbolic feature in region of filling in a form is extracted, extracts horizontal and vertical by from the glyph image in region of filling in a form
Cross feature forms symbolic feature to be identified;
Step 7.5.3:The character class in region of filling in a form is determined using k nearest neighbor algorithm.Symbol lateral cross feature to be identified is arrived
The k nearest neighbor based on DTW distances is carried out in the feature in sample transverse features storehouse to search for;By the crossed longitudinally feature of symbol to be identified to sample
The k nearest neighbor based on DTW distances is carried out in the feature of this longitudinal feature database to search for, in 2*K neighbour, the most sample of sample number
Classification as area image symbol of filling in a form classification.
8. a kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor according to claim 1, it is characterised in that:
Special in the step 2 meet for √, × or zero.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610995573.1A CN106778717B (en) | 2016-11-11 | 2016-11-11 | Evaluation table identification method based on image identification and K neighbor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610995573.1A CN106778717B (en) | 2016-11-11 | 2016-11-11 | Evaluation table identification method based on image identification and K neighbor |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106778717A true CN106778717A (en) | 2017-05-31 |
CN106778717B CN106778717B (en) | 2020-05-05 |
Family
ID=58973330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610995573.1A Active CN106778717B (en) | 2016-11-11 | 2016-11-11 | Evaluation table identification method based on image identification and K neighbor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106778717B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108062529A (en) * | 2017-12-22 | 2018-05-22 | 上海鹰谷信息科技有限公司 | A kind of intelligent identification Method of chemical structural formula |
CN108647701A (en) * | 2018-04-13 | 2018-10-12 | 长安大学 | A kind of quick Train number recognition method |
CN109993126A (en) * | 2019-04-03 | 2019-07-09 | 腾讯科技(深圳)有限公司 | The file information determines method, apparatus, equipment and readable storage medium storing program for executing |
CN110232045A (en) * | 2019-05-27 | 2019-09-13 | 广州润普网络科技有限公司 | A kind of electronics folder image processing method |
WO2019237560A1 (en) * | 2018-06-15 | 2019-12-19 | 深圳市成者云科技有限公司 | Border and page number scanning system |
CN113506279A (en) * | 2021-07-22 | 2021-10-15 | 浙江大华技术股份有限公司 | Method and device for determining inclination angle of object, storage medium and electronic device |
CN115294121A (en) * | 2022-10-08 | 2022-11-04 | 南通有来信息技术有限公司 | Bar code defect detection method based on logistics label |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102236789A (en) * | 2010-04-26 | 2011-11-09 | 富士通株式会社 | Method and device for correcting table image |
CN102629322A (en) * | 2012-03-12 | 2012-08-08 | 华中科技大学 | Character feature extraction method based on stroke shape of boundary point and application thereof |
CN103258450A (en) * | 2013-03-22 | 2013-08-21 | 华中师范大学 | Intelligent learning platform for children with autism |
US20130266195A1 (en) * | 2012-04-10 | 2013-10-10 | Derek Shiell | Hash-Based Face Recognition System |
CN103377177A (en) * | 2012-04-27 | 2013-10-30 | 北大方正集团有限公司 | Method and device for identifying forms in digital format files |
-
2016
- 2016-11-11 CN CN201610995573.1A patent/CN106778717B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102236789A (en) * | 2010-04-26 | 2011-11-09 | 富士通株式会社 | Method and device for correcting table image |
CN102629322A (en) * | 2012-03-12 | 2012-08-08 | 华中科技大学 | Character feature extraction method based on stroke shape of boundary point and application thereof |
CN102629322B (en) * | 2012-03-12 | 2014-03-26 | 华中科技大学 | Character feature extraction method based on stroke shape of boundary point and application thereof |
US20130266195A1 (en) * | 2012-04-10 | 2013-10-10 | Derek Shiell | Hash-Based Face Recognition System |
CN103377177A (en) * | 2012-04-27 | 2013-10-30 | 北大方正集团有限公司 | Method and device for identifying forms in digital format files |
CN103258450A (en) * | 2013-03-22 | 2013-08-21 | 华中师范大学 | Intelligent learning platform for children with autism |
Non-Patent Citations (9)
Title |
---|
JIMIN WANG ET AL.: ""Obstacle detection model implementation based on information fusion of ultrasonic and vision"", 《 2016 IEEE INTERNATIONAL CONFERENCE ON REAL-TIME COMPUTING AND ROBOTICS》 * |
JONG-MIN KIM ET AL.: ""Real Time Face Detection and Recognition Using Rectangular Feature Based Classifier and Modified Matching Algorithm"", 《 2009 FIFTH INTERNATIONAL CONFERENCE ON NATURAL COMPUTATION》 * |
何珑: ""基于随机森林的产品垃圾评论识别"", 《中文信息学报》 * |
刘为 等: ""基于字线分离的表格识别预处理算法"", 《计算机工程与设计》 * |
王壮 等: ""一种基于近邻搜索的快速k-近邻分类算法"", 《系统工程与电子技术》 * |
王心醉 等: ""基于双向PCA和K近邻的人脸识别算法"", 《解放军理工大学学报(自然科学版)》 * |
王继民 等: ""多度量水文时间序列相似性分析"", 《水文》 * |
王绪 等: ""基于投影特征与结构特征的表格图像识别"", 《计算机工程》 * |
芮明 等: ""基于视觉的表格自动识别方法"", 《计算机应用研究》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108062529A (en) * | 2017-12-22 | 2018-05-22 | 上海鹰谷信息科技有限公司 | A kind of intelligent identification Method of chemical structural formula |
CN108062529B (en) * | 2017-12-22 | 2024-01-12 | 上海鹰谷信息科技有限公司 | Intelligent identification method for chemical structural formula |
CN108647701A (en) * | 2018-04-13 | 2018-10-12 | 长安大学 | A kind of quick Train number recognition method |
WO2019237560A1 (en) * | 2018-06-15 | 2019-12-19 | 深圳市成者云科技有限公司 | Border and page number scanning system |
CN109993126A (en) * | 2019-04-03 | 2019-07-09 | 腾讯科技(深圳)有限公司 | The file information determines method, apparatus, equipment and readable storage medium storing program for executing |
CN109993126B (en) * | 2019-04-03 | 2023-10-24 | 腾讯科技(深圳)有限公司 | File information determining method, device, equipment and readable storage medium |
CN110232045A (en) * | 2019-05-27 | 2019-09-13 | 广州润普网络科技有限公司 | A kind of electronics folder image processing method |
CN110232045B (en) * | 2019-05-27 | 2023-08-11 | 广州润普网络科技有限公司 | Electronic file image processing method |
CN113506279A (en) * | 2021-07-22 | 2021-10-15 | 浙江大华技术股份有限公司 | Method and device for determining inclination angle of object, storage medium and electronic device |
CN115294121A (en) * | 2022-10-08 | 2022-11-04 | 南通有来信息技术有限公司 | Bar code defect detection method based on logistics label |
Also Published As
Publication number | Publication date |
---|---|
CN106778717B (en) | 2020-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106778717A (en) | A kind of test and appraisal table recognition methods based on image recognition and k nearest neighbor | |
AU2004271639B2 (en) | Systems and methods for biometric identification using handwriting recognition | |
US8442319B2 (en) | System and method for classifying connected groups of foreground pixels in scanned document images according to the type of marking | |
Srihari et al. | Individuality of handwriting | |
Srihari et al. | Establishing handwriting individuality using pattern recognition techniques | |
US7724958B2 (en) | Systems and methods for biometric identification using handwriting recognition | |
CN103914680B (en) | A kind of spray printing character picture identification and check system and method | |
US7580551B1 (en) | Method and apparatus for analyzing and/or comparing handwritten and/or biometric samples | |
CN101615252B (en) | Method for extracting text information from adaptive images | |
CN100527156C (en) | Picture words detecting method | |
CN102360419B (en) | Method and system for computer scanning reading management | |
CN107633250A (en) | A kind of Text region error correction method, error correction system and computer installation | |
CN110210413A (en) | A kind of multidisciplinary paper content detection based on deep learning and identifying system and method | |
CN103034848B (en) | A kind of recognition methods of form types | |
CN101719142B (en) | Method for detecting picture characters by sparse representation based on classifying dictionary | |
CN110503054B (en) | Text image processing method and device | |
CN109784342A (en) | A kind of OCR recognition methods and terminal based on deep learning model | |
CN108052936B (en) | Automatic inclination correction method and system for Braille image | |
CN107463866A (en) | A kind of method of the hand-written laboratory report of identification for performance evaluation | |
CN105468732A (en) | Image keyword inspecting method and device | |
CN110222660B (en) | Signature authentication method and system based on dynamic and static feature fusion | |
CN112651323A (en) | Chinese handwriting recognition method and system based on text line detection | |
Zhang et al. | Computational method for calligraphic style representation and classification | |
Almohri et al. | A real-time DSP-based optical character recognition system for isolated Arabic characters using the TI TMS320C6416T | |
CN108062548B (en) | Braille square self-adaptive positioning method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |