WO2021135605A1 - 一种字符缺陷检测方法及装置 - Google Patents

一种字符缺陷检测方法及装置 Download PDF

Info

Publication number
WO2021135605A1
WO2021135605A1 PCT/CN2020/125318 CN2020125318W WO2021135605A1 WO 2021135605 A1 WO2021135605 A1 WO 2021135605A1 CN 2020125318 W CN2020125318 W CN 2020125318W WO 2021135605 A1 WO2021135605 A1 WO 2021135605A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
character
area
inspected
transformed
Prior art date
Application number
PCT/CN2020/125318
Other languages
English (en)
French (fr)
Inventor
李士钰
张一凡
田继锋
Original Assignee
歌尔股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 歌尔股份有限公司 filed Critical 歌尔股份有限公司
Priority to US17/594,142 priority Critical patent/US12002198B2/en
Publication of WO2021135605A1 publication Critical patent/WO2021135605A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/12Detection or correction of errors, e.g. by rescanning the pattern
    • G06V30/133Evaluation of quality of the acquired characters
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/02Affine transformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/1444Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/01Arrangements or apparatus for facilitating the optical investigation
    • G01N2021/0106General arrangement of respective parts
    • G01N2021/0112Apparatus in one mechanical, optical or electronic block
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete and fast Fourier transform, [DFT, FFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30144Printing quality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30176Document

Definitions

  • this application is proposed to provide a character defect detection method and device that overcomes the above-mentioned problems or at least partially solves the above-mentioned problems.
  • a character defect detection method includes:
  • the character defect detection result of the image to be inspected is obtained.
  • the acquiring module is used to acquire the to-be-checked image containing the character and the template character image corresponding to the character, and to convert the to-be-checked image into an image in the same format as the template character image;
  • a determining module configured to obtain a first image based on the first effective area, and obtain a second image based on the second effective area;
  • Fig. 2 shows a schematic diagram of a template character image according to an embodiment of the present application
  • Fig. 4 shows a schematic diagram of a second effective area of a template character image according to an embodiment of the present application
  • Fig. 6 shows a schematic diagram of a first image according to an embodiment of the present application
  • FIG. 8 shows a schematic diagram of the first image after color inversion according to an embodiment of the present application.
  • Fig. 9 shows a schematic diagram of transforming an image according to an embodiment of the present application.
  • Fig. 10 shows a partial enlarged view of a transformed image according to an embodiment of the present application
  • FIG. 11 shows a block diagram of a character defect detection device according to an embodiment of the present application.
  • Fig. 12 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present application.
  • Fig. 1 shows a schematic flowchart of a character defect detection method according to an embodiment of the present application.
  • the character defect detection method of this embodiment includes the following steps:
  • Step S104 based on the first image and the second image, calculate a transformed image indicating the information difference between the first image and the second image;
  • Step S105 Obtain the character defect detection result of the image to be inspected according to the information of the transformed image.
  • this embodiment accurately obtains the difference between the two images according to the transformed image, and then completes the character defect detection of the image to be inspected, ensuring the detection accuracy. Moreover, after the method of the embodiment of the present application is run, the character defect detection of the image to be inspected is automatically realized, and the effect of automation is achieved, and the labor cost is saved.
  • the image to be inspected is a non-grayscale image
  • the image to be inspected can be processed first, only the grayscale information is retained, and the grayscale image is used for detection, which will not affect the detection effect but also save the detection time.
  • the grayscale image is further simplified, and a binary image is used. If the template character image is not a black and white image, the binarization process should be performed first to set the gray value of the pixel on the template character image to 0 or 255. Converted to a black and white image, it should be noted that in the process of binarization, the gray value of the pixel corresponding to the character in the template character image is set to the sum of 0 and the preset gray value.
  • the preset gray value can be According to the average normal gray value of the good product, the reason why the pixel point of the character is not directly set to 0 but the sum of 0 and the preset gray value is to make the gray value of the template character image and the image to be inspected Try to be as close as possible to ensure the effect of subsequent image registration and character defect detection.
  • the smallest circumscribed rectangular area of the template character in the template character image is extracted to obtain the second effective area.
  • the second effective area obtained after extraction is shown in Figure 4, and the rectangular frame (second The effective area) is the smallest bounding rectangle that contains the character "PC”.
  • the smallest circumscribed rectangular area of the image character to be inspected is extracted to obtain the first effective area, and the first effective area obtained after the extraction is shown in FIG. 5.
  • this embodiment executes the steps of generating the first image and the second image. That is to say, obtaining the first image based on the first effective area and obtaining the second image based on the second effective area includes: selecting the background color picture according to the size determined by the second effective area and the Fourier transform result of the template character image; The first effective area is superimposed on the bottom-color picture to obtain a first image; the second effective area is superimposed on the bottom-color picture to obtain a second image.
  • the first image obtained here is shown in Figure 6, and the second image obtained is shown in Figure 7.
  • the horizontal direction, the template characters or the characters of the image to be inspected should be in the center position of the corresponding white background picture, and the vertical direction, the template characters or the characters of the image to be inspected
  • the positions of the respective white background pictures are approximately similar, that is, the template characters and the characters of the image to be inspected in the vertical direction are located within the same position range in the background color picture. Because the character size of the template character image and the character size of the image to be inspected are originally different, there is no guarantee that the positions of the two are exactly the same when superimposed on a white background image of the same size.
  • the white image is selected as the background color image in this embodiment, but it should be noted that this embodiment is not limited to this.
  • the background color image may also be a black image. Accordingly, the black image is selected as For the background color picture, the area where the characters are located can be processed as white first.
  • the circumscribed rectangle of the template character in the template character image can be calculated to obtain the width and height of the second effective area, and the template character image can be Fouriered according to the width and height of the second effective area.
  • the result of the leaf transform jointly determines the width and height of the white background image, thereby speeding up the Fourier transform process of the subsequent template character image and saving detection time.
  • FIG. 6 shows a schematic diagram of a first image according to an embodiment of the present application
  • FIG. 7 shows a schematic diagram of a second image according to an embodiment of the present application
  • the first image shown in FIG. 6 is inverted
  • the first image after inverted color is obtained, as shown in Figure 8.
  • the coordinates of the peak are the image and inverted color shown in Figure 8
  • the displacement offset between the second images afterwards.
  • the inverted second image is reversely moved to obtain the Fourier transform result image.
  • the polar coordinate system is constructed with the center point of the image shown in FIG. 8 as the center and the polar coordinate system is constructed with the center point of the Fourier transform result image as the center, respectively, to obtain the polar coordinates of each pixel in the image shown in FIG. 8, and The polar coordinates of each pixel of the image as a result of Fourier transform.
  • detecting the character color depth defect in the character in the image to be inspected includes: setting a normal gray value interval, and selecting the gray value in the transformed image to belong to the gray value
  • the pixel points in the interval constitute the target pixel area; the area of the target pixel area is calculated, and when the area of the target pixel area is inconsistent with the preset area threshold, it is determined that the characters in the image to be inspected have character color defects.
  • the mask of the character part in the transformed image shown in Fig. 9 calculates the mask of the character part in the transformed image shown in Fig. 9, and use the mask to set the character area of the first image (the image shown in Fig. 6) to the color indicated by the background color (such as white), that is, The character area is set to white, and then the size of the dirty area (ie, the non-white area) is calculated. When the size of the dirty area is greater than the set threshold, it is determined as dirty.
  • the character defect detection of this embodiment automatically detects the character defects of the image to be inspected, such as dark, light, dirty, content errors and other defects, which ensures the detection accuracy. It can be replicated on a large scale, saving labor costs.
  • Fig. 11 shows a block diagram of a character defect detection device according to an embodiment of the present application.
  • the character defect detection device of this embodiment includes:
  • the determining module 1103 is configured to obtain a first image based on the first effective area, and obtain a second image based on the second effective area;
  • the transformation module 1104 is configured to calculate a transformed image indicating the information difference between the first image and the second image according to the first image and the second image;
  • the detection module 1105 is used to obtain the character defect detection result of the image to be inspected according to the information of the transformed image.
  • the detection module 1105 is specifically configured to detect whether the characters in the image to be inspected are dirty or have character content errors according to the mask information of the character area in the transformed image; and/or, according to the transformed image
  • the gray value information of the character area in the middle is used to detect the characters in the image to be inspected for the defect of character color depth.
  • the determining module 1103 is specifically configured to select the base color picture according to the size determined by the second effective area and the Fourier transform result of the template character image; superimpose the first effective area on the base color picture , Get the first image; superimpose the second effective area on the bottom color picture to get the second image.
  • the template character image is a binarized image
  • the image to be inspected is converted into a binarized image
  • a white image is selected as the background color image
  • the transform module 1104 is specifically used to calculate the displacement offset between the first image and the second image; according to the first image or the second image, combined with the displacement offset, the Fourier The leaf transform calculates the Fourier transform result image; performs spatial transformation according to the Fourier transform result image, the first image, and the second image to obtain the transformed image.
  • the transform module 1104 specifically performs inverse color processing on the first image and the second image; performs Fourier transform on the inverted second image to obtain the inverted first image and the inverted color.
  • the inverted second image is reversely moved according to the displacement offset to obtain the Fourier transform result image;
  • the polar coordinate system of the inverted first image is constructed separately,
  • the polar coordinate system of the Fourier transform result image according to the polar coordinates of the pixels of the inverted first image and the polar coordinates of the pixels of the Fourier transform result image, determine the inverted first image and the Fourier
  • the displacement between the transformed result images; the affine transformation parameter is determined according to the displacement, and the second image is affine transformed based on the affine transformation parameter to obtain the transformed image.
  • the detection module 1105 is specifically configured to set a normal gray value interval, and select pixels whose gray values fall within the gray value interval range from the transformed image to form the target pixel area; calculate the target The area of the pixel area.
  • the area of the target pixel area is inconsistent with the preset area threshold, it is determined that the characters in the image to be inspected have character color depth defects.
  • the detection module 1105 is specifically used to calculate the mask of the character area of the transformed image; according to the mask, the character area of the first image is set to the color indicated by the background color, and the image of the first image is obtained. The size of the area outside the background color area. When the size of the area outside the background color area of the first image is greater than the preset threshold, it is determined that the characters in the image to be inspected are dirty or have character content errors.
  • another embodiment of the present invention provides a computer-readable storage medium 1200, the computer-readable storage medium 1200 stores a computer program, and the computer program causes a computer to execute the aforementioned gesture interaction method.
  • the image to be inspected containing the character and the template character image corresponding to the character convert the image to be inspected into an image in the same format as the template character image; extract the first valid area containing the character in the image to be inspected, and extract the template character
  • the image includes the second effective area of the template characters; the first image is obtained based on the first effective area, and the second image is obtained based on the second effective area; according to the first image and the second image, calculate the indication
  • the transformed image with poor information according to the information of the transformed image, the character defect detection result of the image to be inspected is obtained.
  • the computer program further causes the computer to execute the following gesture interaction method:
  • the computer program further causes the computer to execute the following gesture interaction method:
  • the computer program further causes the computer to execute the following gesture interaction method:
  • the offset reversely moves the second image after the inverted color to obtain the Fourier transform result image; respectively construct the polar coordinate system of the inverted first image and the polar coordinate system of the Fourier transform result image, according to the inverse
  • the polar coordinates of the pixels of the colored first image and the polar coordinates of the pixels of the Fourier transform result image are used to determine the displacement between the inverted first image and the Fourier transform result image; determine the affine transformation according to the displacement Parameter, performing affine transformation on the second image based on the affine transformation parameter to obtain a transformed image.
  • Calculate the mask of the character area of the transformed image set the character area of the first image to the color indicated by the background color according to the mask, and obtain the size of the area outside the background color area of the first image.
  • the size of the area outside the color area is greater than the preset threshold, it is determined that the characters in the image to be inspected are dirty or have character content errors.
  • the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

一种字符缺陷检测方法及装置,该字符缺陷检测方法包括:获取包含字符的待检图像以及与该字符对应的模板字符图像,将待检图像转换为与模板字符图像的格式一致的图像;提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;基于第一有效区域得到第一图像,基于第二有效区域得到第二图像;根据第一图像与第二图像计算指示第一图像与第二图像的信息差的变换图像;根据变换图像的信息获得待检图像的字符缺陷检测结果。该方法的检测精度能够达到人工检测的精度,而且取得了自动化的效果,节省了人力成本。

Description

一种字符缺陷检测方法及装置 技术领域
本申请涉及图像技术领域,具体涉及一种字符缺陷检测方法及装置。
发明背景
在商品上印刷或镭雕字符比如一些产品信息(产地、产品名称、企业商标等)是一种定制化产品外观的体现。由于当前印刷设备或镭雕设备的打印头在进行字符打印时普遍存在一定的误差,比如字符笔画粗细不完全一致,对这些字符的检测就成为了产品生产过程中的重要环节。当前大部分字符缺陷检测仍然依靠人工完成,效率低且检测人力成本较高。
发明内容
鉴于上述问题,提出了本申请以便提供一种克服上述问题或者至少部分地解决上述问题的一种字符缺陷检测方法及装置。
根据本申请的一个方面,提供了一种字符缺陷检测方法,该字符缺陷检测方法包括:
获取包含字符的待检图像以及与该字符对应的模板字符图像,将待检图像转换为与模板字符图像的格式一致的图像;
提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;
基于第一有效区域得到第一图像,基于第二有效区域得到第二图像;
根据第一图像与第二图像,计算指示第一图像与第二图像的信息差的变换图像;
根据变换图像的信息,获得待检图像的字符缺陷检测结果。
根据本申请的另一个方面,提供了一种字符缺陷检测装置,该字符缺陷检测装置包括:
获取模块,用于获取包含字符的待检图像以及与该字符对应的模板字符图像,将待检图像转换为与模板字符图像的格式一致的图像;
提取模块,用于提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;
确定模块,用于基于第一有效区域得到第一图像,基于第二有效区域得到 第二图像;
变换模块,用于根据第一图像与第二图像,计算指示第一图像与第二图像的信息差的变换图像;
检测模块,用于根据变换图像的信息,获得待检图像的字符缺陷检测结果。
根据本申请的又一个方面,提供了一种计算机可读存储介质。该计算机可读存储介质存储计算机程序,计算机程序使计算机执行上述的手势交互方法。
本申请实施例的字符缺陷检测的技术方案,利用包含第一图像与第二图像的信息差的变换图像,可以根据变换图像准确获得两图像的差异,确定出异常点进而实现字符缺陷检测,保证了本申请实施例检测精度能够达到人工检测的精度。而且,本申请实施例的字符缺陷检测方法或装置运行后自动实现对待检图像的字符缺陷检测,取得了自动化的效果,节省人力成本,适合大规模推广。
附图简要说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本申请一个实施例字符缺陷检测方法的流程示意图;
图2示出了根据本申请一个实施例模板字符图像的示意图;
图3示出了根据本申请一个实施例待检图像的示意图;
图4示出了根据本申请一个实施例模板字符图像的第二有效区域的示意图;
图5示出了根据本申请一个实施例待检图像的第一有效区域的示意图;
图6示出了根据本申请一个实施例第一图像的示意图;
图7示出了根据本申请一个实施例第二图像的示意图;
图8示出了根据本申请一个实施例反色后第一图像的示意图;
图9示出了根据本申请一个实施例变换图像的示意图;
图10示出了根据本申请一个实施例变换图像的局部放大图;
图11示出了根据本申请一个实施例字符缺陷检测装置的框图;
图12示出了根据本申请一个实施例的计算机可读存储介质结构示意图。
具体实施方式
下面将参照附图更详细地描述本申请的示例性实施例。虽然附图中显示了 本申请的示例性实施例,然而应当理解,可以以各种形式实现本申请而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本申请,并且能够将本申请的范围完整的传达给本领域的技术人员。
图1示出了根据本申请一个实施例字符缺陷检测方法的流程示意图,参见图1,本实施例的字符缺陷检测方法包括下列步骤:
步骤S101,获取包含字符的待检图像以及与该字符对应的模板字符图像,将待检图像转换为与模板字符图像的格式一致的图像;这里的字符包括字母、数字、汉字或条形码等符号信息。
步骤S102,提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;
步骤S103,基于第一有效区域得到第一图像,基于第二有效区域得到第二图像;
步骤S104,根据第一图像与第二图像,计算指示第一图像与第二图像的信息差的变换图像;
步骤S105,根据变换图像的信息,获得待检图像的字符缺陷检测结果。
由图1所示可知,本实施例根据变换图像准确获得两图像的差异,进而完成待检图像字符缺陷检测,保证了检测精度。而且,本申请实施例的方法运行后自动实现对待检图像的字符缺陷检测,取得了自动化的效果,节省了人力成本。
本申请实施例的字符缺陷检测适用于镭雕、打印、印刷等多种应用场景,实现过程基本相同,因此,下面以镭雕字符为例对前述字符缺陷检测方法进行说明。
镭雕是利用镭射光束在物质表面或是透明物质内部雕刻出字符的加工方式,字符可根据需求任意定制。图2至图10示意了一次字符缺陷检测过程中的各相关图像,下面结合图2至图10对本实施例的字符缺陷检测的实现步骤进行重点描述。
首先,获取图像并二值化。
本实施例获取包含字符的待检图像以及与该字符对应的模板字符图像,将待检图像转换为与模板字符图像的格式一致的图像。图2示出了根据本申请一个实施例模板字符图像的示意图,图3示出了根据本申请一个实施例待检图像的示意图,参见图2,模板字符图像为二值化图像,因此,本实施例将待检图像 转换为二值化图像,保证两图像格式一致。
实际应用中,如果待检图像为非灰度图像,可以先对待检图像进行处理,只保留灰度信息,利用灰度图像进行检测,这样既不影响检测效果还可以节省检测耗时。本实施例中对灰度图像进一步简化,采用了二值化图像,如果模板字符图像不是黑白图像,应先进行二值化处理将模板字符图像上像素点的灰度值设置为0或255,转换为黑白图像,需要说明的是,在二值化过程中,将模板字符图像中字符对应的像素点的灰度值设置为0与预设灰度值的和,该预设灰度值可以根据良品的平均正常灰度值确定,这里之所以不直接将字符的像素点设置为0而是设置为0与预设灰度值的和是为了让模板字符图像和待检图像的灰度值尽量接近,确保后续图像配准以及字符缺陷检测的效果。
其次,提取有效区域。
提取待检图像中包含字符的第一有效区域,比如提取待检图像中包含字符的圆形区域或多边形区域,作为第一有效区域;提取模板字符图像中包括模板字符的第二有效区域,比如提取模板字符图像中包括模板字符的圆形区域或多边形区域,作为第二有效区域。
为处理方便,本实施例中提取模板字符图像中模板字符的最小外接矩形区域,得到第二有效区域,提取后得到的第二有效区域如图4所示,图4中的矩形框(第二有效区域)为包含了字符“PC”的最小外接矩形。提取待检图像字符的最小外接矩形区域,得到第一有效区域,提取后得到的第一有效区域如图5所示。
注:以上对图像进行二值化和提取有效区域的步骤顺序不限,可以先提取有效区域而后再对有效区域二值化,也可以先对图像进行二值化而后提取有效区域,效果是相同的。
接着,叠加生成图像。
在提取得到第一有效区域以及第二有效区域之后,本实施例执行生成第一图像和第二图像的步骤。也就是说,基于第一有效区域得到第一图像,基于第二有效区域得到第二图像包括:根据第二有效区域以及模板字符图像的傅里叶变换结果确定的尺寸,选取底色图片;将第一有效区域叠加到底色图片上,得到第一图像;将第二有效区域叠加到底色图片上,得到第二图像。这里得到的第一图像如图6所示,得到的第二图像如图7所示。需要说明的是,本实施例,在进行图像叠加时,水平方向,模板字符或待检图像的字符应在各自对应的白 底图片的居中位置,垂直方向,模板字符或待检图像的字符在各自对应的白底图片的位置大致相近即可,即垂直方向上模板字符和待检图像的字符分别位于底色图片中的同一个位置范围内即可。因为模板字符图像的字符大小和待检图像的字符大小本就不同,所以,在叠加到相同尺寸的白底图片时不能保证两者位置完全相同。
另外,可以看出,本实施例中选取白色图作为底色图片,但需要说明的是,本实施例不以此为限,底色图片也可以是黑色图片,相应的,在选用黑色图像为底色图片时,可以先将字符所在区域处理成白色。
由于外壳边缘部分不镭雕字符,因此,可计算模板字符图像中模板字符的外接矩形得到第二有效区域的宽度和高度,并根据第二有效区域的宽度和高度以及对模板字符图像进行傅里叶变换的结果共同确定白底图片的宽度和高度,从而加速后续模板字符图像的傅里叶变换过程进而节省检测时间。
举例来说,第二有效区域的宽度和高度分别是(50,50),而傅里叶变换实现基于一个折半的递归,需要像素点的个数为2的幂,这里可以增加一些点(一般是值为0的)凑出一个2的幂,比如根据所需要达到的宽度和高度均增加14个点,即可凑出2的6次幂(64),从而方便后续对模板字符图像进行傅里叶变换。基于此,本实施例的白底图片的宽度和高度一种选取方式是宽度和高度为(64,64)。
再次,图像变换得到变换图像。
在获取第一图像与第二图像之后,进行图像配准。本实施例根据第一图像与第二图像,计算指示第一图像与第二图像的信息差的变换图像包括:计算第一图像与第二图像之间的位移偏移量;根据第一图像或者第二图像,结合位移偏移量,利用傅里叶变换计算傅里叶变换结果图像;根据傅里叶变换结果图像、第一图像和第二图像进行空间变换,得到变换图像。
进一步地,本实施例包括:对第一图像和第二图像进行反色处理;对反色后第二图像进行傅里叶变换,得到反色后第一图像与反色后第二图像之间的位移偏移量,根据位移偏移量对反色后第二图像进行反向移动,得到傅里叶变换结果图像;分别构建反色后第一图像的极坐标系,以及傅里叶变换结果图像的极坐标系,根据反色后第一图像的像素点的极坐标以及傅里叶变换结果图像的像素点的极坐标,确定反色后第一图像与傅里叶变换结果图像之间的位移;根据位移确定仿射变换参数,基于仿射变换参数对第二图像进行仿射变换,得到 变换图像。
接上例,图6示出了根据本申请一个实施例第一图像的示意图,图7示出了根据本申请一个实施例第二图像的示意图;对图6所示的第一图像进行反色处理,得到反色后第一图像,如图8所示。对图7所示的第二图像进行反色处理,得到反色后第二图像。然后,利用相位相关法对图8所示图像以及反色后第二图像进行傅里叶反变换,得到脉冲函数,计算脉冲函数的峰值,峰值处的坐标即为图8所示图像以及反色后第二图像之间的位移偏移量。根据位移偏移量对反色后第二图像进行反向移动,得到傅里叶变换结果图像。接着,分别以图8所示图像的中心点为中心构建极坐标系以及以傅里叶变换结果图像的中心点为中心构建极坐标系,得到图8所示图像各像素点的极坐标,以及以傅里叶变换结果图像的各像素点的极坐标。
得到极坐标之后,图8所示图像与傅里叶变换结果图像之间的偏移即为旋转和缩放。再使用相位相关法检测图8所示图像与傅里叶变换结果图像的旋转角度和缩放因子。根据旋转角度和缩放因子求出仿射变换值,对傅里叶变换结果图像进行仿射变换,傅里叶变换结果图像变换后如图9所示,局部放大细节如图10所示。至此,本实施例基于模板字符图像、第一图像进行空间变换,得到了变换图像。
这里的变换图像可以理解是将模板字符图像根据模板字符图像与待检图像的对应关系转换到待检图像的标准下的图像。同理,本申请的其他实施例中,也可以根据模板字符图像与待检图像的对应关系将待检图像转换到模板字符图像的标准下得到变换图像,而后依据变换图像的信息完成待检图像字符缺陷检测。由于模板字符图像一般是规则的、清晰的,噪声较少的图像,所以优选地,将模板字符图像根据模板字符图像与待检图像的对应关系转换到待检图像的标准下,得到变换图像。
最后,检测字符缺陷。
获得变换图像之后,本实施例根据变换图像的信息,获得待检图像的字符缺陷检测结果,比如包括:根据变换图像中字符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误;和/或,根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷。也就是说,在一个实施例中,可以根据变换图像中字符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误。在另一个实施例中,可以根据变换图像中字 符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误以及根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷。在另一个实施例中,可以根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷。
具体的,根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷包括:设置正常灰度值区间,并在变换图像中选取灰度值属于该灰度值区间范围的像素点,构成目标像素区域;计算目标像素区域的面积,当目标像素区域的面积与预设面积阈值不一致时,确定待检图像中的字符存在字符颜色深浅缺陷。
比如设置正常灰度值区间M,在图9所示变换图像中选取灰度值属于该灰度值区间M的像素点,由这些像素点构成目标像素区域,计算目标像素区域的面积,当目标像素区域的面积与预设面积阈值不一致时,比如,大于预设面积阈值(面积阈值可以为:需检测的最小面积)即判定为字符颜色深浅缺陷。
前述根据变换图像中字符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误包括:计算变换图像的字符区域的掩模;根据掩模将第一图像的字符区域设置为底色指示的颜色,并获得第一图像的底色区域之外的区域的大小,当第一图像的底色区域之外的区域的大小大于预设阈值时,确定待检图像中的字符存在脏污或存在字符内容错误。
比如,计算出图9所示变换图像中字符部分的掩模,利用掩模将第一图像(图6所示图像)的字符区域设置为底色指示的颜色(如白色),也就是说,将字符区域设置为白色,再计算脏污区域(即,非白色区域)的大小,在脏污区域大小大于设定阈值时,判定为脏污。
需要说明的是,根据这种判定字符区域脏污的方式同样可以确定存在字符内容错误,比如模板字符是“PC”,产品上镭射的字符是“PD”,由于字母C和字母D不同,字母D比字母C多出的部分即为脏污,这样就检测出了产品上镭射的字符内容错误。另外,本实施例还可以根据前述得到变换图像过程中计算出的脉冲函数的峰值,将峰值与预设峰值阈值进行比较,当峰值小于预设峰值阈值时,表明字符内容的匹配度低,即,镭雕字符内容错误。
由上可知,本实施例的字符缺陷检测,自动检测待检图像的字符缺陷,如深色、浅色、脏污、内容错误等缺陷不良,保证了检测精度。并可规模化复制,节省了人力成本。
图11示出了根据本申请一个实施例字符缺陷检测装置的框图,参见图11,本实施例的字符缺陷检测装置,该字符缺陷检测装置1100包括:
获取模块1101,用于获取包含字符的待检图像以及与该字符对应的模板字符图像,将待检图像转换为与模板字符图像的格式一致的图像;
提取模块1102,用于提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;
确定模块1103,用于基于第一有效区域得到第一图像,基于第二有效区域得到第二图像;
变换模块1104,用于根据第一图像与第二图像,计算指示第一图像与第二图像的信息差的变换图像;
检测模块1105,用于根据变换图像的信息,获得待检图像的字符缺陷检测结果。
在本申请的一个实施例中,检测模块1105,具体用于根据变换图像中字符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误;和/或,根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷。
在本申请的一个实施例中,提取模块1102具体用于提取待检图像中包含字符的圆形区域或多边形区域,作为第一有效区域;提取模板字符图像中包括模板字符的圆形区域或多边形区域,作为第二有效区域。
在本申请的一个实施例中,确定模块1103,具体用于根据第二有效区域以及模板字符图像的傅里叶变换结果确定的尺寸,选取底色图片;将第一有效区域叠加到底色图片上,得到第一图像;将第二有效区域叠加到底色图片上,得到第二图像。
在本申请的一个实施例中,模板字符图像为二值化图像,将待检图像转换为二值化图像,选取白色图作为底色图片。
在本申请的一个实施例中,变换模块1104,具体用于计算第一图像与第二图像之间的位移偏移量;根据第一图像或者第二图像,结合位移偏移量,利用傅里叶变换计算傅里叶变换结果图像;根据傅里叶变换结果图像、第一图像和第二图像进行空间变换,得到变换图像。
在本申请的一个实施例中,变换模块1104,具体对第一图像和第二图像进行反色处理;对反色后第二图像进行傅里叶变换,得到反色后第一图像与反色 后第二图像之间的位移偏移量,根据位移偏移量对反色后第二图像进行反向移动,得到傅里叶变换结果图像;分别构建反色后第一图像的极坐标系,以及傅里叶变换结果图像的极坐标系,根据反色后第一图像的像素点的极坐标以及傅里叶变换结果图像的像素点的极坐标,确定反色后第一图像与傅里叶变换结果图像之间的位移;根据位移确定仿射变换参数,基于仿射变换参数对第二图像进行仿射变换,得到变换图像。
在本申请的一个实施例中,检测模块1105,具体用于设置正常灰度值区间,并在变换图像中选取灰度值属于该灰度值区间范围的像素点,构成目标像素区域;计算目标像素区域的面积,当目标像素区域的面积与预设面积阈值不一致时,确定待检图像中的字符存在字符颜色深浅缺陷。
在本申请的一个实施例中,检测模块1105,具体用于计算变换图像的字符区域的掩模;根据掩模将第一图像的字符区域设置为底色指示的颜色,并获得第一图像的底色区域之外的区域的大小,当第一图像的底色区域之外的区域的大小大于预设阈值时,确定待检图像中的字符存在脏污或存在字符内容错误。
需要说明的是,上述字符缺陷检测装置实施例的具体实施方式可以参照前述对应方法实施例的具体实施方式进行,在此不再赘述。
参见图12,本发明的另一个实施例提供一种计算机可读存储介质1200,计算机可读存储介质1200存储计算机程序,计算机程序使计算机执行上述的手势交互方法。
具体的,计算机可读存储介质1200中存储的计算机程序使计算机执行下述的手势交互方法:
获取包含字符的待检图像以及与该字符对应的模板字符图像,将待检图像转换为与模板字符图像的格式一致的图像;提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;基于第一有效区域得到第一图像,基于第二有效区域得到第二图像;根据第一图像与第二图像,计算指示第一图像与第二图像的信息差的变换图像;根据变换图像的信息,获得待检图像的字符缺陷检测结果。
其中,计算机程序进一步使计算机执行下述的手势交互方法:
根据变换图像中字符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误;和/或,根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷。
其中,计算机程序进一步使计算机执行下述的手势交互方法:
计算第一图像与第二图像之间的位移偏移量;根据第一图像或者第二图像,结合位移偏移量,利用傅里叶变换计算傅里叶变换结果图像;根据傅里叶变换结果图像、第一图像和第二图像进行空间变换,得到变换图像。
其中,计算机程序进一步使计算机执行下述的手势交互方法:
对第一图像和第二图像进行反色处理;对反色后第二图像进行傅里叶变换,得到反色后第一图像与反色后第二图像之间的位移偏移量,根据位移偏移量对反色后第二图像进行反向移动,得到傅里叶变换结果图像;分别构建反色后第一图像的极坐标系,以及傅里叶变换结果图像的极坐标系,根据反色后第一图像的像素点的极坐标以及傅里叶变换结果图像的像素点的极坐标,确定反色后第一图像与傅里叶变换结果图像之间的位移;根据位移确定仿射变换参数,基于仿射变换参数对第二图像进行仿射变换,得到变换图像。
其中,计算机程序进一步使计算机执行下述的手势交互方法:
计算变换图像的字符区域的掩模;根据掩模将第一图像的字符区域设置为底色指示的颜色,并获得第一图像的底色区域之外的区域的大小,当第一图像的底色区域之外的区域的大小大于预设阈值时,确定待检图像中的字符存在脏污或存在字符内容错误。
需要说明的是,上述计算机存储介质实施例中程序具体实现的功能可以参照前述对应方法实施例的具体内容,在此不再赘述。
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图的一个流程或多个流程和/或方框图的一个方框或多个方框中指定的功能的装置。
需要说明的是术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述,仅为本发明的具体实施方式,在本发明的上述教导下,本领域技术人员可以在上述实施例的基础上进行其他的改进或变形。本领域技术人员应该明白,上述的具体描述只是更好的解释本发明的目的,本发明的保护范围以权利要求的保护范围为准。

Claims (20)

  1. 一种字符缺陷检测方法,其中,该字符缺陷检测方法包括:
    获取包含字符的待检图像以及与该字符对应的模板字符图像,将所述待检图像转换为与所述模板字符图像的格式一致的图像;
    提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;
    基于所述第一有效区域得到第一图像,基于所述第二有效区域得到第二图像;
    根据所述第一图像与所述第二图像,计算指示所述第一图像与所述第二图像的信息差的变换图像;
    根据所述变换图像的信息,获得所述待检图像的字符缺陷检测结果。
  2. 如权利要求1所述的方法,其中,所述根据所述变换图像的信息,获得所述待检图像的字符缺陷检测结果包括:
    根据所述变换图像中字符区域的掩膜信息,检测所述待检图像中的字符存在脏污或存在字符内容错误;和/或,
    根据所述变换图像中字符区域的灰度值信息,检测所述待检图像中的字符存在字符颜色深浅缺陷。
  3. 如权利要求1所述的方法,其中,
    提取待检图像中包含字符的第一有效区域包括:
    提取待检图像中包含字符的圆形区域或多边形区域,作为第一有效区域;
    所述提取模板字符图像中包括模板字符的第二有效区域包括:
    提取模板字符图像中包括模板字符的圆形区域或多边形区域,作为第二有效区域。
  4. 如权利要求1所述的方法,其中,所述基于所述第一有效区域得到第一图像,基于所述第二有效区域得到第二图像包括:
    根据所述第二有效区域以及所述模板字符图像的傅里叶变换结果确定的尺寸,选取底色图片;
    将所述第一有效区域叠加到所述底色图片上,得到第一图像;
    将所述第二有效区域叠加到所述底色图片上,得到第二图像。
  5. 如权利要求4所述的方法,其中,所述模板字符图像为二值化图像,将待检图像转换为二值化图像,所述方法还包括:
    选取白色图作为所述底色图片。
  6. 如权利要求1所述的方法,其中,根据所述第一图像与所述第二图像,计算指示所述第一图像与所述第二图像的信息差的变换图像包括:
    计算所述第一图像与所述第二图像之间的位移偏移量;
    根据第一图像或者第二图像,结合位移偏移量,利用傅里叶变换计算傅里叶变换结果图像;
    根据傅里叶变换结果图像、第一图像和所述第二图像进行空间变换,得到变换图像。
  7. 如权利要求6所述的方法,其中,进一步包括:
    对所述第一图像和所述第二图像进行反色处理;
    对反色后所述第二图像进行傅里叶变换,得到反色后所述第一图像与反色后所述第二图像之间的位移偏移量,根据位移偏移量对反色后所述第二图像进行反向移动,得到傅里叶变换结果图像;
    分别构建反色后所述第一图像的极坐标系,以及所述傅里叶变换结果图像的极坐标系,根据反色后所述第一图像的像素点的极坐标以及所述傅里叶变换结果图像的像素点的极坐标,确定反色后所述第一图像与所述傅里叶变换结果图像之间的位移;
    根据所述位移确定仿射变换参数,基于仿射变换参数对所述第二图像进行仿射变换,得到变换图像。
  8. 如权利要求2所述的方法,其中,所述根据所述变换图像中字符区域的灰度值信息,检测所述待检图像中的字符存在字符颜色深浅缺陷包括:
    设置正常灰度值区间,并在所述变换图像中选取灰度值属于该灰度值区间范围的像素点,构成目标像素区域;
    计算所述目标像素区域的面积,当所述目标像素区域的面积与预设面积阈值不一致时,确定所述待检图像中的字符存在字符颜色深浅缺陷。
  9. 如权利要求2所述的方法,其中,所述根据所述变换图像中字符区域的掩膜信息,检测所述待检图像中的字符存在脏污或存在字符内容错误包括:
    计算所述变换图像的字符区域的掩模;
    根据所述掩模将所述第一图像的字符区域设置为底色指示的颜色,并获得所述第一图像的底色区域之外的区域的大小,
    当所述第一图像的底色区域之外的区域的大小大于预设阈值时,确定所述待检图像中的字符存在脏污或存在字符内容错误。
  10. 一种字符缺陷检测装置,其中,该字符缺陷检测装置包括:
    获取模块,用于获取包含字符的待检图像以及与该字符对应的模板字符图像,将所述待检图像转换为与所述模板字符图像的格式一致的图像;
    提取模块,用于提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;
    确定模块,用于基于所述第一有效区域得到第一图像,基于所述第二有效区域得到第二图像;
    变换模块,用于根据所述第一图像与所述第二图像,计算指示所述第一图像与所述第二图像的信息差的变换图像;
    检测模块,用于根据所述变换图像的信息,获得所述待检图像的字符缺陷检测结果。
  11. 如权利要求10所述的装置,其中,
    检测模块,具体用于根据变换图像中字符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误;和/或,根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷。
  12. 如权利要求10所述的装置,其中,
    确定模块,具体用于根据第二有效区域以及模板字符图像的傅里叶变换结果确定的尺寸,选取底色图片;将第一有效区域叠加到底色图片上,得到第一图像;将第二有效区域叠加到底色图片上,得到第二图像。
  13. 如权利要求10所述的装置,其中,
    变换模块,具体用于计算第一图像与第二图像之间的位移偏移量;根据第一图像或者第二图像,结合位移偏移量,利用傅里叶变换计算傅里叶变换结果图像;根据傅里叶变换结果图像、第一图像和第二图像进行空间变换,得到变换图像。
  14. 如权利要求10所述的装置,其中,
    变换模块,具体用于对第一图像和第二图像进行反色处理;对反色后第二图像进行傅里叶变换,得到反色后第一图像与反色后第二图像之间的位移偏移量,根据位移偏移量对反色后第二图像进行反向移动,得到傅里叶变换结果图像;分别构建反色后第一图像的极坐标系,以及傅里叶变换结果图像的极坐标系,根据反色后第一图像的像素点的极坐标以及傅里叶变换结果图像的像素点的极坐标,确定反色后第一图像与傅里叶变换结果图像之间的位移;根据位移确定仿射变换参数,基于仿射变换参数对第二图像进行仿射变换,得到变换图 像。
  15. 如权利要求11所述的装置,其中,
    检测模块,具体用于计算变换图像的字符区域的掩模;根据掩模将第一图像的字符区域设置为底色指示的颜色,并获得第一图像的底色区域之外的区域的大小,当第一图像的底色区域之外的区域的大小大于预设阈值时,确定待检图像中的字符存在脏污或存在字符内容错误。
  16. 一种计算机可读存储介质,计算机可读存储介质存储计算机程序,计算机程序使所述计算机执行下述的手势交互方法:
    获取包含字符的待检图像以及与该字符对应的模板字符图像,将所述待检图像转换为与所述模板字符图像的格式一致的图像;提取待检图像中包含字符的第一有效区域,以及提取模板字符图像中包括模板字符的第二有效区域;基于所述第一有效区域得到第一图像,基于所述第二有效区域得到第二图像;根据所述第一图像与所述第二图像,计算指示所述第一图像与所述第二图像的信息差的变换图像;根据所述变换图像的信息,获得所述待检图像的字符缺陷检测结果。
  17. 如权利要求16所述的计算机可读存储介质,其中,计算机程序进一步使所述计算机执行下述的手势交互方法:
    根据变换图像中字符区域的掩膜信息,检测待检图像中的字符存在脏污或存在字符内容错误;和/或,根据变换图像中字符区域的灰度值信息,检测待检图像中的字符存在字符颜色深浅缺陷。
  18. 如权利要求16所述的计算机可读存储介质,其中,计算机程序进一步使所述计算机执行下述的手势交互方法:
    计算第一图像与第二图像之间的位移偏移量;根据第一图像或者第二图像,结合位移偏移量,利用傅里叶变换计算傅里叶变换结果图像;根据傅里叶变换结果图像、第一图像和第二图像进行空间变换,得到变换图像。
  19. 如权利要求16所述的计算机可读存储介质,其中,计算机程序进一步使所述计算机执行下述的手势交互方法:
    对第一图像和第二图像进行反色处理;对反色后第二图像进行傅里叶变换,得到反色后第一图像与反色后第二图像之间的位移偏移量,根据位移偏移量对反色后第二图像进行反向移动,得到傅里叶变换结果图像;分别构建反色后第一图像的极坐标系,以及傅里叶变换结果图像的极坐标系,根据反色后第一图像的像素点的极坐标以及傅里叶变换结果图像的像素点的极坐标,确定反色后 第一图像与傅里叶变换结果图像之间的位移;根据位移确定仿射变换参数,基于仿射变换参数对第二图像进行仿射变换,得到变换图像。
  20. 如权利要求17所述的计算机可读存储介质,其中,计算机程序进一步使所述计算机执行下述的手势交互方法:
    计算变换图像的字符区域的掩模;根据掩模将第一图像的字符区域设置为底色指示的颜色,并获得第一图像的底色区域之外的区域的大小,当第一图像的底色区域之外的区域的大小大于预设阈值时,确定待检图像中的字符存在脏污或存在字符内容错误。
PCT/CN2020/125318 2019-12-30 2020-10-30 一种字符缺陷检测方法及装置 WO2021135605A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/594,142 US12002198B2 (en) 2019-12-30 2020-10-30 Character defect detection method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911397495.5A CN111060527B (zh) 2019-12-30 2019-12-30 一种字符缺陷检测方法及装置
CN201911397495.5 2019-12-30

Publications (1)

Publication Number Publication Date
WO2021135605A1 true WO2021135605A1 (zh) 2021-07-08

Family

ID=70305185

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125318 WO2021135605A1 (zh) 2019-12-30 2020-10-30 一种字符缺陷检测方法及装置

Country Status (3)

Country Link
US (1) US12002198B2 (zh)
CN (1) CN111060527B (zh)
WO (1) WO2021135605A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111060527B (zh) * 2019-12-30 2021-10-29 歌尔股份有限公司 一种字符缺陷检测方法及装置
CN111426693A (zh) * 2020-04-26 2020-07-17 湖南恒岳重钢钢结构工程有限公司 一种质量缺陷检测***及其检测方法
CN111612774B (zh) * 2020-05-22 2024-05-03 珠海格力智能装备有限公司 缺陷区域的确定方法、确定装置、存储介质与处理器
CN112418226B (zh) * 2020-10-23 2022-11-25 济南信通达电气科技有限公司 一种鱼眼分合闸状态识别的方法及装置
CN113111868B (zh) * 2021-03-16 2023-08-18 广州大学 一种字符缺陷检测方法、***、装置及存储介质
CN116129435B (zh) * 2023-04-14 2023-08-08 歌尔股份有限公司 字符缺陷检测方法、装置、设备及存储介质
CN117173157B (zh) * 2023-10-24 2024-02-13 粤芯半导体技术股份有限公司 图形化工艺质量检测方法、装置、设备以及存储介质

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6756589B1 (en) * 1998-07-10 2004-06-29 Hitachi, Ltd. Method for observing specimen and device therefor
JP2005208847A (ja) * 2004-01-21 2005-08-04 Fuji Xerox Co Ltd 画像欠陥検出装置、画像形成装置
JP2009097922A (ja) * 2007-10-15 2009-05-07 Daido Steel Co Ltd 外観検査方法及び外観検査装置
CN101916445A (zh) * 2010-08-25 2010-12-15 天津大学 一种基于仿射参数估计的图像配准方法
JP2011138208A (ja) * 2009-12-25 2011-07-14 Sharp Corp 画像処理方法、画像処理装置、画像処理プログラムおよび記録媒体
CN107492091A (zh) * 2017-07-06 2017-12-19 东莞理工学院 基于机器视觉的标签外观检测方法及终端设备
CN109308700A (zh) * 2017-07-27 2019-02-05 南京敏光视觉智能科技有限公司 一种基于印刷品字符的视觉识别缺陷检测方法
CN110197180A (zh) * 2019-05-30 2019-09-03 新华三技术有限公司 字符缺陷检测方法、装置及设备
CN111060527A (zh) * 2019-12-30 2020-04-24 歌尔股份有限公司 一种字符缺陷检测方法及装置

Family Cites Families (39)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3001079B2 (ja) * 1993-10-20 2000-01-17 新日本製鐵株式会社 印刷文字検査方法及び印刷文字検査装置
JPH07144461A (ja) * 1993-11-24 1995-06-06 Hitachi Eng Co Ltd 印字装置
JPH1063779A (ja) * 1996-08-26 1998-03-06 Fuji Photo Film Co Ltd 文字認識方法および装置
JPH1096613A (ja) * 1997-08-04 1998-04-14 Hitachi Ltd 欠陥検出方法及びその装置
JP2001043372A (ja) * 1999-07-29 2001-02-16 Hitachi Eng Co Ltd 文字検査装置
US6654487B1 (en) * 2000-03-03 2003-11-25 Charles H. Downs, Jr. Character recognition, including method and system for processing checks with invalidated MICR lines
JP3669698B2 (ja) 2002-09-20 2005-07-13 日東電工株式会社 印刷物の検査方法及び検査装置
JP2004276476A (ja) * 2003-03-17 2004-10-07 Dainippon Printing Co Ltd 印刷物検査装置、印刷物検査方法、印刷物検査処理プログラム及び当該プログラムが記録された記録媒体
JP4061289B2 (ja) * 2004-04-27 2008-03-12 独立行政法人科学技術振興機構 画像検査方法及び装置
CN101221661B (zh) * 2008-01-29 2010-09-22 深圳市迅雷网络技术有限公司 一种图像配准方法及装置
JP5198397B2 (ja) * 2009-09-09 2013-05-15 株式会社東芝 フォトマスクの特性検出装置およびフォトマスクの特性検出方法
JP2011076204A (ja) * 2009-09-29 2011-04-14 Toppan Printing Co Ltd 印刷物検査方法及び印刷物検査装置
JP5371848B2 (ja) * 2009-12-07 2013-12-18 株式会社神戸製鋼所 タイヤ形状検査方法、及びタイヤ形状検査装置
CN101980289B (zh) * 2010-10-25 2012-06-27 上海大学 基于频域配准和凸集投影的多帧图像超分辨率重建方法
CN103828361B (zh) * 2011-09-21 2015-04-29 富士胶片株式会社 图像处理装置、方法,立体图像获取装置,便携式电子设备,打印机和立体图像播放器装置
CN103226106B (zh) * 2013-03-15 2016-02-24 江南大学 基于机器视觉的轴承防尘盖品质监测方法
CN103591904B (zh) * 2013-09-18 2016-08-17 中国矿业大学(北京) 一种两步三维傅里叶变换测量物体内部三维变形场的方法
CN104166848B (zh) * 2014-08-28 2017-08-29 武汉虹识技术有限公司 一种应用于虹膜识别的匹配方法及***
CN104568986A (zh) * 2015-01-26 2015-04-29 中国科学院半导体研究所 基于surf算法的遥控器面板印刷缺陷自动检测方法
CN105675626B (zh) * 2016-02-26 2018-08-07 广东工业大学 一种轮胎模具的字符缺陷检测方法
CN105894514B (zh) * 2016-04-06 2019-01-11 广东工业大学 一种基于gpu并行运算的印刷品缺陷检测方法及***
CN105938547B (zh) * 2016-04-14 2019-02-12 河海大学 一种纸质水文年鉴数字化方法
CN106803244B (zh) * 2016-11-24 2019-09-03 深圳市华汉伟业科技有限公司 缺陷识别方法及***
CN106952257B (zh) * 2017-03-21 2019-12-03 南京大学 一种基于模板匹配与相似度计算的曲面标签破损缺陷检测方法
CN107247057B (zh) * 2017-06-09 2020-02-28 青岛软控机电工程有限公司 一种瓶盖表面生产日期缺陷检测方法
CN107328793B (zh) * 2017-06-30 2019-12-03 航天新长征大道科技有限公司 一种基于机器视觉的饰品表面字印瑕疵检测方法和装置
CN107421953A (zh) * 2017-07-06 2017-12-01 东莞理工学院 热缩膜缺陷检测方法及终端设备
CN107561736B (zh) * 2017-08-04 2020-04-07 南京理工大学 基于傅里叶及Hough变换的LCD缺陷检测方法
CN108416765B (zh) * 2018-01-30 2020-08-18 华南理工大学 一种字符缺陷自动检测方法和***
CN108982508B (zh) * 2018-05-23 2020-11-24 江苏农林职业技术学院 一种基于特征模板匹配和深度学习的塑封体ic芯片缺陷检测方法
CN108918536B (zh) * 2018-07-13 2021-01-26 广东工业大学 轮胎模具表面字符缺陷检测方法、装置、设备及存储介质
CN109142383B (zh) * 2018-08-10 2021-07-09 惠州太初科技有限公司 一种基于形态学的字符缺陷检测方法
CN109598271B (zh) * 2018-12-10 2021-02-09 北京奇艺世纪科技有限公司 一种字符分割方法及装置
CN109724990B (zh) * 2019-01-08 2021-08-06 上海大学 一种包装盒标签中喷码区域的快速定位与检测方法
CN109934809A (zh) * 2019-03-08 2019-06-25 深慧视(深圳)科技有限公司 一种纸质标签字符缺陷检测方法
CN110097046A (zh) * 2019-03-11 2019-08-06 上海肇观电子科技有限公司 一种文字检测方法及装置、设备和计算机可读存储介质
CN110111301A (zh) * 2019-03-21 2019-08-09 广东工业大学 基于频域变换的金属氧化表面缺陷视觉检测方法
CN110596121A (zh) * 2019-09-12 2019-12-20 南京旷云科技有限公司 键盘外观检测方法、装置和电子***
CN110390677B (zh) * 2019-09-17 2020-01-07 成都数之联科技有限公司 一种基于滑动自匹配的缺陷定位方法及***

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6756589B1 (en) * 1998-07-10 2004-06-29 Hitachi, Ltd. Method for observing specimen and device therefor
JP2005208847A (ja) * 2004-01-21 2005-08-04 Fuji Xerox Co Ltd 画像欠陥検出装置、画像形成装置
JP2009097922A (ja) * 2007-10-15 2009-05-07 Daido Steel Co Ltd 外観検査方法及び外観検査装置
JP2011138208A (ja) * 2009-12-25 2011-07-14 Sharp Corp 画像処理方法、画像処理装置、画像処理プログラムおよび記録媒体
CN101916445A (zh) * 2010-08-25 2010-12-15 天津大学 一种基于仿射参数估计的图像配准方法
CN107492091A (zh) * 2017-07-06 2017-12-19 东莞理工学院 基于机器视觉的标签外观检测方法及终端设备
CN109308700A (zh) * 2017-07-27 2019-02-05 南京敏光视觉智能科技有限公司 一种基于印刷品字符的视觉识别缺陷检测方法
CN110197180A (zh) * 2019-05-30 2019-09-03 新华三技术有限公司 字符缺陷检测方法、装置及设备
CN111060527A (zh) * 2019-12-30 2020-04-24 歌尔股份有限公司 一种字符缺陷检测方法及装置

Also Published As

Publication number Publication date
CN111060527B (zh) 2021-10-29
US20220172337A1 (en) 2022-06-02
CN111060527A (zh) 2020-04-24
US12002198B2 (en) 2024-06-04

Similar Documents

Publication Publication Date Title
WO2021135605A1 (zh) 一种字符缺陷检测方法及装置
CN111474184B (zh) 基于工业机器视觉的aoi字符缺陷检测方法和装置
EP3309703B1 (en) Method and system for decoding qr code based on weighted average grey method
CN111160352B (zh) 一种基于图像分割的工件金属表面文字识别方法及***
US9607199B2 (en) Decoding machine-readable optical codes with aesthetic component
TWI606406B (zh) 從成像檔案擷取正文之方法、設備以及有形電腦可讀儲存媒體
CN107609451A (zh) 一种基于二维码的高精度视觉定位方法及***
CN104568986A (zh) 基于surf算法的遥控器面板印刷缺陷自动检测方法
CN105654015A (zh) 解码二维矩阵符号的方法和***
CN102184378A (zh) 一种pdf417标准二维条码图像切割的办法
CN106709952B (zh) 一种显示屏幕的自动标定方法
JP6188052B2 (ja) 情報システム及びサーバー
CN108256518B (zh) 文字区域检测方法及装置
CN115170525A (zh) 一种图像差异检测方法及装置
CN111274863A (zh) 一种基于文本山峰概率密度的文本预测方法
CN114998347B (zh) 一种半导体面板角点定位方法及装置
CN115063405A (zh) 钢材表面缺陷检测的方法、***、电子设备和存储介质
CN116110069A (zh) 基于编码标志点的答题卡识别方法、装置及其相关介质
CN112434543B (zh) 一种针对畸变彩色直接部件标记的图像重构方法及***
KR101766787B1 (ko) Gpu장치를 기반으로 하는 딥러닝 분석을 이용한 영상 보정 방법
CN105930813B (zh) 一种在任意自然场景下检测行文本的方法
CN109871910B (zh) 一种手写字符识别方法及装置
Dai et al. The realization of identification method for datamatrix code
CN113298803A (zh) 一种磁铁片检测方法、***、设备及计算机可读存储介质
JP5003379B2 (ja) 画像処理装置及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20908830

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20908830

Country of ref document: EP

Kind code of ref document: A1