CN106600593A - Aluminum ceramic ball surface detect detection method - Google Patents
Aluminum ceramic ball surface detect detection method Download PDFInfo
- Publication number
- CN106600593A CN106600593A CN201611180223.6A CN201611180223A CN106600593A CN 106600593 A CN106600593 A CN 106600593A CN 201611180223 A CN201611180223 A CN 201611180223A CN 106600593 A CN106600593 A CN 106600593A
- Authority
- CN
- China
- Prior art keywords
- image
- porcelain ball
- aluminum porcelain
- ceramic ball
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- 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
- 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
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- 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
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N2201/00—Features of devices classified in G01N21/00
- G01N2201/10—Scanning
- G01N2201/102—Video camera
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
本发明涉及一种中铝瓷球表面缺陷检测方法:采集中铝瓷球表面的光学图像;对所述光学图像进行灰度变换;构造线性平滑滤波器对所述二值图像进行滤波,除去高频成分和锐化细节;采用高反差保留算法对滤波图像进行增强;采用阈值边缘描述法对滤波图像进行首次图像分割获得初步的中铝瓷球表面的缺陷信息;以面积为特征进行统计分类,并进行筛选;对筛选出的区域进行膨胀、合并为域,将区域单独分割;将上步得到的局部初始图像再次进行线性平滑运算,利用动态阈值法进行图像精准分割,得到精准的中铝瓷球表面的缺陷信息;进行面积统计,计算其像素点,若像素点大于0,则判定对应中铝瓷球不合格。本发明提高了检测准确性与自动化程度,提升了检测效率。
The invention relates to a method for detecting defects on the surface of a medium-alumina ceramic ball: collecting an optical image of the surface of a medium-alumina ceramic ball; performing gray scale transformation on the optical image; constructing a linear smoothing filter to filter the binary image to remove high Frequency components and sharpening details; the high contrast preservation algorithm is used to enhance the filtered image; the threshold edge description method is used to segment the filtered image for the first time to obtain preliminary defect information on the surface of the aluminum ceramic ball; the area is used as a feature for statistical classification, And filter; expand and merge the selected areas into domains, and segment the areas separately; perform linear smoothing operations on the local initial images obtained in the previous step, and use dynamic threshold method to perform image segmentation accurately to obtain accurate medium-aluminum porcelain Defect information on the surface of the ball; perform area statistics and calculate its pixel points. If the pixel point is greater than 0, it is determined that the corresponding medium-aluminum ceramic ball is unqualified. The invention improves the detection accuracy and automation degree, and improves the detection efficiency.
Description
技术领域technical field
本发明涉及一种中铝瓷球表面缺陷检测方法。The invention relates to a method for detecting surface defects of medium-alumina ceramic balls.
背景技术Background technique
瓷球广泛用于石油、化工、化肥、天然气及环保等行业,作为反应器内催化剂的覆盖支撑材料和塔填料。它具有耐高温高压,吸水率低,化学性能稳定的特点。能经受酸、碱及其它有机溶剂的腐蚀,并能经受生产过程中出现的温度变化。针对各尺寸中铝瓷球,为了保证产品可用性,必须对其表面的微缺损(如微小裂纹、微破损)进行检测。目前该类零件的表面缺损检测主要依靠人眼目视检测,由于受检查人员技术、经验、工作环境以及视力疲劳等影响,很容易出现误检和漏检,并且人工目测效率低、缺乏准确性和规范化,稳定性和可靠性比较差。为了解决人工目测工作难度大、效率低、漏检率高的难题,需要引进一种自动检测技术,既降低人力成本又能实现对产品质量的严格控制。Porcelain balls are widely used in petroleum, chemical, fertilizer, natural gas and environmental protection industries, as covering support materials for catalysts in reactors and tower packing. It has the characteristics of high temperature and high pressure resistance, low water absorption and stable chemical properties. It can withstand the corrosion of acid, alkali and other organic solvents, and can withstand the temperature changes in the production process. For aluminum ceramic balls of various sizes, in order to ensure product usability, it is necessary to detect micro-defects on the surface (such as micro-cracks, micro-damages). At present, the surface defect detection of such parts mainly relies on human visual inspection. Due to the influence of the inspector's technology, experience, working environment and visual fatigue, it is easy to have false detection and missed detection, and the efficiency of manual visual inspection is low and lacks accuracy. And normalization, stability and reliability are relatively poor. In order to solve the problems of high difficulty, low efficiency and high missed detection rate of manual visual inspection, it is necessary to introduce an automatic detection technology, which can not only reduce labor costs but also achieve strict control of product quality.
目前计算机视觉技术已相对成熟,具有非接触、速度快、精度高、抗干扰能力强等诸多优点,如果将计算机视觉技术引入小尺寸中铝瓷球端面缺损检测中,将能够很好地满足其对可靠性和灵敏度的要求,而且维护方便。At present, computer vision technology is relatively mature, and has many advantages such as non-contact, fast speed, high precision, and strong anti-interference ability. Requirements for reliability and sensitivity, and easy maintenance.
发明内容Contents of the invention
有鉴于此,本发明的目的在于提供一种中铝瓷球表面缺陷检测方法,提高了检测准确性与自动化程度,提升了检测效率。In view of this, the object of the present invention is to provide a method for detecting surface defects of medium-aluminum ceramic balls, which improves the detection accuracy and automation, and improves the detection efficiency.
为实现上述目的,本发明采用如下技术方案:一种中铝瓷球表面缺陷检测方法,其特征在于,包括以下步骤:In order to achieve the above object, the present invention adopts the following technical solution: a method for detecting surface defects of medium-aluminum ceramic balls, which is characterized in that it includes the following steps:
步骤S1:采集中铝瓷球表面的光学图像;Step S1: collecting an optical image of the surface of the aluminum ceramic ball;
步骤S2:对所述光学图像进行灰度变换,得到二值图像;Step S2: performing grayscale transformation on the optical image to obtain a binary image;
步骤S3:构造线性平滑滤波器对所述二值图像进行滤波,除去高频成分和锐化细节,得到滤波图像;Step S3: Construct a linear smoothing filter to filter the binary image, remove high-frequency components and sharpen details, and obtain a filtered image;
步骤S4:采用高反差保留算法对所述滤波图像进行增强,凸显出中铝瓷球表面裂缝与背景之间的对比度;Step S4: using a high-contrast preservation algorithm to enhance the filtered image, highlighting the contrast between the cracks on the surface of the medium-alumina ceramic ball and the background;
步骤S5:采用阈值边缘描述法对所述滤波图像进行首次图像分割得到若干区域,结合图像形态学运算滤除背景,获得初步的中铝瓷球表面的缺陷信息;Step S5: Segment the filtered image for the first time by using the threshold edge description method to obtain several regions, and filter the background in combination with image morphology operations to obtain preliminary defect information on the surface of the medium-aluminum ceramic ball;
步骤S6:对于所述若干区域以面积为特征进行统计分类,设定面积值M1和M2,筛选出面积值介于M1和M2之间的区域;Step S6: Statistically classify the several regions based on the area, set the area values M1 and M2, and filter out the regions whose area values are between M1 and M2;
步骤S7:对筛选出的区域设定膨胀系数对对应的图像进行膨胀,对膨胀后的图像合并为域,利用对比作差法,将区域单独分割出来,得到与膨胀后的图像特征相同的局部初始图像;Step S7: Set the expansion coefficient for the screened area to expand the corresponding image, merge the expanded image into a domain, use the contrast method to separate the area separately, and obtain the local area with the same characteristics as the expanded image initial image;
步骤S8:将步骤S7得到的局部初始图像再次进行线性平滑运算进行滤波,将再次滤波后的图像利用动态阈值法进行图像精准分割,得到精准的中铝瓷球表面的缺陷信息;Step S8: Perform linear smoothing operation on the local initial image obtained in step S7 to filter again, and use the dynamic threshold method to perform accurate image segmentation on the re-filtered image to obtain accurate defect information on the surface of the aluminum ceramic ball;
步骤S9:对所述精确的中铝瓷球表面的缺陷信息进行面积统计,计算其像素点,若像素点大于0,则判定对应中铝瓷球不合格。Step S9: Perform area statistics on the accurate defect information on the surface of the medium-aluminum ceramic ball, and calculate its pixel points. If the pixel point is greater than 0, it is determined that the corresponding medium-aluminum ceramic ball is unqualified.
进一步的,所述步骤S1中,采集所述光学图像的装置包括传送带及用于旋转中铝瓷球的抓取装置,所述抓取装置在传送带上方随传送带移动;所述传送带正上方还设置有若干带光源的暗箱及用于获取暗箱内部图像的工业相机,所述暗箱在传送带前进的方向上开设有用于中铝瓷球通过的开口;所述带光源的暗箱的正下方设置有不合格收集框,所述传送带尾端的下方设置有合格收集框;还包括控制器,所述控制器与所述工业相机、抓取装置及控制传送带运动的电机连接,用于接收工业相机采集到的光学图像、控制抓取装置松开或夹紧中铝瓷球并控制传送带的运动;所述控制器与上位机连接,将光学图像传输给上位机并接收上位机的控制命令。Further, in the step S1, the device for collecting the optical image includes a conveyor belt and a grabbing device for rotating the aluminum ceramic ball, and the grabbing device moves with the conveyor belt above the conveyor belt; There are a number of dark boxes with light sources and industrial cameras used to obtain images inside the dark boxes. The dark boxes are provided with openings for the passage of medium-aluminum ceramic balls in the direction of the conveyor belt; A collection frame, a qualified collection frame is provided below the tail end of the conveyor belt; it also includes a controller connected to the industrial camera, the grabbing device and a motor that controls the movement of the conveyor belt, and is used to receive the optical data collected by the industrial camera. Image, control the grabbing device to loosen or clamp the aluminum ceramic ball and control the movement of the conveyor belt; the controller is connected with the upper computer, transmits the optical image to the upper computer and receives the control command of the upper computer.
进一步的,所述光源为组合条形光源,设置于暗箱顶部的周侧;所述暗箱的内壁设置有漫射板,暗箱的顶部设置有相机开口,所述相机开口的正上方设置工业相机。Further, the light source is a combined strip light source, which is arranged around the top of the dark box; the inner wall of the dark box is provided with a diffusion plate, the top of the dark box is provided with a camera opening, and an industrial camera is arranged directly above the camera opening.
进一步的,所述步骤S3中,所述线性平滑滤波器采用局部均值运算,每个像素灰度值用其局部邻域内所有值的权值置换,计算公式为:Further, in the step S3, the linear smoothing filter adopts a local mean value operation, and the gray value of each pixel is replaced by the weight of all values in its local neighborhood, and the calculation formula is:
其中,M是邻域N内的像素点总数,h[i,j]是滤波后像素点[i,j]的灰度值,f[k,l]是滤波前像素点[k,l]的邻域像素点的灰度值。Among them, M is the total number of pixels in the neighborhood N, h[i,j] is the gray value of the filtered pixel [i,j], f[k,l] is the pre-filtered pixel [k,l] The gray value of the neighboring pixels.
进一步的,所述步骤S4的具体内容如下:Further, the specific content of the step S4 is as follows:
步骤S41:采用高斯核对滤波图像进行模糊,选择的3*3的模糊逼近模板为:Step S41: Using the Gaussian kernel to blur the filtered image, the selected 3*3 blur approximation template is:
其中高斯核逼近计算的公式为:The formula for Gaussian kernel approximation calculation is:
步骤S42:利用权值矩阵对光学图像进行卷积,得到模糊图像;Step S42: using the weight matrix to convolve the optical image to obtain a blurred image;
步骤S43:将原始图像与模糊图像相减,得到高通图像;Step S43: subtracting the original image from the blurred image to obtain a high-pass image;
步骤S44:将原始图像与高通图像进行动态权值相加,表达式为:Step S44: adding dynamic weights to the original image and the high-pass image, the expression is:
AdImg=BlurImg+Amount*(RawImg-BlurImg+127)AdImg=BlurImg+Amount*(RawImg-BlurImg+127)
其中:AdImg为增强图像,BlurImg为模糊图像,RawImg-BlurImg+127为高通图像,RawImg为原始图像,Amount为权值,权值的取值范围为[0,1]。Among them: AdImg is an enhanced image, BlurImg is a blurred image, RawImg-BlurImg+127 is a high-pass image, RawImg is an original image, Amount is a weight, and the value range of the weight is [0,1].
进一步的,所述步骤S5中,阈值边缘描述法的具体内容如下:Further, in the step S5, the specific content of the threshold edge description method is as follows:
步骤S51:选择一个初始近似阈值的估算值T1和T2,其中,T1小于T2;Step S51: Select an initial approximate threshold value T1 and T2, wherein T1 is smaller than T2;
步骤S52:利用估算值T1和T2把图像按照灰度值是否小于T1、大于T2以及介于T1和T2之间分成三组区域R1、R2和R3;Step S52: Use the estimated values T1 and T2 to divide the image into three groups of regions R 1 , R 2 and R 3 according to whether the gray value is smaller than T1, larger than T2, and between T1 and T2;
步骤S53:合并区域R1和R2,将图像重新分成区域L1和L2;Step S53: merge the regions R 1 and R 2 , and re-divide the image into regions L1 and L2;
步骤S54:利用求导法对区域L1和L2区域交界处二次求导,结果以矩阵形式保存;Step S54: use the derivation method to obtain the second derivation at the junction of the regions L1 and L2, and save the result in matrix form;
步骤S55:针对上述保存后的图像再次设置T1’和T2’,得到满足上述条件的所有区域的边界信息以矩阵形式保存。Step S55: Set T1' and T2' again for the above-mentioned saved image, and obtain the boundary information of all regions satisfying the above-mentioned conditions and save them in matrix form.
进一步的,所述步骤S8中,动态阈值法的具体内容如下:Further, in the step S8, the specific content of the dynamic threshold method is as follows:
步骤S81:将再次滤波后的图像点集阈值记做g{e},将局部图像的点集的阈值记做g{o},并设定基准差值t;Step S81: record the threshold of the image point set after filtering again as g{e}, record the threshold of the point set of the local image as g{o}, and set the reference difference t;
步骤S82:将g{e}中的数值分别减去基准差值t,并与g{o}比较,若满足g{o}<g{e}-t,则将该图像上的点集留下,否则剔除,最后得到精确滤波后的中铝瓷球表面缺陷信息,并对其进行标记。Step S82: Subtract the reference difference t from the value in g{e}, and compare with g{o}, if g{o}<g{e}-t is satisfied, save the point set on the image Otherwise, it is eliminated, and finally the accurately filtered surface defect information of the medium-alumina ceramic ball is obtained and marked.
本发明与现有技术相比具有以下有益效果:本发明采用计算机视觉和组合光源漫射光技术相结合的方式,实现了各尺寸中铝瓷球表面的缺陷检测及筛选,特别是解决了中铝瓷球表面细小裂纹检测困难,另外本发明能够实现多工位检测以及解决了常用算法计算量大、检测速度慢等问题,能够真实反映中铝瓷球的表面缺陷信息,并能准确判断检测对象是否合格,且数据量小,检测效率高,具有很强的实用性和广阔的应用前景。Compared with the prior art, the present invention has the following beneficial effects: the present invention adopts the combination of computer vision and combined light source diffuse light technology to realize the detection and screening of defects on the surface of aluminum ceramic balls of various sizes, especially to solve the problem of It is difficult to detect small cracks on the surface of ceramic balls. In addition, the invention can realize multi-station detection and solve the problems of large calculation amount and slow detection speed of common algorithms, and can truly reflect the surface defect information of medium-alumina ceramic balls, and can accurately judge the detection object Whether it is qualified or not, and the amount of data is small, the detection efficiency is high, and it has strong practicability and broad application prospects.
附图说明Description of drawings
图1是本发明的方法流程图。Fig. 1 is a flow chart of the method of the present invention.
图2是本发明一实施例采集光学图像的装置示意图。Fig. 2 is a schematic diagram of a device for collecting optical images according to an embodiment of the present invention.
图3是本发明一实施例的暗箱及工业相机局部示意图。Fig. 3 is a partial schematic diagram of a dark box and an industrial camera according to an embodiment of the present invention.
图4是图3的A-A剖视图。Fig. 4 is a cross-sectional view along line A-A of Fig. 3 .
图5是图3的B-B剖视图。Fig. 5 is a B-B sectional view of Fig. 3 .
图6是图3的C-C剖视图。Fig. 6 is a C-C sectional view of Fig. 3 .
图中:1-传送带;2-抓取装置;3-中铝瓷球;4-暗箱;5-工业相机;6-控制器;7-上位机;8-箱体;9-不合格收集框;10-合格收集框;41-组合条形光源;42-漫射板;43-相机开口;44-开口。In the figure: 1-conveyor belt; 2-grabbing device; 3-medium aluminum ceramic ball; 4-black box; 5-industrial camera; 6-controller; 7-host computer; 8-box; 9-unqualified collection box ; 10-qualified collection frame; 41-combined strip light source; 42-diffusion plate; 43-camera opening; 44-opening.
具体实施方式detailed description
下面结合附图及实施例对本发明做进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
请参照图1,本发明提供一种中铝瓷球表面缺陷检测方法,其特征在于,包括以下步骤:Please refer to Fig. 1, the present invention provides a kind of surface defect detection method of medium-aluminum ceramic ball, it is characterized in that, comprises the following steps:
步骤S1:采集中铝瓷球表面的光学图像;Step S1: collecting an optical image of the surface of the aluminum ceramic ball;
请参照图2至图6,采集所述光学图像的装置包括传送带1及用于旋转中铝瓷球3的抓取装置2,所述抓取装置2在传送带1上方随传送带1移动;所述传送带正上方还设置有若干带光源的暗箱4及用于获取暗箱4内部图像的工业相机5,所述暗箱4在传送带1前进的方向上开设有用于中铝瓷球3通过的开口44;在传送带1运动的同时,中铝瓷球3随着抓取装置2依次进入暗箱中,由工业相机5获取中铝瓷球3表面的光学图像;每进入下一个暗箱前,抓取装置2带动中铝瓷球3转动一定角度,每次转动的角度由暗箱的个数决定,只要保证历经所有的暗箱后,中铝瓷球在同一平面内转动了360°即可,比如,在本实施例中,设置有6个暗箱,则每次中铝瓷球转动60°。Please refer to Fig. 2 to Fig. 6, the device of collecting described optical image comprises conveyer belt 1 and the grasping device 2 that is used for rotating medium aluminum ceramic ball 3, and described grasping device 2 moves with conveyer belt 1 above conveyer belt 1; The conveyor belt is also provided with some dark boxes 4 with light sources and an industrial camera 5 for obtaining images inside the dark box 4, and the dark box 4 is provided with an opening 44 for the passage of the aluminum ceramic ball 3 in the direction in which the conveyor belt 1 advances; While the conveyor belt 1 is moving, the medium-aluminum ceramic balls 3 enter the dark box sequentially with the grasping device 2, and the optical image of the surface of the medium-aluminum ceramic balls 3 is obtained by the industrial camera 5; before entering the next dark box, the grasping device 2 drives the medium The aluminum ceramic ball 3 rotates at a certain angle, and the angle of each rotation is determined by the number of dark boxes, as long as it is ensured that the aluminum ceramic ball rotates 360° in the same plane after passing through all the dark boxes, for example, in this embodiment , is provided with 6 obscura, each time the aluminum ceramic ball rotates 60 °.
还包括控制器6,所述控制器6与所述工业相机5、抓取装置2及控制传送带1运动的电机连接,用于接收工业相机5采集到的光学图像、控制抓取装置2松开或夹紧中铝瓷球并控制传送带1的运动;所述控制器6与上位机7连接,将光学图像传输给上位机7并接收上位机的控制命令。所述带光源的暗箱4的正下方设置有不合格收集框9,所述传送带1尾端的下方设置有合格收集框10;在传送带1的起始端,还设置有用于存储中铝瓷球的下方带开口的箱体8。Also includes a controller 6, the controller 6 is connected with the industrial camera 5, the grasping device 2 and the motor that controls the movement of the conveyor belt 1, and is used to receive the optical image collected by the industrial camera 5 and control the grasping device 2 to release Or clamp the aluminum ceramic ball and control the movement of the conveyor belt 1; the controller 6 is connected with the host computer 7, transmits the optical image to the host computer 7 and receives the control command from the host computer. An unqualified collection frame 9 is arranged directly below the dark box 4 with a light source, and a qualified collection frame 10 is arranged below the tail end of the conveyor belt 1; Box 8 with opening.
于本实施例中,上位机为计算机,在计算机接收到控制器传输过来的光学图像后,根据下述步骤S2至步骤S9判断对应的中铝瓷球的合格情况,若判断中铝瓷球不合格,计算机向控制器发出松开相应抓取装置的控制命令,则中铝瓷球掉落至下方的不合格收集框,若判断中铝瓷球合格,则计算机发出传送带运动的命令以及抓取装置带动中铝瓷球旋转的命令,令中铝瓷球进入下一个暗箱,在中铝瓷球历经所有暗箱后,中铝瓷球整体合格,控制器控制抓取装置在传送带末端松开中铝瓷球另起掉落至合格收集框中。In this embodiment, the upper computer is a computer. After the computer receives the optical image transmitted by the controller, it judges the qualification of the corresponding aluminum ceramic ball according to the following steps S2 to S9. If it is judged that the aluminum ceramic ball is not If it is qualified, the computer sends a control command to the controller to loosen the corresponding grabbing device, and then the aluminum ceramic balls fall to the unqualified collection box below. The device drives the order of the aluminum ceramic ball to rotate, so that the aluminum ceramic ball enters the next dark box. After the aluminum ceramic ball passes through all the dark boxes, the aluminum ceramic ball is qualified as a whole, and the controller controls the grabbing device to release the aluminum ceramic ball at the end of the conveyor belt. The ceramic balls will be dropped into the qualified collection box separately.
于本实施例中,所述光源为组合条形光源41,设置于暗箱4顶部的周侧;所述暗箱4的内壁设置有漫射板42,暗箱4的顶部设置有相机开口43,所述相机开口43的正上方设置工业相机5;优选的,为了避免直射光照照射中铝瓷球表面形成强烈的反光,组合条形光源41在安装时向外侧倾斜一定的角度,光照射在漫射板上,经漫反射直接照射在中铝瓷球表面,不仅能够有效避免光照时的阴影,同时能有效避免强反射,从而获得清晰的中铝瓷球表面裂缝缺陷的图像。In this embodiment, the light source is a combination strip light source 41, which is arranged on the peripheral side of the top of the dark box 4; the inner wall of the dark box 4 is provided with a diffusion plate 42, and the top of the dark box 4 is provided with a camera opening 43. An industrial camera 5 is arranged directly above the camera opening 43; preferably, in order to avoid strong reflections on the surface of the aluminum ceramic ball in the direct light irradiation, the combined strip light source 41 is inclined to the outside at a certain angle during installation, and the light is irradiated on the diffuser plate. On the surface, direct irradiation on the surface of the medium-alumina ceramic ball through diffuse reflection can not only effectively avoid the shadow of the light, but also effectively avoid strong reflection, so as to obtain a clear image of crack defects on the surface of the medium-alumina ceramic ball.
步骤S2:对所述光学图像进行灰度变换,得到二值图像;Step S2: performing grayscale transformation on the optical image to obtain a binary image;
步骤S3:构造线性平滑滤波器对所述二值图像进行滤波,除去高频成分和锐化细节,得到滤波图像;所述线性平滑滤波器采用局部均值运算,每个像素灰度值用其局部邻域内所有值的权值置换,计算公式为:Step S3: Construct a linear smoothing filter to filter the binary image, remove high-frequency components and sharpen details, and obtain a filtered image; the linear smoothing filter uses a local mean value operation, and the gray value of each pixel uses its local The weight replacement of all values in the neighborhood, the calculation formula is:
其中,M是邻域N内的像素点总数,h[i,j]是滤波后像素点[i,j]的灰度值,f[k,l]是滤波前像素点[k,l]的邻域像素点的灰度值;例如在像素点[i,j]处取3×3邻域,得到Among them, M is the total number of pixels in the neighborhood N, h[i,j] is the gray value of the filtered pixel [i,j], f[k,l] is the pre-filtered pixel [k,l] The gray value of the neighborhood pixel; for example, take a 3×3 neighborhood at the pixel [i,j], get
线性平滑滤波器可除去高频成分和图像中的锐化细节,本发明采9×9用的平滑滤波器,其权值模板如下:The linear smoothing filter can remove high-frequency components and sharp details in the image. The present invention adopts a 9×9 smoothing filter, and its weight template is as follows:
步骤S4:采用高反差保留算法对所述滤波图像进行增强,以便凸显出中铝瓷球表面裂缝与背景之间的对比度,便于后续的分割处理,具体的方法如下;Step S4: using a high-contrast preservation algorithm to enhance the filtered image, so as to highlight the contrast between the cracks on the surface of the medium-aluminum ceramic ball and the background, and facilitate subsequent segmentation processing. The specific method is as follows;
步骤S41:采用高斯核对滤波图像进行模糊,根据现有的情况,选择3*3的权值因子(模糊半径)可以获得很好的效果,选择的3*3的模糊逼近模板为:Step S41: Use the Gaussian kernel to blur the filtered image. According to the existing situation, a good effect can be obtained by selecting a weight factor (blurring radius) of 3*3. The selected blurring approximation template of 3*3 is:
其中高斯核逼近计算的公式为:The formula for Gaussian kernel approximation calculation is:
步骤S42:利用权值矩阵对光学图像进行卷积,得到模糊图像;Step S42: using the weight matrix to convolve the optical image to obtain a blurred image;
步骤S43:将原始图像与模糊图像相减,得到高通图像,即保留完美边缘,本实例中即为存在表面缺陷的地方;Step S43: Subtracting the original image from the blurred image to obtain a high-pass image, that is, retaining the perfect edge, which is the place where there is a surface defect in this example;
步骤S44:将原始图像与高通图像进行动态权值相加,表达式为:Step S44: adding dynamic weights to the original image and the high-pass image, the expression is:
AdImg=BlurI mg+Amount*(RawImg-BlurImg+127)AdImg=BlurImg+Amount*(RawImg-BlurImg+127)
其中:AdImg为增强图像,BlurImg为模糊图像,RawImg-BlurImg+127为高通图像,RawImg为原始图像,Amount为权值,权值的取值范围为[0,1]。Among them: AdImg is an enhanced image, BlurImg is a blurred image, RawImg-BlurImg+127 is a high-pass image, RawImg is an original image, Amount is a weight, and the value range of the weight is [0,1].
步骤S5:采用阈值边缘描述法对所述滤波图像进行首次图像分割得到若干区域,结合图像形态学运算滤除背景,获得初步的中铝瓷球表面的缺陷信息;阈值边缘描述法的具体内容如下:Step S5: Use the threshold edge description method to perform image segmentation on the filtered image for the first time to obtain several regions, and combine the image morphology operation to filter out the background to obtain preliminary defect information on the surface of the aluminum ceramic ball; the specific content of the threshold edge description method is as follows :
步骤S51:选择一个初始近似阈值的估算值T1和T2,其中,T1小于T2;Step S51: Select an initial approximate threshold value T1 and T2, wherein T1 is smaller than T2;
步骤S52:利用估算值T1和T2把图像按照灰度值是否小于T1、大于T2以及介于T1和T2之间分成三组区域R1、R2和R3;Step S52: Use the estimated values T1 and T2 to divide the image into three groups of regions R 1 , R 2 and R 3 according to whether the gray value is smaller than T1, larger than T2, and between T1 and T2;
步骤S53:合并区域R1和R2,将图像重新分成区域L1和L2;Step S53: merge the regions R 1 and R 2 , and re-divide the image into regions L1 and L2;
步骤S54:利用求导法对区域L1和L2区域交界处二次求导,由于区域L1和L2交界处边缘特征变换明显,对其二次求导得到变化的极值可以准确地确定边界的位置,结果以矩阵形式保存;Step S54: Use the derivation method to conduct a second derivation at the junction of the regions L1 and L2. Since the edge features at the junction of the regions L1 and L2 are significantly transformed, the changed extreme value obtained by the second derivation can accurately determine the position of the boundary , the result is saved in matrix form;
步骤S55:针对上述保存后的图像再次设置T1’和T2’,得到满足上述条件的所有区域的边界信息,并将边界以特定颜色与原始图像区分显示,其结果以矩阵形式保存。Step S55: Set T1' and T2' again for the above-mentioned saved image, obtain the boundary information of all regions that meet the above conditions, and display the boundary with a specific color to distinguish it from the original image, and save the result in matrix form.
步骤S6:对于所述符合条件的若干区域以面积为特征进行统计分类,通过计算所有筛选出的区域面积的大小,设定面积值M1和M2,筛选出面积值介于M1和M2之间的区域,可以除去由于中铝瓷球表面自身特征出现的干扰噪声。Step S6: Statistically classify the qualified areas with the area as the feature, calculate the size of all the screened areas, set the area values M1 and M2, and filter out the area values between M1 and M2 area, which can remove the interference noise due to the characteristics of the surface of the medium-alumina ceramic ball.
步骤S7:对筛选出的区域设定膨胀系数对对应的图像进行膨胀,对膨胀后的图像合并为域,利用对比作差法,将区域单独分割出来,得到与膨胀后的图像特征相同的局部初始图像;所述对比作差法如下:Step S7: Set the expansion coefficient for the screened area to expand the corresponding image, merge the expanded image into a domain, use the contrast method to separate the area separately, and obtain the local area with the same characteristics as the expanded image Initial image; the contrast method is as follows:
将初始灰度变换后的图像与上述膨胀处理后合并后的点集进行逻辑与运算,得到与膨胀后图像特征相同的差后局部初始图像,即为包含中铝瓷球缺陷的分割后的图像。Perform logical AND operation on the image after the initial gray scale transformation and the merged point set after the above-mentioned expansion processing, and obtain the local initial image after difference with the same characteristics as the image after expansion, which is the segmented image containing the defects of medium-alumina ceramic balls .
步骤S8:将步骤S7得到的局部初始图像再次进行线性平滑运算进行滤波,将再次滤波后的图像利用动态阈值法进行图像精准分割,得到精准的中铝瓷球表面的缺陷信息;动态阈值法的具体内容如下:Step S8: Perform linear smoothing operation on the local initial image obtained in step S7 to filter again, and use the dynamic threshold method to perform image segmentation on the re-filtered image to obtain accurate defect information on the surface of the aluminum ceramic ball; the dynamic threshold method The specific content is as follows:
步骤S81:将再次滤波后的图像点集阈值记做g{e},将局部图像的点集的阈值记做g{o},并设定基准差值t;Step S81: record the threshold of the image point set after filtering again as g{e}, record the threshold of the point set of the local image as g{o}, and set the reference difference t;
步骤S82:将g{e}中的数值分别减去基准差值t,并与g{o}比较,若满足g{o}<g{e}-t,则将该图像上的点集留下,否则剔除,最后得到精确滤波后的中铝瓷球表面缺陷信息,并对其进行标记。Step S82: Subtract the reference difference t from the value in g{e}, and compare with g{o}, if g{o}<g{e}-t is satisfied, save the point set on the image Otherwise, it is eliminated, and finally the accurately filtered surface defect information of the medium-alumina ceramic ball is obtained and marked.
步骤S9:对所述精确的中铝瓷球表面的缺陷信息进行面积统计,计算其像素点,若像素点大于0,则判定对应中铝瓷球不合格。Step S9: Perform area statistics on the accurate defect information on the surface of the medium-aluminum ceramic ball, and calculate its pixel points. If the pixel point is greater than 0, it is determined that the corresponding medium-aluminum ceramic ball is unqualified.
以上所述仅为本发明的较佳实施例,凡依本发明申请专利范围所做的均等变化与修饰,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611180223.6A CN106600593B (en) | 2016-12-19 | 2016-12-19 | A method for detecting surface defects of medium-aluminum ceramic balls |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611180223.6A CN106600593B (en) | 2016-12-19 | 2016-12-19 | A method for detecting surface defects of medium-aluminum ceramic balls |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106600593A true CN106600593A (en) | 2017-04-26 |
CN106600593B CN106600593B (en) | 2019-08-09 |
Family
ID=58601864
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611180223.6A Expired - Fee Related CN106600593B (en) | 2016-12-19 | 2016-12-19 | A method for detecting surface defects of medium-aluminum ceramic balls |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106600593B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107862693A (en) * | 2017-12-08 | 2018-03-30 | 湖南文理学院 | Detection method and device for nickel foam surface defect |
CN108230324A (en) * | 2018-01-31 | 2018-06-29 | 浙江理工大学 | Magnetic shoe surface microdefect visible detection method |
CN108318491A (en) * | 2017-12-04 | 2018-07-24 | 华南理工大学 | A kind of fabric defect detection method based on frequency spectrum curvature analysis |
CN109146871A (en) * | 2018-08-31 | 2019-01-04 | 珠海格力智能装备有限公司 | Crack identification method and device |
CN109584239A (en) * | 2018-12-13 | 2019-04-05 | 华南理工大学 | A kind of bloom body surface defect detecting system and method based on reflected light |
CN112354964A (en) * | 2020-10-14 | 2021-02-12 | 宁波格劳博智能工业有限公司 | Full-automatic cleaning and detecting equipment and method for lithium battery gravure printing roller |
CN113008897A (en) * | 2021-02-24 | 2021-06-22 | 江苏阿瑞斯智能设备有限公司 | Method, device and equipment for detecting defects of ceramic catalyst carrier |
CN113066046A (en) * | 2020-12-04 | 2021-07-02 | 泰州可以信息科技有限公司 | Cross section area qualified grade analysis platform and method |
WO2022007125A1 (en) * | 2020-07-07 | 2022-01-13 | 蒋梦兰 | Porcelain surface crack repairing and identifying system |
CN119290891A (en) * | 2024-10-25 | 2025-01-10 | 南京木木西里科技有限公司 | A target ball positioning circle measurement defect detection method and device based on SOD-YOLOv5 model |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6028948A (en) * | 1997-12-29 | 2000-02-22 | Lockheed Martin Corporation | Surface anomaly-detection and analysis method |
JP4012366B2 (en) * | 2000-12-26 | 2007-11-21 | 新日本製鐵株式会社 | Surface flaw detector |
CN102393397A (en) * | 2011-08-30 | 2012-03-28 | 成都四星液压制造有限公司 | System and method for detecting surface defects of magnetic shoe |
CN105447851A (en) * | 2015-11-12 | 2016-03-30 | 刘新辉 | Glass panel sound hole defect detection method and system |
CN106093066A (en) * | 2016-06-24 | 2016-11-09 | 安徽工业大学 | A kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved |
-
2016
- 2016-12-19 CN CN201611180223.6A patent/CN106600593B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6028948A (en) * | 1997-12-29 | 2000-02-22 | Lockheed Martin Corporation | Surface anomaly-detection and analysis method |
JP4012366B2 (en) * | 2000-12-26 | 2007-11-21 | 新日本製鐵株式会社 | Surface flaw detector |
CN102393397A (en) * | 2011-08-30 | 2012-03-28 | 成都四星液压制造有限公司 | System and method for detecting surface defects of magnetic shoe |
CN105447851A (en) * | 2015-11-12 | 2016-03-30 | 刘新辉 | Glass panel sound hole defect detection method and system |
CN106093066A (en) * | 2016-06-24 | 2016-11-09 | 安徽工业大学 | A kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108318491A (en) * | 2017-12-04 | 2018-07-24 | 华南理工大学 | A kind of fabric defect detection method based on frequency spectrum curvature analysis |
CN108318491B (en) * | 2017-12-04 | 2020-07-28 | 华南理工大学 | Fabric defect detection method based on frequency spectrum curvature analysis |
CN107862693B (en) * | 2017-12-08 | 2021-10-08 | 湖南文理学院 | Method and device for detecting surface defects of nickel foam |
CN107862693A (en) * | 2017-12-08 | 2018-03-30 | 湖南文理学院 | Detection method and device for nickel foam surface defect |
CN108230324A (en) * | 2018-01-31 | 2018-06-29 | 浙江理工大学 | Magnetic shoe surface microdefect visible detection method |
CN108230324B (en) * | 2018-01-31 | 2023-10-20 | 浙江理工大学 | Visual detection method for microdefect on surface of magnetic shoe |
CN109146871A (en) * | 2018-08-31 | 2019-01-04 | 珠海格力智能装备有限公司 | Crack identification method and device |
CN109584239A (en) * | 2018-12-13 | 2019-04-05 | 华南理工大学 | A kind of bloom body surface defect detecting system and method based on reflected light |
CN109584239B (en) * | 2018-12-13 | 2024-02-06 | 华南理工大学 | High-light object surface defect detection system and method based on reflected light |
WO2022007125A1 (en) * | 2020-07-07 | 2022-01-13 | 蒋梦兰 | Porcelain surface crack repairing and identifying system |
CN112354964A (en) * | 2020-10-14 | 2021-02-12 | 宁波格劳博智能工业有限公司 | Full-automatic cleaning and detecting equipment and method for lithium battery gravure printing roller |
CN113066046A (en) * | 2020-12-04 | 2021-07-02 | 泰州可以信息科技有限公司 | Cross section area qualified grade analysis platform and method |
CN113008897A (en) * | 2021-02-24 | 2021-06-22 | 江苏阿瑞斯智能设备有限公司 | Method, device and equipment for detecting defects of ceramic catalyst carrier |
CN119290891A (en) * | 2024-10-25 | 2025-01-10 | 南京木木西里科技有限公司 | A target ball positioning circle measurement defect detection method and device based on SOD-YOLOv5 model |
CN119290891B (en) * | 2024-10-25 | 2025-05-06 | 南京木木西里科技有限公司 | Target pill positioning circle measurement defect detection method and device based on SOD-YOLOv model |
Also Published As
Publication number | Publication date |
---|---|
CN106600593B (en) | 2019-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106600593B (en) | A method for detecting surface defects of medium-aluminum ceramic balls | |
Ren et al. | State of the art in defect detection based on machine vision | |
CN113469177B (en) | Deep learning-based drainage pipeline defect detection method and system | |
Xiao et al. | Surface defect detection using image pyramid | |
US20190331301A1 (en) | Method for leakage detection of underground pipeline corridor based on dynamic infrared thermal image processing | |
CN113435460B (en) | A recognition method for bright crystal granular limestone images | |
CN108921201B (en) | Dam defect identification and classification method based on feature combination and CNN | |
CN110570393A (en) | A method for detecting defects in the window area of mobile phone glass cover based on machine vision | |
CN111932489A (en) | Weld defect detection method, system, storage medium, computer device and terminal | |
CN109636772A (en) | The defect inspection method on the irregular shape intermetallic composite coating surface based on deep learning | |
CN110458807A (en) | A Machine Vision Detection System for Railway Track Defects | |
CN108846397B (en) | Automatic detection method for cable semi-conducting layer based on image processing | |
CN101620060A (en) | Automatic detection method of particle size distribution | |
Jia et al. | Crack identification for marine engineering equipment based on improved SSD and YOLOv5 | |
CN108711149A (en) | Ore-rock particle size detection method based on image procossing | |
Kazantsev et al. | Statistical detection of defects in radiographic images in nondestructive testing | |
CN115330802B (en) | Method for extracting debonding defect of X-ray image of carbon fiber composite gas cylinder | |
CN105931225A (en) | Method for analyzing crystal growth shape and size distribution based on real-time image detection technology | |
WO2021109011A1 (en) | Intelligent capacitor internal defect detection method based on ultrasound image | |
CN106914428A (en) | A kind of New Algorithm of the steel ball surface defect Differential Detection based on machine vision | |
CN115829995A (en) | Cloth flaw detection method and system based on pixel-level multi-scale feature fusion | |
CN109886931A (en) | Surface defect detection method of wheel speed sensor ring gear based on BP neural network | |
CN114486916A (en) | Defect detection method of mobile phone glass cover based on machine vision | |
CN109584206B (en) | Synthesis method of training samples of neural network in part surface defect detection | |
Liu et al. | A multiple scale spaces empowered approach for welding radiographic image defect segmentation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190809 |
|
CF01 | Termination of patent right due to non-payment of annual fee |