CN108844961A - A kind of temperature controller case vision detection system and method - Google Patents
A kind of temperature controller case vision detection system and method Download PDFInfo
- Publication number
- CN108844961A CN108844961A CN201810864988.4A CN201810864988A CN108844961A CN 108844961 A CN108844961 A CN 108844961A CN 201810864988 A CN201810864988 A CN 201810864988A CN 108844961 A CN108844961 A CN 108844961A
- Authority
- CN
- China
- Prior art keywords
- station
- temperature controller
- image
- controller case
- camera
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/002—Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/08—Measuring arrangements characterised by the use of optical techniques for measuring diameters
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/08—Measuring arrangements characterised by the use of optical techniques for measuring diameters
- G01B11/12—Measuring arrangements characterised by the use of optical techniques for measuring diameters internal diameters
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种视觉检测系统及方法,特别涉及一种温控器壳体视觉检测系统及方法。The invention relates to a visual inspection system and method, in particular to a visual inspection system and method for a temperature controller housing.
背景技术Background technique
现代工业大批量的生产难以保证每个壳体的质量,故而企业在壳体出厂前需对每个壳体的尺寸测量和表面缺陷进行检测,常用的方法是由生产员人工对壳体进行尺寸测量和目视检测,人工检测中工人劳动强度大,且受限于工人的精神状态,熟练水准,经验缺乏等多种原因,导致壳体的检测速度慢,效率低,并且容易产生漏检,错检等过失,自动化程度低。The mass production of modern industry is difficult to guarantee the quality of each shell, so the company needs to measure the size and surface defects of each shell before the shell leaves the factory. The common method is to manually measure the shell by the production staff. Measurement and visual inspection, manual inspection is labor-intensive for workers, and is limited by the mental state of workers, proficiency level, lack of experience and other reasons, resulting in slow detection of the shell, low efficiency, and prone to missed inspections. Errors such as wrong detection, low degree of automation.
发明内容Contents of the invention
本发明要提供一种温控器壳体视觉检测系统及方法,可以自动检测温控器壳体的尺寸和表面缺陷情况。The present invention provides a visual inspection system and method for a thermostat housing, which can automatically detect the size and surface defects of the thermostat housing.
本发明解决其技术问题的解决方案是:一种温控器壳体视觉检测系统,包括:玻璃转盘、第一工位、第二工位和第三工位,第一工位、第二工位和第三工位分别沿玻璃转盘的边缘设置;The solution of the present invention to solve the technical problem is: a visual inspection system for the temperature controller housing, including: a glass turntable, a first station, a second station and a third station, the first station, the second station The first station and the third station are respectively set along the edge of the glass turntable;
第一工位、第二工位和第三工位均设有固定架、摄像头和机器视觉光源,所述机器视觉光源和摄像头均设置在固定架中,其中,第一工位和第二工位的摄像头均设置在玻璃转盘的下方,并朝向所述玻璃转盘,第三工位的摄像头设置在玻璃转盘的上方,并朝向所述玻璃转盘,玻璃转盘用于带动被测温控器壳体分别通过第一工位、第二工位和第三工位;The first station, the second station and the third station are all equipped with a fixed frame, a camera and a machine vision light source, and the machine vision light source and the camera are all arranged in the fixed frame, wherein the first station and the second station The cameras of the third station are all set under the glass turntable and facing the glass turntable. The cameras of the third station are set above the glass turntable and facing the glass turntable. The glass turntable is used to drive the temperature controller housing under test. Pass the first station, the second station and the third station respectively;
第一工位的摄像头用于拍摄被测温控器壳体的底部外圈图像;The camera at the first station is used to take images of the outer ring of the bottom of the thermostat housing under test;
第二工位的摄像头用于拍摄被测温控器壳体的底部内圈图像;The camera at the second station is used to take images of the bottom inner ring of the temperature controller housing under test;
第三工位的摄像头用于拍摄被测温控器壳体的顶部图像。The camera at the third station is used to capture the top image of the temperature controller casing under test.
进一步,所述视觉光源包括环形光源和穹顶光源,所述玻璃转盘设于所述环形光源和穹顶光源之间的区间内。Further, the visual light source includes a ring light source and a dome light source, and the glass turntable is arranged in a section between the ring light source and the dome light source.
进一步,所述摄像头包括CCD传感器相机和FS-LM3517工业镜头。Further, the camera includes a CCD sensor camera and an FS-LM3517 industrial lens.
一种温控器壳体视觉检测方法,包括:A method for visual inspection of a thermostat housing, comprising:
分别从第一工位、第二工位和第三工位的摄像头中获取被测温控器壳体的底部外圈图像、底部内圈图像和顶部图像;Obtain the bottom outer ring image, the bottom inner ring image and the top image of the temperature controller casing under test from the cameras of the first station, the second station and the third station respectively;
分别对被测温控器壳体的底部外圈图像、底部内圈图像和顶部图像进行预处理,得到预处理后的底部外圈图像、底部内圈图像和顶部图像;Preprocessing the bottom outer ring image, the bottom inner ring image and the top image of the temperature controller housing under test respectively, to obtain the preprocessed bottom outer ring image, bottom inner ring image and top image;
从所述底部外圈图像中提取外圈的半径值信息,并将所述半径值信息与预设的标准外圈半径值对比,判断被测温控器壳体是否合格;Extracting the radius value information of the outer circle from the bottom outer circle image, and comparing the radius value information with the preset standard outer circle radius value to determine whether the temperature controller housing under test is qualified;
建立参考模板,根据参考模板与所述底部内圈图像、顶部图像进行匹配,定位出ROI区域,得到指定检测区域;Establish a reference template, match the bottom inner circle image and the top image according to the reference template, locate the ROI area, and obtain the designated detection area;
对所述指定检测区域依次进行刚体仿射变换、全局阈值处理,设定检测灰度区间,根据所述检测灰度区间判断被测温控器壳体是否合格。Rigid body affine transformation and global threshold value processing are sequentially performed on the specified detection area, a detection gray scale interval is set, and whether the temperature controller housing under test is qualified is judged according to the detection gray scale interval.
进一步,所述预处理包括:高斯滤波处理。Further, the preprocessing includes: Gaussian filtering processing.
进一步,从所述底部外圈图像中提取外圈的半径值信息的方法包括:对所述底部外圈图像进行多阈值分割,得到底部外圈的粗外边缘,所述底部外圈进行最小二乘法拟合圆,得到所述底部外圈的半径值信息。Further, the method for extracting the radius value information of the outer circle from the bottom outer circle image includes: performing multi-threshold segmentation on the bottom outer circle image to obtain a thick outer edge of the bottom outer circle, and performing least squares segmentation on the bottom outer circle. The circle is fitted by multiplication to obtain the radius value information of the outer ring at the bottom.
本发明的有益效果是:本发明自动对温控器壳体底部和顶部不同区域表面缺陷情况进行了检测、采集图像和图像分析,精确高效地找到壳体的尺寸错误和表面缺陷问题,提高了检测效率和准确度。The beneficial effects of the present invention are: the present invention automatically detects, collects images and analyzes the surface defects in different areas of the bottom and top of the thermostat casing, accurately and efficiently finds the size errors and surface defects of the casing, and improves the temperature control system. Detection efficiency and accuracy.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单说明。显然,所描述的附图只是本发明的一部分实施例,而不是全部实施例,本领域的技术人员在不付出创造性劳动的前提下,还可以根据这些附图获得其他设计方案和附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly describe the drawings that need to be used in the description of the embodiments. Apparently, the described drawings are only some embodiments of the present invention, not all embodiments, and those skilled in the art can obtain other designs and drawings based on these drawings without creative work.
图1是本发明检测系统的结构示意图;Fig. 1 is the structural representation of detection system of the present invention;
图2是第一工位和第二工位的结构示意图;Fig. 2 is the structural representation of first station and second station;
图3是第三工位的结构示意图;Fig. 3 is the structural representation of the 3rd station;
图4是第一工位采集所得的原图像;Fig. 4 is the original image collected by the first station;
图5是第一工位采集所得的图像经过高斯滤波后的图像;Fig. 5 is the image after Gaussian filtering of the image collected by the first station;
图6是温控器壳体的底部和顶部的结构示意图;Fig. 6 is a structural schematic diagram of the bottom and top of the thermostat housing;
图7是第一工位检测时多阈值分割所得的粗外边缘;Fig. 7 is the thick outer edge obtained by multi-threshold segmentation during the first station detection;
图8是第一工位检测时待拟合的外圆边缘;Fig. 8 is the outer circular edge to be fitted during the first station detection;
图9是第一工位检测流程图;Fig. 9 is a flow chart of the detection of the first station;
图10是第二工位检测参考模板示意图;Fig. 10 is a schematic diagram of the second station detection reference template;
图11是第二工位孔卡料检测结果图;Fig. 11 is a diagram of the detection result of hole jam material in the second station;
图12是第二工位检测孔卡料的流程图;Fig. 12 is a flow chart of the second station detection hole jam material;
图13是第三工位检测参考模块;Figure 13 is the third station detection reference module;
图14是第三工位盲孔穿料结果图;Fig. 14 is a diagram of the result of blind hole piercing at the third station;
图15是第三工位检测流程图。Fig. 15 is a flow chart of the detection of the third station.
具体实施方式Detailed ways
以下将结合实施例和附图对本发明的构思、具体结构及产生的技术效果进行清楚、完整的描述,以充分地理解本发明的目的、特征和效果。显然,所描述的实施例只是本发明的一部分实施例,而不是全部实施例,基于本发明的实施例,本领域的技术人员在不付出创造性劳动的前提下所获得的其他实施例,均属于本发明保护的范围。另外,文中所提到的所有联接/连接关系,并非单指构件直接相接,而是指可根据具体实施情况,通过添加或减少联接辅件,来组成更优的联接结构。本发明创造中的各个技术特征,在不互相矛盾冲突的前提下可以交互组合。The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and accompanying drawings, so as to fully understand the purpose, features and effects of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative efforts belong to The protection scope of the present invention. In addition, all the connection/connection relationships mentioned in this article do not refer to the direct connection of components, but mean that a better connection structure can be formed by adding or reducing connection accessories according to specific implementation conditions. The various technical features in the invention can be combined interactively on the premise of not conflicting with each other.
实施例1,参照图1、图2、图3和图6,其中图6中,上方的图形为温控器壳体的顶部9,下方的图形为温控器壳体的底部10。一种温控器壳体视觉检测系统,包括:玻璃转盘4、第一工位1、第二工位2和第三工位3,第一工位1、第二工位2和第三工位3分别沿玻璃转盘4的边缘设置;Embodiment 1, referring to Fig. 1, Fig. 2, Fig. 3 and Fig. 6, wherein in Fig. 6, the upper figure is the top 9 of the thermostat housing, and the lower figure is the bottom 10 of the thermostat housing. A visual detection system for a thermostat housing, comprising: a glass turntable 4, a first station 1, a second station 2 and a third station 3, the first station 1, the second station 2 and the third station The bits 3 are respectively set along the edge of the glass turntable 4;
第一工位1、第二工位2和第三工位3均设有固定架5、摄像头8和机器视觉光源,所述机器视觉光源和摄像头8均设置在固定架5中,其中,第一工位1和第二工位2的摄像头8均设置在玻璃转盘4的下方,并朝向所述玻璃转盘4,第三工位3的摄像头8设置在玻璃转盘4的上方,并朝向所述玻璃转盘4。The first station 1, the second station 2 and the third station 3 are all provided with a fixed frame 5, a camera 8 and a machine vision light source, and the machine vision light source and the camera 8 are all arranged in the fixed frame 5, wherein the first The cameras 8 of the first station 1 and the second station 2 are all arranged below the glass turntable 4, and towards the glass turntable 4, and the camera 8 of the third station 3 is arranged above the glass turntable 4, and towards the glass turntable 4. Glass turntable4.
因为被测壳体底部10的外圈和内圈的高度不一致,即外圈距离镜头近,因此第一工位1的摄像头8的景深比第二工位2的摄像头8的景深浅,从而可以拍摄出更清晰的壳体底部外圈图像;同理,因为内圈距离镜头远,因此第二工位2的摄像头8的景深比第一工位1的摄像头8的景深深,从而可以拍摄出更清晰的壳体底部内圈图像。Because the heights of the outer ring and the inner ring of the bottom 10 of the housing under test are inconsistent, that is, the outer ring is closer to the lens, the depth of field of the camera 8 of the first station 1 is shallower than that of the camera 8 of the second station 2, so that Take a clearer image of the outer ring at the bottom of the shell; similarly, because the inner ring is far away from the lens, the depth of field of the camera 8 of the second station 2 is deeper than that of the camera 8 of the first station 1, so that the A clearer image of the inner ring at the bottom of the housing.
所述玻璃转盘4、第一工位1、第二工位2和第三工位3由PLC电气控制系统驱动,所述PLC电气控制系统的型号为FX3U-48MT。The glass turntable 4, the first station 1, the second station 2 and the third station 3 are driven by a PLC electrical control system whose model is FX3U-48MT.
本视觉检测系统的工作原理:The working principle of the visual inspection system:
被测温控器壳体放置在玻璃转盘4上,玻璃转盘4在PLC电气系统的驱动下旋转,分别通过第一工位1、第二工位2和第三工位3,第一工位1的摄像头8拍摄被测温控器壳体底部10的外圆图像,第二工位2的摄像头8拍摄被测温控器壳体底部10的内圆图像,第三工位3的摄像头8拍摄被测温控器壳体顶部9的图像;第一工位1、第二工位2和第三工位3获取的被测温控器壳体的图像通过USB端口发送到计算机,计算机对所获得的图像进行进一步分析和处理。The temperature controller housing to be tested is placed on the glass turntable 4, and the glass turntable 4 rotates under the drive of the PLC electrical system, passing through the first station 1, the second station 2 and the third station 3 respectively, the first station The camera 8 of 1 takes the outer circle image of the bottom 10 of the thermostat housing under test, the camera 8 of the second station 2 takes the inner circle image of the bottom 10 of the thermostat housing under test, and the camera 8 of the third station 3 Take the image of the top 9 of the temperature controller housing under test; the images of the temperature controller housing under test obtained by the first station 1, the second station 2 and the third station 3 are sent to the computer through the USB port, and the computer The acquired images are further analyzed and processed.
进一步,所述视觉光源包括环形光源6和穹顶光源7,所述玻璃转盘4设于所述环形光源6和穹顶光源7之间的区间内。Further, the visual light source includes a ring light source 6 and a dome light source 7 , and the glass turntable 4 is arranged in a section between the ring light source 6 and the dome light source 7 .
所述环形光源6为30度低角度环形光源,有利于提高检测精度,获得表面清晰且边缘轮廓突出的图像。The ring light source 6 is a 30-degree low-angle ring light source, which is conducive to improving detection accuracy and obtaining images with clear surfaces and prominent edge contours.
所述摄像头8包括CCD传感器相机和FS-LM3517工业镜头。The camera 8 includes a CCD sensor camera and an FS-LM3517 industrial lens.
本发明通过三个工位自动检测代替人工检测,不但提高了检测效率和准确率,而且有效地降低了检测成本,同时不需要翻转温控器壳体,即可获得被测壳体顶部9和底部10的图像,操作简单,实用性强。The present invention replaces manual detection by automatic detection at three stations, which not only improves the detection efficiency and accuracy, but also effectively reduces the detection cost. At the same time, the top 9 and The bottom 10 images are easy to operate and highly practical.
其中本发明创造还包括一种温控器壳体视觉检测方法,包括:分别从第一工位1、第二工位2、第三工位3的摄像头8中获取被测温控器壳体底部10的外圈图像、底部10的内圈图像、顶部9的图像;Wherein, the present invention also includes a visual inspection method for a thermostat housing, comprising: obtaining the housing of the thermostat under test from the cameras 8 of the first station 1, the second station 2, and the third station 3, respectively. Outer image of bottom 10, inner image of bottom 10, image of top 9;
分别对被测温控器壳体底部10的外圈图像、底部10的内圈图像、顶部9的图像进行预处理,得到预处理后底部外圈图像、底部内圈图像、顶部图像;Perform preprocessing on the outer ring image of the bottom 10, the inner ring image of the bottom 10, and the top image of the top 9 of the thermostat housing under test respectively, to obtain the preprocessed bottom outer ring image, bottom inner ring image, and top image;
参照图4和图5,所述预处理包括:高斯滤波处理。Referring to FIG. 4 and FIG. 5 , the preprocessing includes: Gaussian filtering processing.
对所述底部外圈图像进行多阈值分割,得到底部外圈的粗外边缘,所述底部外圈进行最小二乘法拟合圆,得到所述底部外圈的半径值信息,并将所述半径值信息与预设的标准外圈半径值对比,判断被测温控器壳体是否合格;Carry out multi-threshold segmentation to the bottom outer circle image to obtain the thick outer edge of the bottom outer circle, and perform least squares method fitting circle on the bottom outer circle to obtain the radius value information of the bottom outer circle, and convert the radius Value information is compared with the preset standard outer ring radius value to judge whether the tested thermostat housing is qualified;
建立参考模板,根据参考模板与所述底部内圈图像、顶部图像进行匹配,定位出ROI区域,得到指定检测区域;Establish a reference template, match the bottom inner circle image and the top image according to the reference template, locate the ROI area, and obtain the designated detection area;
对所述指定检测区域依次进行刚体仿射变换、全局阈值处理,设定检测灰度区间,根据所述检测灰度区间判断被测温控器壳体是否合格。Rigid body affine transformation and global threshold value processing are sequentially performed on the specified detection area, a detection gray scale interval is set, and whether the temperature controller housing under test is qualified is judged according to the detection gray scale interval.
被测温控器壳体的底部10和顶部9都出现不合格的情况,对底部10和顶部9出现的各种缺陷问题进行定义,合理安排各检测工位检测的缺陷种类。表1为各种缺陷种类的划分:Both the bottom 10 and the top 9 of the thermostat housing under test are found to be unqualified, and the various defect problems that appear at the bottom 10 and the top 9 are defined, and the types of defects detected by each testing station are reasonably arranged. Table 1 shows the division of various types of defects:
上述图像处理过程可以在软件平台Halcon中进行。The above image processing process can be carried out in the software platform Halcon.
参考图6至图9,第一工位1检测被测温控器壳体底部10的外圆的检测过程:Referring to Fig. 6 to Fig. 9, the detection process of the first station 1 detecting the outer circle of the bottom 10 of the thermostat housing under test:
对已经经过预处理的底部外圈图像进行多阈值分割,使用多阈值法的核心函数auto_threshold动态阈值分割初步找到底部外圆的边缘,从而初步分割壳体与背景,用函数boundary提取最接近目标区域的轮廓,对该轮廓进行闭运算操作,后将膨胀后的区域和原图进行reduce_domain减操作,这样就能得到只有壳体底部10的外圆边缘的真实图像。其次,通过提取边缘后拟合圆找到中心,在函数edges_sub_pix中用Sobel算子提取亚像素边缘轮廓,对提取出来的亚像素xld轮廓进行分割,将轮廓分为直线段、圆(或圆弧)、椭圆弧不同的段,用到的函数是segment_contours_xld,该函数用到的切分模式是'lines_circles'(使用直线段和圆(弧)分割),再用函数union_adjacent_contours_xld合并相邻圆弧轮廓,用函数fit_circle_contour_xld进行最小二乘法拟合圆,可得到被测壳体底部外圆的圆心坐标和半径,与设定好的标准外径值做对比,确定是否符合要求。Perform multi-threshold segmentation on the preprocessed bottom outer circle image, use the core function auto_threshold dynamic threshold segmentation of the multi-threshold method to initially find the edge of the bottom outer circle, thereby initially segment the shell and the background, and use the function boundary to extract the closest target area The contour of the contour, perform a closed operation on the contour, and then perform a reduce_domain subtraction operation on the expanded area and the original image, so that a real image with only the outer circular edge of the bottom 10 of the shell can be obtained. Secondly, find the center by fitting the circle after extracting the edge, use the Sobel operator to extract the sub-pixel edge contour in the function edges_sub_pix, segment the extracted sub-pixel xld contour, and divide the contour into straight line segments, circles (or arcs) , Different segments of elliptical arcs, the function used is segment_contours_xld, the segmentation mode used by this function is 'lines_circles' (using straight line segments and circles (arcs) to divide), and then the function union_adjacent_contours_xld is used to merge adjacent arc contours, using The function fit_circle_contour_xld performs the least squares method to fit the circle, and the center coordinates and radius of the outer circle at the bottom of the measured shell can be obtained, and compared with the set standard outer diameter value to determine whether it meets the requirements.
然后根据所述的圆心坐标及半径再确定位置生成圆,形态学运算及区域相减后得到准确的圆环部分,用函数polar_trans_image_ext将图像中的直角坐标系下的圆环转换为极坐标形态,对极坐标下的图像平滑滤波,再通过全局阈值和连通区域选择找出极坐标下的不满料及水口长部分,并且标记出来,再用函数polar_trans_region_inv把圆环从极坐标转为直角坐标后,即可在窗口中显示明显的缺陷。Then determine the position to generate a circle according to the center coordinates and radius, obtain the accurate circle part after the morphological operation and area subtraction, and use the function polar_trans_image_ext to convert the circle under the Cartesian coordinate system in the image into a polar coordinate form, Smooth and filter the image in polar coordinates, and then find out the dissatisfied material and the long part of the nozzle in polar coordinates through the global threshold and connected region selection, and mark them out, and then use the function polar_trans_region_inv to convert the ring from polar coordinates to Cartesian coordinates, that is Obvious defects can be displayed in a window.
从六个样本实验中,外圆半径误差大部分保持在公差范围0.01mm以内,基本符合检测要求,而对于不满料和水口长的缺陷面积则基本可判断出合格与不合格的情况。From the six sample experiments, most of the errors of the outer circle radius are kept within the tolerance range of 0.01mm, which basically meets the inspection requirements, and the qualified and unqualified conditions can basically be judged for the defect area of insufficient material and nozzle length.
参考图10-图12,第二工位2检测被测温控器壳体底部10的内圆孔卡料缺陷的检测过程:Referring to Figure 10-Figure 12, the second station 2 detects the detection process of the inner hole hole defect at the bottom 10 of the thermostat housing under test:
首先对被测温控器壳体底部10的内圆图像进行预处理,建立参考模板,使用函数gen_rectangle2划出参考模板的ROI矩形区域,利用函数area_center()求出其中心坐标,函数orientation_region找出区域偏转角,再通过函数reduce_domain()把这个矩形区域从图像中分离开;为了快速方便地确定在创建模板create_shape_model时使用参数金字塔级数NumLevels和对比度Contrast,需要使用函数inspect_shape_model创建一个形状模型的表示形式,其可以显示多个金字塔级数的模型,各个对象再通过select_obj来访问,接下来利用函数create_shape_model()来创建模板,用函数get_shape_model_contours()得到模板的轮廓,以便更快速更准确的找到模板。First, preprocess the inner circle image of the bottom 10 of the thermostat under test, establish a reference template, use the function gen_rectangle2 to delineate the ROI rectangular area of the reference template, use the function area_center() to find its center coordinates, and use the function orientation_region to find out The area deflection angle, and then use the function reduce_domain() to separate the rectangular area from the image; in order to quickly and easily determine the parameters of the pyramid series NumLevels and contrast Contrast when creating the template create_shape_model, you need to use the function inspect_shape_model to create a representation of the shape model form, which can display multiple pyramid series models, each object is accessed through select_obj, and then the function create_shape_model() is used to create a template, and the function get_shape_model_contours() is used to obtain the outline of the template in order to find the template more quickly and accurately .
第二步是生成检测卡料孔的ROI区域,函数union2联合这两个ROI圆区域为一个检测区域,find_shape_model()函数在图像中找出与参考模板最佳匹配的区域,并且返回该区域的中心点坐标及旋转角度,利用中心点和角度结合函数vector_angle_to_rigid(),对检测区域做刚体仿射变换,使得每张图像都可以找到对应检测区域位置,再对检测区域做全局阈值处理,若孔洞区域内的灰度值小于40的阈值面积大于0.1mm,则出现孔卡料缺陷11。The second step is to generate the ROI area for detecting the card material hole. The function union2 combines the two ROI circle areas as a detection area. The find_shape_model() function finds the area that best matches the reference template in the image and returns the area of the area. The coordinates of the center point and the rotation angle, using the center point and angle combined with the function vector_angle_to_rigid(), perform rigid affine transformation on the detection area, so that each image can find the position of the corresponding detection area, and then perform global threshold processing on the detection area, if the hole If the grayscale value in the area is less than 40 and the threshold area is greater than 0.1 mm, there will be a hole jam defect 11 .
第二工位2检测对被测温控器壳体的底部10内圆进行麻点和料收缩的检测原理与底部10内圆孔卡料的检测原理相似。当底部10内圆出现孔卡料、麻点和料收缩中三种缺陷中的一种,都判定该被测温控器壳体为不合格。The second station 2 detects pitting and material shrinkage on the inner circle of the bottom 10 of the temperature controller housing to be tested. When one of the three defects of hole jam, pitting and material shrinkage occurs in the inner circle of the bottom 10, it is determined that the temperature controller housing under test is unqualified.
参考图13至图15,第三工位3检测被测温控器壳体顶部9的盲孔缺料缺陷12的检测过程:Referring to Figures 13 to 15, the third station 3 detects the detection process of the blind hole defect 12 on the top 9 of the thermostat housing under test:
第三工位3检测原理与第二工位2的检测原理相类似,首先对被测温控器壳体顶部图像进行预处理,以两圆所处的矩形模块为参考模板,选取这位置做模板是因为该位置不存在缺陷,且存在两圆和字母等明显特征。然后是生成盲孔检测区域,在图像中找出与参考模板最佳匹配的区域,定位两圆的位置,使用边缘分割及边缘拟合得到完整且精确的小圆,从中获取圆的半径,取两圆测到的半径平均值与标准半径对比,误差要在公差范围0.01mm以内才算合格。The detection principle of the third station 3 is similar to the detection principle of the second station 2. First, the image of the top of the temperature controller under test is preprocessed, and the rectangular module where the two circles are located is used as a reference template, and this position is selected as the reference template. The template is because there are no defects in this location and there are obvious features such as two circles and letters. Then generate the blind hole detection area, find the area that best matches the reference template in the image, locate the positions of the two circles, use edge segmentation and edge fitting to obtain a complete and accurate small circle, and obtain the radius of the circle from it. The average value of the radius measured by the two circles is compared with the standard radius, and the error must be within the tolerance range of 0.01mm to be considered qualified.
随后使用所得参考模板中的检测区域的坐标值,对检测区域仿射变换,准确定位图像中的检测区域,对所述检测区域做全局阈值处理,其中灰度值大于200的阈值面积大于0.01mm2,则出现盲孔缺料缺陷12。Then use the coordinate values of the detection area in the obtained reference template to affine transform the detection area, accurately locate the detection area in the image, and perform global threshold processing on the detection area, wherein the threshold area with a gray value greater than 200 is greater than 0.01mm 2 , then there will be defects of blind hole lack of material 12.
第三工位3检测对被测温控器壳体的顶部9进行工字筋缺料和料收缩的检测原理与顶部9盲孔缺料的检测原理相似。当顶部9出现盲孔缺料、工字筋缺料和料收缩这三种缺陷中的一种,都判定该被测温控器壳体为不合格。The third station 3 detects that the detection principle of the I-beam lack of material and material shrinkage on the top 9 of the temperature controller housing under test is similar to the detection principle of the blind hole lack of material on the top 9 . When one of the three defects of blind hole lack of material, I-shaped rib lack of material and material shrinkage occurs on the top 9, it is determined that the tested temperature controller housing is unqualified.
本发明通过三个不同的自动检测装置,对温控器壳体的底部10和顶部9不同区域表面缺陷情况进行了测量和采集图像,通过软件算法对图像进行对比分析,精确高效地找到壳体的尺寸错误和表面缺陷问题,提高了检测效率,降低人为检测错误,形成一套有效规范的机器视觉检测系统。The present invention measures and collects images of surface defects in different areas of the bottom 10 and top 9 of the thermostat housing through three different automatic detection devices, and compares and analyzes the images through software algorithms to find the housing accurately and efficiently. The problem of dimensional errors and surface defects improves the detection efficiency, reduces human detection errors, and forms an effective and standardized machine vision detection system.
以上对本发明的较佳实施方式进行了具体说明,但本发明创造并不限于所述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可作出种种的等同变型或替换,这些等同的变型或替换均包含在本申请权利要求所限定的范围内。The preferred embodiments of the present invention have been described in detail above, but the invention is not limited to the described embodiments, and those skilled in the art can also make various equivalent modifications or replacements without violating the spirit of the present invention. These equivalent modifications or replacements are all within the scope defined by the claims of the present application.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810864988.4A CN108844961A (en) | 2018-08-01 | 2018-08-01 | A kind of temperature controller case vision detection system and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810864988.4A CN108844961A (en) | 2018-08-01 | 2018-08-01 | A kind of temperature controller case vision detection system and method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN108844961A true CN108844961A (en) | 2018-11-20 |
Family
ID=64192347
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810864988.4A Pending CN108844961A (en) | 2018-08-01 | 2018-08-01 | A kind of temperature controller case vision detection system and method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108844961A (en) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109580648A (en) * | 2019-01-21 | 2019-04-05 | 昆山湖大机器人技术有限公司 | Screwdriver bit detection method and detection device |
| CN110211113A (en) * | 2019-06-03 | 2019-09-06 | 湖南瑞智健科技有限公司 | A kind of detection algorithm and calculating equipment of groove exception |
| CN110412055A (en) * | 2019-05-06 | 2019-11-05 | 天津大学 | A lens white fog defect detection method based on multi-light source dark field illumination |
| WO2020232696A1 (en) * | 2019-05-23 | 2020-11-26 | 深圳市汇顶科技股份有限公司 | Calibration method and device for optical fingerprint identification and electronic equipment |
| CN112991284A (en) * | 2021-03-05 | 2021-06-18 | 佛山科学技术学院 | Temperature controller guide frame defect detection method and system |
| CN113155024A (en) * | 2021-04-07 | 2021-07-23 | 杭州江奥光电科技有限公司 | Method and device for measuring size and detecting defects of annular workpiece |
| CN115435684A (en) * | 2022-09-30 | 2022-12-06 | 中国兵器装备集团自动化研究所有限公司 | A dimensional defect detection method, device, equipment and storage medium |
| CN115508370A (en) * | 2022-06-30 | 2022-12-23 | 吉林大学 | An all-round oil seal defect detection equipment |
| CN115508383A (en) * | 2022-09-29 | 2022-12-23 | 广东利元亨智能装备股份有限公司 | Shell appearance detection method and device |
| CN118442934A (en) * | 2024-05-20 | 2024-08-06 | 常熟华新汽车零部件有限公司 | Method and system for detecting edge of storage battery shell |
| CN119470473A (en) * | 2025-01-09 | 2025-02-18 | 成都精工华耀科技有限公司 | A method and system for quality inspection of perforated workpieces |
| CN119643554A (en) * | 2024-11-13 | 2025-03-18 | 中国第一汽车股份有限公司 | Differential case defect detection method, device, computer equipment and storage medium |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060147094A1 (en) * | 2003-09-08 | 2006-07-06 | Woong-Tuk Yoo | Pupil detection method and shape descriptor extraction method for a iris recognition, iris feature extraction apparatus and method, and iris recognition system and method using its |
| CN101944231A (en) * | 2010-08-19 | 2011-01-12 | 北京农业智能装备技术研究中心 | Method for extracting wheatear morphological parameters |
| CN102914545A (en) * | 2012-11-15 | 2013-02-06 | 潍坊学院 | Gear defect detection method and system based on computer vision |
| CN204154661U (en) * | 2014-10-16 | 2015-02-11 | 浙江丰立机电有限公司 | Low module bevel gear open defect automatic detection device |
| CN104677782A (en) * | 2015-02-13 | 2015-06-03 | 江苏大学 | Machine vision online detection system and method for electric connector shell |
| CN106680287A (en) * | 2016-12-28 | 2017-05-17 | 无锡浩远视觉科技有限公司 | Visual inspection method for step defects of bearing rivets |
| CN106780473A (en) * | 2016-12-23 | 2017-05-31 | 西安交通大学 | A kind of magnet ring defect multi-vision visual detection method and system |
| CN106839986A (en) * | 2017-03-24 | 2017-06-13 | 中国计量大学 | It is a kind of that detecting system is carried based on machine vision and the double of machine learning |
| CN106872474A (en) * | 2017-03-08 | 2017-06-20 | 苏州易瑞得电子科技有限公司 | Exploded perspective vision testing machine and its detection method |
| CN107036542A (en) * | 2017-05-19 | 2017-08-11 | 佛山市南海区广工大数控装备协同创新研究院 | A kind of ring gear internal-and external diameter appearance detecting method and device |
| WO2018050123A1 (en) * | 2016-09-19 | 2018-03-22 | 北京眼神科技有限公司 | Method and device for detecting iris image |
| CN108144873A (en) * | 2017-12-29 | 2018-06-12 | 深圳市智能机器人研究院 | A kind of vision detection system and method |
-
2018
- 2018-08-01 CN CN201810864988.4A patent/CN108844961A/en active Pending
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060147094A1 (en) * | 2003-09-08 | 2006-07-06 | Woong-Tuk Yoo | Pupil detection method and shape descriptor extraction method for a iris recognition, iris feature extraction apparatus and method, and iris recognition system and method using its |
| CN101944231A (en) * | 2010-08-19 | 2011-01-12 | 北京农业智能装备技术研究中心 | Method for extracting wheatear morphological parameters |
| CN102914545A (en) * | 2012-11-15 | 2013-02-06 | 潍坊学院 | Gear defect detection method and system based on computer vision |
| CN204154661U (en) * | 2014-10-16 | 2015-02-11 | 浙江丰立机电有限公司 | Low module bevel gear open defect automatic detection device |
| CN104677782A (en) * | 2015-02-13 | 2015-06-03 | 江苏大学 | Machine vision online detection system and method for electric connector shell |
| WO2018050123A1 (en) * | 2016-09-19 | 2018-03-22 | 北京眼神科技有限公司 | Method and device for detecting iris image |
| CN106780473A (en) * | 2016-12-23 | 2017-05-31 | 西安交通大学 | A kind of magnet ring defect multi-vision visual detection method and system |
| CN106680287A (en) * | 2016-12-28 | 2017-05-17 | 无锡浩远视觉科技有限公司 | Visual inspection method for step defects of bearing rivets |
| CN106872474A (en) * | 2017-03-08 | 2017-06-20 | 苏州易瑞得电子科技有限公司 | Exploded perspective vision testing machine and its detection method |
| CN106839986A (en) * | 2017-03-24 | 2017-06-13 | 中国计量大学 | It is a kind of that detecting system is carried based on machine vision and the double of machine learning |
| CN107036542A (en) * | 2017-05-19 | 2017-08-11 | 佛山市南海区广工大数控装备协同创新研究院 | A kind of ring gear internal-and external diameter appearance detecting method and device |
| CN108144873A (en) * | 2017-12-29 | 2018-06-12 | 深圳市智能机器人研究院 | A kind of vision detection system and method |
Non-Patent Citations (12)
| Title |
|---|
| 周阳;王正家;徐伟;邬礼默;罗欢;: "基于HALCON的大幅面柔性印刷品质量检测", 《湖北工业大学学报》, vol. 31, no. 04, 15 August 2016 (2016-08-15), pages 14 - 16 * |
| 张振超;卢建宁;王伟;郭彦斌;赵义辉;: "基于HALCON的中压真空断路器视觉检测系统实现", 《制造业自动化》, vol. 37, no. 4, 25 April 2015 (2015-04-25), pages 152 - 153 * |
| 张琼: "基于HALCON的无标记印刷品图像质量检测", 《汕头大学学报(自然科学版)》, vol. 26, no. 02, 31 May 2011 (2011-05-31), pages 14 - 16 * |
| 曾强: "基于HALCON的刹车片轮廓缺陷检测方法研究", 《煤矿机械》, vol. 37, no. 08, 15 August 2016 (2016-08-15), pages 143 - 146 * |
| 李明亮: "图像处理在螺丝尺寸测量中的应用", 《福建电脑》, no. 02, 25 February 2010 (2010-02-25), pages 15 - 16 * |
| 窦兆玉: "基于机器视觉的液晶屏幕坏点检测", 《北京信息科技大学学报(自然科学版)》, vol. 30, no. 05, 31 October 2015 (2015-10-31), pages 88 - 92 * |
| 胡秀珍, 隋青美: "基于机器视觉的铁芯表面缺陷检测系统研究", 仪器仪表用户, vol. 24, no. 1, 31 January 2017 (2017-01-31), pages 21 - 23 * |
| 胡秀珍等: "基于机器视觉的铁芯表面缺陷检测系统研究", 仪器仪表用户, vol. 24, no. 1, 1 January 2017 (2017-01-01), pages 21 - 23 * |
| 许桢英, 李健康, 凌俊等: "基于Halcon的电连接器壳体缺陷检测系统设计", 制造业自动化, vol. 37, no. 18, 25 September 2015 (2015-09-25), pages 135 - 138 * |
| 许桢英: "基于Halcon的电连接器壳体零件孔径快速精密测量", 《制造业自动化》, vol. 37, no. 22, 25 November 2015 (2015-11-25), pages 31 - 33 * |
| 陈艺峰: "Halcon在工件二维尺寸检测上的应用", 《机电技术》, vol. 34, no. 04, 30 August 2011 (2011-08-30), pages 12 - 17 * |
| 陈茜茜: "基于Halcon的弹芯尺寸精密检测算法研究", 《测试技术学报》, vol. 32, no. 02, 27 April 2018 (2018-04-27), pages 112 - 118 * |
Cited By (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109580648A (en) * | 2019-01-21 | 2019-04-05 | 昆山湖大机器人技术有限公司 | Screwdriver bit detection method and detection device |
| CN110412055A (en) * | 2019-05-06 | 2019-11-05 | 天津大学 | A lens white fog defect detection method based on multi-light source dark field illumination |
| CN112513871B (en) * | 2019-05-23 | 2024-03-22 | 深圳市汇顶科技股份有限公司 | Calibration method and device for optical fingerprint identification and electronic equipment |
| CN112513871A (en) * | 2019-05-23 | 2021-03-16 | 深圳市汇顶科技股份有限公司 | Calibration method and device for optical fingerprint identification and electronic equipment |
| WO2020232696A1 (en) * | 2019-05-23 | 2020-11-26 | 深圳市汇顶科技股份有限公司 | Calibration method and device for optical fingerprint identification and electronic equipment |
| CN110211113A (en) * | 2019-06-03 | 2019-09-06 | 湖南瑞智健科技有限公司 | A kind of detection algorithm and calculating equipment of groove exception |
| CN110211113B (en) * | 2019-06-03 | 2021-09-07 | 湖南瑞智健科技有限公司 | An abnormal groove detection algorithm and computing device |
| CN112991284A (en) * | 2021-03-05 | 2021-06-18 | 佛山科学技术学院 | Temperature controller guide frame defect detection method and system |
| CN112991284B (en) * | 2021-03-05 | 2022-11-01 | 佛山科学技术学院 | Method and system for defect detection of thermostat guide frame |
| CN113155024A (en) * | 2021-04-07 | 2021-07-23 | 杭州江奥光电科技有限公司 | Method and device for measuring size and detecting defects of annular workpiece |
| CN113155024B (en) * | 2021-04-07 | 2025-07-01 | 杭州江奥光电科技有限公司 | A method and device for measuring the size and detecting defects of annular workpieces |
| CN115508370A (en) * | 2022-06-30 | 2022-12-23 | 吉林大学 | An all-round oil seal defect detection equipment |
| CN115508383A (en) * | 2022-09-29 | 2022-12-23 | 广东利元亨智能装备股份有限公司 | Shell appearance detection method and device |
| WO2024066074A1 (en) * | 2022-09-29 | 2024-04-04 | 广东利元亨智能装备股份有限公司 | Case appearance inspection method and apparatus |
| CN115435684A (en) * | 2022-09-30 | 2022-12-06 | 中国兵器装备集团自动化研究所有限公司 | A dimensional defect detection method, device, equipment and storage medium |
| CN118442934A (en) * | 2024-05-20 | 2024-08-06 | 常熟华新汽车零部件有限公司 | Method and system for detecting edge of storage battery shell |
| CN119643554A (en) * | 2024-11-13 | 2025-03-18 | 中国第一汽车股份有限公司 | Differential case defect detection method, device, computer equipment and storage medium |
| CN119470473A (en) * | 2025-01-09 | 2025-02-18 | 成都精工华耀科技有限公司 | A method and system for quality inspection of perforated workpieces |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108844961A (en) | A kind of temperature controller case vision detection system and method | |
| CN109900711A (en) | Workpiece, defect detection method based on machine vision | |
| CN105067638B (en) | Tire fetal membrane face character defect inspection method based on machine vision | |
| CN108921176B (en) | Pointer instrument positioning and identifying method based on machine vision | |
| CN105069790B (en) | A kind of gear open defect fast image detection method | |
| CN109752392B (en) | A PCB board defect type detection system and method | |
| CN111047568A (en) | Steam leakage defect detection and identification method and system | |
| CN106248686A (en) | Glass surface defects based on machine vision detection device and method | |
| CN107239742B (en) | Method for calculating scale value of instrument pointer | |
| CN106370671A (en) | PCB (printed circuit board) component detection system and method based on machine vision | |
| CN104568986A (en) | Method for automatically detecting printing defects of remote controller panel based on SURF (Speed-Up Robust Feature) algorithm | |
| CN113705564B (en) | A method for identifying and reading pointer instruments | |
| CN105973148A (en) | Pen point appearance size standardization detection system based on machine vision | |
| WO2021046726A1 (en) | Method and device for detecting mechanical equipment parts | |
| CN115601359A (en) | Welding seam detection method and device | |
| WO2017181724A1 (en) | Inspection method and system for missing electronic component | |
| CN107895362A (en) | A kind of machine vision method of miniature binding post quality testing | |
| CN106501272B (en) | Machine vision soldering tin positioning detection system | |
| CN108802052A (en) | A kind of detecting system and its detection method about slide fastener defect | |
| Sun et al. | Cascaded detection method for surface defects of lead frame based on high-resolution detection images | |
| CN109900719A (en) | A kind of visible detection method of blade surface knife mark | |
| CN119919410B (en) | Method for measuring size and appearance of O-rings | |
| CN115035092A (en) | Image-based bottle detection method, device, equipment and storage medium | |
| CN108389184A (en) | A kind of workpiece drilling number detection method based on machine vision | |
| CN111739003B (en) | Machine vision method for appearance detection |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information |
Country or region after: China Address after: 528000 Foshan Institute of science and technology, Xianxi reservoir West Road, Shishan town, Nanhai District, Foshan City, Guangdong Province Applicant after: Foshan University Address before: 528000 Foshan Institute of science and technology, Xianxi reservoir West Road, Shishan town, Nanhai District, Foshan City, Guangdong Province Applicant before: FOSHAN University Country or region before: China |
|
| CB02 | Change of applicant information | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181120 |
|
| RJ01 | Rejection of invention patent application after publication |