CN107945172A - A kind of character detection method and system - Google Patents
A kind of character detection method and system Download PDFInfo
- Publication number
- CN107945172A CN107945172A CN201711294481.1A CN201711294481A CN107945172A CN 107945172 A CN107945172 A CN 107945172A CN 201711294481 A CN201711294481 A CN 201711294481A CN 107945172 A CN107945172 A CN 107945172A
- Authority
- CN
- China
- Prior art keywords
- image
- width
- study
- gray
- pose
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Quality & Reliability (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The present invention provides a kind of character detection method and system,Including image study module,Image collection module and image processing module,The method that the present invention is learnt by multi-template,Calculate reference picture and standard deviation image,The pixel value size of standard deviation image can be configured according to actual requirement,Pretreatment image carries out flaw point judgement on the basis of reference picture and standard deviation image,Can the slight jitter of product and the conversion of small pose in effectively compatible practical application,Reduce unnecessary NG products,It has the fault-tolerant parameter that can be set compared to conventional method,Template has the accuracy of higher,With more preferable disposal ability and more reasonably Processing Algorithm,It is compatible more black in processing procedure,The function of few ink processing at the same time,The defects of printing opposite rule product suitable for detection is detected,It is particularly suitable for the flaw of character,Offset,The detection of more few black phenomenons of ink.
Description
Technical field
The present invention relates to character detection technique field, more particularly to a kind of character detection method and system.
Background technology
Character machining has extensively in fields such as electronics, the detection of mechanical components model, all kinds of printed matter print quality inspections
General application.A width in the method that traditional character machining uses template matches, i.e. selection qualified images adjusts as reference
The pose of pretreatment image, the very big region of same reference picture pixel differences is found out using the one-to-one method of pixel.Due to
The reference data of this method determines by single image, reasonability and property placed in the middle without statistics.And required during realizing
It is excessively stringent, it is impossible to which that compatible body form has the gray value during slight shake and image procossing in smaller range inclined
Difference, so as to cause unnecessary NG products.
The content of the invention
(1) technical problem solved
To solve the above-mentioned problems, the present invention provides a kind of character detection method and system, learnt by multi-template
Method, calculates reference picture and standard deviation image, the pixel value size of standard deviation image can according to actual requirement into
Row is set, and pretreatment image carries out flaw point judgement on the basis of reference picture and standard deviation image, can be effectively compatible real
The slight jitter of product and the conversion of small pose in the application of border.
(2) technical solution
A kind of character detection method, includes the following steps:
S1, choose n width training images;
A width in S2, the selected training image, obtains its pose, as instruction other described in a manner of template matches
Practice the study image of image pose change;
S3, read training image described in the i-th width, using the pose of the study image as training described in standard rotation and translation
Image is added to form new with the study image to identical pose, and by the training image in the form of gray value
Practise image;
S4, make i+1, judges the size of i+1 and n, if i+1≤n, continue to read i+1 width described in training image, lay equal stress on
The action of multiple S3;If i+1 > n, the training image study finishes, into next step;
S5, to described in n width learn image according to formula (1)Calculated, obtain reference picture;
S6, to learning image and the reference picture described in n width according to formula (2)Into
Row calculates, and obtains standard deviation image;
S7, contrasted pretreatment image and the reference picture, calculates gray-scale deviation value;
S8, contrasted the gray-scale deviation value and the gray value of the standard deviation image, if the gray-scale deviation
Value then judges that the pretreatment image is qualified, otherwise judges the pre- place in the intensity value ranges of the standard deviation image
It is unqualified to manage image, into next step;
S9, carry out Blob analyses to the pretreatment image;
S10, screening flaw point.
Further, the pose in the step S2 and the step S3 includes reference point position and angle.
Further, the gray value of the standard deviation image in the step S6 and the step S8 takes standard grayscale
2~3 times of value.
Further, the flaw point in the step S10 is area of the pretreatment image after Blob is analyzed
Region.
A kind of character machining system, including image study module, image collection module and image processing module;
Described image study module chooses training image described in n width, selectes a wherein width, is obtained in a manner of template matches
The pose, the study image changed as pose described in training image other described;Read training figure described in the i-th width
Picture, using the pose of the study image as training image described in standard rotation and translation to the identical pose, and will
The training image is added to form the new study image with the study image in the form of gray value, makes i+1 and repeats
Action is stated, until training image study finishes described in n width;
Described image acquisition module is to learning image according to formula (1) described in n widthCarry out calculating acquisition
The reference picture, then to learning image and the reference picture described in n width according to formula (2)Calculate and obtain the standard deviation image;
Described image processing module is contrasted the pretreatment image and the reference picture, and it is inclined to calculate the gray scale
Difference is simultaneously analyzed, judge the gray-scale deviation value whether within the gray value permissible range of the standard deviation image from
And judge whether the pretreatment image is qualified, and Blob analyses are carried out to the pretreatment image according to the actual requirements, screening
The flaw point.
Further, the pose includes reference point position and angle.
Further, the gray value of the standard deviation image takes 2~3 times of standard gray angle value.
Further, the flaw point is surface area of the pretreatment image after Blob is analyzed.
(3) beneficial effect
The present invention provides a kind of character detection method and system, and the method learnt by multi-template, calculates reference chart
Picture and standard deviation image, the pixel value size of standard deviation image can be configured according to actual requirement, pretreatment image
On the basis of reference picture and standard deviation image carry out flaw point judgement, can effectively compatibility practical application in product it is slight
Shake and small pose convert, and reduce unnecessary NG products, it has the fault-tolerant ginseng that can be set compared to conventional method
Number, template have the accuracy of higher, have more preferable disposal ability and a more reasonably Processing Algorithm, and compatibility is more in processing procedure
The function of black, few ink processing at the same time, detects suitable for detecting the defects of printing opposite rule product, is particularly suitable for the flaw of character
Defect, offset, the detection of the few black phenomenon of more ink.
Brief description of the drawings
Fig. 1 is a kind of execution flow chart of character detection method according to the present invention.
Fig. 2 is a kind of functional block diagram of character machining system according to the present invention.
Embodiment
Embodiment according to the present invention is described in further details below in conjunction with the accompanying drawings.
As shown in Figure 1, a kind of character detection method, includes the following steps:
S1, choose n width training images;
A width in S2, selected training image, obtains its pose, as other training image positions in a manner of template matches
The study image of appearance change;
Template is exactly small image known to a pair, and template matches are exactly the searching target in the big image of a width, it is known that should
There is the target to be looked in figure, and the target has identical size, direction and pictorial element with template, can be with by certain algorithm
Target is found in figure, determines its coordinate position.In step s 2, a width qualified images are chosen as reference, with selected instruction
Practice image and carry out template matches, determine the pose of target in training image.
S3, read the i-th width training image, is standard rotation and translation training image to identical to learn the pose of image
Pose, and training image is added to form new study image with study image in the form of gray value;
Pose in step S2 and S3 includes reference point position and angle, in step s3 by training image to learn image
Reference point position and angle are standard, rotation and translation reference point position extremely identical with study image and angle.
S4, make i+1, judges the size of i+1 and n, if i+1≤n, continues to read i+1 width training image, and repeat S3
Action;If i+1 > n, training image study finishes, into next step;
S5, learn n width image according to formula (1)Calculated, obtain reference picture;
Wherein mx,cFor reference picture, gx,c;I is to learn image, i≤n.
S6, learn n width image and reference picture according to formula (2)Calculated,
Obtain standard deviation image;
Wherein sx,cFor standard deviation image, mx,cFor reference picture, gx,c;I is to learn image, i≤n.
S7, contrasted pretreatment image and reference picture, calculates gray-scale deviation value;
S8, contrasted gray-scale deviation value and the gray value of standard deviation image, if gray-scale deviation value is in standard deviation
In the intensity value ranges of image, then judge that pretreatment image is qualified, otherwise judge that pretreatment image is unqualified, into next step
Suddenly;
According to the shake size of product in practical application and the difference of pose, the ash of step S6 and S8 Plays offset images
Angle value size generally takes 2~3 times of standard gray angle value, phenomena such as with how black compatibility is, few ink.
S9, carry out Blob analyses to pretreatment image;
Blob refers to one piece of connected region that there is Similar color, Texture eigenvalue to be formed in image.Blob is analyzed
It is that image is subjected to binaryzation, segmentation obtains foreground and background, connected region detection is then carried out, so as to obtain the mistake of Blob blocks
Journey.In simple terms, Blob analyses are exactly that the zonule that will appear from " gray scale mutation " in one piece of " smooth " region searches out.
In step s 9, analyzed by Blob and search out the surface area for " gray scale mutation " occur in underproof pretreatment image
Come.
S10, screening flaw point.
Flaw point is the surface area for occurring " gray scale mutation ", and surface area is screened.
As shown in Fig. 2, a kind of character machining system, including image study module, image collection module and image procossing mould
Block.
Image study module chooses n width training images, selectes a wherein width, its pose is obtained in a manner of template matches,
Study image as the change of other training image poses;The i-th width training image is read, is revolved using the pose for learning image as standard
Turn and translation training image is to identical pose, and training image is added to form new with study image in the form of gray value
Image is practised, i+1 is made and repeats above-mentioned action, until the study of n width training image finishes;Pose includes reference point position and angle.
Image collection module learns n width image according to formula (1)Calculate and obtain reference chart
Picture, then image and reference picture are learnt according to formula (2) to n widthCarry out calculating acquisition standard
Offset images;Wherein sx,cFor standard deviation image, mx,cFor reference picture, gx,c;I is to learn image, i≤n.
Image processing module is contrasted pretreatment image and reference picture, is calculated gray-scale deviation value and is analyzed,
Judge gray-scale deviation value whether within the gray value permissible range of standard deviation image so as to judging whether pretreatment image closes
Lattice, according to the shake size of product in practical application and the difference of pose, the gray value size of standard deviation image generally takes mark
2~3 times of quasi- gray value, phenomena such as with how black compatibility is, few ink.If the gray-scale deviation value of pretreatment image is in standard deviation image
Intensity value ranges in, then judge that pretreatment image is qualified;Otherwise, it is determined that pretreatment image is unqualified.To underproof pre- place
Manage image and carry out Blob analyses, search out the surface area for occurring " gray scale mutation " in pretreatment image, these surface areas are
For flaw point, flaw point is screened.
The present invention provides a kind of character detection method and system, and the method learnt by multi-template, calculates reference chart
Picture and standard deviation image, the pixel value size of standard deviation image can be configured according to actual requirement, pretreatment image
On the basis of reference picture and standard deviation image carry out flaw point judgement, can effectively compatibility practical application in product it is slight
Shake and small pose convert, and reduce unnecessary NG products, it has the fault-tolerant ginseng that can be set compared to conventional method
Number, template have the accuracy of higher, have more preferable disposal ability and a more reasonably Processing Algorithm, and compatibility is more in processing procedure
The function of black, few ink processing at the same time, detects suitable for detecting the defects of printing opposite rule product, is particularly suitable for the flaw of character
Defect, offset, the detection of the few black phenomenon of more ink.
The above-described embodiments are merely illustrative of preferred embodiments of the present invention, not to the structure of the present invention
Think and scope is defined.On the premise of design concept of the present invention is not departed from, technology of the ordinary people in the field to the present invention
The all variations and modifications that scheme is made, should all drop into protection scope of the present invention, the claimed technology contents of the present invention,
All record in detail in the claims.
Claims (8)
- A kind of 1. character detection method, it is characterised in that:Include the following steps:S1, choose n width training images;A width in S2, the selected training image, obtains its pose in a manner of template matches, as training figure other described The study image of image position appearance change;S3, read training image described in the i-th width, using the pose of the study image as training image described in standard rotation and translation It is added to form the new study figure in the form of gray value with the study image to identical pose, and by the training image Picture;S4, make i+1, judges the size of i+1 and n, if i+1≤n, continues to read training image described in i+1 width, and repeat S3 Action;If i+1 > n, the training image study finishes, into next step;S5, to described in n width learn image according to formula (1)I is calculated, and obtains reference picture;S6, to learning image and the reference picture described in n width according to formula (2)Counted Calculate, obtain standard deviation image;S7, contrasted pretreatment image and the reference picture, calculates gray-scale deviation value;S8, contrasted the gray-scale deviation value and the gray value of the standard deviation image, if the gray-scale deviation value exists In the intensity value ranges of the standard deviation image, then judge that the pretreatment image is qualified, otherwise judge the pretreatment figure As unqualified, into next step;S9, carry out Blob analyses to the pretreatment image;S10, screening flaw point.
- A kind of 2. character detection method according to claim 1, it is characterised in that:In the step S2 and the step S3 The pose include reference point position and angle.
- A kind of 3. character detection method according to claim 1, it is characterised in that:In the step S6 and the step S8 The gray value of the standard deviation image take 2~3 times of standard gray angle value.
- A kind of 4. character detection method according to claim 1, it is characterised in that:The flaw in the step S10 Point is surface area of the pretreatment image after Blob is analyzed.
- A kind of 5. character machining system, it is characterised in that:Including image study module, image collection module and image procossing mould Block;Described image study module chooses training image described in n width, selectes a wherein width, is obtained in a manner of template matches described Pose, the study image changed as pose described in training image other described;Training image described in the i-th width is read, with The pose of the study image is training image described in standard rotation and translation to the identical pose, and by the instruction Practice image to be added to form the new study image in the form of gray value with the study image, make i+1 and repeat above-mentioned action, Until training image study finishes described in n width;Described image acquisition module is to learning image according to formula (1) described in n widthI is carried out described in calculating acquisition Reference picture, then to learning image and the reference picture described in n width according to formula (2)Into Row, which calculates, obtains the standard deviation image;Described image processing module is contrasted the pretreatment image and the reference picture, calculates the gray-scale deviation value And analyzed, judge the gray-scale deviation value whether within the gray value permissible range of the standard deviation image so as to sentencing Whether the fixed pretreatment image is qualified, and carries out Blob analyses to the pretreatment image according to the actual requirements, described in screening Flaw point.
- A kind of 6. character machining system according to claim 5, it is characterised in that:The pose includes reference point position and angle Degree.
- A kind of 7. character machining system according to claim 5, it is characterised in that:The gray value of the standard deviation image Take 2~3 times of standard gray angle value.
- A kind of 8. character machining system according to claim 5, it is characterised in that:The flaw point is schemed for the pretreatment As the surface area after Blob is analyzed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711294481.1A CN107945172A (en) | 2017-12-08 | 2017-12-08 | A kind of character detection method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711294481.1A CN107945172A (en) | 2017-12-08 | 2017-12-08 | A kind of character detection method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107945172A true CN107945172A (en) | 2018-04-20 |
Family
ID=61945338
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711294481.1A Pending CN107945172A (en) | 2017-12-08 | 2017-12-08 | A kind of character detection method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107945172A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111126391A (en) * | 2019-12-24 | 2020-05-08 | 熵智科技(深圳)有限公司 | Method for positioning defects of printed characters |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009066998A2 (en) * | 2007-11-23 | 2009-05-28 | Mimos Berhad | Apparatus and method for multiple-touch spatial sensors |
CN103048331A (en) * | 2012-12-20 | 2013-04-17 | 石家庄印钞有限公司 | Printing defect detection method based on flexible template registration |
CN104156938A (en) * | 2013-05-14 | 2014-11-19 | 五邑大学 | Image communication area description method, and application method thereof in image registration |
CN104318552A (en) * | 2014-10-15 | 2015-01-28 | 北京理工大学 | Convex hull projection graph matching based model registration method |
CN107389693A (en) * | 2017-06-29 | 2017-11-24 | 西安理工大学 | A kind of printed matter defect automatic testing method based on machine vision |
-
2017
- 2017-12-08 CN CN201711294481.1A patent/CN107945172A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009066998A2 (en) * | 2007-11-23 | 2009-05-28 | Mimos Berhad | Apparatus and method for multiple-touch spatial sensors |
CN103048331A (en) * | 2012-12-20 | 2013-04-17 | 石家庄印钞有限公司 | Printing defect detection method based on flexible template registration |
CN104156938A (en) * | 2013-05-14 | 2014-11-19 | 五邑大学 | Image communication area description method, and application method thereof in image registration |
CN104318552A (en) * | 2014-10-15 | 2015-01-28 | 北京理工大学 | Convex hull projection graph matching based model registration method |
CN107389693A (en) * | 2017-06-29 | 2017-11-24 | 西安理工大学 | A kind of printed matter defect automatic testing method based on machine vision |
Non-Patent Citations (1)
Title |
---|
李景妹: "印刷品缺陷检测中关键技术的研究", 《中国优秀硕士学位论文全文数据库 工程科技I辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111126391A (en) * | 2019-12-24 | 2020-05-08 | 熵智科技(深圳)有限公司 | Method for positioning defects of printed characters |
CN111126391B (en) * | 2019-12-24 | 2023-10-31 | 熵智科技(深圳)有限公司 | Printed character defect positioning method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106295653B (en) | Water quality image classification method | |
CN110473173A (en) | A kind of defect inspection method based on deep learning semantic segmentation | |
CN103324449B (en) | A kind of font distinguished in input picture and the method for non-glyph image pseudomorphism | |
CN110222792A (en) | A kind of label defects detection algorithm based on twin network | |
CN103745461B (en) | A kind of printing image defect detection method based on areas combine feature | |
CN110414334A (en) | A kind of smart water quality recognition methods maked an inspection tour based on unmanned plane | |
CN103439348B (en) | Remote controller key defect detection method based on difference image method | |
CN109918523B (en) | Circuit board component detection method based on YOLO9000 algorithm | |
Liang et al. | In-line inspection solution for codes on complex backgrounds for the plastic container industry | |
US8971663B2 (en) | System and method for producing synthetic golden template image for vision system inspection of multi-layer patterns | |
CN103729649B (en) | A kind of image rotation angle detection method and device | |
CN111242896A (en) | Color printing label defect detection and quality rating method | |
CN109307675A (en) | A kind of product appearance detection method and system | |
CN105957059A (en) | Electronic component missing detection method and system | |
CN110689000B (en) | Vehicle license plate recognition method based on license plate sample generated in complex environment | |
CN111126391A (en) | Method for positioning defects of printed characters | |
CN108921099A (en) | Moving ship object detection method in a kind of navigation channel based on deep learning | |
CN107240112A (en) | Individual X Angular Point Extracting Methods under a kind of complex scene | |
CN105184850A (en) | Method and system for building and printing animal model through mobile phone camera | |
CN108629762A (en) | A kind of stone age evaluation and test model reduces the image pre-processing method and system of interference characteristic | |
CN103455826B (en) | Efficient matching kernel body detection method based on rapid robustness characteristics | |
CN108921023A (en) | A kind of method and device of determining low quality portrait data | |
CN116542932A (en) | Injection molding surface defect detection method based on improved YOLOv5s | |
CN102074017A (en) | Method and device for detecting and tracking barbell central point | |
CN111598858A (en) | Method and system for detecting rubber gloves based on transfer learning |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180420 |