CN117274158A - A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes - Google Patents
A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes Download PDFInfo
- Publication number
- CN117274158A CN117274158A CN202310997623.XA CN202310997623A CN117274158A CN 117274158 A CN117274158 A CN 117274158A CN 202310997623 A CN202310997623 A CN 202310997623A CN 117274158 A CN117274158 A CN 117274158A
- Authority
- CN
- China
- Prior art keywords
- image
- paving
- view
- defects
- images
- 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
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000007547 defect Effects 0.000 title claims abstract description 61
- 238000004519 manufacturing process Methods 0.000 title claims abstract description 51
- 239000000919 ceramic Substances 0.000 title claims abstract description 31
- 239000000654 additive Substances 0.000 title claims abstract description 29
- 230000000996 additive effect Effects 0.000 title claims abstract description 29
- 238000012544 monitoring process Methods 0.000 title claims abstract description 18
- 238000000016 photochemical curing Methods 0.000 title claims description 7
- 238000001514 detection method Methods 0.000 claims abstract description 41
- 239000011159 matrix material Substances 0.000 claims abstract description 34
- 238000003702 image correction Methods 0.000 claims abstract description 30
- 238000013136 deep learning model Methods 0.000 claims abstract description 10
- 238000012549 training Methods 0.000 claims abstract description 10
- 238000011065 in-situ storage Methods 0.000 claims abstract description 4
- 238000011897 real-time detection Methods 0.000 claims abstract description 3
- 230000008569 process Effects 0.000 claims description 36
- 230000006870 function Effects 0.000 claims description 31
- 230000002068 genetic effect Effects 0.000 claims description 30
- 238000012937 correction Methods 0.000 claims description 26
- 238000000465 moulding Methods 0.000 claims description 24
- 239000000463 material Substances 0.000 claims description 21
- 230000003287 optical effect Effects 0.000 claims description 19
- 230000035772 mutation Effects 0.000 claims description 14
- 238000005457 optimization Methods 0.000 claims description 14
- 238000001723 curing Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 9
- 230000004927 fusion Effects 0.000 claims description 7
- 239000002002 slurry Substances 0.000 claims description 7
- 238000013459 approach Methods 0.000 claims description 6
- 230000002950 deficient Effects 0.000 claims description 5
- 238000009826 distribution Methods 0.000 claims description 5
- 238000000605 extraction Methods 0.000 abstract description 6
- 239000013589 supplement Substances 0.000 abstract description 6
- 239000010410 layer Substances 0.000 description 54
- 238000004364 calculation method Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 7
- 238000007711 solidification Methods 0.000 description 5
- 230000008023 solidification Effects 0.000 description 5
- 230000009466 transformation Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000007639 printing Methods 0.000 description 4
- 239000003086 colorant Substances 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000007500 overflow downdraw method Methods 0.000 description 3
- 239000002994 raw material Substances 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 230000010429 evolutionary process Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- HBMJWWWQQXIZIP-UHFFFAOYSA-N silicon carbide Chemical compound [Si+]#[C-] HBMJWWWQQXIZIP-UHFFFAOYSA-N 0.000 description 2
- 229910010271 silicon carbide Inorganic materials 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000010146 3D printing Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 238000005238 degreasing Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 239000011229 interlayer Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000035515 penetration Effects 0.000 description 1
- 239000000843 powder Substances 0.000 description 1
- 239000000047 product Substances 0.000 description 1
- 239000011347 resin Substances 0.000 description 1
- 229920005989 resin Polymers 0.000 description 1
- 238000013341 scale-up Methods 0.000 description 1
- 238000002922 simulated annealing Methods 0.000 description 1
- 238000005245 sintering Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
- 238000011179 visual inspection Methods 0.000 description 1
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
- G06T7/0008—Industrial image inspection checking presence/absence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- 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/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- 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/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- 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/30232—Surveillance
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P10/00—Technologies related to metal processing
- Y02P10/25—Process efficiency
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Physiology (AREA)
- Evolutionary Computation (AREA)
- Genetics & Genomics (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Quality & Reliability (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
本发明公开了一种在线监测陶瓷光固化增材制造工艺铺料缺陷的方法,包括基于获取的图像校正矩阵,将监控相机采集到的侧视的铺料图像校正为正视的铺料图像;经过图像校正后的第k层正视的铺料图像和第k‑N层正视的铺料图像与第k‑N层切片图像合成三通道彩色图像,并将三通道彩色图像分割为若干个子图像;搭建深度学习模型,利用历史图像数据作为训练集对深度学习模型进行训练,训练完成后获取缺陷检测模型,将子图像依次输入缺陷检测模型中,实现缺陷原位实时检测。优点是:给需要检测的图像融入更多的信息,作为对被检图像地信息补充,在充分利用模型特征提取能力的同时,赋予了图像更多的信息,提升检测准确率。
The invention discloses a method for online monitoring of paving defects in ceramic light-curing additive manufacturing processes, which includes correcting the side-view paving image collected by a surveillance camera into a front-view paving image based on the acquired image correction matrix; After image correction, the front-view paving image of the k-th layer and the front-view paving image of the k-N layer are combined with the k-N-th layer slice image to synthesize a three-channel color image, and divide the three-channel color image into several sub-images; build The deep learning model uses historical image data as a training set to train the deep learning model. After the training is completed, the defect detection model is obtained, and the sub-images are sequentially input into the defect detection model to achieve in-situ real-time detection of defects. The advantage is: integrating more information into the image that needs to be detected, as a supplement to the information of the image being inspected, while making full use of the feature extraction capabilities of the model, it gives the image more information and improves the detection accuracy.
Description
技术领域Technical field
本发明涉及铺料情况监测技术领域,尤其涉及一种在线监测陶瓷光固化增材制造工艺铺料缺陷的方法。The invention relates to the technical field of paving situation monitoring, and in particular to a method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes.
背景技术Background technique
随着我国3D打印技术的发展,打印技术也逐渐走向成熟,打印产品的尺寸逐步向大型化发展,带来的问题是制造时间成倍增加,在制造过程容易产生各种缺陷。With the development of 3D printing technology in our country, printing technology has gradually matured, and the size of printed products has gradually developed towards large-scale. The problem is that the manufacturing time has doubled, and various defects are prone to occur during the manufacturing process.
如图1所示,陶瓷增材制造过程中,主要存在三类缺陷,第一类缺陷为裂纹缺陷,表现为气泡、凹坑和划痕,此类缺陷在零件坯体成型过程中虽不至于直接导致零件损坏,但是导致了零件内部材料分布不均,在后序的脱脂与烧结工艺中极易导致零件开裂;第二类缺陷为断裂缺陷,即缺料导致的断裂,表现形式为铺料面的某一部分没有材料,在铺满原材料的区域和未铺满的区域之间形成一条明显的边缘,在后面的成型过程中即使缺料的部分重新铺料打印,也由于陶瓷浆料的透光性不足难以穿透两层铺料厚度的浆料,使原材料难以全部固化,缺料缺陷严重影响坯体零件的层间结合力,导致零件分层断裂;第三类缺陷为破坏缺陷,表现为零件的薄弱处的坍塌,此种缺陷会导致坯体零件的成型过程完全失败,不能识别缺陷及时终止打印任务的话将导致时间与资源的极大浪费。As shown in Figure 1, there are three main types of defects in the ceramic additive manufacturing process. The first type of defects are crack defects, which are manifested as bubbles, pits and scratches. Although such defects are not serious during the molding process of the part body, It directly causes damage to the parts, but also leads to uneven distribution of materials inside the parts, which can easily lead to cracking of the parts during the subsequent degreasing and sintering processes. The second type of defects is fracture defects, which are fractures caused by lack of material, in the form of paving. There is no material in a certain part of the surface, forming an obvious edge between the area covered with raw materials and the area not covered. In the subsequent molding process, even if the missing parts are re-printed, due to the penetration of the ceramic slurry, Insufficient lightness makes it difficult to penetrate the slurry with two layers of paving thickness, making it difficult to fully solidify the raw materials. The lack of material defects seriously affects the interlayer bonding force of the green parts, causing the parts to break in layers; the third type of defects is damage defects, which manifest as Because of the collapse of the weak points of the parts, such defects will cause the molding process of the green parts to completely fail. Failure to identify the defects and terminate the printing task in time will lead to a huge waste of time and resources.
在目前工程应用中,发现此类错误一般依靠人工目视检查。随着陶瓷增材制造的大型化,制造时间成指数级增长趋势,使得人工检查的方式越来越不适用于本应用场景。In current engineering applications, finding such errors generally relies on manual visual inspection. With the scale-up of ceramic additive manufacturing, the manufacturing time increases exponentially, making manual inspection methods increasingly unsuitable for this application scenario.
一次陶瓷增材成型过程的固化区域的数字图像掩膜如图2(a)所示,那么一张典型的正常情况下的铺料面图像如图2(b)所示,典型的有缺陷(缺料)的铺料面图像如图2(c)所示。从图中可以直观看出,图像上的信息包括正常打印形成的浆料固化区域和缺陷(缺料)产生的意外边缘组成,两种边缘在二维图像上的表现十分相似,对于目标检测模型具有相当的混淆性,对于这类复杂表面中缺陷目标检测问题,直接将现有的目标检测方法应用在此类缺陷的检测中,却无法达到良好的缺陷检测效果,模型无法准确识别打印边缘和缺料边缘,从而导致误检。以制造过程中的缺料缺陷为例,将由于铺料所产生的边缘作为缺陷中要识别的目标,对数据集图像进行了标注,随后将数据集图像与标注信息输入模型中进行训练得到目标检测模型的权重,然后将验证集的图像输入训练好的模型中验证训练效果,验证图像如图3所示,可以明显看到,在验证图像中,模型将许多正常固化的边缘识别为了由于缺料所产生的边缘,造成了误检。The digital image mask of the cured area in a ceramic additive molding process is shown in Figure 2(a), and a typical image of the paving surface under normal conditions is shown in Figure 2(b). A typical defective ( The image of the paving surface (lack of material) is shown in Figure 2(c). It can be intuitively seen from the figure that the information on the image includes the slurry solidification area formed by normal printing and the unexpected edges caused by defects (lack of material). The performance of the two edges on the two-dimensional image is very similar. For the target detection model It is quite confusing. For the problem of defect target detection in such complex surfaces, the existing target detection method is directly applied to the detection of such defects, but it cannot achieve good defect detection results. The model cannot accurately identify the printing edges and The edge of the material is missing, resulting in false detection. Taking the material shortage defect in the manufacturing process as an example, the edge caused by the paving material is used as the target to be identified in the defect, the data set image is annotated, and then the data set image and annotation information are input into the model for training to obtain the target. Detect the weight of the model, and then input the images of the verification set into the trained model to verify the training effect. The verification image is shown in Figure 3. It can be clearly seen that in the verification image, the model recognizes many normally solidified edges due to lack of The edges generated by the material cause false detections.
造成这种误检的原因,有以下两点:1、在陶瓷增材制造成型过程中,由于采用的原材料为成分单一的陶瓷固体粉末与树脂的混合物,其固化过程没有颜色信息的产生;2、增材制造成型过程以其强大的灵活性著称,每次成型任务根据模型的不同使得铺料表面的固化区域十分灵活多变,而铺料缺料所产生的边缘又具有很大的随机性,综合产生的结果就是铺料表面的固化边缘与缺料边缘没有明显的几何特征方面的区别,使得两种边缘不易区分。以上两点原因可以总结为一点,即现有的铺料图像对增材制造铺料面的信息表达不足,使模型无法区分打印边缘与缺料边缘。There are two reasons for this misdetection: 1. In the ceramic additive manufacturing and molding process, since the raw material used is a mixture of ceramic solid powder and resin with a single component, no color information is generated during the curing process; 2. The additive manufacturing molding process is known for its strong flexibility. Each molding task makes the curing area on the surface of the paving material very flexible and changeable depending on the model, and the edges caused by the lack of material in the paving material are highly random. , the comprehensive result is that there is no obvious difference in geometric characteristics between the solidified edge and the missing edge of the paving surface, making it difficult to distinguish the two edges. The above two reasons can be summarized into one point, that is, the existing paving images do not adequately express the information of the additive manufacturing paving surface, making it impossible for the model to distinguish between printed edges and missing material edges.
发明内容Contents of the invention
本发明的目的在于提供一种在线监测陶瓷光固化增材制造工艺铺料缺陷的方法,从而解决现有技术中存在的前述问题。The purpose of the present invention is to provide a method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes, thereby solving the aforementioned problems existing in the prior art.
为了实现上述目的,本发明采用的技术方案如下:In order to achieve the above objects, the technical solutions adopted by the present invention are as follows:
一种在线监测陶瓷光固化增材制造工艺铺料缺陷的方法,包括如下步骤,A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes, including the following steps:
S1、图像校正:S1. Image correction:
基于光机投影的图像与切片图像获取图像校正矩阵,基于图像校正矩阵,将监控相机采集到的侧视的铺料图像校正为正视的铺料图像;所述切片图像为正视角下制造平面的浆料固化成型区域图像;The image correction matrix is obtained based on the image projected by the optical machine and the slice image. Based on the image correction matrix, the side-view paving image collected by the surveillance camera is corrected into a front-view paving image; the slice image is a manufacturing plane under the front viewing angle. Image of the slurry curing molding area;
S2、多层图像融合:S2, multi-layer image fusion:
经过图像校正后的第k层正视的铺料图像和第k-N层正视的铺料图像与第k-N层切片图像合成三通道彩色图像,并将三通道彩色图像分割为若干个子图像;其中,N=1,2,3,……,K-1;After image correction, the front-view paving image of the k-th layer and the front-view paving image of the k-Nth layer are combined with the k-Nth layer slice image to synthesize a three-channel color image, and the three-channel color image is divided into several sub-images; where, N= 1,2,3,…,K-1;
S3、缺陷检测:S3. Defect detection:
搭建深度学习模型,利用历史图像数据作为训练集对深度学习模型进行训练,训练完成后获取缺陷检测模型,将子图像依次输入缺陷检测模型中,实现陶瓷增材制造铺料缺陷原位在线实时检测。Build a deep learning model and use historical image data as a training set to train the deep learning model. After the training is completed, the defect detection model is obtained, and the sub-images are sequentially input into the defect detection model to achieve in-situ online real-time detection of defects in ceramic additive manufacturing paving materials. .
优选的,步骤S2具体包括如下内容,Preferably, step S2 specifically includes the following content:
S21、利用光机投影标记成型区域的外轮廓,在监控相机的镜头前端安装窄带透光片后采集光机投影的图像并计算成型区域的四个角点,将成型区域的四个角点与切片图像的四个角点相对应以获取图像校正矩阵;S21. Use optical machine projection to mark the outer contour of the molding area, install a narrow-band light-transmitting sheet on the front end of the lens of the surveillance camera, collect the image projected by the optical machine and calculate the four corner points of the molding area, and compare the four corner points of the molding area with The four corner points of the sliced image correspond to obtain the image correction matrix;
S22、将图像校正矩阵作用在监控相机采集的侧视的铺料图像中,获取初步的正视铺料图像;S22. Apply the image correction matrix to the side-view paving image collected by the surveillance camera to obtain a preliminary front-view paving image;
S23、使用插值算法填充初步的正视铺料图像中的空白像素点,并裁剪初步的正视铺料图像至与切片图像同像素,获取最终的正视铺料图像,即校正后图像;S23. Use the interpolation algorithm to fill in the blank pixels in the preliminary front-view paving image, and crop the preliminary front-view paving image to the same pixels as the sliced image to obtain the final front-view paving image, that is, the corrected image;
S24、定义目标函数,利用优化算法优化目标函数,以降低校正后图像与原图之间的误差。S24. Define the objective function and use the optimization algorithm to optimize the objective function to reduce the error between the corrected image and the original image.
优选的,步骤S24中,将二值化后的切片图像与校正后的图像的一阶范数与真值图像像素数的比值定义为目标函数,表达如下,Preferably, in step S24, the ratio of the first-order norm of the binarized slice image and the corrected image to the number of pixels of the true image is defined as the objective function, which is expressed as follows,
imgcali=imgsrc∝Himg cali = img src ∝H
(x′,y′)=(0,0),(0,Htruth),(Wtruth,Htruth),(Wtruth,0)(x′,y′)=(0,0),(0,H truth ),(W truth ,H truth ),(W truth ,0)
其中,imgslic为切片图像,即校正的真值;imgcali为监控相机采集到光机投影图像完成校正和二值化后的图像;imgsrc为监控相机采集到的原图,原图根据图像校正矩阵H完成图像校正;(x,y,1)为原图中图像齐次坐标点;(x’,y’,1)为校正图像中与原图中对应的点,h1~h8为校正矩阵H的八个独立元素;Wtruth和Htruth分别为真值图像的宽、高方向最大像素值;x∈[0,w],y∈[0,h],w和h分别为原图中的像素坐标点;i,j为对应图像的像素。Among them, img slic is the slice image, that is, the corrected true value; img cali is the corrected and binarized image of the optical-mechanical projection image collected by the surveillance camera; img src is the original image collected by the surveillance camera, and the original image is based on the image The correction matrix H completes the image correction; (x, y, 1) is the homogeneous coordinate point of the image in the original image; (x', y', 1) is the point in the corrected image corresponding to the original image, h 1 ~ h 8 are the eight independent elements of the correction matrix H; W truth and H truth are the maximum pixel values in the width and height directions of the true image respectively; x∈[0,w], y∈[0,h], w and h are respectively The pixel coordinate point in the original image; i, j are the pixels of the corresponding image.
优选的,所述优化算法为改进的遗传算法,Preferably, the optimization algorithm is an improved genetic algorithm,
所述改进的遗传算法将S21中的四个角点坐标及角点周围按照正态分布的随机点作为初始种群,为遗传算法提供先验知识;在初始种群中进行选择、交叉和变异,以最大效率逼近目标函数的最优值。The improved genetic algorithm uses the four corner point coordinates in S21 and the random points according to the normal distribution around the corner points as the initial population to provide a priori knowledge for the genetic algorithm; selection, crossover and mutation are performed in the initial population to Maximum efficiency approaches the optimal value of the objective function.
优选的,在利用改进的遗传算法对目标函数优化的过程中,将校正点坐标的整数部分与小数部分分别编码,并赋予小数部分更大的突变概率以使遗传算法的搜索能力更强,整数部分赋予更小的突变概率以使进化过程稳定;在交叉过程中只对小数部分进行交叉,整数部分不交叉,以减少计算的复杂度;Preferably, in the process of optimizing the objective function using an improved genetic algorithm, the integer part and the decimal part of the correction point coordinates are encoded separately, and the decimal part is given a greater mutation probability to make the genetic algorithm's search ability stronger, and the integer part is Parts are given a smaller mutation probability to stabilize the evolutionary process; only the decimal part is crossed during the crossover process, and the integer part is not crossed to reduce the computational complexity;
每个世代进化前根据目标函数对每个个体的适应度进行排序,适应度最高的个体直接进入下一世代,改进遗传算法的目的是寻找图像整数像素点之间更加精确的校正标记点。Before each generation evolves, the fitness of each individual is sorted according to the objective function. The individual with the highest fitness directly enters the next generation. The purpose of the improved genetic algorithm is to find more accurate correction mark points between the integer pixels of the image.
优选的,步骤S3具体包括如下内容,Preferably, step S3 specifically includes the following content:
S21、分别采集第k-N层和第k层侧视的铺料图像;S21. Collect side view paving images of the k-Nth layer and the kth layer respectively;
S22、将侧视的铺料图像通过图像校正,获取正视的铺料图像;S22. Calibrate the side-view paving image to obtain the front-view paving image;
S23、使用插值算法填充正视的铺料图像中的空白像素点;S23. Use the interpolation algorithm to fill in the blank pixels in the front-view paving image;
S24、裁剪正视的铺料图像至与切片图像同像素;S24. Crop the front view paving image to the same pixel as the sliced image;
S25、将经过上述处理后的第k层正视的铺料图像置于第一通道,处理后第k-N层正视的铺料图像置于第二通道,第k-N层切片图像置于第三通道,以合成三通道彩色图像;S25. Place the front-view paving image of the k-th layer after the above processing in the first channel, the front-view paving image of the k-Nth layer after processing in the second channel, and place the k-Nth layer slice image in the third channel, so as to Synthesize three-channel color images;
S26、对该三通道彩色图像进行分块,并将分块后的图像输入缺陷检测模型中进行检测,输出识别出来的缺陷目标物。S26. Divide the three-channel color image into blocks, input the divided images into the defect detection model for detection, and output the identified defective target objects.
优选的,采用监控相机采集铺料图像的具体过程为,Preferably, the specific process of using surveillance cameras to collect paving images is as follows:
将监控相机旁轴安装在制造平面的斜上方,通过监控相机拍摄各个时刻的侧视的铺料图像,从而实现图像采集;Install the surveillance camera side-axis diagonally above the manufacturing plane, and capture side-view paving images at each moment through the surveillance camera to achieve image collection;
在获取图像校正矩阵时,需要在监控相机的镜头前端安装可拆卸的窄带透光片,以获取相应的图像。When obtaining the image correction matrix, a detachable narrow-band light-transmitting sheet needs to be installed at the front end of the lens of the surveillance camera to obtain the corresponding image.
优选的,所述窄带透光片为405nm窄带透光片,只有405n波长的光能够穿过该窄带透光片。Preferably, the narrow-band light-transmitting sheet is a 405nm narrow-band light-transmitting sheet, and only light with a wavelength of 405n can pass through the narrow-band light-transmitting sheet.
本发明的有益效果是:1、采用机器视觉的方式对陶瓷制造的铺料过程进行全程的自动检测,依靠图像处理技术及深度学习技术,智能识别制造平面的铺料缺陷,解决了长时间工艺过程的检测效率的问题。2、提出多层图像融合方法,给需要检测的图像融入更多的信息,作为对被检图像地信息补充,在充分利用模型特征提取能力的同时,赋予了图像更多的信息,有助于提升检测准确率。3、通过校正矩阵将采集的侧视图像校正为正视图像,并通过优化算法对设置的目标函数求解,以降低校正误差。4、采用改进的遗传算法优化目标函数,通过将初始角点以及角点周围的点作为初始种群,为遗传算法提供先验知识,使其能够以最大效率逼近目标函数的最优值,提高算法计算速度。The beneficial effects of the present invention are: 1. Using machine vision to automatically detect the entire ceramic manufacturing paving process, relying on image processing technology and deep learning technology to intelligently identify paving defects on the manufacturing plane, solving the problem of long-term processes The problem of detection efficiency of the process. 2. Propose a multi-layer image fusion method to incorporate more information into the images that need to be detected. As a supplement to the information of the inspected images, while making full use of the feature extraction capabilities of the model, it also gives the images more information, which helps Improve detection accuracy. 3. Correct the collected side view image to the front view image through the correction matrix, and solve the set objective function through the optimization algorithm to reduce the correction error. 4. Use an improved genetic algorithm to optimize the objective function. By using the initial corner point and the points around the corner point as the initial population, the genetic algorithm is provided with prior knowledge, so that it can approach the optimal value of the objective function with maximum efficiency and improve the algorithm. Calculation speed.
附图说明Description of the drawings
图1是陶瓷增材制造的铺料过程中典型缺陷表现形式;Figure 1 shows the typical defect manifestations during the laying process of ceramic additive manufacturing;
图2是陶瓷增材制造的铺料过程中正常铺料图像与有缺陷铺料图像的典型表现;Figure 2 is a typical representation of normal paving images and defective paving images during the paving process of ceramic additive manufacturing;
图3是陶瓷增材制造的铺料过程中固化边缘被误检为缺料边缘的示意图;Figure 3 is a schematic diagram of the solidified edge being mistakenly detected as a missing edge during the paving process of ceramic additive manufacturing;
图4是本发明实施例中增材制造碳化硅反射镜示意图;Figure 4 is a schematic diagram of an additively manufactured silicon carbide reflector in an embodiment of the present invention;
图5是本发明实施例中采集的侧视的图像与校正后的图像;Figure 5 is a side view image and a corrected image collected in the embodiment of the present invention;
图6是本发明实施例中遗传算法解决最优校正点的效果图;Figure 6 is an effect diagram of the genetic algorithm solving the optimal correction point in the embodiment of the present invention;
图7是本发明实施例中多层图像融合示意图。Figure 7 is a schematic diagram of multi-layer image fusion in an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本发明,并不用于限定本发明。In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present invention and are not intended to limit the present invention.
实施例一Embodiment 1
本实施例中,提供了一种在线监测陶瓷光固化增材制造工艺铺料缺陷的方法,包括如下步骤,In this embodiment, a method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes is provided, which includes the following steps:
一、图像采集1. Image collection
本实施例中,将监控相机旁轴安装在制造平面的斜上方,通过监控相机拍摄各个时刻的侧视的铺料图像,从而实现图像采集。In this embodiment, the surveillance camera is installed on the side axis obliquely above the manufacturing plane, and the surveillance camera captures side-view paving images at various times, thereby achieving image collection.
在光机进行参数标定时安装窄带透光片,完成标定动作后拆除。即在获取图像校正矩阵时,需要在监控相机的镜头前端安装可拆卸的窄带透光片,以获取相应的图像。其他时候拆除窄带透光片,使用监控相机直接获取图像。Install the narrow-band light-transmitting sheet when calibrating the parameters of the optical machine, and remove it after completing the calibration. That is, when obtaining the image correction matrix, a detachable narrow-band light-transmitting sheet needs to be installed at the front end of the lens of the surveillance camera to obtain the corresponding image. At other times, the narrow-band light-transmitting sheet is removed and the surveillance camera is used to obtain the image directly.
所述窄带透光片为405nm窄带透光片,只有405n波长的光能够穿过该窄带透光片。The narrow-band light-transmitting sheet is a 405nm narrow-band light-transmitting sheet, and only light with a wavelength of 405n can pass through the narrow-band light-transmitting sheet.
二、图像校正:2. Image correction:
基于光机投影的图像与切片图像获取图像校正矩阵,基于图像校正矩阵,将监控相机采集到的侧视的铺料图像校正为正视的铺料图像;所述切片图像为正视角下制造平面的浆料固化成型区域图像。The image correction matrix is obtained based on the image projected by the optical machine and the slice image. Based on the image correction matrix, the side-view paving image collected by the surveillance camera is corrected into a front-view paving image; the slice image is a manufacturing plane under the front viewing angle. Image of the slurry cured molding area.
具体包括如下内容,Specifically include the following content,
1、利用光机投影标记成型区域的外轮廓,在监控相机的镜头前端安装窄带透光片后采集光机投影的图像并计算成型区域的四个角点,将成型区域的四个角点与切片图像的四个角点相对应以获取图像校正矩阵;1. Use optical machine projection to mark the outer contour of the molding area, install a narrow-band light-transmitting sheet on the front end of the lens of the surveillance camera, collect the image projected by the optical machine and calculate the four corner points of the molding area, and compare the four corner points of the molding area with The four corner points of the sliced image correspond to obtain the image correction matrix;
2、将图像校正矩阵作用在监控相机采集的侧视的铺料图像中,获取初步的正视铺料图像;2. Apply the image correction matrix to the side-view paving image collected by the surveillance camera to obtain a preliminary front-view paving image;
3、使用插值算法填充初步的正视铺料图像中的空白像素点,并裁剪初步的正视铺料图像至与切片图像同像素,获取最终的正视铺料图像,即校正后图像;3. Use the interpolation algorithm to fill in the blank pixels in the preliminary front-view paving image, and crop the preliminary front-view paving image to the same pixels as the sliced image to obtain the final front-view paving image, which is the corrected image;
4、定义目标函数,利用优化算法优化目标函数,以降低校正后图像与原图之间的误差。所述优化算法为改进的遗传算法,4. Define the objective function and use the optimization algorithm to optimize the objective function to reduce the error between the corrected image and the original image. The optimization algorithm is an improved genetic algorithm,
所述改进的遗传算法将S21中的四个角点坐标及角点周围按照正态分布的随机点作为初始种群,为遗传算法提供先验知识;在初始种群中进行选择、交叉和变异,以最大效率逼近目标函数的最优值。The improved genetic algorithm uses the four corner point coordinates in S21 and the random points according to the normal distribution around the corner points as the initial population to provide a priori knowledge for the genetic algorithm; selection, crossover and mutation are performed in the initial population to Maximum efficiency approaches the optimal value of the objective function.
本实施例中,将二值化后的切片图像与校正后的图像的一阶范数与真值图像像素数的比值定义为目标函数,表达如下,In this embodiment, the ratio of the first-order norm of the binarized slice image and the corrected image to the number of pixels in the true image is defined as the objective function, which is expressed as follows:
imgcali=imgsrc∝Himg cali = img src ∝H
(x′,y′)=(0,0),(0,Htruth),(Wtruth,Htruth),(Wtruth,0)(x′,y′)=(0,0),(0,H truth ),(W truth ,H truth ),(W truth ,0)
其中,imgslic为切片图像,即校正的真值;imgcali为监控相机采集到光机投影图像完成校正和二值化后的图像;imgsrc为监控相机采集到的原图,原图根据图像校正矩阵H完成图像校正;(x,y,1)为原图中图像齐次坐标点;(x’,y’,1)为校正图像中与原图中对应的点,h1~h8为校正矩阵H的八个独立元素;Wtruth和Htruth分别为真值图像的宽、高方向最大像素值;x∈[0,w],y∈[0,h],w和h分别为原图中的像素坐标点;i,j为对应图像的像素。Among them, img slic is the slice image, that is, the corrected true value; img cali is the corrected and binarized image of the optical-mechanical projection image collected by the surveillance camera; img src is the original image collected by the surveillance camera, and the original image is based on the image The correction matrix H completes the image correction; (x, y, 1) is the homogeneous coordinate point of the image in the original image; (x', y', 1) is the point in the corrected image corresponding to the original image, h 1 ~ h 8 are the eight independent elements of the correction matrix H; W truth and H truth are the maximum pixel values in the width and height directions of the true image respectively; x∈[0,w], y∈[0,h], w and h are respectively The pixel coordinate point in the original image; i, j are the pixels of the corresponding image.
本实施例中,根据平面射影映射性质,一个平面射影变换时关于3维其齐次向量的一种线性变换,这种线性变换关系可以用一个非奇异的3x3矩阵表示,即In this embodiment, according to the properties of plane projective mapping, a plane projective transformation is a linear transformation of its homogeneous vector in 3 dimensions. This linear transformation relationship can be represented by a non-singular 3x3 matrix, that is
将405nm窄带透光片安装于监控相机的镜头前端后,相机只采集405nm的光信号,此时用光学系统标定出来制造平面的四个角点,根据两平面间四组对应点求取上式中的变换矩阵的八个独立元素,求得两平面间的变换矩阵,随后将矩阵作用在整个平面,可以消除平面上的失真现象,将侧视的图像恢复成正视视角下的图像。After installing the 405nm narrow-band light-transmitting sheet on the front end of the lens of the surveillance camera, the camera only collects the 405nm light signal. At this time, the optical system is used to calibrate the four corner points of the manufacturing plane. The above formula is obtained based on the four sets of corresponding points between the two planes. Using the eight independent elements of the transformation matrix in , the transformation matrix between the two planes is obtained, and then the matrix is applied to the entire plane, which can eliminate the distortion on the plane and restore the image from the side view to the image from the front view.
本实施例中,由于多层图像融合中需要用到第k-N层的切片图像作为辅助信息源提供第k-N层的制造面固化区域信息,需要注意的是,在这个过程中需要切片图像与铺料图像能够严格对应切片图像才能准确提供铺料面固化区域的信息。但是,为保证制造面内光机能量的高效利用与分布均匀,制造面正上方位置被光机占据,用于监控的工业相机只能放在光机的侧面完成铺料图像的采集,如图5(a)所示。因此,需要将侧视的铺料图像校正到正视视角下才能完成切片图像与制造面的对应。根据图像校正理论,图像校正需要计算两幅图像间唯一的3x3的校正矩阵,在齐次坐标系下,只需要计算矩阵中的八个独立比率,计算这八个独立比率需要含八个方程的方程组解出。两幅图像上的一组对应点的横、纵坐标可以提供两个方程,四组对应点即可提供所需的八个方程。In this embodiment, since the slice image of the k-Nth layer is needed as an auxiliary information source in multi-layer image fusion to provide the curing area information of the k-Nth layer's manufacturing surface, it should be noted that the slice image and paving material are required in this process. Only the images that can strictly correspond to the sliced images can accurately provide information on the cured area of the paving surface. However, in order to ensure the efficient utilization and uniform distribution of the optical machine energy in the manufacturing surface, the position directly above the manufacturing surface is occupied by the optical machine, and the industrial camera used for monitoring can only be placed on the side of the optical machine to collect paving images, as shown in the figure As shown in 5(a). Therefore, the side-view paving image needs to be corrected to the front-view perspective to complete the correspondence between the slice image and the manufacturing surface. According to the image correction theory, image correction requires the calculation of a unique 3x3 correction matrix between two images. Under the homogeneous coordinate system, only eight independent ratios in the matrix need to be calculated. Calculating these eight independent ratios requires eight equations. The system of equations is solved. The horizontal and vertical coordinates of a set of corresponding points on the two images can provide two equations, and four sets of corresponding points can provide the required eight equations.
本发明使用光机投影标记成型区域的外轮廓,在监控相机的镜头前端安装窄带透光片后采集光机投影的图像并计算成型区域的四个角点,将成型区域的四个角点与切片图像的四个角点相对应即可得到图像的校正矩阵,随后将校正矩阵作用在原图中,经过图像裁剪后,得到图5(b)所示正视图像。在此应用方法中,检测到的成型区域四个角点位置是不精确的,因为使用的监控相机分辨率与投影所用的光机分辨率接近。在工程应用中,需要相机的分辨率远大于要光机的投影分辨率才能使用图像准确的描述角点,但是,下沉式光固化陶瓷增材制造以其高精度著称,制造区域单个像素的尺寸仅有60微米左右,在投影光机本身分辨率已经很大的情况下使用远大于光机分辨率的相机无疑是不可能的。为解决图像校正问题,本发明中将二值化后切片图像与校正图像的一阶范数与真值图像像素数的比值定义为损失函数,函数值越小表示校正误差越小。This invention uses optical machine projection to mark the outer contour of the molding area, installs a narrow-band light-transmitting sheet at the front end of the lens of the surveillance camera, collects the image projected by the optical machine and calculates the four corner points of the molding area, and compares the four corner points of the molding area with The correction matrix of the image can be obtained by corresponding the four corner points of the sliced image. Then the correction matrix is applied to the original image. After the image is cropped, the front view image shown in Figure 5(b) is obtained. In this application method, the detected positions of the four corner points of the molding area are inaccurate because the resolution of the surveillance camera used is close to the opto-mechanical resolution used for projection. In engineering applications, the resolution of the camera is required to be much greater than the projection resolution of the light machine in order to use images to accurately describe corner points. However, sunken light-curing ceramic additive manufacturing is known for its high precision. The single pixel in the manufacturing area The size is only about 60 microns. It is undoubtedly impossible to use a camera with a resolution much larger than that of the optical machine when the resolution of the projection machine itself is already very large. In order to solve the problem of image correction, the present invention defines the ratio of the first-order norm of the binarized slice image and the corrected image to the number of pixels of the true image as the loss function. The smaller the function value, the smaller the correction error.
原图像由校正矩阵计算得到校正图像的过程中需要经过对应位置计算、插值、二值化、裁剪,所以原图像与校正图像之间并不是简单的等式关系,也正因为此原因,使得目标函数的函数值无法求得精确的解析解,取而代之可行的方法是通过穷举法穷举原图像上所有的点的组合,分别计算校正矩阵后计算目标函数值,在有角点位置大概信息的先验知识的情况下,可能的最优值组合计算成本可控。The process of calculating the corrected image from the original image by the correction matrix requires corresponding position calculation, interpolation, binarization, and cropping. Therefore, the relationship between the original image and the corrected image is not a simple equation. For this reason, the target The function value of the function cannot obtain an accurate analytical solution. Instead, a feasible method is to exhaustively enumerate all the point combinations on the original image through the exhaustive method, calculate the correction matrix separately and then calculate the objective function value. When there is approximate information about the corner point position, In the case of prior knowledge, the calculation cost of possible optimal value combinations is controllable.
然而,穷举法默认的前置条件是最优解的取值范围为离散值(因为选取的点都为原图像中的像素点),但实际情况并非如此,最优校正点可能会在某两个像素点之间。这种情况启发式算法可以得到较好的结果。常用的启发式算法有神经网络、模拟退火、蚁群算法和遗传算法等,结合各种算法与本课题的特点,本发明使用遗传算法对目标函数进行寻优。However, the default precondition of the exhaustive method is that the value range of the optimal solution is discrete values (because the selected points are all pixels in the original image), but this is not the actual situation. The optimal correction point may be somewhere between two pixels. In this case heuristic algorithm can get better results. Commonly used heuristic algorithms include neural networks, simulated annealing, ant colony algorithm and genetic algorithms. Combining various algorithms with the characteristics of this topic, the present invention uses genetic algorithms to optimize the objective function.
遗传算法通过模拟自然种群的进化过程寻找最优解,但是其一大缺点是当决策变量过多时难以取得很好的效果,因为不同的决策变量往往需要同时向最优解变异才会得到适应性更强的种群,但不同的决策变量的遗传与变异彼此之间都是独立的,所以决策变量越多越难以取得满意的结果。解决此类问题的一个可行的方法是为遗传算法提供先验知识指导优化进程,在本发明中,图5(a)中光机的投影范围为制造区域的范围,边界的四个角点及和边界周围按照正态分布的随机点作为遗传算法的种群,为遗传算法提供先验知识进行计算。本发明中,设定的遗传算法参数如表2所示。Genetic algorithms find optimal solutions by simulating the evolution process of natural populations. However, one of its major disadvantages is that it is difficult to achieve good results when there are too many decision variables, because different decision variables often need to mutate toward the optimal solution at the same time to gain adaptability. Stronger populations, but the inheritance and variation of different decision variables are independent of each other, so the more decision variables there are, the more difficult it is to achieve satisfactory results. A feasible method to solve such problems is to provide a priori knowledge for the genetic algorithm to guide the optimization process. In the present invention, the projection range of the optical machine in Figure 5(a) is the range of the manufacturing area, the four corner points of the boundary and The random points according to the normal distribution around the boundary are used as the population of the genetic algorithm, providing a priori knowledge for the genetic algorithm to calculate. In the present invention, the set genetic algorithm parameters are shown in Table 2.
表2遗传算法参数Table 2 Genetic algorithm parameters
本发明中选择较小的种群规模和较大的迭代次数的原因是,小的种群规模可以有效提高算法的计算速度,在有先验知识的前提下,初始种群已经是“精英个体”,在精英个体中进行选择、交叉和变异,能够以最大效率逼近目标函数的最优值。The reason why a smaller population size and a larger number of iterations are selected in this invention is that a small population size can effectively improve the calculation speed of the algorithm. Under the premise of having prior knowledge, the initial population is already an "elite individual". Selection, crossover and mutation among elite individuals can approach the optimal value of the objective function with maximum efficiency.
在利用改进的遗传算法对目标函数优化的过程中,将校正点坐标的整数部分与小数部分分别编码,并赋予小数部分更高的突变概率以使算法的搜索能力更强,整数部分赋予较小的突变概率以使进化过程稳定;在交叉过程中只对小数部分进行交叉,整数部分不交叉。这样做的原因是在定义好初始种群后,个体的整数部分相似度较高,没有交叉的必要,因此省去这一过程减少计算的复杂度。In the process of optimizing the objective function using the improved genetic algorithm, the integer part and the decimal part of the correction point coordinates are encoded separately, and the decimal part is given a higher mutation probability to make the algorithm's search ability stronger, and the integer part is given a smaller The mutation probability is to make the evolutionary process stable; only the decimal part is crossed during the crossover process, and the integer part is not crossed. The reason for this is that after the initial population is defined, the integer part similarity of individuals is high and there is no need for crossover, so this process is omitted to reduce the complexity of calculations.
此外,为保证算法的稳定性,每个世代进化前根据目标函数对每个个体的适应度进行排序,适应度最高的个体直接进入下一世代。算法的最终目的是寻找图像整数像素点之间更加精确的校正标记点。In addition, in order to ensure the stability of the algorithm, the fitness of each individual is sorted according to the objective function before each generation evolves, and the individual with the highest fitness directly enters the next generation. The ultimate goal of the algorithm is to find more accurate correction mark points between the integer pixels of the image.
经过大量试验后,发现所使用的方法可以稳定的逼近最优解,在经过500代左右的迭代,种群平均适应度已经十分接近最优个体的适应度,进化到1000代时已经几乎完全重合,如图6所示。After a large number of experiments, it was found that the method used can stably approximate the optimal solution. After about 500 generations of iterations, the average fitness of the population has been very close to the fitness of the optimal individual. It has almost completely coincided with the fitness of the optimal individual by the 1000th generation. As shown in Figure 6.
优化结果如表3所示,可以看到,校正点经过遗传算法优化后在适应度上有数量级的提升,并且将优化前坐标点的离散值扩展到的连续值,从而更精确的定位到了校正点,提升了优化效果。经过图像校正后,可以将零件的切片图像与铺料图像较为准确的对应起来,为后序工作提供了基础。The optimization results are shown in Table 3. It can be seen that the fitness of the correction points has been improved by an order of magnitude after optimization by the genetic algorithm, and the discrete values of the coordinate points before optimization have been extended to continuous values, thereby more accurately locating the correction points. point to improve the optimization effect. After image correction, the sliced image of the part and the paving image can be more accurately matched, which provides a basis for subsequent work.
表3优化结果对比Table 3 Comparison of optimization results
三、多层图像融合:3. Multi-layer image fusion:
经过图像校正后的第k层正视的铺料图像和第k-N层正视的铺料图像与第k-N层切片图像合成三通道彩色图像,并将三通道彩色图像分割为若干个子图像。N的值可以根据实际情况进行选择,以便更好地满足实际需求。After image correction, the front-view paving image of the k-th layer and the front-view paving image of the k-Nth layer are combined with the k-Nth layer slice image to synthesize a three-channel color image, and the three-channel color image is divided into several sub-images. The value of N can be selected according to the actual situation to better meet actual needs.
本实施例中,利用第k-1层的切片图像作为辅助信息源提供第k-1层的制造面固化区域信息,从而实现多层图像融合,具体包括如下内容,In this embodiment, the slice image of the k-1th layer is used as an auxiliary information source to provide the manufacturing surface solidification area information of the k-1th layer, thereby achieving multi-layer image fusion, specifically including the following:
1、分别采集第k-1层和第k层侧视的铺料图像;1. Collect the side view paving images of the k-1th layer and the kth layer respectively;
2、将侧视的铺料图像通过图像校正,获取正视的铺料图像;2. Correct the side-view paving image to obtain the front-view paving image;
3、使用插值算法填充正视的铺料图像中的空白像素点;3. Use the interpolation algorithm to fill in the blank pixels in the front-view paving image;
4、裁剪正视的铺料图像至与切片图像同像素;4. Crop the front view paving image to the same pixels as the sliced image;
5、将经过上述处理后的第k层正视的铺料图像置于第一通道,处理后第k-1层正视的铺料图像置于第二通道,第k-1层切片图像置于第三通道,以合成三通道彩色图像;5. Place the front-view paving image of the k-th layer after the above processing in the first channel, the front-view paving image of the k-1th layer after processing in the second channel, and the k-1th layer slice image in the second channel. three-channel to synthesize a three-channel color image;
6、对该三通道彩色图像进行分块,并将分块后的图像输入缺陷检测模型中进行检测,输出识别出来的缺陷目标物。该步骤中,分块目的是可以实现铺料与检测的同时进行,平台上已铺过料的部分可以先进行检测而不用等整个平台铺完之后在一起进行检测,这样可以提高设备的工作效率。6. Divide the three-channel color image into blocks, input the divided images into the defect detection model for detection, and output the identified defect targets. In this step, the purpose of blocking is to realize paving and testing at the same time. The parts of the platform that have been paved with materials can be tested first instead of waiting for the entire platform to be tested together. This can improve the work efficiency of the equipment. .
本实施例中,为了解决复杂表面中的目标检测问题,本发明利用多层图像融合的方式,给需要检测的图像融入更多的信息,作为对被检图像地信息补充。具体地说,是将若干张其他图像信息融入被检图像中,为检测模型提供信息参考。在传统目标检测模型中,被检图像输入检测框架后进行数次下采样进行特征提取,生成不同尺度的特征图,继而在相应的特征图中解码目标物信息完成不同尺度地目标物地预测。In this embodiment, in order to solve the problem of target detection on complex surfaces, the present invention uses a multi-layer image fusion method to incorporate more information into the image that needs to be detected as an information supplement to the image being detected. Specifically, several other image information is integrated into the inspected image to provide information reference for the detection model. In the traditional target detection model, after the inspected image is input into the detection framework, it is down-sampled several times for feature extraction to generate feature maps of different scales, and then the target information is decoded in the corresponding feature maps to complete the prediction of target objects at different scales.
本发明提出了新的检测方式,使用若干辅助图像作为被检图像的信息补充,在检测模型中同时对主被检图像和辅助信息图像进行特征提取,并将辅助图像的特征层与主被检图像的特征层进行堆叠、融合后共同输出预测结果。在陶瓷增材制造零件坯体成型过程中,零件是按照时间顺序逐层成型的。将当前成型的工作层定义为第k层,将当前层前序成型的层定义为第k-N层。本实施例中,选择了两张辅助图像作为被检图像的信息补充,分别是主被检的图像的第k-N层铺料图像和第k-N层的切片图像,选择这两个图像的原因是铺料的缺陷在图像上的表现是第k层的铺料图像相对于第k-N层铺料图像的边缘突变。在实际应用中,一般都是当铺料工序正常之后才会执行曝光工序,所以第k-N层的铺料图像一般都是铺料正常图像,将第k-N层正常铺料图像的图像信息融入当前第k层被检图像中,有助于帮助模型分辨正常边缘与缺陷边缘的不同,对于当前层的铺料缺陷检测有着十分重要的指导作用。The present invention proposes a new detection method, which uses several auxiliary images as information supplements of the inspected image, extracts features of the main inspected image and the auxiliary information image at the same time in the detection model, and combines the feature layer of the auxiliary image with the main inspected image. The feature layers of the image are stacked and fused to jointly output the prediction results. During the blank forming process of ceramic additive manufacturing parts, the parts are formed layer by layer in a time sequence. The currently formed working layer is defined as the k-th layer, and the layer formed before the current layer is defined as the k-Nth layer. In this embodiment, two auxiliary images are selected as the information supplement of the inspected image, namely the k-Nth layer paving image of the main inspected image and the k-Nth layer slice image. The reason for selecting these two images is that the paving The manifestation of material defects on the image is the edge mutation of the paving image of the kth layer relative to the paving image of the k-Nth layer. In practical applications, the exposure process is generally performed after the paving process is normal. Therefore, the paving images of the k-Nth layer are generally normal paving images. The image information of the normal paving images of the k-Nth layer is integrated into the current k-th layer. In the inspected image of the layer, it helps the model distinguish the difference between normal edges and defective edges, and plays a very important guiding role in the detection of paving defects in the current layer.
选择第k-N层的切片图像作为另一个辅助图像的原因在于,铺料表面的边缘突变有时并不是因为铺料缺陷造成的,如图4(a)所示的碳化硅反射镜,该模型的厚度为3mm,在以50um的层厚成型过程中在41层至42层之间由镜面向背部结构转变,在此过程中,铺料面由圆形固化区域向网格行固化区域突变,产生图像边缘的突变信息,如图4(b)-图4(c)所示。这种情况下需要将正常的边缘突变信息输入检测模型中,切片图像的物理含义为制造平面的浆料固化区域,可以提供上一层的表面固化区域信息辅助模型准确识别正常固化区域的边缘。The reason for choosing the slice image of the k-Nth layer as another auxiliary image is that the edge mutation on the surface of the pavement is sometimes not caused by defects in the paving material, such as the silicon carbide mirror shown in Figure 4(a). The thickness of this model is 3mm. During the molding process with a layer thickness of 50um, the structure changes from mirror to back between layer 41 and layer 42. During this process, the paving surface mutates from a circular solidified area to a grid row solidified area, creating an image. The mutation information of the edge is shown in Figure 4(b)-Figure 4(c). In this case, the normal edge mutation information needs to be input into the detection model. The physical meaning of the slice image is the slurry solidification area on the manufacturing plane, which can provide the surface solidification area information of the upper layer to assist the model in accurately identifying the edges of the normal solidification area.
本实施例中,红(R)、绿(G)、蓝(B)为光学三原色,三种色彩可以组合出图像的任意颜色,绝大部分的真彩数字图像都是由此三原色组成的三通道24位深位图,同样,几乎所有的图像识别类深度学习模型的输入图像都是三通道图像。In this embodiment, red (R), green (G), and blue (B) are the three optical primary colors. The three colors can be combined to produce any color of the image. Most true-color digital images are composed of these three primary colors. Channel 24-bit deep bitmap, similarly, the input images of almost all image recognition deep learning models are three-channel images.
在本发明中,由于铺料表面缺陷没有颜色信息,且黑白相机信噪比优于彩色相机,故图像采集的一直都是8位深灰度图像,输入深度学习模型时再复制成另外两个通道转换成三通道图像,在此过程中极大的浪费了模型的特征提取能力。为解决此问题,如图7所示,本发明首次提出多层铺料图像融合技术,将不同的图像组合成24位深的位图,取代之前的直接复制单一通道的做法,在充分利用模型特征提取能力的同时,赋予了图像更多的信息,有助于提升检测准确率。In the present invention, since the surface defects of the paving materials have no color information, and the signal-to-noise ratio of the black-and-white camera is better than that of the color camera, the images collected are always 8-bit deep grayscale images, which are copied into two other images when inputting the deep learning model. channel is converted into a three-channel image, which greatly wastes the feature extraction capability of the model in this process. In order to solve this problem, as shown in Figure 7, the present invention proposes multi-layer paving image fusion technology for the first time, combining different images into a 24-bit deep bitmap, replacing the previous method of directly copying a single channel, and making full use of the model. At the same time, the feature extraction capability gives the image more information, which helps to improve the detection accuracy.
四、缺陷检测:4. Defect detection:
搭建深度学习模型,利用历史图像数据作为训练集对深度学习模型进行训练,训练完成后获取缺陷检测模型,将各子图像依次输入缺陷检测模型中,实现陶瓷增材制造铺料缺陷原位在线实时检测。Build a deep learning model and use historical image data as a training set to train the deep learning model. After the training is completed, the defect detection model is obtained, and each sub-image is input into the defect detection model in turn to realize in-situ online real-time performance of ceramic additive manufacturing paving defects. detection.
五、方法应用5. Method application
将本发明方法进行实际应用,将检测的结果反馈给铺料设备的控制终端,若存在缺陷,铺料设备正常运行,当检测到缺陷,则存储检测结果并执行相应的处理动作。The method of the present invention is put into practical application, and the detection results are fed back to the control terminal of the paving equipment. If there is a defect, the paving equipment operates normally. When a defect is detected, the detection results are stored and corresponding processing actions are performed.
通过采用本发明公开的上述技术方案,得到了如下有益的效果:By adopting the above technical solutions disclosed in the present invention, the following beneficial effects are obtained:
本发明提供了一种在线监测陶瓷光固化增材制造工艺铺料缺陷的方法,采用机器视觉的方式对陶瓷制造的铺料过程进行全程的自动检测,依靠图像处理技术及深度学习技术,智能识别制造平面的铺料缺陷,解决了长时间工艺过程的检测效率的问题。提出多层图像融合方法,给需要检测的图像融入更多的信息,作为对被检图像地信息补充,在充分利用模型特征提取能力的同时,赋予了图像更多的信息,有助于提升检测准确率。通过校正矩阵将采集的侧视图像校正为正视图像,并通过优化算法对设置的目标函数求解,以降低校正误差。采用改进的遗传算法优化目标函数,通过将初始角点以及角点周围的点作为初始种群,为遗传算法提供先验知识,使其能够以最大效率逼近目标函数的最优值,提高算法计算速度。The present invention provides a method for online monitoring of paving defects in ceramic light-curing additive manufacturing processes. It uses machine vision to automatically detect the entire ceramic manufacturing paving process, and relies on image processing technology and deep learning technology to intelligently identify The paving defects of the manufacturing plane solve the problem of detection efficiency in the long-term process. A multi-layer image fusion method is proposed to incorporate more information into the image that needs to be detected. As a supplement to the information of the inspected image, it makes full use of the feature extraction capabilities of the model and gives the image more information, which helps to improve detection. Accuracy. The collected side view image is corrected to the front view image through the correction matrix, and the set objective function is solved through the optimization algorithm to reduce the correction error. An improved genetic algorithm is used to optimize the objective function. By using the initial corner point and the points around the corner point as the initial population, the genetic algorithm is provided with prior knowledge, allowing it to approach the optimal value of the objective function with maximum efficiency and improve the calculation speed of the algorithm. .
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视本发明的保护范围。The above are only preferred embodiments of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention. These improvements and modifications can also be made. The scope of protection of the present invention should be considered.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310997623.XA CN117274158A (en) | 2023-08-09 | 2023-08-09 | A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310997623.XA CN117274158A (en) | 2023-08-09 | 2023-08-09 | A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117274158A true CN117274158A (en) | 2023-12-22 |
Family
ID=89205152
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310997623.XA Pending CN117274158A (en) | 2023-08-09 | 2023-08-09 | A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117274158A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118228515A (en) * | 2024-05-23 | 2024-06-21 | 中国科学院长春光学精密机械与物理研究所 | Self-adaptive precision optimization method based on photo-curing manufacturing technology |
-
2023
- 2023-08-09 CN CN202310997623.XA patent/CN117274158A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118228515A (en) * | 2024-05-23 | 2024-06-21 | 中国科学院长春光学精密机械与物理研究所 | Self-adaptive precision optimization method based on photo-curing manufacturing technology |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Wang et al. | Measurement for cracks at the bottom of bridges based on tethered creeping unmanned aerial vehicle | |
CN106600648A (en) | Stereo coding target for calibrating internal parameter and distortion coefficient of camera and calibration method thereof | |
CN111982921B (en) | Method and device for detecting hole defects, conveying platform and storage medium | |
CN108562250B (en) | Keyboard keycap flatness rapid measurement method and device based on structured light imaging | |
CN113177565B (en) | Binocular vision position measuring system and method based on deep learning | |
CN110189375B (en) | Image target identification method based on monocular vision measurement | |
CN117036641A (en) | Road scene three-dimensional reconstruction and defect detection method based on binocular vision | |
CN110108711A (en) | Visual inspection system for defects of side wall of circular ring | |
CN106952262B (en) | Ship plate machining precision analysis method based on stereoscopic vision | |
CN112304954A (en) | A method for detecting surface defects of parts based on line laser scanning and machine vision | |
CN112132907A (en) | A camera calibration method, device, electronic device and storage medium | |
CN102074031B (en) | Mark establishing method for printed circuit board appearance inspection machine | |
CN105574845A (en) | Cigarette pack lamination layer number measurement method and device by multi-camera array | |
CN113962929A (en) | Photovoltaic cell assembly defect detection method and system and photovoltaic cell assembly production line | |
CN115187612B (en) | A plane area measurement method, device and system based on machine vision | |
CN113920081A (en) | A kind of tool wear detection method | |
CN109919038A (en) | State recognition method of square pressure plate of power distribution cabinet based on machine vision and deep learning | |
CN117274258B (en) | Method, system, equipment and storage medium for detecting defects of main board image | |
CN116872497A (en) | Online detection method for defects of 3D printing product based on machine vision | |
CN117274573A (en) | Airplane surface hole positioning measurement method based on two-dimensional image and three-dimensional point cloud | |
CN117274158A (en) | A method for online monitoring of paving defects in ceramic photocuring additive manufacturing processes | |
CN119354981A (en) | A visual inspection and quality assessment method for small aircraft structural parts | |
CN114494134A (en) | Industrial defect detection system based on component point cloud registration detection | |
CN112884691B (en) | Data enhancement device, data enhancement apparatus, and storage medium | |
CN110956640B (en) | A Method of Edge Point Detection and Registration in Heterogeneous Images |
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 |