WO2018010391A1 - Board inspection method and device - Google Patents

Board inspection method and device Download PDF

Info

Publication number
WO2018010391A1
WO2018010391A1 PCT/CN2016/113235 CN2016113235W WO2018010391A1 WO 2018010391 A1 WO2018010391 A1 WO 2018010391A1 CN 2016113235 W CN2016113235 W CN 2016113235W WO 2018010391 A1 WO2018010391 A1 WO 2018010391A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
tested
value
area
pixel
Prior art date
Application number
PCT/CN2016/113235
Other languages
French (fr)
Chinese (zh)
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 广州视源电子科技股份有限公司
Publication of WO2018010391A1 publication Critical patent/WO2018010391A1/en

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • 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/20036Morphological image processing
    • 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

Definitions

  • the invention relates to the field of automatic optical detection, in particular to a method and a device for detecting a card.
  • Automated optical inspection is an essential part of the industrial production process.
  • the principle is to obtain the surface state of the finished product through optical imaging, and to detect foreign matter or surface defects on the finished product by image processing.
  • determining whether the finished product enters the detection area is a key step of automatic optical detection.
  • the telecentric lens is usually used in the detection.
  • an object of the present invention is to provide a method and apparatus for detecting a card, which can accurately detect whether a card enters a detection area without requiring a high-precision structure.
  • the invention provides a method for detecting a board, comprising the following steps:
  • the template image is an area of the card in the detection area and the An image when the ratio of the area of the detection area is a predetermined ratio
  • the image to be tested is binarized to obtain a binary image of the image to be tested;
  • the method further includes:
  • the boundary of the image to be tested is expanded, wherein the expanded portion is filled with pixels having a gray value of 0.
  • the image to be tested is binarized to obtain a binary image of the image to be tested, and specifically includes:
  • the method further includes:
  • a morphological closing operation is performed on the binary image to perform morphological filling and noise cancellation on the binary image.
  • the image to be tested is an image that the card enters the detection area for the first time.
  • the predetermined ratio is 1/4.
  • the invention also provides a detecting device for a card, comprising:
  • An acquisition unit configured to collect an image to be tested of a detection area located on the conveyor belt
  • a similarity matching unit configured to match the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image; wherein the template image is a card in the detecting An image when the ratio of the area within the area to the area of the detection area is a predetermined ratio;
  • a binarization unit configured to perform binarization on the image to be tested when the similarity is less than a preset threshold, to obtain a binary image of the image to be tested
  • a contour extracting unit configured to extract all contours on the binary image, calculate an area of the connected region surrounded by the contour, and obtain an area of a minimum circumscribed rectangle of the connected region having the largest area;
  • a ratio calculating unit configured to determine that the card enters the detection area when a ratio of an area of the minimum circumscribed rectangle to an area of the binary image is greater than or equal to the predetermined ratio value.
  • the method further comprises:
  • an expansion unit configured to expand a boundary of the image to be tested, wherein the extended portion is filled with pixels with a gray value of 0.
  • the binarization unit specifically includes:
  • an HSV value calculation module configured to: when the similarity is less than a preset threshold, calculate an HSV value of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested, where , H is the hue, S is the saturation, and V is the value;
  • a matching module configured to compare an HSV value of each pixel of the image to be tested with a preset HSV value of a board bottom color, and determine whether the pixel point matches a color of the board bottom layer; If yes, the gray value of the pixel is set to 1 on the image to be tested, and if not, the gray value of the pixel is set to 0 on the image to be tested;
  • the difference between the H value of one pixel of the image to be tested and the H value of the color of the board substrate is less than a preset error, and the S value of the pixel of the image to be tested and the color of the board bottom layer
  • the difference of the S value is smaller than the preset error, and the difference between the V value of the pixel of the image to be tested and the V value of the color of the board bottom layer is less than the preset error.
  • the pixel of the image matches the color of the board backplane;
  • the binary image generating module is configured to generate a binary image after the HSV value of all the pixels of the image to be tested is compared with the HSV value of the preset color of the board bottom color.
  • the method further comprises:
  • the morphological closing unit is configured to perform a morphological closing operation on the binary image to perform morphological filling and noise elimination on the binary image.
  • the method and device for detecting a card provided by the embodiment of the present invention, after binarizing the image to be tested, according to the area of the minimum circumscribed rectangle of the connected area having the largest area on the binary image and the second The ratio of the area of the value image determines whether the card enters the detection area, so that it is possible to accurately determine whether the card enters the detection area without requiring a high-precision mechanical movement structure.
  • FIG. 1 is a schematic flow chart of a method for detecting a card provided by an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of an image to be tested according to an embodiment of the present invention.
  • 3(a) to 3(a) are schematic diagrams of template images provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a binary image provided by an embodiment of the present invention.
  • Figure 5 is a schematic illustration of the minimum circumscribed rectangle defining the connected region having the largest area on the binary image.
  • FIG. 6 is a schematic diagram of expanding the image to be tested of FIG. 2.
  • Fig. 7 is a schematic diagram showing the morphological closing operation of the binary image of Fig. 4;
  • FIG. 8 is a schematic structural diagram of a device for detecting a card provided by an embodiment of the present invention.
  • FIG. 9 is a schematic structural view of the binarization unit of FIG. 8.
  • FIG. 10 is a schematic structural diagram of a detecting device for a card provided by a preferred embodiment of the present invention.
  • the embodiment of the invention provides a method and a device for detecting a card, which are used for detecting a card (such as a PCB card), in particular, whether the solder surface of the card enters a detection area on the conveyor.
  • a card such as a PCB card
  • an embodiment of the present invention provides a method for detecting a card.
  • the method for detecting the card may be implemented by a detecting device of the card, and at least includes the following steps:
  • the conveyor belt can continuously transport the card in a certain conveying direction, and the detecting device of the card collects an image of the card in the transportation, specifically, the
  • the detection device of the card may include a camera that is mounted above the conveyor belt and acquires an image of the detection area on the conveyor belt in real time.
  • the detection area is the image acquisition field of view of the camera.
  • the camera in order to detect the surface property of the solder surface of the card, in order to highlight the three-dimensional information of the solder surface, it is necessary to illuminate the detection area with three-color light of different angles, and further, in order to avoid In the detection, the camera also uses a telecentric lens for shooting. These two factors will limit the camera to take pictures
  • the field of view size, the image acquisition field of the camera currently detected on the solder surface is generally 250*320mm ⁇ 510*460mm, and its length and/or width may be smaller than the size of the board itself, that is, it is often required to pass local Shoot the board and shoot it.
  • S102 Match the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image, where the template image is an area of the card in the detection area. An image when the ratio of the area of the detection area is a predetermined ratio.
  • the template image is an image when a ratio of an area of the card in the detection area to a total area of the detection area is a predetermined ratio, wherein the predetermined ratio is a predefined value.
  • a threshold value for the board to enter the detection area is determined. For example, when the detecting device of the card sets that the ratio of the area of the card to the area of the detection area is greater than or equal to one quarter, the card enters the detection area, and the The template image is an image acquired when the ratio of the area of the board to the area of the detection area is exactly one quarter.
  • one quarter is only a reference parameter, which may also be set to 1/6, 1/8, 1/2 or other values according to actual needs, and the present invention No specific restrictions.
  • the template image is also related to the direction of movement and initial placement of the card on the conveyor belt, and the card is The portion within the detection area should be the portion where it first enters the detection area.
  • the similarity between the image to be tested and the template image may be obtained by:
  • T(x, y) be the template image
  • I(x, y) be the image to be tested
  • T '(x', y ' ) T (x', y ') - 1 / (w ⁇ h) ⁇ ⁇ x ", y" T (x ", y")
  • I'(x+x',y+y') I(x+x',y+y')-1/(w ⁇ h) ⁇ x′′,y′′ I(x+x′′,y+ y").
  • x and y are the coordinates of the points on the corresponding image
  • w and h are the width and height of the image, respectively.
  • the ratio of the area of the detection area is exactly the preset ratio, that is, when the similarity is 1, it is the time point when the board enters the detection area for the first time.
  • a preset allowable value for example, 0.01
  • the board cannot be considered to have not entered the detection area, for example, slight changes in illumination or errors in mechanical structure may affect similarity. Calculation results. Therefore, when the similarity is less than a preset threshold, the detecting device of the card further calculates a binary image of the image to be tested for further judgment.
  • step S103 may include:
  • the HSV value of the image to be tested can be calculated by the following method:
  • H the hue
  • S the saturation
  • V the value
  • the color of the bottom surface of the soldering surface of the board can be obtained.
  • the color of the bottom board is green, and the board can be obtained by the above conversion formula.
  • Base plate color HSV The value of the card detecting device can store the HSV value of the color of the board bottom plate.
  • the detecting device of the card compares the HSV value of each pixel of the image to be tested with the HSV value of the color of the board bottom plate, and determines whether the pixel point and the color of the board bottom layer Matching; if yes, setting the gray value of the pixel to 1 on the image to be tested, and if not, setting the gray value of the pixel to 0 on the image to be tested.
  • the gray value here is a normalized gray value, that is, the gray value is 0 for all black, and the gray value is 1 for all white.
  • the matching process is: when the difference between the H value of one pixel of the image to be tested and the H value of the color of the board bottom is less than a preset error, the S value of the pixel of the image to be tested The difference between the S value and the color of the board bottom plate is less than a preset error, and the difference between the V value of the pixel of the image to be tested and the V value of the color of the board bottom plate is less than a preset error.
  • the pixel of the image to be tested matches the color of the board bottom plate. If at least one of the three conditions is not satisfied, the pixel of the image to be tested does not match the color of the board bottom board. .
  • the specific calculation process is as follows:
  • H background , S background , V background represent the HSV value of the color of the board base plate
  • H test (i, j) S test (i, j)
  • V test (i, j) is the image to be tested (i , j) the HSV value at the coordinates
  • C is the allowable error.
  • the generated binary image can be as shown in FIG. 4 .
  • an outline on the binary image may be acquired, wherein the extraction of the contour may be implemented according to an existing algorithm, for example, when determining a pixel point with a gray value of 1
  • the gray values of adjacent pixels are all 1, and the point is the inner point of the contour, and vice versa.
  • Contour extraction is done by setting all interior points to background points.
  • the detecting means of the card calculates the area of the connected area surrounded by the outline, and calculates the area of the minimum circumscribed rectangle of the connected area having the largest area.
  • the detecting device of the card determines whether the ratio of the area of the circumscribed rectangle to the area of the binary image is greater than the predetermined ratio If yes, then the description The board has entered the detection area, otherwise it indicates that the board has not entered the detection area.
  • the method for detecting a board provided by the embodiment of the present invention, after binarizing the image to be tested, according to the area of the minimum circumscribed rectangle of the connected area having the largest area on the binary image
  • the ratio of the area of the binary image determines whether the card enters the detection area, so that it is possible to accurately determine whether the card enters the detection without requiring a high-precision mechanical motion structure. within the area.
  • step S102 further includes:
  • the boundary of the image to be tested is expanded, wherein the expanded portion is filled with pixels having a gray value of 0.
  • FIG. 6 is a result of expanding FIG. 2, by which the error due to the positional deviation of the mechanical structure is eliminated, so that the calculation result of the similarity is more accurate. .
  • the method before step S104, the method further includes:
  • a morphological closing operation is performed on the binary image to perform morphological filling and noise cancellation on the binary image.
  • Fig. 7 shows the binary image after the morphological closing operation, and it can be seen that most of the noise has been eliminated, thereby ensuring accurate extraction of the contour.
  • an embodiment of the present invention further provides a card detecting apparatus 100, including:
  • the collecting unit 10 is configured to collect an image to be tested of the detection area located on the conveyor belt.
  • a similarity matching unit 20 configured to match the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image; wherein the template image is a card in the An image when the ratio of the area in the detection area to the area of the detection area is a predetermined ratio.
  • the binarization unit 30 is configured to perform binarization on the image to be tested when the similarity is less than a preset threshold to obtain a binary image of the image to be tested.
  • the binarization unit 30 specifically includes an HSV value calculation module 31 and a matching module. 32 and binary image generation module 33, wherein:
  • the HSV value calculation module 31 is configured to: when the similarity is less than a preset threshold, calculate an HSV of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested. Value, where H is the hue, S is the saturation, and V is the value.
  • the matching module 32 is configured to compare an HSV value of each pixel of the image to be tested with a HSV value of a preset color of the board bottom layer, and determine whether the pixel point and the board bottom color Matching; if yes, setting the gray value of the pixel to 1 on the image to be tested, and if not, setting the gray value of the pixel to 0 on the image to be tested.
  • the S value of the pixel of the image to be tested and the board is smaller than a preset error
  • the difference between the V value of the pixel of the image to be tested and the V value of the color of the bottom plate of the board is less than the preset error, and the three conditions are simultaneously established.
  • the pixel of the image to be tested matches the color of the board backplane.
  • the binary image generating module 33 is configured to generate a binary image after completing an alignment of the HSV value of all the pixel points of the image to be tested with the HSV value of the preset board bottom color.
  • the contour extracting unit 40 is configured to extract all the contours on the binary image, calculate the area of the connected region surrounded by the contour, and obtain the area of the minimum circumscribed rectangle of the connected region having the largest area.
  • the ratio calculating unit 50 is configured to determine that the card enters the detection area when a ratio of an area of the minimum circumscribed rectangle to an area of the binary image is greater than or equal to the predetermined ratio.
  • the detecting device 100 for the card provided by the embodiment of the present invention binarizes the image to be tested by the binarization unit 30, and then calculates the maximum value on the binary image according to the contour extracting unit 40. Determining, by the ratio calculating unit 50, a ratio of an area of the minimum circumscribed rectangle to an area of the binary image to determine whether the card enters the detection area, thereby determining an area of the minimum circumscribed rectangle of the connected area of the area. In the case where a high-precision mechanical motion structure is not required, it is also possible to accurately judge whether or not the board enters the detection area.
  • the detecting device 100 of the card further comprises:
  • the expansion unit 60 is configured to expand a boundary of the image to be tested, wherein the extended portion is filled with pixels with a gray value of 0.
  • FIG. 6 is a result of expanding FIG. 2, by which the error due to the positional deviation of the mechanical structure is eliminated, so that the calculation result of the similarity is more accurate. .
  • the detecting device 100 of the card further comprises:
  • the morphological closing unit 70 is configured to perform a morphological closing operation on the binary image to perform morphological filling and noise elimination on the binary image.
  • Fig. 7 shows the binary image after the morphological closing operation, and it can be seen that most of the noise has been eliminated, thereby ensuring accurate extraction of the contour.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

A board inspection method, comprising: acquiring an image to be inspected of an inspection region located on a conveyor belt (S101); matching the image to be inspected with a pre-configured template image to obtain a similarity level between the image to be inspected and the template image (S102); if the similarity level is less than a preset threshold, performing binarization on the image to be inspected to obtain a binary image (S103); extracting all contours of the binary image and computing an area of connecting regions enclosed by the contours, so as to obtain an area of a minimum bounding rectangle having a maximum area of the connecting regions (S104); and when a ratio between the area of the minimum bounding rectangle and an area of the binary image is greater than or equal to a preset ratio, determining the board has entered the inspection region (S105). A board inspection device is further provided. The inspection method and device can accurately determine whether a board has entered the inspection region or not.

Description

一种板卡的检测方法及装置Method and device for detecting board 技术领域Technical field
本发明涉及自动光学检测领域,具体是一种板卡的检测方法及装置。The invention relates to the field of automatic optical detection, in particular to a method and a device for detecting a card.
背景技术Background technique
自动光学检测是工业制作过程的必要环节,其原理是通过光学成像方式取得成品的表面状态,以影像处理来检测成品上的异物或表面瑕疵等。其中,确定成品是否进入到检测区域是自动光学检测的关键步骤。Automated optical inspection is an essential part of the industrial production process. The principle is to obtain the surface state of the finished product through optical imaging, and to detect foreign matter or surface defects on the finished product by image processing. Among them, determining whether the finished product enters the detection area is a key step of automatic optical detection.
PCB板卡在检测其焊锡面的进入检测中,需要利用不同角度的三色光照明,以凸显焊锡的三维信息;同时,为了避免视差带来的影响,在检测中,通常还会采用远心镜头来拍摄焊锡面的图像。以上两个因素,会限制摄像机拍照的视野大小,目前焊锡面检测的图像采集视野一般为250*320mm~510*460mm,小于板卡本身的面积,也即是说,需要通过局部拍摄板卡的方法进行拍摄。In the detection of the solder surface of the PCB board, it is necessary to use three-color illumination of different angles to highlight the three-dimensional information of the solder. At the same time, in order to avoid the influence of parallax, the telecentric lens is usually used in the detection. To take an image of the solder surface. The above two factors will limit the size of the field of view of the camera. At present, the image acquisition field of the solder surface inspection is generally 250*320mm~510*460mm, which is smaller than the area of the board itself, that is, it needs to pass the partial shooting board. Method to shoot.
现有技术中,在对板卡的焊锡面进行进入检测时,主要通过机械结构来提供板卡进入摄像机视野的时间与坐标。但是这种方法,极大的依赖于机械运动结构的精度,而高精度的机械运动结构,往往也意味着高成本和更多的机械维护工作,不利于降低检测成本。In the prior art, when entering the solder surface of the board, the time and coordinates of the board entering the field of view of the camera are mainly provided by the mechanical structure. However, this method relies greatly on the accuracy of the mechanical motion structure, and the high-precision mechanical motion structure often means high cost and more mechanical maintenance work, which is not conducive to reducing the detection cost.
发明内容Summary of the invention
针对上述问题,本发明的目的在于提供一种板卡的检测方法及装置,在不需要高精度的结构的前提下,也可以准确的检测到板卡是否进入到检测区域。In view of the above problems, an object of the present invention is to provide a method and apparatus for detecting a card, which can accurately detect whether a card enters a detection area without requiring a high-precision structure.
本发明提供了一种板卡的检测方法,包括如下步骤:The invention provides a method for detecting a board, comprising the following steps:
采集位于传送带上的检测区域的待测图像;Acquiring an image to be tested of the detection area located on the conveyor belt;
将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度;其中,所述模板图像为板卡在所述检测区域内的面积与所述检测区域的面积的比为预定比值时的图像;Matching the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image; wherein the template image is an area of the card in the detection area and the An image when the ratio of the area of the detection area is a predetermined ratio;
当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像; When the similarity is less than a preset threshold, the image to be tested is binarized to obtain a binary image of the image to be tested;
提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积;Extracting all contours on the binary image, calculating an area of the connected region surrounded by the contour, and obtaining an area of a minimum circumscribed rectangle of the connected region having the largest area;
当所述最小外接矩形的面积与所述二值图像的面积的比大于等于所述预定比例值时,确定所述板卡进入检测区域。When the ratio of the area of the minimum circumscribed rectangle to the area of the binary image is greater than or equal to the predetermined ratio value, it is determined that the board enters the detection area.
优选地,在将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度之前,还包括:Preferably, before the image to be tested is matched with the preset template image to obtain the similarity between the image to be tested and the template image, the method further includes:
对所述待测图像的边界进行扩展,其中,扩展的部分用灰度值为0的像素点进行填充。The boundary of the image to be tested is expanded, wherein the expanded portion is filled with pixels having a gray value of 0.
优选地,所述当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像,具体包括:Preferably, when the similarity is less than a preset threshold, the image to be tested is binarized to obtain a binary image of the image to be tested, and specifically includes:
当所述相似度小于预设的阈值时,根据所述待测图像的每个像素点的RGB值计算获得所述待测图像的每个像素点的HSV值,其中,H为色调,S为饱和度,V为数值;When the similarity is less than a preset threshold, calculating an HSV value of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested, where H is a hue, and S is Saturation, V is a value;
将所述待测图像的每个像素点的HSV值与预设的板卡底板颜色的HSV值进行比对,判断所述像素点是否与所述板卡底板颜色相匹配;若是,则在所述待测图像上将所述像素点的灰度值设置为1,若否,则在所述待测图像上将所述像素点的灰度值设置为0;其中,当所述待测图像的一个像素点的H值与所述板卡底板颜色的H值的差小于预设的误差,所述待测图像的该像素点的S值与所述板卡底板颜色的S值的差小于预设的误差,所述待测图像的该像素点的V值与所述板卡底板颜色的V值的差小于预设的误差三个条件同时成立时,所述待测图像的该像素点与所述板卡底板颜色相匹配;Comparing the HSV value of each pixel of the image to be tested with the HSV value of the preset color of the board bottom layer, and determining whether the pixel point matches the color of the board bottom board; if yes, Setting the gray value of the pixel to be 1 on the image to be tested, and if not, setting the gray value of the pixel to 0 on the image to be tested; wherein, when the image to be tested The difference between the H value of one pixel and the H value of the color of the board bottom is less than a preset error, and the difference between the S value of the pixel of the image to be tested and the S value of the color of the board bottom is less than a preset error, the difference between the V value of the pixel of the image to be tested and the V value of the color of the board substrate is less than a preset error, and the pixel of the image to be tested is simultaneously established. Matching the color of the board base plate;
在完成所述待测图像的所有像素点的HSV值与预设的板卡底板颜色的HSV值的比对后,生成二值图像。After the HSV value of all the pixels of the image to be tested is compared with the HSV value of the preset board bottom color, a binary image is generated.
优选地,在提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积之前,还包括:Preferably, before extracting all the contours on the binary image, calculating the area of the connected area surrounded by the outline, and obtaining the area of the minimum circumscribed rectangle of the connected area having the largest area, the method further includes:
对所述二值图像进行形态学闭运算,以对所述二值图像进行形态学填充及噪声消除。A morphological closing operation is performed on the binary image to perform morphological filling and noise cancellation on the binary image.
优选地,当所述相似度与1的差的绝对值小于预设的允许值时,则确定所述待测图像为所述板卡第一次进入所述检测区域的图像。Preferably, when the absolute value of the difference between the similarity and 1 is less than a preset allowable value, it is determined that the image to be tested is an image that the card enters the detection area for the first time.
优选地,所述预定比值为1/4。Preferably, the predetermined ratio is 1/4.
本发明还提供一种板卡的检测装置,包括:The invention also provides a detecting device for a card, comprising:
采集单元,用于采集位于传送带上的检测区域的待测图像;An acquisition unit, configured to collect an image to be tested of a detection area located on the conveyor belt;
相似度匹配单元,用于将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度;其中,所述模板图像为板卡在所述检测区域内的面积与所述检测区域的面积的比为预定比值时的图像; a similarity matching unit, configured to match the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image; wherein the template image is a card in the detecting An image when the ratio of the area within the area to the area of the detection area is a predetermined ratio;
二值化单元,用于当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像;a binarization unit, configured to perform binarization on the image to be tested when the similarity is less than a preset threshold, to obtain a binary image of the image to be tested;
轮廓提取单元,用于提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积;a contour extracting unit, configured to extract all contours on the binary image, calculate an area of the connected region surrounded by the contour, and obtain an area of a minimum circumscribed rectangle of the connected region having the largest area;
比值计算单元,用于当所述最小外接矩形的面积与所述二值图像的面积的比大于等于所述预定比例值时,确定所述板卡进入检测区域。And a ratio calculating unit configured to determine that the card enters the detection area when a ratio of an area of the minimum circumscribed rectangle to an area of the binary image is greater than or equal to the predetermined ratio value.
优选地,还包括:Preferably, the method further comprises:
扩展单元,用于对所述待测图像的边界进行扩展,其中,扩展的部分用灰度值为0的像素点进行填充。And an expansion unit, configured to expand a boundary of the image to be tested, wherein the extended portion is filled with pixels with a gray value of 0.
优选地,所述二值化单元具体包括:Preferably, the binarization unit specifically includes:
HSV值计算模块,用于当所述相似度小于预设的阈值时,根据所述待测图像的每个像素点的RGB值计算获得所述待测图像的每个像素点的HSV值,其中,H为色调,S为饱和度,V为数值;And an HSV value calculation module, configured to: when the similarity is less than a preset threshold, calculate an HSV value of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested, where , H is the hue, S is the saturation, and V is the value;
匹配模块,用于将所述待测图像的每个像素点的HSV值与预设的板卡底板颜色的HSV值进行比对,判断所述像素点是否与所述板卡底板颜色相匹配;若是,则在所述待测图像上将所述像素点的灰度值设置为1,若否,则在所述待测图像上将所述像素点的灰度值设置为0;其中,当所述待测图像的一个像素点的H值与所述板卡底板颜色的H值的差小于预设的误差,所述待测图像的该像素点的S值与所述板卡底板颜色的S值的差小于预设的误差,所述待测图像的该像素点的V值与所述板卡底板颜色的V值的差小于预设的误差三个条件同时成立时,所述待测图像的该像素点与所述板卡底板颜色相匹配;a matching module, configured to compare an HSV value of each pixel of the image to be tested with a preset HSV value of a board bottom color, and determine whether the pixel point matches a color of the board bottom layer; If yes, the gray value of the pixel is set to 1 on the image to be tested, and if not, the gray value of the pixel is set to 0 on the image to be tested; The difference between the H value of one pixel of the image to be tested and the H value of the color of the board substrate is less than a preset error, and the S value of the pixel of the image to be tested and the color of the board bottom layer The difference of the S value is smaller than the preset error, and the difference between the V value of the pixel of the image to be tested and the V value of the color of the board bottom layer is less than the preset error. The pixel of the image matches the color of the board backplane;
二值图像生成模块,用于在完成所述待测图像的所有像素点的HSV值与预设的板卡底板颜色的HSV值的比对后,生成二值图像。The binary image generating module is configured to generate a binary image after the HSV value of all the pixels of the image to be tested is compared with the HSV value of the preset color of the board bottom color.
优选地,还包括:Preferably, the method further comprises:
形态学闭运算单元,用于对所述二值图像进行形态学闭运算,以对所述二值图像进行形态学填充及噪声消除。The morphological closing unit is configured to perform a morphological closing operation on the binary image to perform morphological filling and noise elimination on the binary image.
本发明实施例提供的板卡的检测方法及装置,通过将所述待测图像进行二值化后,再根据二值图像上的具有最大面积的连通区域的最小外接矩形的面积与所述二值图像的面积的比来确定所述板卡是否进入到所述检测区域,从而在不需要高精度的机械运动结构的情况下,也能准确的判断所述板卡是否进入到检测区域内。The method and device for detecting a card provided by the embodiment of the present invention, after binarizing the image to be tested, according to the area of the minimum circumscribed rectangle of the connected area having the largest area on the binary image and the second The ratio of the area of the value image determines whether the card enters the detection area, so that it is possible to accurately determine whether the card enters the detection area without requiring a high-precision mechanical movement structure.
附图说明 DRAWINGS
为了更清楚地说明本发明的技术方案,下面将对实施方式中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the present invention, the drawings used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, which are common in the art. For the skilled person, other drawings can be obtained from these drawings without any creative work.
图1是本发明实施例提供的板卡的检测方法的流程示意图。FIG. 1 is a schematic flow chart of a method for detecting a card provided by an embodiment of the present invention.
图2是本发明实施例提供的待测图像的示意图。FIG. 2 is a schematic diagram of an image to be tested according to an embodiment of the present invention.
图3(a)至图3(a)是本发明实施例提供的模板图像的示意图。3(a) to 3(a) are schematic diagrams of template images provided by an embodiment of the present invention.
图4是本发明实施例提供的二值图像的示意图。4 is a schematic diagram of a binary image provided by an embodiment of the present invention.
图5是在二值图像上确定出具有最大面积的连通区域的最小外接矩形的示意图。Figure 5 is a schematic illustration of the minimum circumscribed rectangle defining the connected region having the largest area on the binary image.
图6是对图2的待测图像进行扩展的示意图。FIG. 6 is a schematic diagram of expanding the image to be tested of FIG. 2. FIG.
图7是对图4的二值图像进行形态学闭运算后的示意图。Fig. 7 is a schematic diagram showing the morphological closing operation of the binary image of Fig. 4;
图8是本发明实施例提供的板卡的检测装置的结构示意图。FIG. 8 is a schematic structural diagram of a device for detecting a card provided by an embodiment of the present invention.
图9是图8的二值化单元的结构示意图。9 is a schematic structural view of the binarization unit of FIG. 8.
图10本发明优选实施例提供的板卡的检测装置的结构示意图。FIG. 10 is a schematic structural diagram of a detecting device for a card provided by a preferred embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供一种板卡的检测方法及装置,用于检测板卡(如PCB板卡),特别是板卡的焊锡面是否进入到位于传送带上的检测区域。以下分别进行详细的描述。The embodiment of the invention provides a method and a device for detecting a card, which are used for detecting a card (such as a PCB card), in particular, whether the solder surface of the card enters a detection area on the conveyor. The following is a detailed description.
请参阅图1,本发明实施例提供一种板卡的检测方法,所述板卡的检测方法可由板卡的检测装置来实施,其至少包括如下步骤:Referring to FIG. 1 , an embodiment of the present invention provides a method for detecting a card. The method for detecting the card may be implemented by a detecting device of the card, and at least includes the following steps:
S101,采集位于传送带上的检测区域的待测图像。S101. Acquire an image to be tested of a detection area located on a conveyor belt.
如图2所示,在本发明实施例中,所述传送带可沿一定的传送方向连续不断地输送板卡,所述板卡的检测装置采集输送中的板卡的图像,具体为,所述板卡的检测装置可包括摄像头,所述摄像头架设于传送带上方,并实时采集所述传送带上的检测区域的图像。其中,所述检测区域即为所述摄像头的图像采集视野。As shown in FIG. 2, in the embodiment of the present invention, the conveyor belt can continuously transport the card in a certain conveying direction, and the detecting device of the card collects an image of the card in the transportation, specifically, the The detection device of the card may include a camera that is mounted above the conveyor belt and acquires an image of the detection area on the conveyor belt in real time. The detection area is the image acquisition field of view of the camera.
在本发明实施例中,由于是为了检测所述板卡的焊锡面的表面性质,因而为了凸显焊锡面的三维信息,还需要对所述检测区域利用不同角度的三色光照明,此外,为了避免视差带来的影响,在检测中,所述摄像头还采用远心镜头进行拍摄。这两个因素会限制摄像头拍照 的视野大小,目前在焊锡面检测的摄像头的图像采集视野一般为250*320mm~510*460mm,其长和/或宽可能会小于所述板卡本身的尺寸,也就是说,往往需要通过局部拍摄板卡的方法进行拍摄及检测。In the embodiment of the present invention, in order to detect the surface property of the solder surface of the card, in order to highlight the three-dimensional information of the solder surface, it is necessary to illuminate the detection area with three-color light of different angles, and further, in order to avoid In the detection, the camera also uses a telecentric lens for shooting. These two factors will limit the camera to take pictures The field of view size, the image acquisition field of the camera currently detected on the solder surface is generally 250*320mm~510*460mm, and its length and/or width may be smaller than the size of the board itself, that is, it is often required to pass local Shoot the board and shoot it.
S102,将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度;其中,所述模板图像为板卡在所述检测区域内的面积与所述检测区域的面积的比为预定比值时的图像。S102: Match the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image, where the template image is an area of the card in the detection area. An image when the ratio of the area of the detection area is a predetermined ratio.
在本发明实施例中,所述模板图像为板卡在所述检测区域内的面积与所述检测区域的总面积的比为预定比值时的图像,其中,所述预定比值为预先定义好的确定所述板卡进入到所述检测区域的临界值。例如,当所述板卡的检测装置设定当所述板卡的面积与所述检测区域的面积的比值大于等于四分之一时,所述板卡就进入到所述检测区域,则所述模板图像即为所述板卡的面积与所述检测区域的面积的比值正好为四分之一时采集的图像。In the embodiment of the present invention, the template image is an image when a ratio of an area of the card in the detection area to a total area of the detection area is a predetermined ratio, wherein the predetermined ratio is a predefined value. A threshold value for the board to enter the detection area is determined. For example, when the detecting device of the card sets that the ratio of the area of the card to the area of the detection area is greater than or equal to one quarter, the card enters the detection area, and the The template image is an image acquired when the ratio of the area of the board to the area of the detection area is exactly one quarter.
当然,应该理解是在,在本发明实施例中,四分之一仅是一个参考的参数,其还可根据实际需要设置为1/6,1/8,1/2或其他数值,本发明不做具体限定。Of course, it should be understood that, in the embodiment of the present invention, one quarter is only a reference parameter, which may also be set to 1/6, 1/8, 1/2 or other values according to actual needs, and the present invention No specific restrictions.
此外,如图3(a)至图3(c)所示,还应该理解的是,所述模板图像还与所述板卡在传送带上的运动方向和初始放置位置有关,且所述板卡在所述检测区域内的部分应该是其先进入所述检测区域的部分。Furthermore, as shown in FIGS. 3(a) to 3(c), it should also be understood that the template image is also related to the direction of movement and initial placement of the card on the conveyor belt, and the card is The portion within the detection area should be the portion where it first enters the detection area.
在本发明实施例中,可通过如下方法来获得所述待测图像与所述模板图像的相似度,具体地:In the embodiment of the present invention, the similarity between the image to be tested and the template image may be obtained by:
设T(x,y)为模板图像,I(x,y)为待测图像,首先通过下式分别计算所述模板图像与所述待测图像减去其均值的图像:Let T(x, y) be the template image, I(x, y) be the image to be tested, first calculate the image of the template image and the image to be measured minus the mean value by the following formula:
T′(x′,y′)=T(x′,y′)-1/(w·h)·Σx″,y″T(x″,y″)T '(x', y ' ) = T (x', y ') - 1 / (w · h) · Σ x ", y" T (x ", y")
I′(x+x′,y+y′)=I(x+x′,y+y′)-1/(w·h)·Σx″,y″I(x+x″,y+y″)。I'(x+x',y+y')=I(x+x',y+y')-1/(w·h)·Σ x′′,y′′ I(x+x′′,y+ y").
其中,x和y为在对应图像上的点的坐标,w和h分别为图像的宽度和高度。Where x and y are the coordinates of the points on the corresponding image, and w and h are the width and height of the image, respectively.
然后再通过下式计算相似度:Then calculate the similarity by the following formula:
Figure PCTCN2016113235-appb-000001
Figure PCTCN2016113235-appb-000001
当然,应该理解的是,还可以通过其他算法来计算获得所述待测图像与所述模板图像的相似度,本发明不做具体限定。Of course, it should be understood that the similarity between the image to be tested and the template image can be calculated by other algorithms, which is not specifically limited by the present invention.
S103,当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像。S103. When the similarity is less than a preset threshold, binarize the image to be tested to obtain a binary image of the image to be tested.
在本发明实施例中,若相似度等于1,则说明此时板卡在所述检测区域内的面积与所述 检测区域的面积的比值正好为所述预设比值,也就是说相似度为1的时候,即为所述板卡第一次进入所述检测区域的时间点。当然,由于很难保证能够得到相似度为1的情况,从不那么严格的角度出发,所述相似度与1的差的绝对值小于预设的允许值(如0.01)时,都可以认为其是所述板卡第一次进入所述检测区域的时间点。In the embodiment of the present invention, if the similarity is equal to 1, the area of the board in the detection area at the time is described. The ratio of the area of the detection area is exactly the preset ratio, that is, when the similarity is 1, it is the time point when the board enters the detection area for the first time. Of course, since it is difficult to ensure that the similarity is 1 can be obtained, from a less strict point of view, when the absolute value of the difference between the similarity and 1 is less than a preset allowable value (for example, 0.01), it can be considered as It is the time point when the board enters the detection area for the first time.
然而,即使所述相似度小于或等于所述预设的阈值,也不能认为所述板卡还未进入到所述检测区域,例如,光照的细微变化或机械结构的误差都可能影响到相似度的计算结果。因此,当所述相似度小于预设的阈值时,所述板卡的检测装置还要计算所述待测图像的二值图像,以做进一步的判断。However, even if the similarity is less than or equal to the preset threshold, the board cannot be considered to have not entered the detection area, for example, slight changes in illumination or errors in mechanical structure may affect similarity. Calculation results. Therefore, when the similarity is less than a preset threshold, the detecting device of the card further calculates a binary image of the image to be tested for further judgment.
具体地,步骤S103可包括:Specifically, step S103 may include:
S1031,当所述相似度小于预设的阈值时,根据所述待测图像的每个像素点的RGB值计算获得所述待测图像的每个像素点的HSV值,其中,H为色调,S为饱和度,V为数值。S1031, when the similarity is less than a preset threshold, calculating an HSV value of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested, where H is a hue, S is the saturation and V is the value.
其中,可通过如下方法来计算获得所述待测图像的HSV值:Wherein, the HSV value of the image to be tested can be calculated by the following method:
将所述待测图像上的每个像素点的RGB值转换为HSV值,其转换公式如下式所示:。Converting the RGB value of each pixel on the image to be tested into an HSV value, and the conversion formula is as follows:
Figure PCTCN2016113235-appb-000002
Figure PCTCN2016113235-appb-000002
Figure PCTCN2016113235-appb-000003
Figure PCTCN2016113235-appb-000003
Figure PCTCN2016113235-appb-000004
Figure PCTCN2016113235-appb-000004
V=Cmax V=C max
如此,就获得了所述待测图像上的每个像素点的HSV值,其中,H为色调,S为饱和度,V为数值。Thus, the HSV value of each pixel on the image to be tested is obtained, where H is the hue, S is the saturation, and V is the value.
S1032,将所述待测图像的每个像素点的HSV值与预设的板卡底板颜色的HSV值进行比对,判断所述像素点是否与所述板卡底板颜色相匹配。S1032. Align the HSV value of each pixel of the image to be tested with the HSV value of the preset color of the board bottom layer, and determine whether the pixel point matches the color of the board bottom board.
在本发明实施例中,在制作板卡的标准版式的时候,可以得到板卡的焊锡面的底板的颜色,比如对于绿色板卡,底板颜色即为绿色,通过上述的转换公式可获得板卡底板颜色的HSV 值,所述板卡的检测装置可存储所述板卡底板颜色的HSV值。然后,所述板卡的检测装置将所述待测图像的每个像素点的HSV值与所述板卡底板颜色的HSV值进行比对,判断所述像素点是否与所述板卡底板颜色相匹配;若是,则在所述待测图像上将所述像素点的灰度值设置为1,若否,则在所述待测图像上将所述像素点的灰度值设置为0。需要说明的是,这里的灰度值为归一化后的灰度值,即灰度值为0代表全黑色,而灰度值为1代表全白色。In the embodiment of the present invention, when the standard layout of the board is made, the color of the bottom surface of the soldering surface of the board can be obtained. For example, for the green board, the color of the bottom board is green, and the board can be obtained by the above conversion formula. Base plate color HSV The value of the card detecting device can store the HSV value of the color of the board bottom plate. Then, the detecting device of the card compares the HSV value of each pixel of the image to be tested with the HSV value of the color of the board bottom plate, and determines whether the pixel point and the color of the board bottom layer Matching; if yes, setting the gray value of the pixel to 1 on the image to be tested, and if not, setting the gray value of the pixel to 0 on the image to be tested. It should be noted that the gray value here is a normalized gray value, that is, the gray value is 0 for all black, and the gray value is 1 for all white.
其中,匹配的过程为:当所述待测图像的一个像素点的H值与所述板卡底板颜色的H值的差小于预设的误差,所述待测图像的该像素点的S值与所述板卡底板颜色的S值的差小于预设的误差,所述待测图像的该像素点的V值与所述板卡底板颜色的V值的差小于预设的误差三个条件同时成立时,所述待测图像的该像素点与所述板卡底板颜色相匹配,若三个条件有至少一个不成立,则述待测图像的该像素点与所述板卡底板颜色不匹配。具体计算过程如下式所示:The matching process is: when the difference between the H value of one pixel of the image to be tested and the H value of the color of the board bottom is less than a preset error, the S value of the pixel of the image to be tested The difference between the S value and the color of the board bottom plate is less than a preset error, and the difference between the V value of the pixel of the image to be tested and the V value of the color of the board bottom plate is less than a preset error. At the same time, the pixel of the image to be tested matches the color of the board bottom plate. If at least one of the three conditions is not satisfied, the pixel of the image to be tested does not match the color of the board bottom board. . The specific calculation process is as follows:
Figure PCTCN2016113235-appb-000005
Figure PCTCN2016113235-appb-000005
其中Hbackground、Sbackground、Vbackground表示板卡底板颜色的HSV值,Htest(i,j)、Stest(i,j)、Vtest(i,j)为所述待测图像在(i,j)坐标处的HSV值,C为允许的误差。Where H background , S background , V background represent the HSV value of the color of the board base plate, H test (i, j), S test (i, j), V test (i, j) is the image to be tested (i , j) the HSV value at the coordinates, and C is the allowable error.
S1033,在完成所述待测图像的所有像素点的HSV值与预设的板卡底板颜色的HSV值的比对后,生成二值图像。S1033: After comparing the HSV value of all the pixel points of the image to be tested with the HSV value of the preset board bottom color, a binary image is generated.
其中,生成的二值图像可如图4所示。The generated binary image can be as shown in FIG. 4 .
S104,提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积。S104, extracting all contours on the binary image, calculating an area of the connected area surrounded by the outline, and obtaining an area of a minimum circumscribed rectangle of the connected area having the largest area.
具体的,在生成所述二值图像后,可获取所述二值图像上的轮廓,其中,轮廓的提取可根据现有的算法实现,例如,当判断灰度值为1的像素点的8个相邻像素点的灰度值全部为1,则该点为轮廓的内部点,反之为轮廓点。将所有内部点置为背景点,就完成了轮廓提取。Specifically, after generating the binary image, an outline on the binary image may be acquired, wherein the extraction of the contour may be implemented according to an existing algorithm, for example, when determining a pixel point with a gray value of 1 The gray values of adjacent pixels are all 1, and the point is the inner point of the contour, and vice versa. Contour extraction is done by setting all interior points to background points.
如图5所示,在提取出轮廓后,所述板卡的检测装置计算由所述轮廓围起来的连通区域的面积,并计算具有最大面积的连通区域的最小外接矩形的面积。As shown in FIG. 5, after the outline is extracted, the detecting means of the card calculates the area of the connected area surrounded by the outline, and calculates the area of the minimum circumscribed rectangle of the connected area having the largest area.
S105,当所述最小外接矩形的面积与所述二值图像的面积的比大于等于所述预定比例值时,确定所述板卡进入检测区域。S105. When the ratio of the area of the minimum circumscribed rectangle to the area of the binary image is greater than or equal to the predetermined ratio value, determine that the card enters the detection area.
在本发明实施例中,在获得所述最小外接矩形的面积后,所述板卡的检测装置判断所述外接矩形的面积与所述二值图像的面积的比是否大于所述预定比例值时,若是,则说明所述 板卡已经进入到检测区域里了,否则,则表明所述板卡还未进入到所述检测区域。In the embodiment of the present invention, after the area of the minimum circumscribed rectangle is obtained, the detecting device of the card determines whether the ratio of the area of the circumscribed rectangle to the area of the binary image is greater than the predetermined ratio If yes, then the description The board has entered the detection area, otherwise it indicates that the board has not entered the detection area.
综上所述,本发明实施例提供的板卡的检测方法,通过将所述待测图像进行二值化后,再根据二值图像上的具有最大面积的连通区域的最小外接矩形的面积与所述二值图像的面积的比来确定所述板卡是否进入到所述检测区域,从而在不需要高精度的机械运动结构的情况下,也能准确的判断所述板卡是否进入到检测区域内。In summary, the method for detecting a board provided by the embodiment of the present invention, after binarizing the image to be tested, according to the area of the minimum circumscribed rectangle of the connected area having the largest area on the binary image The ratio of the area of the binary image determines whether the card enters the detection area, so that it is possible to accurately determine whether the card enters the detection without requiring a high-precision mechanical motion structure. within the area.
为了便于对本发明的理解,下面对本发明的一些优选实施例做更进一步的描述。In order to facilitate an understanding of the present invention, some preferred embodiments of the present invention are further described below.
第一个优选实施例:First preferred embodiment:
由于机械结构本身具有偏移误差,因而会导致所述板卡在所述传送带上运动的时候,与实际的预想有偏差,从而摄像头拍摄到的检测图像与所述模板图像拍摄得到的板卡位置存在位置偏移。为了消除这种位置偏移带来的误差,本优选实施在步骤S102之前,还包括:Since the mechanical structure itself has an offset error, the card may be deviated from the actual expectation when the card is moved on the conveyor belt, so that the detected image captured by the camera and the card position obtained by the template image are captured. There is a position offset. In order to eliminate the error caused by the positional shift, the preferred implementation before step S102 further includes:
对所述待测图像的边界进行扩展,其中,扩展的部分用灰度值为0的像素点进行填充。The boundary of the image to be tested is expanded, wherein the expanded portion is filled with pixels having a gray value of 0.
具体地,如图6所示,图6为对图2进行扩展后的结果,通过这种扩展,消除了由于机械结构的位置偏移带来的误差,使得所述相似度的计算结果更准确。Specifically, as shown in FIG. 6, FIG. 6 is a result of expanding FIG. 2, by which the error due to the positional deviation of the mechanical structure is eliminated, so that the calculation result of the similarity is more accurate. .
第二个优选实施例:A second preferred embodiment:
如图5所示,在进行二值化的时候,会有很多噪声,这些噪声会影响轮廓的提取,因此,在提取轮廓前,需先消除这些噪声。As shown in Figure 5, when binarizing, there will be a lot of noise, which will affect the contour extraction. Therefore, before extracting the contour, you need to eliminate these noises.
为此,在本优选实施例中,在步骤S104之前,还包括:To this end, in the preferred embodiment, before step S104, the method further includes:
对所述二值图像进行形态学闭运算,以对所述二值图像进行形态学填充及噪声消除。A morphological closing operation is performed on the binary image to perform morphological filling and noise cancellation on the binary image.
如图7所示,图7为经过形态学闭运算后的二值图像,可见大部分的噪声均已被消除,从而保证了轮廓的准确提取。As shown in Fig. 7, Fig. 7 shows the binary image after the morphological closing operation, and it can be seen that most of the noise has been eliminated, thereby ensuring accurate extraction of the contour.
请参阅图8,本发明实施例还提供一种板卡的检测装置100,其包括:Referring to FIG. 8, an embodiment of the present invention further provides a card detecting apparatus 100, including:
采集单元10,用于采集位于传送带上的检测区域的待测图像。The collecting unit 10 is configured to collect an image to be tested of the detection area located on the conveyor belt.
相似度匹配单元20,用于将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度;其中,所述模板图像为板卡在所述检测区域内的面积与所述检测区域的面积的比为预定比值时的图像。a similarity matching unit 20, configured to match the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image; wherein the template image is a card in the An image when the ratio of the area in the detection area to the area of the detection area is a predetermined ratio.
二值化单元30,用于当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像。The binarization unit 30 is configured to perform binarization on the image to be tested when the similarity is less than a preset threshold to obtain a binary image of the image to be tested.
具体地,请一并参阅图9,所述二值化单元30具体包括HSV值计算模块31、匹配模块 32及二值图像生成模块33,其中:Specifically, please refer to FIG. 9 together, the binarization unit 30 specifically includes an HSV value calculation module 31 and a matching module. 32 and binary image generation module 33, wherein:
所述HSV值计算模块31,用于当所述相似度小于预设的阈值时,根据所述待测图像的每个像素点的RGB值计算获得所述待测图像的每个像素点的HSV值,其中,H为色调,S为饱和度,V为数值。The HSV value calculation module 31 is configured to: when the similarity is less than a preset threshold, calculate an HSV of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested. Value, where H is the hue, S is the saturation, and V is the value.
所述匹配模块32,用于将所述待测图像的每个像素点的HSV值与预设的板卡底板颜色的HSV值进行比对,判断所述像素点是否与所述板卡底板颜色相匹配;若是,则在所述待测图像上将所述像素点的灰度值设置为1,若否,则在所述待测图像上将所述像素点的灰度值设置为0。The matching module 32 is configured to compare an HSV value of each pixel of the image to be tested with a HSV value of a preset color of the board bottom layer, and determine whether the pixel point and the board bottom color Matching; if yes, setting the gray value of the pixel to 1 on the image to be tested, and if not, setting the gray value of the pixel to 0 on the image to be tested.
其中,当所述待测图像的一个像素点的H值与所述板卡底板颜色的H值的差小于预设的误差,所述待测图像的该像素点的S值与所述板卡底板颜色的S值的差小于预设的误差,所述待测图像的该像素点的V值与所述板卡底板颜色的V值的差小于预设的误差三个条件同时成立时,所述待测图像的该像素点与所述板卡底板颜色相匹配。Wherein, when the difference between the H value of one pixel of the image to be tested and the H value of the color of the board substrate is less than a preset error, the S value of the pixel of the image to be tested and the board The difference between the S values of the color of the bottom plate is smaller than a preset error, and the difference between the V value of the pixel of the image to be tested and the V value of the color of the bottom plate of the board is less than the preset error, and the three conditions are simultaneously established. The pixel of the image to be tested matches the color of the board backplane.
所述二值图像生成模块33,用于在完成所述待测图像的所有像素点的HSV值与预设的板卡底板颜色的HSV值的比对后,生成二值图像。The binary image generating module 33 is configured to generate a binary image after completing an alignment of the HSV value of all the pixel points of the image to be tested with the HSV value of the preset board bottom color.
轮廓提取单元40,用于提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积。The contour extracting unit 40 is configured to extract all the contours on the binary image, calculate the area of the connected region surrounded by the contour, and obtain the area of the minimum circumscribed rectangle of the connected region having the largest area.
比值计算单元50,用于当所述最小外接矩形的面积与所述二值图像的面积的比大于等于所述预定比例值时,确定所述板卡进入检测区域。The ratio calculating unit 50 is configured to determine that the card enters the detection area when a ratio of an area of the minimum circumscribed rectangle to an area of the binary image is greater than or equal to the predetermined ratio.
综上所述,本发明实施例提供的板卡的检测装置100,通过二值化单元30将所述待测图像进行二值化后,再根据轮廓提取单元40计算二值图像上的具有最大面积的连通区域的最小外接矩形的面积,由比值计算单元50计算所述最小外接矩形的面积与所述二值图像的面积的比来确定所述板卡是否进入到所述检测区域,从而在不需要高精度的机械运动结构的情况下,也能准确的判断所述板卡是否进入到检测区域内。In summary, the detecting device 100 for the card provided by the embodiment of the present invention binarizes the image to be tested by the binarization unit 30, and then calculates the maximum value on the binary image according to the contour extracting unit 40. Determining, by the ratio calculating unit 50, a ratio of an area of the minimum circumscribed rectangle to an area of the binary image to determine whether the card enters the detection area, thereby determining an area of the minimum circumscribed rectangle of the connected area of the area In the case where a high-precision mechanical motion structure is not required, it is also possible to accurately judge whether or not the board enters the detection area.
请一并参阅图9,优选地,板卡的检测装置100还包括:Referring to FIG. 9 together, preferably, the detecting device 100 of the card further comprises:
扩展单元60,用于对所述待测图像的边界进行扩展,其中,扩展的部分用灰度值为0的像素点进行填充。The expansion unit 60 is configured to expand a boundary of the image to be tested, wherein the extended portion is filled with pixels with a gray value of 0.
具体地,如图6所示,图6为对图2进行扩展后的结果,通过这种扩展,消除了由于机械结构的位置偏移带来的误差,使得所述相似度的计算结果更准确。Specifically, as shown in FIG. 6, FIG. 6 is a result of expanding FIG. 2, by which the error due to the positional deviation of the mechanical structure is eliminated, so that the calculation result of the similarity is more accurate. .
优选地,板卡的检测装置100还包括:Preferably, the detecting device 100 of the card further comprises:
形态学闭运算单元70,用于对所述二值图像进行形态学闭运算,以对所述二值图像进行形态学填充及噪声消除。 The morphological closing unit 70 is configured to perform a morphological closing operation on the binary image to perform morphological filling and noise elimination on the binary image.
如图7所示,图7为经过形态学闭运算后的二值图像,可见大部分的噪声均已被消除,从而保证了轮廓的准确提取。As shown in Fig. 7, Fig. 7 shows the binary image after the morphological closing operation, and it can be seen that most of the noise has been eliminated, thereby ensuring accurate extraction of the contour.
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。The above disclosure is only a preferred embodiment of the present invention, and of course, the scope of the present invention is not limited thereto, and those skilled in the art can understand all or part of the process of implementing the above embodiments, and according to the present invention. The equivalent changes required are still within the scope of the invention.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。 One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Claims (10)

  1. 一种板卡的检测方法,其特征在于,包括如下步骤:A method for detecting a card, comprising the steps of:
    采集位于传送带上的检测区域的待测图像;Acquiring an image to be tested of the detection area located on the conveyor belt;
    将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度;其中,所述模板图像为板卡在所述检测区域内的面积与所述检测区域的面积的比为预定比值时的图像;Matching the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image; wherein the template image is an area of the card in the detection area and the An image when the ratio of the area of the detection area is a predetermined ratio;
    当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像;When the similarity is less than a preset threshold, the image to be tested is binarized to obtain a binary image of the image to be tested;
    提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积;Extracting all contours on the binary image, calculating an area of the connected region surrounded by the contour, and obtaining an area of a minimum circumscribed rectangle of the connected region having the largest area;
    当所述最小外接矩形的面积与所述二值图像的面积的比大于等于所述预定比例值时,确定所述板卡进入检测区域。When the ratio of the area of the minimum circumscribed rectangle to the area of the binary image is greater than or equal to the predetermined ratio value, it is determined that the board enters the detection area.
  2. 根据权利要求1所述的板卡的检测方法,其特征在于,在将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度之前,还包括:The method for detecting a card according to claim 1, wherein before the image to be tested is matched with a preset template image to obtain a similarity between the image to be tested and the template image, include:
    对所述待测图像的边界进行扩展,其中,扩展的部分用灰度值为0的像素点进行填充。The boundary of the image to be tested is expanded, wherein the expanded portion is filled with pixels having a gray value of 0.
  3. 根据权利要求1所述的板卡的检测方法,其特征在于,所述当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像,具体包括:The method for detecting a card according to claim 1, wherein when the similarity is less than a preset threshold, the image to be tested is binarized to obtain the image to be tested. Value image, including:
    当所述相似度小于预设的阈值时,根据所述待测图像的每个像素点的RGB值计算获得所述待测图像的每个像素点的HSV值,其中,H为色调,S为饱和度,V为数值;When the similarity is less than a preset threshold, calculating an HSV value of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested, where H is a hue, and S is Saturation, V is a value;
    将所述待测图像的每个像素点的HSV值与预设的板卡底板颜色的HSV值进行比对,判断所述像素点是否与所述板卡底板颜色相匹配;若是,则在所述待测图像上将所述像素点的灰度值设置为1,若否,则在所述待测图像上将所述像素点的灰度值设置为0;其中,当所述待测图像的一个像素点的H值与所述板卡底板颜色的H值的差小于预设的误差,所述待测图像的该像素点的S值与所述板卡底板颜色的S值的差小于预设的误差,所述待测图像的该像素点的V值与所述板卡底板颜色的V值的差小于预设的误差三个条件同时成立时,所述待测图像的该像素点与所述板卡底板颜色相匹配;Comparing the HSV value of each pixel of the image to be tested with the HSV value of the preset color of the board bottom layer, and determining whether the pixel point matches the color of the board bottom board; if yes, Setting the gray value of the pixel to be 1 on the image to be tested, and if not, setting the gray value of the pixel to 0 on the image to be tested; wherein, when the image to be tested The difference between the H value of one pixel and the H value of the color of the board bottom is less than a preset error, and the difference between the S value of the pixel of the image to be tested and the S value of the color of the board bottom is less than a preset error, the difference between the V value of the pixel of the image to be tested and the V value of the color of the board substrate is less than a preset error, and the pixel of the image to be tested is simultaneously established. Matching the color of the board base plate;
    在完成所述待测图像的所有像素点的HSV值与预设的板卡底板颜色的HSV值的比对后,生成二值图像。 After the HSV value of all the pixels of the image to be tested is compared with the HSV value of the preset board bottom color, a binary image is generated.
  4. 根据权利要求1所述的板卡的检测方法,其特征在于,在提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积之前,还包括:The method for detecting a board according to claim 1, wherein all contours on said binary image are extracted, an area of a connected area surrounded by said outline is calculated, and a connected area having a largest area is obtained Before the area of the smallest circumscribed rectangle, it also includes:
    对所述二值图像进行形态学闭运算,以对所述二值图像进行形态学填充及噪声消除。A morphological closing operation is performed on the binary image to perform morphological filling and noise cancellation on the binary image.
  5. 根据权利要求1所述的板卡的检测方法,其特征在于,当所述相似度与1的差的绝对值小于预设的允许值时,则确定所述待测图像为所述板卡第一次进入所述检测区域的图像。The method for detecting a card according to claim 1, wherein when the absolute value of the difference between the similarity and 1 is less than a preset allowable value, determining that the image to be tested is the card number An image that enters the detection area once.
  6. 根据权利要求1至5任意一项所述的板卡的检测方法,其特征在于,所述预定比值为1/4。The method of detecting a card according to any one of claims 1 to 5, wherein the predetermined ratio is 1/4.
  7. 一种板卡的检测装置,其特征在于,包括:A device for detecting a card, comprising:
    采集单元,用于采集位于传送带上的检测区域的待测图像;An acquisition unit, configured to collect an image to be tested of a detection area located on the conveyor belt;
    相似度匹配单元,用于将所述待测图像与预置的模板图像进行匹配,获得所述待测图像与所述模板图像的相似度;其中,所述模板图像为板卡在所述检测区域内的面积与所述检测区域的面积的比为预定比值时的图像;a similarity matching unit, configured to match the image to be tested with a preset template image to obtain a similarity between the image to be tested and the template image; wherein the template image is a card in the detecting An image when the ratio of the area within the area to the area of the detection area is a predetermined ratio;
    二值化单元,用于当所述相似度小于预设的阈值时,对所述待测图像进行二值化,获得所述待测图像的二值图像;a binarization unit, configured to perform binarization on the image to be tested when the similarity is less than a preset threshold, to obtain a binary image of the image to be tested;
    轮廓提取单元,用于提取所述二值图像上的所有轮廓,计算由所述轮廓围起来的连通区域的面积,并获得具有最大面积的连通区域的最小外接矩形的面积;a contour extracting unit, configured to extract all contours on the binary image, calculate an area of the connected region surrounded by the contour, and obtain an area of a minimum circumscribed rectangle of the connected region having the largest area;
    比值计算单元,用于当所述最小外接矩形的面积与所述二值图像的面积的比大于等于所述预定比例值时,确定所述板卡进入检测区域。And a ratio calculating unit configured to determine that the card enters the detection area when a ratio of an area of the minimum circumscribed rectangle to an area of the binary image is greater than or equal to the predetermined ratio value.
  8. 根据权利要求7所述的板卡的检测装置,其特征在于,还包括:The device for detecting a card according to claim 7, further comprising:
    扩展单元,用于对所述待测图像的边界进行扩展,其中,扩展的部分用灰度值为0的像素点进行填充。And an expansion unit, configured to expand a boundary of the image to be tested, wherein the extended portion is filled with pixels with a gray value of 0.
  9. 根据权利要求7所述的板卡的检测装置,其特征在于,所述二值化单元具体包括:The device for detecting a card according to claim 7, wherein the binarization unit specifically comprises:
    HSV值计算模块,用于当所述相似度小于预设的阈值时,根据所述待测图像的每个像素点的RGB值计算获得所述待测图像的每个像素点的HSV值,其中,H为色调,S为饱和度,V为数值; And an HSV value calculation module, configured to: when the similarity is less than a preset threshold, calculate an HSV value of each pixel of the image to be tested according to an RGB value of each pixel of the image to be tested, where , H is the hue, S is the saturation, and V is the value;
    匹配模块,用于将所述待测图像的每个像素点的HSV值与预设的板卡底板颜色的HSV值进行比对,判断所述像素点是否与所述板卡底板颜色相匹配;若是,则在所述待测图像上将所述像素点的灰度值设置为1,若否,则在所述待测图像上将所述像素点的灰度值设置为0;其中,当所述待测图像的一个像素点的H值与所述板卡底板颜色的H值的差小于预设的误差,所述待测图像的该像素点的S值与所述板卡底板颜色的S值的差小于预设的误差,所述待测图像的该像素点的V值与所述板卡底板颜色的V值的差小于预设的误差三个条件同时成立时,所述待测图像的该像素点与所述板卡底板颜色相匹配;a matching module, configured to compare an HSV value of each pixel of the image to be tested with a preset HSV value of a board bottom color, and determine whether the pixel point matches a color of the board bottom layer; If yes, the gray value of the pixel is set to 1 on the image to be tested, and if not, the gray value of the pixel is set to 0 on the image to be tested; The difference between the H value of one pixel of the image to be tested and the H value of the color of the board substrate is less than a preset error, and the S value of the pixel of the image to be tested and the color of the board bottom layer The difference of the S value is smaller than the preset error, and the difference between the V value of the pixel of the image to be tested and the V value of the color of the board bottom layer is less than the preset error. The pixel of the image matches the color of the board backplane;
    二值图像生成模块,用于在完成所述待测图像的所有像素点的HSV值与预设的板卡底板颜色的HSV值的比对后,生成二值图像。The binary image generating module is configured to generate a binary image after the HSV value of all the pixels of the image to be tested is compared with the HSV value of the preset color of the board bottom color.
  10. 根据权利要求7所述的板卡的检测装置,其特征在于,还包括:The device for detecting a card according to claim 7, further comprising:
    形态学闭运算单元,用于对所述二值图像进行形态学闭运算,以对所述二值图像进行形态学填充及噪声消除。 The morphological closing unit is configured to perform a morphological closing operation on the binary image to perform morphological filling and noise elimination on the binary image.
PCT/CN2016/113235 2016-07-13 2016-12-29 Board inspection method and device WO2018010391A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610557006.8 2016-07-13
CN201610557006.8A CN106228546B (en) 2016-07-13 2016-07-13 A kind of detection method and device of board

Publications (1)

Publication Number Publication Date
WO2018010391A1 true WO2018010391A1 (en) 2018-01-18

Family

ID=57519807

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113235 WO2018010391A1 (en) 2016-07-13 2016-12-29 Board inspection method and device

Country Status (2)

Country Link
CN (1) CN106228546B (en)
WO (1) WO2018010391A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110276742A (en) * 2019-05-07 2019-09-24 平安科技(深圳)有限公司 Tail light for train monitoring method, device, terminal and storage medium
CN110473165A (en) * 2019-07-02 2019-11-19 深圳市格灵人工智能与机器人研究院有限公司 A kind of welding quality of circuit board detection method and device
CN110865911A (en) * 2019-10-23 2020-03-06 广州视源电子科技股份有限公司 Image testing method and device, storage medium, image acquisition card and upper computer
CN111879777A (en) * 2020-06-19 2020-11-03 巨轮(广州)智能装备有限公司 Soft material fitting defect detection method, device, equipment and storage medium
CN112634179A (en) * 2021-01-14 2021-04-09 北京四方继保工程技术有限公司 Transformer equipment image change detection method and system for preventing camera shake
CN113674259A (en) * 2021-08-26 2021-11-19 中冶赛迪重庆信息技术有限公司 Belt conveyor slip detection method and system, electronic equipment and medium
CN113822094A (en) * 2020-06-02 2021-12-21 苏州科瓴精密机械科技有限公司 Method, system, robot and storage medium for identifying working position based on image

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228546B (en) * 2016-07-13 2019-01-29 广州视源电子科技股份有限公司 A kind of detection method and device of board
CN106950487A (en) * 2017-03-02 2017-07-14 广州视源电子科技股份有限公司 A kind of board detection method and device
CN106981061A (en) * 2017-03-06 2017-07-25 深圳市恒茂科技有限公司 A kind of spot area detection method
CN108010026B (en) * 2017-12-26 2021-10-01 深圳供电局有限公司 Protection pressing plate state identification method and device
CN108171691B (en) * 2017-12-26 2021-05-04 成都睿视智能设备有限责任公司 Detection method of plastic container
CN109242874B (en) * 2018-09-26 2022-02-15 广东工业大学 Method and system for quickly identifying logistics packages of quasi-woven bags
CN110220882B (en) * 2019-05-30 2022-05-17 深圳前海达闼云端智能科技有限公司 Sample detection method, sample detection device, sample calculation device, and computer storage medium
CN112465047B (en) * 2020-12-04 2022-10-25 宁波智能装备研究院有限公司 Industrial image visual identification method based on prior model
CN113552118A (en) * 2021-07-15 2021-10-26 海口市骨科与糖尿病医院(上海市第六人民医院海口骨科与糖尿病医院) Detection method for indicating card in surgical instrument package

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060204074A1 (en) * 2005-02-21 2006-09-14 Omron Corporation PC board inspecting method and apparatus and inspection logic setting method and apparatus
CN103150730A (en) * 2013-03-07 2013-06-12 南京航空航天大学 Round small target accurate detection method based on image
CN105139386A (en) * 2015-08-12 2015-12-09 南京航空航天大学 Image processing method for quickly and automatically detecting soldered dot unsatisfied products of electric connectors
CN105303189A (en) * 2014-07-29 2016-02-03 阿里巴巴集团控股有限公司 Method and device for detecting specific identification image in predetermined area
CN105352437A (en) * 2015-10-21 2016-02-24 广州视源电子科技股份有限公司 Board card position detection method and device
CN106228546A (en) * 2016-07-13 2016-12-14 广州视源电子科技股份有限公司 The detection method of a kind of board and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006038582A (en) * 2004-07-26 2006-02-09 Dainippon Screen Mfg Co Ltd Detection of flaw due to regional division of image
CN102938077A (en) * 2012-10-25 2013-02-20 渭南师范学院 Online AOI (Automatic Optical Inspection) image retrieval method based on double-threshold binaryzation
CN105092598B (en) * 2015-09-28 2018-02-06 深圳大学 A kind of large format pcb board defect method for quickly identifying and system based on connected domain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060204074A1 (en) * 2005-02-21 2006-09-14 Omron Corporation PC board inspecting method and apparatus and inspection logic setting method and apparatus
CN103150730A (en) * 2013-03-07 2013-06-12 南京航空航天大学 Round small target accurate detection method based on image
CN105303189A (en) * 2014-07-29 2016-02-03 阿里巴巴集团控股有限公司 Method and device for detecting specific identification image in predetermined area
CN105139386A (en) * 2015-08-12 2015-12-09 南京航空航天大学 Image processing method for quickly and automatically detecting soldered dot unsatisfied products of electric connectors
CN105352437A (en) * 2015-10-21 2016-02-24 广州视源电子科技股份有限公司 Board card position detection method and device
CN106228546A (en) * 2016-07-13 2016-12-14 广州视源电子科技股份有限公司 The detection method of a kind of board and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110276742A (en) * 2019-05-07 2019-09-24 平安科技(深圳)有限公司 Tail light for train monitoring method, device, terminal and storage medium
CN110276742B (en) * 2019-05-07 2023-10-10 平安科技(深圳)有限公司 Train tail lamp monitoring method, device, terminal and storage medium
CN110473165A (en) * 2019-07-02 2019-11-19 深圳市格灵人工智能与机器人研究院有限公司 A kind of welding quality of circuit board detection method and device
CN110865911A (en) * 2019-10-23 2020-03-06 广州视源电子科技股份有限公司 Image testing method and device, storage medium, image acquisition card and upper computer
CN110865911B (en) * 2019-10-23 2024-03-05 广州视源电子科技股份有限公司 Image testing method, device, storage medium, image acquisition card and upper computer
CN113822094A (en) * 2020-06-02 2021-12-21 苏州科瓴精密机械科技有限公司 Method, system, robot and storage medium for identifying working position based on image
CN113822094B (en) * 2020-06-02 2024-01-16 苏州科瓴精密机械科技有限公司 Method, system, robot and storage medium for identifying working position based on image
CN111879777A (en) * 2020-06-19 2020-11-03 巨轮(广州)智能装备有限公司 Soft material fitting defect detection method, device, equipment and storage medium
CN112634179A (en) * 2021-01-14 2021-04-09 北京四方继保工程技术有限公司 Transformer equipment image change detection method and system for preventing camera shake
CN112634179B (en) * 2021-01-14 2024-03-15 北京四方继保工程技术有限公司 Camera shake prevention power transformation equipment image change detection method and system
CN113674259A (en) * 2021-08-26 2021-11-19 中冶赛迪重庆信息技术有限公司 Belt conveyor slip detection method and system, electronic equipment and medium
CN113674259B (en) * 2021-08-26 2024-03-05 中冶赛迪信息技术(重庆)有限公司 Belt conveyor slip detection method, system, electronic equipment and medium

Also Published As

Publication number Publication date
CN106228546A (en) 2016-12-14
CN106228546B (en) 2019-01-29

Similar Documents

Publication Publication Date Title
WO2018010391A1 (en) Board inspection method and device
TWI787296B (en) Optical inspection method, optical inspection device and optical inspection system
WO2018068415A1 (en) Detection method and system for wrong part
WO2017181724A1 (en) Inspection method and system for missing electronic component
CN108520514B (en) Consistency detection method for electronic elements of printed circuit board based on computer vision
JP2018036241A (en) Inspection method, inspection device, inspection program and recording medium
BR112020022645A2 (en) system and method for detecting defects in imaged items
WO2018068417A1 (en) Component defect detection method and system
WO2017071406A1 (en) Method and system for detecting pin of gold needle element
TWI765442B (en) Method for defect level determination and computer readable storage medium thereof
TW201741649A (en) Defect detection method and defect detection system easily and reliably detecting a defect of an object to be inspected with a simple structure
JP2018096908A (en) Inspection device and inspection method
WO2017107529A1 (en) Positioning method and device for diodes arranged side by side
WO2017050088A1 (en) Method and device for locating electronic component
WO2021046726A1 (en) Method and device for detecting mechanical equipment parts
JP6197340B2 (en) Image processing apparatus, image processing method, and program
CN108346592B (en) Method and device for simulating defects on back of wafer
CN110288040A (en) A kind of similar evaluation method of image based on validating topology and equipment
WO2018068414A1 (en) Detection method and device for resistor having color bands, and automated optical inspection system
CN108898584B (en) Image analysis-based full-automatic veneered capacitor welding polarity discrimination method
KR20190119801A (en) Vehicle Headlight Alignment Calibration and Classification, Inspection of Vehicle Headlight Defects
KR101383827B1 (en) System and method for automatic extraction of soldering regions in pcb
TWI634308B (en) 2d solder paste printing inspection method
CN114187294B (en) Regular wafer positioning method based on prior information
JP2000321038A (en) Method for detecting fault of pattern

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: 16908713

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: 16908713

Country of ref document: EP

Kind code of ref document: A1