CN115273088A - Chinese character printing quality detection method based on machine vision - Google Patents
Chinese character printing quality detection method based on machine vision Download PDFInfo
- Publication number
- CN115273088A CN115273088A CN202211205049.1A CN202211205049A CN115273088A CN 115273088 A CN115273088 A CN 115273088A CN 202211205049 A CN202211205049 A CN 202211205049A CN 115273088 A CN115273088 A CN 115273088A
- Authority
- CN
- China
- Prior art keywords
- chinese character
- probability
- pixel point
- single chinese
- pixel
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 26
- 230000007547 defect Effects 0.000 claims abstract description 33
- 230000002159 abnormal effect Effects 0.000 claims abstract description 8
- 238000000034 method Methods 0.000 claims description 19
- 230000011218 segmentation Effects 0.000 claims description 11
- 230000035772 mutation Effects 0.000 claims description 8
- 102100029469 WD repeat and HMG-box DNA-binding protein 1 Human genes 0.000 claims description 3
- 101710097421 WD repeat and HMG-box DNA-binding protein 1 Proteins 0.000 claims description 3
- 238000007689 inspection Methods 0.000 claims 2
- 230000002708 enhancing effect Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- 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/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- 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/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- 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/30—Subject of image; Context of image processing
- G06T2207/30168—Image quality inspection
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Character Input (AREA)
- Character Discrimination (AREA)
Abstract
The invention relates to the technical field of data processing, in particular to a Chinese character printing quality detection method based on machine vision, which comprises the steps of obtaining a binary image of a Chinese character, and dividing to obtain a plurality of single Chinese character areas; based on the set window size, increasing the size of each window to obtain the target size of the window, acquiring a new gray value of each pixel point, and obtaining a first probability that each pixel point belongs to a character skeleton pixel point and a second probability that each pixel point belongs to a matched key pixel point according to the new gray value; calculating a third probability that each pixel point belongs to an abnormal point; and acquiring a new single Chinese character region of each single Chinese character region by utilizing the first probability, the second probability and the third probability, matching the new single Chinese character region with the template Chinese character to complete the defect detection of the Chinese character, and enhancing the detection precision and the anti-interference capability by reassigning the gray value of the character pixel point.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a Chinese character printing quality detection method based on machine vision.
Background
The Chinese character printing medium is one of the main ways for storing, transmitting, exchanging information and transmitting culture in China, and the detection, control and evaluation of the printing quality of characters are important links in the production and management work of publishing and printing enterprises. However, various defects are inevitably generated in the large-scale printing process, and a series of defects such as character missing printing, error printing, dirt, dislocation and the like are frequently generated in the printing process of Chinese characters.
The product containing the Chinese character printing defects is removed, and the method has important significance for improving the comprehensive quality and market competitiveness of the product. Wherein, the manual detection is easy to cause visual fatigue and has low detection efficiency; the defect detection of machine vision can improve the detection precision and the automation degree of the defects of the printed Chinese characters, but the current defect detection precision of the printed Chinese characters is low, and the anti-interference capability is poor, for example, because of the particularity and the complexity of the Chinese characters, the defects of the printed Chinese characters are easily influenced by noise points and error matching points.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a Chinese character printing quality detection method based on machine vision, and the adopted technical scheme is as follows:
acquiring a character image of a Chinese character, converting the character image into a gray image, performing threshold segmentation on the gray image to obtain a binary image, and performing Chinese character segmentation on the binary image to obtain a plurality of single Chinese character areas;
respectively taking each pixel point in the current single Chinese character region as a central pixel point of a window, correspondingly obtaining the target size when the window contains non-character pixel points by increasing the size of each window to form a target size set, and taking the number of the character pixel points in the window as a new gray value of the central pixel point; counting the number of pixels of which the gray value of each pixel in the current single Chinese character region is less than or equal to the gray value in eight neighborhoods of the current single Chinese character region to form a pixel number set, calculating the sum of the number of pixels in the pixel number set, and obtaining a first probability that the corresponding pixel belongs to a character skeleton pixel according to a first ratio of the number of pixels of each pixel in the current single Chinese character region to the sum of the number of pixels; counting a new gray value set in the current single Chinese character region, calculating the sum of new gray values of the new gray value set, and taking a second ratio of the new gray value of each pixel point in the current single Chinese character region to the sum of the new gray values as a second probability that the corresponding pixel point belongs to the matched key pixel point;
calculating the gray value variance of the character pixel points in each window corresponding to each target size based on the target size set to form a gray value variance set corresponding to the target size, calculating the gray value variance sum of the gray value variance set, acquiring a third ratio of the gray value variance and the gray value variance sum of each window, and taking the third ratio as a third probability that the central pixel point of the corresponding window belongs to an abnormal point, wherein the abnormal point refers to a cross point or a mutation point; reassigning the gray values of the pixel points according to the first probability, the second probability and the third probability of each pixel point in the current single Chinese character area to obtain a new single Chinese character area;
and acquiring the new single Chinese character area of each single Chinese character area, and matching the new single Chinese character area with the template Chinese character to finish the detection of the Chinese character defects.
Further, the method for obtaining a new single chinese character region by reassigning the gray values of the pixel points according to the first probability, the second probability and the third probability of each pixel point in the current single chinese character region includes:
respectively normalizing the first probability of each pixel point in the current single Chinese character region to obtain a normalized first probability; respectively normalizing the second probability of each pixel point in the current single Chinese character region to obtain a normalized second probability; respectively normalizing the third probability of each pixel point in the current single Chinese character region to obtain a normalized third probability;
and replacing the new gray value of the corresponding pixel point by the sum of the normalized first probability, the normalized second probability and the normalized third probability of each pixel point, and further obtaining a new single Chinese character region corresponding to the current single Chinese character region.
Further, the method for matching the new single chinese character region with the template chinese character to complete the detection of chinese character defects includes:
subtracting the new single Chinese character region and the template Chinese character, and determining that the single Chinese character has no defects when the numerical values in the subtraction result are all 0;
when the numerical value in the subtraction operation result has 1 and-1, adding the gray values of the pixel points which have the numerical value of 1 and correspond to the new single Chinese character region to obtain a first addition result, adding the gray values of the pixel points which have the numerical value of-1 and correspond to the new single Chinese character region to obtain a second addition result, and taking the sum of the first addition result and the second addition result as the defect degree of the corresponding single Chinese character;
and when the defect degree is larger than the defect degree threshold value, confirming that the single Chinese character has defects.
The embodiment of the invention at least has the following beneficial effects: the gray values of the pixel points in the characters are re-assigned through the characteristics of Chinese character writing, the larger the influence of the gray values on character shape recognition is, the larger the new value given by the pixel points is, the influence of noise points and error matching points can be effectively removed, and the new value is calculated through a plurality of Chinese character characteristics, so that the assignment accuracy of complex and special Chinese characters is improved, and the detection precision and the anti-interference capability are enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart illustrating steps of a method for detecting chinese character printing quality based on machine vision according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to the specific implementation, structure, features and effects of the method for detecting Chinese character printing quality based on machine vision according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The present invention is directed to the following scenarios:
due to the particularity and complexity of the Chinese characters, the detection process is easily influenced by noise points and error matching points, so that the detection precision of the defects of the printed Chinese characters is low, and the anti-jamming capability is poor. The invention processes the Chinese character image acquired by optical scanning, and reassigns the gray value of each pixel point in the Chinese character according to the writing characteristic of the Chinese character, and the template matching detects the printing quality of the Chinese character, thereby improving the precision and the anti-interference capability of the defect detection of the printed Chinese character.
The specific scheme of the Chinese character printing quality detection method based on machine vision provided by the invention is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating steps of a method for detecting Chinese character printing quality based on machine vision according to an embodiment of the present invention is shown, where the method includes the following steps:
and S001, acquiring a character image of the Chinese character, converting the character image into a gray level image, performing threshold segmentation on the gray level image to obtain a binary image, and performing Chinese character segmentation on the binary image to obtain a plurality of single Chinese character areas.
Specifically, firstly, the Chinese characters of the printed product are converted into image information through an optical scanning technology, and character images of the Chinese characters are obtained. Since the images generate noise in the process of acquisition and transmission, and the presence of the noise will influence the subsequent processing and analysis of the images to some extent, the noise in the character images is processed by using the adaptive median filtering of the 3 x 3 template.
And then, carrying out graying processing on the character image to obtain a corresponding grayscale image, and carrying out threshold segmentation on the grayscale image by using an Otsu algorithm, namely, using the obtained segmentation threshold to enable the pixel point of the Chinese character region to be 1 and the pixel point of the background region to be 0 so as to obtain a binary image of the character image. And then, carrying out vertical projection and horizontal projection on the binary image, carrying out preliminary segmentation on each Chinese character according to the distance between the row and the column of the printed Chinese character, and further obtaining the minimum circumscribed rectangle of a single Chinese character, namely a single Chinese character area according to the starting and ending positions of the row and the column of the connected domain in each preliminary segmentation block, thereby completing the segmentation of the Chinese character.
And finally, carrying out normalization processing on each single Chinese character area by using a bilinear interpolation algorithm to enable the size of each single Chinese character area to be consistent with that of the character block of the template Chinese character.
Step S002, respectively taking each pixel point in the current single Chinese character area as a central pixel point of a window, correspondingly obtaining the target size when the window contains non-character pixel points by increasing the size of each window to form a target size set, and taking the number of the character pixel points in the window as a new gray value of the central pixel point; counting the number of pixel points of which the gray value of each pixel point in the current single Chinese character region is less than or equal to the gray value in the eight neighborhoods of the current single Chinese character region so as to calculate the first probability that the corresponding pixel points belong to the character skeleton pixel points; and counting a new gray value set in the current single Chinese character region to calculate a second probability that the corresponding pixel point belongs to the matched key pixel point.
Specifically, the Chinese character font framework represents the Chinese character font which expresses strokes in a line form and omits handwriting modification, so that each Chinese character is an independent individual different from other Chinese characters, and the Chinese character font framework is a key for Chinese character identification.
Taking a single Chinese character region as an example, firstly, pixel points in the single Chinese character region are traversed one by one, each pixel point is taken as a central pixel point of a window, and a size is designedThe starting size n of the window is 1; then gradually adding 1 to the value of n to increase the size of the window, stopping increasing the size of the window when the window contains non-character pixel points, taking the corresponding value of n when the increase is stopped as the target size of the corresponding pixel points, recording the number A of the character pixel points in the window at the moment, and giving the value A to the middle of the windowAnd the heart pixel points are used as new gray values, so that the replacement of the gray values in the single Chinese character area is completed. Meanwhile, the target size of each pixel point in the single Chinese character region forms a target size set.
The force from starting to receiving in the Chinese character stroke writing can be divided into three types, namely from heavy to light, from light to heavy or even, so that the thickness of the strokes is changed from wide to narrow, from narrow to wide or even. Therefore, each stroke should be equally divided along the skeleton line, and when a certain pixel point in the stroke of the Chinese character is a skeleton pixel point, the pixel value of a non-skeleton pixel point in the eight neighborhoods of the pixel point should be smaller than the pixel point. The pixel values of the skeleton pixel point and the pixel point are the same; or the pixel value of one framework pixel point is larger than the pixel point, and the pixel value of the other framework pixel point is smaller than the pixel point, so that the gray value of the pixel point in the eight neighborhoods of one pixel point in the Chinese character is less than the number of the pixel points of the pixel point, and the probability that the pixel point is the framework pixel point is higher.
Counting the number B of pixels, in which the gray value in the eight neighborhood of each pixel in the single Chinese character region is greater than that of the pixel, and when the number B of the pixels is 0, making the number B of the pixels to be 1, further obtaining the number B of the pixels in each pixel in the single Chinese character region, and forming a pixel number set by the number B of the pixelsAnd b represents the total number of pixel points in the single Chinese character region. Therefore, according to the stroke analysis of the Chinese character, the probability that each pixel point in the Chinese character is the skeleton pixel point can be obtained, one pixel point in a single Chinese character area is taken as an example, and the number of the pixel points of which the gray value of the pixel points in eight neighborhoods is greater than that of the pixel points is taken asTherefore, the pixel is the first probability of the character skeleton pixelComprises the following steps:
whereinExpressing the j pixel point number in the pixel point number set;the smaller the value of (A), the first probability that the pixel is the character skeleton pixelThe larger.
And similarly, obtaining the first probability of each pixel point in the single Chinese character region by using a calculation formula of the first probability.
Because the sizes of Chinese characters are consistent, the inflection point of the stroke of a Chinese character in Chinese character matching and the starting point or the receiving point with heavy stroke strength are often key pixel points in matching, and the positions of the key points are areas with wider strokes, so that the new gray value A of the key pixel points in a single Chinese character area is larger, and statistics on a new gray value set in the single Chinese character area is carried outWhere a is the number of categories of new gray scale values. According to the stroke analysis of Chinese characters, the probability that each pixel point in the single Chinese character region is the matched key pixel point can be obtained, one pixel point in the single Chinese character region is taken as an example, and the new gray value isSo that the pixel point is the second probability of the matched key pixel pointComprises the following steps:
wherein,representing the xth new gray value in the new set of gray values, the new gray valueThe larger the probability is, the second probability that the pixel point is the key pixel point matched with the Chinese characterThe larger.
And similarly, obtaining the second probability of each pixel point in the single Chinese character region by using a calculation formula of the second probability.
Step S003, based on the target size set, calculating the gray value variance of the character pixel points in each window under each target size to form a gray value variance set corresponding to the target size, calculating the gray value variance sum of the gray value variance set, acquiring a third ratio of the gray value variance and the gray value variance sum of each window, and taking the third ratio as a third probability that the central pixel point of the corresponding window belongs to an abnormal point, wherein the abnormal point refers to a cross point or a mutation point; and re-assigning the gray values of the pixel points according to the first probability, the second probability and the third probability of each pixel point in the current single Chinese character area to obtain a new single Chinese character area.
Specifically, the Chinese character is composed of various strokes, the intersection point between the strokes is also a key point for character recognition, and because the width of the intersection point of some strokes is smaller or the number of the pixel points of which the gray value of the pixel point in the eight neighborhoods is larger than that of the pixel point is larger, the probability of the pixel point at the intersection point can be small only according to the probability of stroke analysis.
The width change rule of a single stroke is known to be relatively fixed, when the lower stroke strength is uniform, the stroke width is almost unchanged, when the lower stroke strength is from heavy to light or from light to heavy, the stroke width is gradually increased or decreased, but the change is slow, and the width change rule at the intersection of the strokes is complex. Therefore, pixel points are classified according to the window size of each pixel point in the Chinese character, and the more drastic the change of the gray value of the pixel point in the window is under the same window size, the higher the probability that the pixel point is positioned at the stroke intersection point or the stroke strength mutation point of the stroke is. And removing the non-character pixel points in the window without analyzing.
Based on the target size set, taking a target size as an example, counting the number of windows of the target size as c, calculating the gray value variance V of the character pixel points in each window under the target size, and obtaining a gray value variance setThe larger the gray value variance V value is, the larger the probability that the central pixel point of the window is a cross point or a mutation point is. The gray value variance corresponding to a window with the target sizeSo that the third probability that the central pixel point in the window is the cross point or the mutation pointComprises the following steps:
Similarly, by using the calculation formula of the third probability, the third probability that the central pixel point in each window is the intersection or the mutation point in the same target size can be obtained, and the third probability that the central pixel point in each window is the intersection or the mutation point in each target size can also be obtained.
The first probability, the second probability and the third probability of each pixel point in the single Chinese character region can be obtained by utilizing the steps S002 and S003, and then the gray value of the pixel point is re-assigned according to the first probability, the second probability and the third probability of each pixel point in the current single Chinese character region to obtain a new single Chinese character region, which specifically comprises the following steps: respectively normalizing the first probability of each pixel point in the current single Chinese character region to obtain a normalized first probability; respectively normalizing the second probability of each pixel point in the current single Chinese character region to obtain a normalized second probability; respectively normalizing the third probability of each pixel point in the current single Chinese character region to obtain a normalized third probability; and replacing the new gray value of the corresponding pixel point by the sum of the normalized first probability, the normalized second probability and the normalized third probability of each pixel point, and further obtaining a new single Chinese character region corresponding to the current single Chinese character region.
And step S004, acquiring a new single Chinese character area of each single Chinese character area, and matching the new single Chinese character area with the template Chinese characters to finish the detection of the Chinese character defects.
Specifically, a new single kanji character area of each single kanji character area is obtained by the method of step S003.
Taking a single Chinese character area as an example, subtracting a new single Chinese character area corresponding to the single Chinese character area from a binary image of a template Chinese character, wherein the pixel point of the Chinese character area is 1, the pixel point of a background area is 0, and if the values of the pixel points in the subtracted image are all 0, the corresponding single Chinese character area is free of defects; if the pixel points in the subtracted images have 1 and-1, the pixel point with the value of 1 represents the part of the printed Chinese character which is redundant compared with the template Chinese character, the pixel point with the value of-1 represents the part of the printed Chinese character which is lacked compared with the template Chinese character, the gray values of the pixel points with the value of 1 and corresponding to the new single Chinese character region are added to obtain a first addition result, the gray values of the pixel points with the value of-1 and corresponding to the new single Chinese character region are added to obtain a second addition result, and the sum of the first addition result and the second addition result is used as the defect degree of the corresponding single Chinese character.
In the scheme, the defect degree threshold value is 0.01, when the defect degree is greater than the defect degree threshold value, the single Chinese character is determined to have defects, the single Chinese character is marked as a defective printed Chinese character, and the defect detection of all the single Chinese characters is finished in the same way.
In summary, the embodiment of the present invention provides a method for detecting chinese character printing quality based on machine vision, which obtains a character image of a chinese character, obtains a corresponding binary image, and obtains a plurality of single chinese character areas in the binary image; based on the set window size, the size of each window is increased, the target size when the window contains non-character pixel points is correspondingly obtained, the number of the character pixel points in the window is used as a new gray value of a central pixel point, and a first probability that each pixel point belongs to a character skeleton pixel point and a second probability that each pixel point belongs to a matched key pixel point are obtained according to the new gray value; calculating a third probability that each pixel point belongs to an abnormal point corresponding to the gray value variance of the character pixel point in each window under each target size; and acquiring a new single Chinese character region of each single Chinese character region by utilizing the first probability, the second probability and the third probability, and matching the new single Chinese character region with the template Chinese character to finish the detection of the Chinese character defects. According to the scheme, the grey values of the character pixel points are reassigned, so that the assignment accuracy of complex and special Chinese characters is improved, and the detection precision and the anti-interference capability are enhanced.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And that specific embodiments have been described above. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit of the present invention.
Claims (3)
1. The Chinese character printing quality detection method based on machine vision is characterized by comprising the following steps:
acquiring a character image of a Chinese character, converting the character image into a gray image, performing threshold segmentation on the gray image to obtain a binary image, and performing Chinese character segmentation on the binary image to obtain a plurality of single Chinese character areas;
respectively taking each pixel point in the current single Chinese character area as a central pixel point of a window, correspondingly obtaining the target size when the window contains non-character pixel points by increasing the size of each window to form a target size set, and taking the number of the character pixel points in the window as a new gray value of the central pixel point; counting the number of pixels of which the new gray value of each pixel in the current single Chinese character region is less than or equal to the new gray value in the eight neighborhoods of the current single Chinese character region to form a pixel number set, calculating the sum of the number of pixels in the pixel number set, and obtaining a first probability that the corresponding pixel belongs to a character skeleton pixel according to a first ratio of the number of pixels of each pixel in the current single Chinese character region to the sum of the number of pixels; counting a new gray value set in the current single Chinese character region, calculating the sum of new gray values of the new gray value set, and taking a second ratio of the new gray value of each pixel point in the current single Chinese character region to the sum of the new gray values as a second probability that the corresponding pixel point belongs to the matched key pixel point;
calculating the gray value variance of the character pixel points in each window corresponding to each target size based on the target size set to form a gray value variance set corresponding to the target size, calculating the gray value variance sum of the gray value variance set, acquiring a third ratio of the gray value variance and the gray value variance sum of each window, and taking the third ratio as a third probability that the central pixel point of the corresponding window belongs to an abnormal point, wherein the abnormal point refers to a cross point or a mutation point; reassigning the gray value of each pixel point according to the first probability, the second probability and the third probability of each pixel point in the current single Chinese character area to obtain a new single Chinese character area;
and acquiring the new single Chinese character area of each single Chinese character area, and matching the new single Chinese character area with the template Chinese character to finish the detection of the Chinese character defects.
2. The method for detecting printing quality of chinese characters based on machine vision as claimed in claim 1, wherein said method for obtaining new single chinese character region by re-assigning gray values of pixel points according to first, second and third probabilities of each pixel point in current single chinese character region comprises:
respectively normalizing the first probability of each pixel point in the current single Chinese character region to obtain a normalized first probability; respectively normalizing the second probability of each pixel point in the current single Chinese character region to obtain a normalized second probability; respectively normalizing the third probability of each pixel point in the current single Chinese character region to obtain a normalized third probability;
and replacing the new gray value of the corresponding pixel point by the sum of the normalized first probability, the normalized second probability and the normalized third probability of each pixel point, and further obtaining a new single Chinese character region corresponding to the current single Chinese character region.
3. The method for machine vision-based Chinese character printing quality inspection of claim 1, wherein said matching of said new single Chinese character region with template Chinese characters to complete the method for Chinese character defect inspection comprises:
subtracting the new single Chinese character region and the template Chinese character, and confirming that the single Chinese character has no defects when the numerical values in the subtraction result are all 0;
when the numerical value in the subtraction operation result has 1 and-1, adding the gray values of the pixel points with the numerical value of 1 and corresponding to the new single Chinese character region to obtain a first addition result, adding the gray values of the pixel points with the numerical value of-1 and corresponding to the new single Chinese character region to obtain a second addition result, and taking the sum of the first addition result and the second addition result as the defect degree of the corresponding single Chinese character;
and when the defect degree is larger than the defect degree threshold value, confirming that the single Chinese character has defects.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211205049.1A CN115273088B (en) | 2022-09-30 | 2022-09-30 | Chinese character printing quality detection method based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211205049.1A CN115273088B (en) | 2022-09-30 | 2022-09-30 | Chinese character printing quality detection method based on machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115273088A true CN115273088A (en) | 2022-11-01 |
CN115273088B CN115273088B (en) | 2022-12-13 |
Family
ID=83758037
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211205049.1A Active CN115273088B (en) | 2022-09-30 | 2022-09-30 | Chinese character printing quality detection method based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115273088B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115880699A (en) * | 2023-03-03 | 2023-03-31 | 济南市莱芜区综合检验检测中心 | Food packaging bag detection method and system |
CN116363668A (en) * | 2023-05-31 | 2023-06-30 | 山东一品文化传媒有限公司 | Intelligent book checking method and system |
CN116452580A (en) * | 2023-06-13 | 2023-07-18 | 山东古天电子科技有限公司 | Notebook appearance quality detection method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110197180A (en) * | 2019-05-30 | 2019-09-03 | 新华三技术有限公司 | Character defect inspection method, device and equipment |
CN110610484A (en) * | 2019-08-21 | 2019-12-24 | 西安理工大学 | Printing dot quality detection method based on rotary projection transformation |
CN115078365A (en) * | 2021-03-15 | 2022-09-20 | 中国石油大学(华东) | Soft package printing quality defect detection method |
CN115082934A (en) * | 2022-07-04 | 2022-09-20 | 南京晨浩泰电子商务有限公司 | Handwritten Chinese character segmentation and recognition method in financial bill |
-
2022
- 2022-09-30 CN CN202211205049.1A patent/CN115273088B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110197180A (en) * | 2019-05-30 | 2019-09-03 | 新华三技术有限公司 | Character defect inspection method, device and equipment |
CN110610484A (en) * | 2019-08-21 | 2019-12-24 | 西安理工大学 | Printing dot quality detection method based on rotary projection transformation |
CN115078365A (en) * | 2021-03-15 | 2022-09-20 | 中国石油大学(华东) | Soft package printing quality defect detection method |
CN115082934A (en) * | 2022-07-04 | 2022-09-20 | 南京晨浩泰电子商务有限公司 | Handwritten Chinese character segmentation and recognition method in financial bill |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115880699A (en) * | 2023-03-03 | 2023-03-31 | 济南市莱芜区综合检验检测中心 | Food packaging bag detection method and system |
CN116363668A (en) * | 2023-05-31 | 2023-06-30 | 山东一品文化传媒有限公司 | Intelligent book checking method and system |
CN116363668B (en) * | 2023-05-31 | 2023-08-29 | 山东一品文化传媒有限公司 | Intelligent book checking method and system |
CN116452580A (en) * | 2023-06-13 | 2023-07-18 | 山东古天电子科技有限公司 | Notebook appearance quality detection method |
CN116452580B (en) * | 2023-06-13 | 2023-09-01 | 山东古天电子科技有限公司 | Notebook appearance quality detection method |
Also Published As
Publication number | Publication date |
---|---|
CN115273088B (en) | 2022-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115273088B (en) | Chinese character printing quality detection method based on machine vision | |
CN115082683A (en) | Injection molding defect detection method based on image processing | |
CN111833306A (en) | Defect detection method and model training method for defect detection | |
CN112183038A (en) | Form identification and typing method, computer equipment and computer readable storage medium | |
CN111539437B (en) | Detection and identification method of oracle-bone inscription components based on deep learning | |
CN116523923B (en) | Battery case defect identification method | |
CN113888536B (en) | Printed matter double image detection method and system based on computer vision | |
CN117689655B (en) | Metal button surface defect detection method based on computer vision | |
CN111724376B (en) | Paper disease detection method based on texture feature analysis | |
CN115272339A (en) | Metal mold dirt cleaning method | |
CN112991536A (en) | Automatic extraction and vectorization method for geographic surface elements of thematic map | |
CN115880566A (en) | Intelligent marking system based on visual analysis | |
CN115909375A (en) | Report form analysis method based on intelligent recognition | |
CN117351001A (en) | Surface defect identification method for regenerated aluminum alloy template | |
CN116977335A (en) | Intelligent detection method for pitting defects on surface of mechanical part | |
CN109242819B (en) | Surface scratch defect communication algorithm based on image processing | |
CN114511851B (en) | Hairspring algae cell statistical method based on microscope image | |
CN114067122B (en) | Two-stage binarization image processing method | |
CN113160166B (en) | Medical image data mining working method through convolutional neural network model | |
CN114648738A (en) | Image identification system and method based on Internet of things and edge calculation | |
CN115457563A (en) | Zero-missing-detection and low-error-identification ship water gauge reading method | |
CN114266748A (en) | Method and device for judging integrity of surface of process plate in rail transit maintenance field | |
CN114548250A (en) | Mobile phone appearance detection method and device based on data analysis | |
CN112966746A (en) | Stable variable gray template generation method suitable for tire defect detection | |
CN112016564A (en) | Method for calculating optimal binarization threshold value at lower case amount of financial bill |
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 |