WO2017032308A1 - Pcb board detection method and apparatus - Google Patents
Pcb board detection method and apparatus Download PDFInfo
- Publication number
- WO2017032308A1 WO2017032308A1 PCT/CN2016/096546 CN2016096546W WO2017032308A1 WO 2017032308 A1 WO2017032308 A1 WO 2017032308A1 CN 2016096546 W CN2016096546 W CN 2016096546W WO 2017032308 A1 WO2017032308 A1 WO 2017032308A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- threshold
- pcb board
- edge image
- zero pixels
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30141—Printed circuit board [PCB]
Definitions
- the invention relates to the field of automatic optical inspection of PCBs, in particular to a device for detecting PCB boards.
- AOI Automatic Optical Inspection
- the technology mainly includes four steps: image acquisition, image processing, feature extraction and decision-making.
- image processing it is often necessary to perform preliminary analysis on the collected original image to determine whether the original image contains complete PCB boards, which play a vital role in improving the efficiency and quality of PCB inspection.
- the existing image processing schemes often have problems such as low robustness, slow calculation speed, and complicated operation, which cannot meet the requirements for use.
- an object of the present invention is to provide a PCB board detecting method and device, which realizes fast and accurate PCB board testing and satisfies the use requirements.
- Embodiments of the present invention provide a PCB board detecting method, including the following steps:
- the image is processed by using a Canny operator to obtain an edge image, wherein the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are adaptively generated according to pixel information of the image;
- the method further includes:
- the size of the image is normalized.
- the image is processed by using a Canny operator to obtain an edge image, wherein the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are according to the
- the pixel information of the image is adaptively generated, and specifically includes:
- the high threshold takes the smaller of I max and (1 + ⁇ ) * m; the low threshold takes I min and (1 - ⁇ ) * m The larger of them, ⁇ is an empirical parameter;
- the image is processed using the high threshold and the low threshold as threshold parameters of the Canny operator to obtain an edge image.
- the empirical parameter ⁇ takes a value of 0.33.
- the counting the number of non-zero pixels in the edge image includes:
- the pixels in the edge image are traversed, the pixels whose pixel values are not zero are marked as non-zero pixels, and the number of non-zero pixels is counted.
- the detecting the extent to which the PCB board enters the designated area according to the relationship between the number of the non-zero pixels and the at least one preset threshold is:
- the designated area includes a boundary area, wherein the boundary area is a point in the specified area that a minimum distance to two sides perpendicular to a traveling direction of the conveyor belt is less than or equal to a predetermined length The area formed;
- the detecting the extent to which the PCB board enters the designated area according to the relationship between the number of the non-zero pixels and the at least one preset threshold is:
- the designated area further includes an inner area, the inner area being an area other than the boundary area in the designated area;
- the detecting the extent to which the PCB board enters the designated area according to the relationship between the number of the non-zero pixels and the at least one preset threshold is:
- the invention also provides a PCB board detecting device, comprising:
- An acquisition unit for collecting an image of a designated area on a conveying surface of the conveyor belt
- An image processing unit configured to process the image by using a Canny operator to obtain an edge image, wherein the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are according to the image Pixel information adaptive generation;
- a statistical unit configured to count the number of non-zero pixels in the edge image
- a detecting unit configured to detect, according to a magnitude relationship between the number of the non-zero pixels and the at least one preset threshold, the extent to which the PCB board enters the designated area.
- the PCB board detecting device further includes:
- a normalization unit for normalizing the size of the image is
- the image processing unit specifically includes:
- a pixel acquisition unit configured to acquire a pixel value range of the image, where the pixel value range is [I min , I max ];
- a calculating unit configured to calculate a pixel median value m of the image, wherein the pixel median value m is a pixel value in which the serial number is in the middle after the respective pixel values of the image are sorted by size;
- a threshold generating unit configured to generate the high threshold and a low threshold, wherein the high threshold takes a smaller one of I max and (1+ ⁇ )*m; the low threshold takes I min and (1) The larger of - ⁇ )*m, ⁇ is an empirical parameter;
- a processing unit configured to process the image by using the high threshold and the low threshold as a threshold parameter of the Canny operator to obtain an edge image.
- the designated area includes a boundary area, wherein the boundary area is a point in the specified area that a minimum distance to two sides perpendicular to a traveling direction of the conveyor belt is less than or equal to a predetermined length The area formed;
- the statistic unit is specifically configured to: count the number of non-zero pixels in the edge image corresponding to the boundary area;
- the detecting unit is configured to determine that the PCB board portion enters the designated area when determining that the number of non-zero pixels in the edge image corresponding to the boundary area is greater than a preset second threshold.
- the designated area further includes an inner area, wherein the inner area is an area other than the boundary area in the designated area;
- the statistic unit is specifically configured to separately count the number of non-zero pixels of the edge image corresponding to the inner region and the edge image corresponding to the boundary region;
- the detecting unit is configured to: determine that the number of non-zero pixels in the edge image corresponding to the inner region is greater than a preset third threshold, and the non-zero pixels in the edge image corresponding to the boundary region When the number is less than the preset fourth threshold, it is determined that the PCB board completely enters the designated area.
- the method and device for detecting a PCB board use an adaptive Canny operator to analyze an image of a specified area on a transmission surface of a conveyor belt, and detect the extent to which the PCB board enters a designated area, and determine that the PCB board completely enters.
- the image of the designated area thereby filtering out unnecessary invalid images for subsequent processing, improving the speed and accuracy of PCB detection. Since the edge detection parameter of the adaptive Canny operator is adaptively generated according to the pixel information of the image, no manual basis is needed.
- the body condition adjustment parameters are highly robust and achieve a high degree of automation of PCB inspection.
- FIG. 1 is a schematic flow chart of a PCB board detecting method according to a first embodiment of the present invention.
- FIG. 2 is a schematic view of a portion of a PCB board provided in a first embodiment of the present invention entering a designated area.
- FIG. 3 is a schematic diagram of the PCB board provided in the first embodiment of the present invention completely entering a designated area.
- FIG. 4 is a schematic diagram of a PCB board according to a first embodiment of the present invention that has not entered or has left a designated area.
- FIG. 5 is a schematic flow chart of a PCB board detecting method according to a second embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a PCB board detecting apparatus according to a third embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of the image processing unit shown in FIG. 6.
- FIG. 8 is a schematic structural diagram of a PCB board detecting apparatus according to a fourth embodiment of the present invention.
- Embodiments of the present invention provide a PCB board detecting method and apparatus for detecting the extent to which a PCB board enters an image acquisition field of view, and improving the efficiency and quality of automatic optical inspection of the PCB. A detailed description will be given below.
- a first embodiment of the present invention provides a PCB board detecting method.
- the PCB board detecting method is implemented by a PCB board detecting device, and includes at least the following steps:
- the conveyor belt can continuously transport the PCB board along a certain transmission direction
- the PCB board detecting device collects the image of the PCB board in the transportation.
- the PCB board detecting device includes a camera.
- the camera is mounted above the conveyor belt and acquires an image of a designated area on the conveying surface in real time, wherein the image may be a color image or a black and white image. Since the PCB board is constantly moving relative to the camera, a PCB board portion may enter the designated area in the image of the designated area collected by the camera, and the PCB board completely enters the designated area. Or, the PCB board does not enter or has left the designated area and the like.
- the image is processed by using a Canny operator to obtain an edge image, where the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are adaptive according to pixel information of the image. generate.
- the Canny operator is generally used for detecting edge of an image.
- the high threshold and the low threshold of the traditional Canny operator are preset, and cannot be customized according to the current situation of the image. Adapt to the adjustment.
- the PCB board detecting apparatus adopts an adaptive edge detection strategy, and automatically generates appropriate high thresholds and low thresholds according to pixel information of the image, thereby providing a preferred threshold for the Canny operator.
- Parameter specifically,
- the PCB board detecting device acquires a gray value of each pixel of the image, and reads a maximum value I max and a minimum value I min from the gray values.
- the pixel value range is labeled as [I min , I max ].
- a pixel median value m of the image is calculated, wherein the pixel median value m is a pixel value in which the serial number is in the middle after the respective pixel values of the image are sorted by size.
- the high threshold t high and the low threshold t low are generated, wherein the high threshold t high takes the smaller of I max and (1+ ⁇ )*m, and the low threshold t low takes I The larger of min and (1- ⁇ )*m.
- the high threshold t high takes the smaller of I max and (1+ ⁇ )*m
- the low threshold t low takes I min and (1- ⁇ )*m
- t high min(I max ,(1+ ⁇ )*m)
- t low max(I min ,(1- ⁇ )*m)
- ⁇ is an empirical parameter.
- the empirical parameter ⁇ takes a value of 0.33. It is to be understood that the empirical parameter ⁇ may also have a value of 0.2, 0.3, 0.4 or any other suitable value, which may be set according to actual needs, and is not specifically limited in the present invention.
- the image is processed using the high threshold and the low threshold as threshold parameters of the Canny operator to obtain an edge image.
- the PCB board detecting apparatus processes the image by using the high threshold and the low threshold as threshold parameters of the Canny operator to obtain an edge image.
- the process of processing the edge image by the canny operator can refer to the calculation principle of the Canny operator, and the present invention is not described herein.
- the PCB board detecting device traverses all the pixels in the edge image, and marks the pixels whose pixel values are not zero as non-zero pixels, and counts the number of the non-zero pixels.
- the relationship between the PCB board and the designated area may include not entering or leaving, partially entering, and fully entering.
- the following embodiments of the present invention will be described one by one.
- the PCB board detecting device counts the number of non-zero pixels in the edge image corresponding to the designated area 10, and respectively compares the number of non-zero pixels in the edge image with The first threshold is compared, and when the number of non-zero pixels in the edge image is less than the first threshold, it is determined that the PCB board 20 has not entered or has left the designated area 10, wherein Narrative A threshold can be zero, or a value close to zero.
- the designated area 10 includes a boundary area 11, wherein the boundary area 11 is within the designated area 10.
- the PCB board detecting device counts the number of non-zero pixels in the edge image corresponding to the boundary region 11
- the number of non-zero pixels in the edge image corresponding to the boundary region 11 is preset with The two thresholds are compared. When the number of non-zero pixels in the edge image corresponding to the boundary region 11 is greater than the second threshold, it is determined that the PCB board 20 partially enters the designated area 10.
- the designated area 10 may further include an inner area 12, wherein the inner area 12 is an area other than the boundary area 11 in the designated area 10.
- the PCB board detecting device separately counts the number of non-zero pixels in the edge image corresponding to the inner region 12 and the edge image corresponding to the boundary region 11, and respectively respectively outputs the edge image corresponding to the inner region 12
- the number of non-zero pixels in the comparison is compared with a preset third threshold, and the number of non-zero pixels in the edge image corresponding to the boundary region 11 is compared with a preset fourth threshold.
- the method for detecting a PCB board uses an adaptive Canny operator to analyze an image of a specified area on a transmission surface of the conveyor belt, and detects the extent to which the PCB board enters the designated area, and determines that the PCB board completely enters the Specify an image of the area to filter out unnecessary invalid images for subsequent processing, improving the speed and accuracy of PCB inspection. Since the edge detection parameter of the adaptive Canny operator is adaptively generated according to the pixel information of the image, it is not necessary to manually adjust parameters according to specific conditions, and has strong robustness, and achieves high automation of PCB detection.
- FIG. 5 is a schematic flowchart diagram of a PCB detecting method according to a second embodiment of the present invention.
- the PCB board detection method includes:
- the PCB board detecting device may first downsample the image and reduce the image resolution to a predetermined size, wherein the predetermined size may be to keep the height pixel value of the image unchanged. , reducing the width pixel value to a preset threshold, or maintaining the width pixel value of the image unchanged, reducing the height pixel value to a preset threshold, or simultaneously reducing the width and height pixel values of the image to a preset threshold, which may be The actual needs are set, and the present invention is not specifically limited.
- the image is processed by using a Canny operator to obtain an edge image, where the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are adaptive according to pixel information of the image. generate.
- the PCB board detecting method provided by the embodiment of the invention reduces the image normalized processing by downsampling the collected image, thereby improving the detection efficiency.
- FIG. 6 is a schematic structural diagram of a PCB board detecting apparatus according to a third embodiment of the present invention.
- the PCB board detecting device 300 includes an acquiring unit 310, an image processing unit 320, a statistic unit 330, and a detecting unit 340, wherein:
- the collecting unit 310 is configured to collect an image of a designated area on a conveying surface of the conveyor belt.
- the image processing unit 320 is configured to process the image by using a Canny operator to obtain an edge image, where the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are according to the The pixel information of the image is adaptively generated.
- the image processing unit 320 includes:
- the pixel obtaining unit 321 is configured to acquire a pixel value range of the image, where the pixel value ranges from [I min , I max ].
- the calculating unit 322 is configured to calculate a pixel median value m of the image, wherein the pixel median value m is a pixel value in which the serial number is in the middle after the respective pixel values of the image are sorted by size.
- the threshold generating unit 323 is configured to generate the high threshold and the low threshold, wherein the high threshold takes a smaller one of I max and (1+ ⁇ )*m; the low threshold takes I min and ( The larger of the two 1- ⁇ )*m, ⁇ is the empirical parameter.
- the processing unit 324 is configured to process the image by using the high threshold and the low threshold as a threshold parameter of the Canny operator to obtain an edge image, where the edge image includes a first edge image and a second edge image
- the high threshold is applied to the image to obtain the first edge image
- the low threshold is applied to the image to obtain the second edge image.
- the statistic unit 330 is configured to count the number of non-zero pixels in the edge image.
- the detecting unit 340 is configured to detect, according to the size relationship between the number of the non-zero pixels and the at least one preset threshold, the extent to which the PCB board enters the designated area.
- the relationship between the PCB board and the designated area may include not entering or leaving, partially entering, and fully entering, and the following description will be made one by one in the embodiment of the present invention.
- the detecting unit 340 selects the non-zero pixels in the edge image corresponding to the designated area 10. The number of zero pixels is compared with a preset first threshold. When the number of non-zero pixels in the edge image corresponding to the designated area 10 is less than the first threshold, the detecting unit 340 determines the The PCB board 20 has not entered or has left the designated area 10, wherein the first threshold may be zero, or a value close to zero.
- the designated area 10 includes a boundary area 11 , wherein the boundary area 11 is composed of points in the designated area 10 that have a minimum distance to two sides perpendicular to the traveling direction of the conveyor belt that is less than or equal to a predetermined length.
- the area may set the preset length to one tenth or one-twentieth of the width of the designated area, and the like.
- the designated area 10 may further include an inner area 12, wherein the inner area 12 is an area other than the boundary area 11 in the designated area 10.
- the statistic unit 330 separately counts the edge image corresponding to the inner region 12 and the number of non-zero pixels of the edge image corresponding to the boundary region 11, the detecting unit 340 respectively respectively the edge corresponding to the inner region 12
- the number of non-zero pixels in the image is compared with a preset third threshold, and the number of non-zero pixels in the edge image corresponding to the boundary region 11 is compared with a preset fourth threshold.
- the detecting unit 340 determines that the PCB board 20 completely enters the designated area 10.
- the PCB board detecting apparatus 300 processes the image collected by the collecting unit 310 by the image processing unit 320 to obtain an edge image, and then uses the statistical unit 330 to count the image processing unit 320.
- the number of non-zero pixels of the edge image is detected by the detecting unit 340 to the extent that the PCB board enters the image capturing field of view, and the image of the PCB board completely enters the image capturing field of view is determined, thereby filtering unnecessary portions for subsequent processing. Invalid images improve the speed and accuracy of PCB inspection. Since the edge detection parameter of the adaptive Canny operator adopted by the image processing unit 320 is adaptively generated according to the pixel information of the image, it is not necessary to manually adjust parameters according to specific conditions, and has strong robustness and realizes PCB. The detection is highly automated.
- FIG. 8 is a schematic structural diagram of a PCB board detecting apparatus according to a fourth embodiment of the present invention.
- the PCB board detecting apparatus 400 includes an acquiring unit 410, a normalization unit 420, an image processing unit 430, a statistics unit 440, and a detecting unit 450, wherein:
- the collecting unit 410 is configured to collect an image of a designated area on a conveying surface of the conveyor belt.
- the normalization unit 420 is configured to normalize the size of the image.
- the normalization unit 420 may first downsample the image of the collection unit 410 and reduce the image resolution to a predetermined size, wherein the predetermined size may be the height of the image.
- the pixel value is unchanged, the width pixel value is lowered to a preset threshold, or the width pixel value of the image is kept unchanged, the height pixel value is lowered to a preset threshold, or the image width and height pixel values are simultaneously lowered to a preset threshold.
- the image processing unit 430 is configured to process the image by using a Canny operator to obtain an edge image, where the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are according to the The pixel information of the image is adaptively generated.
- the statistics unit 440 is configured to count the number of non-zero pixels in the edge image.
- the detecting unit 450 is configured to detect, according to the relationship between the number of the non-zero pixels and the at least one preset threshold, the extent to which the PCB board enters the designated area.
- the PCB board detecting apparatus 400 provided by the embodiment of the present invention performs down-sampling on the image collected by the collecting unit 410 by the normalization unit 420, thereby realizing normalization processing of the image, and improving the detection efficiency.
- first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
- features defining “first” or “second” may include at least one of the features, either explicitly or implicitly.
- the meaning of "a plurality” is at least two, such as two, three, etc., unless specifically defined otherwise.
- a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport the software for use by the instruction execution system, apparatus, or apparatus, or in conjunction with the instruction execution system, apparatus, or apparatus.
- computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
- the computer readable medium may even be a paper or other suitable medium on which the software may be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method proceeds to obtain the software electronically and then store it in computer memory.
- a plurality of steps or methods may be stored in a memory and understood by appropriate instructions, and portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
- the software or firmware executed by the system is implemented.
- a discrete logic circuit having logic gates for implementing logic functions on data signals, dedicated to suitable combinational logic gates Integrated circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
- each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
- the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
- the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Quality & Reliability (AREA)
Abstract
Description
Claims (13)
- 一种PCB板检测方法,其特征在于,包括如下步骤:A method for detecting a PCB board, comprising the steps of:采集传送带的传送面上指定区域的图像;Acquiring an image of a designated area on the conveying surface of the conveyor belt;利用Canny算子对所述图像进行处理得到边缘图像,其中,所述Canny算子包括高阈值和低阈值两个参数,且所述高阈值和低阈值根据所述图像的像素信息自适应生成;The image is processed by using a Canny operator to obtain an edge image, wherein the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are adaptively generated according to pixel information of the image;统计所述边缘图像内的非零像素的个数;Counting the number of non-zero pixels in the edge image;根据所述非零像素的个数与至少一个预设的阈值的大小关系,检测所述PCB板进入所述指定区域的程度。And detecting, by the relationship between the number of the non-zero pixels and the at least one preset threshold, the extent to which the PCB board enters the designated area.
- 根据权利要求1所述的PCB板检测方法,其特征在于,在所述采集传送带的传送面上指定区域的图像之后,在所述利用Canny算子对所述图像进行处理得到边缘图像之前,还包括:The PCB board detecting method according to claim 1, wherein after the image of the area is specified on the conveying surface of the collecting conveyor, before the image is processed by the Canny operator to obtain an edge image, include:对所述图像的尺寸进行归一化处理。The size of the image is normalized.
- 根据权利要求1所述的PCB板检测方法,其特征在于,所述利用Canny算子对所述图像进行处理得到边缘图像,其中,所述Canny算子包括高阈值和低阈值两个参数,且所述高阈值和低阈值根据所述图像的像素信息自适应生成,具体包括:The PCB board detecting method according to claim 1, wherein the image is processed by using a Canny operator to obtain an edge image, wherein the Canny operator includes two parameters of a high threshold and a low threshold, and The high threshold and the low threshold are adaptively generated according to the pixel information of the image, and specifically include:获取所述图像的像素取值范围,其中,所述像素取值范围为[Imin,Imax];Obtaining a pixel value range of the image, wherein the pixel takes a value range of [I min , I max ];计算所述图像的像素中值m,其中,所述像素中值m为将所述图像的各个像素值按大小进行排序后,序号位于中间的像素值;Calculating a pixel median value m of the image, wherein the pixel median value m is a pixel value in which the serial number is in the middle after the pixel values of the image are sorted by size;生成所述高阈值和低阈值,其中,所述高阈值取Imax和(1+σ)*m二者中的较小者;所述低阈值取Imin和(1-σ)*m二者中的较大者,σ为经验参数;Generating the high threshold and the low threshold, wherein the high threshold takes the smaller of I max and (1 + σ) * m; the low threshold takes I min and (1 - σ) * m The larger of them, σ is an empirical parameter;利用所述高阈值和低阈值作为所述Canny算子的阈值参数对所述图像进行处理,得到边缘图像。 The image is processed using the high threshold and the low threshold as threshold parameters of the Canny operator to obtain an edge image.
- 根据权利要求3所述的PCB板检测方法,其特征在于,所述经验参数σ取值为0.33。The PCB board detecting method according to claim 3, wherein the empirical parameter σ has a value of 0.33.
- 根据权利要求1所述的PCB板检测方法,其特征在于,所述统计所述边缘图像内的非零像素的个数,具体包括:The method for detecting a PCB according to claim 1, wherein the counting the number of non-zero pixels in the edge image comprises:遍历所述边缘图像内的所有像素,将像素值不为零的像素标记为非零像素,并统计获取非零像素的个数。The pixels in the edge image are traversed, the pixels whose pixel values are not zero are marked as non-zero pixels, and the number of non-zero pixels is counted.
- 根据权利要求1所述的PCB板检测方法,其特征在于,所述根据所述非零像素的个数与至少一个预设的阈值的大小关系,检测所述PCB板进入所述指定区域的程度,为:The PCB board detecting method according to claim 1, wherein the detecting the extent to which the PCB board enters the designated area according to the magnitude relationship of the number of the non-zero pixels and the at least one preset threshold ,for:当判断所述边缘图像内的非零像素的个数少于第一阈值时,确定所述PCB板位于所述指定区域外。When it is determined that the number of non-zero pixels in the edge image is less than the first threshold, it is determined that the PCB board is located outside the designated area.
- 根据权利要求1所述的PCB板检测方法,其特征在于,所述指定区域包括边界区域,其中,所述边界区域为所述指定区域内的到与传送带前进方向垂直的两条边的最小距离小于或者等于一预设的长度的点所组成的区域;The PCB board detecting method according to claim 1, wherein the designated area includes a boundary area, wherein the boundary area is a minimum distance to two sides perpendicular to a traveling direction of the conveyor belt in the designated area An area consisting of points that are less than or equal to a predetermined length;则所述统计所述边缘图像内的非零像素的个数,为:Then counting the number of non-zero pixels in the edge image is:统计所述边界区域对应的边缘图像内的非零像素的个数;Counting the number of non-zero pixels in the edge image corresponding to the boundary region;所述根据所述非零像素的个数与至少一个预设的阈值的大小关系,检测所述PCB板进入所述指定区域的程度,为:The detecting the extent to which the PCB board enters the designated area according to the relationship between the number of the non-zero pixels and the at least one preset threshold is:当判断所述边界区域对应的边缘图像内的非零像素的个数大于预设的第二阈值时,确定所述PCB板部分进入所述指定区域。When it is determined that the number of non-zero pixels in the edge image corresponding to the boundary region is greater than a preset second threshold, determining that the PCB board portion enters the designated region.
- 根据权利要求7所述的PCB板检测方法,其特征在于,所述指定区域还包括内部区域,所述内部区域为所述指定区域内除所述边界区域之外的区域;The PCB board detecting method according to claim 7, wherein the designated area further includes an inner area, wherein the inner area is an area other than the boundary area in the designated area;则所述统计所述边缘图像内的非零像素的个数,为: Then counting the number of non-zero pixels in the edge image is:分别统计所述边界区域对应的边缘图像内的非零像素的个数和所述内部区域对应的边缘图像内的非零像素的个数;Statistically counting the number of non-zero pixels in the edge image corresponding to the boundary region and the number of non-zero pixels in the edge image corresponding to the internal region;所述根据所述非零像素的个数与至少一个预设的阈值的大小关系,检测所述PCB板进入所述指定区域的程度,为:The detecting the extent to which the PCB board enters the designated area according to the relationship between the number of the non-zero pixels and the at least one preset threshold is:当判断所述内部区域对应的边缘图像内的非零像素的个数大于预设的第三阈值,且所述边界区域对应的边缘图像内的非零像素的个数少于预设的第四阈值时,确定所述PCB板完全进入所述指定区域。When it is determined that the number of non-zero pixels in the edge image corresponding to the inner region is greater than a preset third threshold, and the number of non-zero pixels in the edge image corresponding to the boundary region is less than a preset fourth At the threshold, it is determined that the PCB board completely enters the designated area.
- 一种PCB板检测装置,其特征在于,包括:A PCB board detecting device, comprising:采集单元,用于采集传送带的传送面上指定区域的图像;An acquisition unit for collecting an image of a designated area on a conveying surface of the conveyor belt;图像处理单元,用于利用Canny算子对所述图像进行处理得到边缘图像,其中,所述Canny算子包括高阈值和低阈值两个参数,且所述高阈值和低阈值根据所述图像的像素信息自适应生成;An image processing unit, configured to process the image by using a Canny operator to obtain an edge image, wherein the Canny operator includes two parameters of a high threshold and a low threshold, and the high threshold and the low threshold are according to the image Pixel information adaptive generation;统计单元,用于统计所述边缘图像内的非零像素的个数;a statistical unit, configured to count the number of non-zero pixels in the edge image;检测单元,用于根据所述非零像素的个数与至少一个预设的阈值的大小关系,检测所述PCB板进入所述指定区域的程度。And a detecting unit, configured to detect, according to a magnitude relationship between the number of the non-zero pixels and the at least one preset threshold, the extent to which the PCB board enters the designated area.
- 根据权利要求9所述的PCB板检测装置,其特征在于,所述PCB板检测装置还包括:The PCB board detecting device according to claim 9, wherein the PCB board detecting device further comprises:归一化单元,用于对所述图像的尺寸进行归一化处理。A normalization unit for normalizing the size of the image.
- 根据权利要求9所述的PCB板检测装置,其特征在于,所述图像处理单元具体包括:The PCB board detecting device according to claim 9, wherein the image processing unit specifically comprises:像素获取单元,用于获取所述图像的像素取值范围,其中,所述像素取值范围为[Imin,Imax];a pixel acquisition unit, configured to acquire a pixel value range of the image, where the pixel value range is [I min , I max ];计算单元,用于计算所述图像的像素中值m,其中,所述像素中值m为将所述图像的各个像素值按大小进行排序后,序号位于中间的像素值; a calculating unit, configured to calculate a pixel median value m of the image, wherein the pixel median value m is a pixel value in which the serial number is in the middle after the respective pixel values of the image are sorted by size;阈值生成单元,用于生成所述高阈值和低阈值,其中,所述高阈值取Imax和(1+σ)*m二者中的较小者;所述低阈值取Imin和(1-σ)*m二者中的较大者,σ为经验参数;a threshold generating unit, configured to generate the high threshold and a low threshold, wherein the high threshold takes a smaller one of I max and (1+σ)*m; the low threshold takes I min and (1) The larger of -σ)*m, σ is an empirical parameter;处理单元,用于利用所述高阈值和低阈值作为所述Canny算子的阈值参数对所述图像进行处理,得到边缘图像。And a processing unit, configured to process the image by using the high threshold and the low threshold as a threshold parameter of the Canny operator to obtain an edge image.
- 根据权利要求9所述的PCB板检测装置,其特征在于,所述指定区域包括边界区域,其中,所述边界区域为所述指定区域内的到与传送带前进方向垂直的两条边的最小距离小于或者等于一预设的长度的点所组成的区域;The PCB board detecting device according to claim 9, wherein the designated area includes a boundary area, wherein the boundary area is a minimum distance to two sides perpendicular to a traveling direction of the conveyor belt in the designated area An area consisting of points that are less than or equal to a predetermined length;所述统计单元具体用于,统计所述边界区域对应的边缘图像内的非零像素的个数;The statistic unit is specifically configured to: count the number of non-zero pixels in the edge image corresponding to the boundary area;所述检测单元具体用于,在判断所述边界区域对应的边缘图像内的非零像素的个数大于预设的第二阈值时,确定所述PCB板部分进入所述指定区域。The detecting unit is configured to determine that the PCB board portion enters the designated area when determining that the number of non-zero pixels in the edge image corresponding to the boundary area is greater than a preset second threshold.
- 根据权利要求12所述的PCB板检测装置,其特征在于,所述指定区域还包括内部区域,其中,所述内部区域为所述指定区域内除所述边界区域之外的区域;The PCB board detecting device according to claim 12, wherein the designated area further includes an inner area, wherein the inner area is an area other than the boundary area in the designated area;所述统计单元具体用于,分别统计所述内部区域对应的边缘图像和所述边界区域对应的边缘图像内的非零像素的个数;The statistic unit is configured to separately count the edge image corresponding to the inner region and the number of non-zero pixels in the edge image corresponding to the boundary region;所述检测单元具体用于,在判断所述内部区域对应的边缘图像内的非零像素的个数大于预设的第三阈值,且所述边界区域对应的边缘图像内的非零像素的个数少于预设的第四阈值时,确定所述PCB板完全进入所述指定区域。 The detecting unit is configured to: determine that the number of non-zero pixels in the edge image corresponding to the inner region is greater than a preset third threshold, and the non-zero pixels in the edge image corresponding to the boundary region When the number is less than the preset fourth threshold, it is determined that the PCB board completely enters the designated area.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510527487.3A CN105139397B (en) | 2015-08-25 | 2015-08-25 | A kind of pcb board detection method and device |
CN201510527487.3 | 2015-08-25 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017032308A1 true WO2017032308A1 (en) | 2017-03-02 |
Family
ID=54724729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/096546 WO2017032308A1 (en) | 2015-08-25 | 2016-08-24 | Pcb board detection method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105139397B (en) |
WO (1) | WO2017032308A1 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109035236A (en) * | 2018-07-27 | 2018-12-18 | 深圳市闿思科技有限公司 | Casting fin detection method and device |
CN112215827A (en) * | 2020-10-20 | 2021-01-12 | 中广核核电运营有限公司 | Electromigration region detection method and device, computer equipment and storage medium |
CN113252625A (en) * | 2021-04-27 | 2021-08-13 | 歌尔光学科技有限公司 | Glue path detection method for glue with fluorescence effect |
CN115131287A (en) * | 2022-05-16 | 2022-09-30 | 奥蒂玛光学科技(深圳)有限公司 | Image processing method, area detection method, detection device and storage medium |
CN115601364A (en) * | 2022-12-14 | 2023-01-13 | 惠州威尔高电子有限公司(Cn) | Golden finger circuit board detection method based on image analysis |
CN116703889A (en) * | 2023-07-31 | 2023-09-05 | 深圳市普能达电子有限公司 | Flexible circuit board patch abnormality detection method |
CN116758077A (en) * | 2023-08-18 | 2023-09-15 | 山东航宇游艇发展有限公司 | Online detection method and system for surface flatness of surfboard |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105139397B (en) * | 2015-08-25 | 2017-12-19 | 广州视源电子科技股份有限公司 | A kind of pcb board detection method and device |
CN106469482A (en) * | 2016-09-05 | 2017-03-01 | 深圳怡化电脑股份有限公司 | Bank note crosses the border detection method, device and Banknote deposting/drawing out equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060023934A1 (en) * | 2004-07-30 | 2006-02-02 | Fujitsu Limited | Component edge detecting method, component edge detecting program and component inspection apparatus |
CN102034101A (en) * | 2010-10-22 | 2011-04-27 | 广东工业大学 | Method for quickly positioning circular mark in PCB visual detection |
CN102496161A (en) * | 2011-12-13 | 2012-06-13 | 浙江欧威科技有限公司 | Method for extracting contour of image of printed circuit board (PCB) |
CN104268857A (en) * | 2014-09-16 | 2015-01-07 | 湖南大学 | Rapid sub pixel edge detection and locating method based on machine vision |
CN105139397A (en) * | 2015-08-25 | 2015-12-09 | 广州视源电子科技股份有限公司 | PCB board detection method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102456131A (en) * | 2010-11-02 | 2012-05-16 | 屏东科技大学 | Obstacle sensing method |
CN102436656A (en) * | 2011-09-05 | 2012-05-02 | 同济大学 | Animal-diversity monitoring method based on computer vision |
CN103600707B (en) * | 2013-11-06 | 2016-08-17 | 同济大学 | A kind of parking position detection device and method of Intelligent parking system |
-
2015
- 2015-08-25 CN CN201510527487.3A patent/CN105139397B/en active Active
-
2016
- 2016-08-24 WO PCT/CN2016/096546 patent/WO2017032308A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060023934A1 (en) * | 2004-07-30 | 2006-02-02 | Fujitsu Limited | Component edge detecting method, component edge detecting program and component inspection apparatus |
CN102034101A (en) * | 2010-10-22 | 2011-04-27 | 广东工业大学 | Method for quickly positioning circular mark in PCB visual detection |
CN102496161A (en) * | 2011-12-13 | 2012-06-13 | 浙江欧威科技有限公司 | Method for extracting contour of image of printed circuit board (PCB) |
CN104268857A (en) * | 2014-09-16 | 2015-01-07 | 湖南大学 | Rapid sub pixel edge detection and locating method based on machine vision |
CN105139397A (en) * | 2015-08-25 | 2015-12-09 | 广州视源电子科技股份有限公司 | PCB board detection method and device |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109035236A (en) * | 2018-07-27 | 2018-12-18 | 深圳市闿思科技有限公司 | Casting fin detection method and device |
CN109035236B (en) * | 2018-07-27 | 2024-02-23 | 深圳市闿思科技有限公司 | Casting burr detection method and device |
CN112215827A (en) * | 2020-10-20 | 2021-01-12 | 中广核核电运营有限公司 | Electromigration region detection method and device, computer equipment and storage medium |
CN113252625A (en) * | 2021-04-27 | 2021-08-13 | 歌尔光学科技有限公司 | Glue path detection method for glue with fluorescence effect |
CN115131287A (en) * | 2022-05-16 | 2022-09-30 | 奥蒂玛光学科技(深圳)有限公司 | Image processing method, area detection method, detection device and storage medium |
CN115601364A (en) * | 2022-12-14 | 2023-01-13 | 惠州威尔高电子有限公司(Cn) | Golden finger circuit board detection method based on image analysis |
CN115601364B (en) * | 2022-12-14 | 2023-04-07 | 惠州威尔高电子有限公司 | Golden finger circuit board detection method based on image analysis |
CN116703889A (en) * | 2023-07-31 | 2023-09-05 | 深圳市普能达电子有限公司 | Flexible circuit board patch abnormality detection method |
CN116703889B (en) * | 2023-07-31 | 2023-10-03 | 深圳市普能达电子有限公司 | Flexible circuit board patch abnormality detection method |
CN116758077A (en) * | 2023-08-18 | 2023-09-15 | 山东航宇游艇发展有限公司 | Online detection method and system for surface flatness of surfboard |
CN116758077B (en) * | 2023-08-18 | 2023-10-20 | 山东航宇游艇发展有限公司 | Online detection method and system for surface flatness of surfboard |
Also Published As
Publication number | Publication date |
---|---|
CN105139397B (en) | 2017-12-19 |
CN105139397A (en) | 2015-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017032308A1 (en) | Pcb board detection method and apparatus | |
US8755589B2 (en) | Measurement of belt wear through edge detection of a raster image | |
CN110930390B (en) | Chip pin missing detection method based on semi-supervised deep learning | |
US8774514B2 (en) | Method of and apparatus for classifying image using histogram analysis, and method of and apparatus for recognizing text image using the histogram analysis | |
CN110866903B (en) | Ping-pong ball identification method based on Hough circle transformation technology | |
CN115239704B (en) | Accurate detection and repair method for wood surface defects | |
CN101464418B (en) | Flaw detection method and apparatus | |
KR20190088089A (en) | Apparatus and method for detecting defects on welding surface | |
CN113340909B (en) | Glue line defect detection method based on machine vision | |
CN113781415B (en) | Defect detection method, device, equipment and medium for X-ray image | |
CN110738644A (en) | automobile coating surface defect detection method and system based on deep learning | |
CN114127784A (en) | Method, computer program product and computer readable medium for generating a mask for a camera stream | |
CN111476804A (en) | Method, device and equipment for efficiently segmenting carrier roller image and storage medium | |
US20170103536A1 (en) | Counting apparatus and method for moving objects | |
JP2014020926A (en) | Surface defect inspection device and surface defect inspection method | |
CN117635620B (en) | Circuit board defect detection method and system based on image processing | |
CN109784145B (en) | Target detection method based on depth map and storage medium | |
CN115861315A (en) | Defect detection method and device | |
CN108982544B (en) | Method for detecting defective parts of printed circuit board | |
JP2004062519A (en) | Lane mark detector | |
TWI549097B (en) | A method of detecting images of appearance of electronic components and computer readable media thereof | |
KR101646838B1 (en) | Counting method for track images | |
CN117593302B (en) | Defective part tracing method and system | |
Eom et al. | Automated X-ray Defect Inspection on Occluded BGA Balls Using Hybrid Algorithm. | |
Wu et al. | Automatic optical inspection for chip components based on local principal wave probability |
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: 16838566 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: 16838566 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16838566 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.01.2019) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16838566 Country of ref document: EP Kind code of ref document: A1 |