CN114354607A - A Photometric Stereo Defect Detection Method Based on Helical Phase Contrast Filtering Algorithm - Google Patents
A Photometric Stereo Defect Detection Method Based on Helical Phase Contrast Filtering Algorithm Download PDFInfo
- Publication number
- CN114354607A CN114354607A CN202111174769.1A CN202111174769A CN114354607A CN 114354607 A CN114354607 A CN 114354607A CN 202111174769 A CN202111174769 A CN 202111174769A CN 114354607 A CN114354607 A CN 114354607A
- Authority
- CN
- China
- Prior art keywords
- phase contrast
- light source
- detection method
- method based
- camera
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- 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
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
Description
技术领域technical field
本发明涉及相位成像领域的螺旋相衬滤波算法、机器视觉中的光度立体算法领域,尤其涉及一种基于螺旋相衬滤波算法的光度立体瑕疵检测方法。The invention relates to the field of helical phase contrast filtering algorithms in the field of phase imaging and the field of photometric stereoscopic algorithms in machine vision, in particular to a photometric stereoscopic defect detection method based on the helical phase contrast filtering algorithm.
背景技术Background technique
上个世纪,为了能够对物体进行无标记成像,泽尼克发展了相衬显微成像技术,Gabor提出全息术,研究人员将相衬显微,全息术结合发展出了螺旋相衬滤波成像方法,这种无标记技术产生的图像中包含了物体厚度和表面结构的折射率信息,增强并突出了物体表面结构边缘,去除并均衡了表面背景,使表面结构边缘与背景具有较高的对比度,同时也避免了强背景所带来的背景干扰。In the last century, in order to be able to perform label-free imaging of objects, Zernike developed phase contrast microscopy imaging technology, Gabor proposed holography, researchers combined phase contrast microscopy and holography to develop a spiral phase contrast filtering imaging method, The image produced by this label-free technology contains the refractive index information of the object thickness and surface structure, enhances and highlights the edge of the surface structure of the object, removes and equalizes the surface background, and makes the surface structure edge and background have high contrast. The background interference caused by the strong background is also avoided.
近年来,从图像中捕捉物体的“外观”已经变得越来越重要。所谓“外观”,一般指的是一个模型,它能够预测物体在所有可能的视野和照明条件下的图像。要充分采样一个物体的外观,因为它在形状和反射率上确实是任意变化的,需要从各种视图和光源组合的图像,这在大多数情况下是不切实际的。幸运的是,现实世界中的对象通常表现出规律性,可以利用这些规律性大幅减少所需图像的数量。因此,选择有效的(或接近有效的)约束条件,并且强大到足以在实际系统中使用,这对于外观捕获至关重要。目前,有光度立体视觉检测工作已经表明,在已知的光照条件下,相机视角确定,从变化的图像中恢复一个明确的外观模型是可行的。这是一个重要的特殊情况下的外观捕捉,因为它仅依靠光度线索,避免解决对应问题。这也很重要,因为这种明确的外观模型已经被证明对视觉任务很有用,比如瑕疵检测。然而在瑕疵检测领域,通过光度立体方法处理后的图像所需求的是背景消除且均衡平滑,只突出瑕疵位置,背景与瑕疵位置形成最鲜明的对比度。为实现这一目的的一般做法是通过设置阈值来分离背景与瑕疵,但这种方式有时会由于背景与瑕疵的像素值相近而造成误判,将背景与瑕疵不能完整分离。因此,迫切需要一种基于螺旋相衬滤波算法的光度立体瑕疵检测方法,以解决现有技术中存在的这一问题。In recent years, capturing the "look" of an object from an image has become increasingly important. By "appearance", we generally refer to a model that predicts how an object will look in all possible fields of view and lighting conditions. To adequately sample the appearance of an object, as it is indeed arbitrarily variable in shape and reflectivity, requires images from various views and light sources combined, which is impractical in most cases. Fortunately, real-world objects often exhibit regularities that can be exploited to drastically reduce the number of images required. Therefore, choosing effective (or near-effective) constraints, strong enough to be used in real systems, is crucial for appearance capture. So far, photometric stereo vision detection work has shown that it is feasible to recover an unambiguous appearance model from changing images under known lighting conditions, with camera viewing angle determined. This is an important special case for appearance capture, as it relies only on photometric cues and avoids solving correspondence problems. It is also important because such explicit appearance models have been shown to be useful for vision tasks such as flaw detection. However, in the field of defect detection, the image processed by the photometric stereo method requires that the background is eliminated and balanced and smooth, only the defect position is highlighted, and the background and the defect position form the sharpest contrast. The general practice for this purpose is to separate the background and the flaw by setting a threshold, but this method sometimes causes misjudgment due to the similar pixel values of the background and the flaw, and the background and the flaw cannot be completely separated. Therefore, there is an urgent need for a photometric stereoscopic defect detection method based on a helical phase contrast filtering algorithm to solve this problem in the prior art.
为了解决上述技术问题,特提出一种新的技术方案。In order to solve the above technical problems, a new technical solution is proposed.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种基于螺旋相衬滤波算法的光度立体瑕疵检测方法,以解决上述背景技术中提出的问题。The purpose of the present invention is to provide a photometric stereoscopic defect detection method based on a helical phase contrast filtering algorithm, so as to solve the problems raised in the above background art.
为实现上述目的,本发明提供如下技术方案:一种基于螺旋相衬滤波算法的光度立体瑕疵检测方法,包含数据采集部分和数据处理部分;In order to achieve the above-mentioned purpose, the present invention provides the following technical solutions: a photometric stereoscopic defect detection method based on a helical phase contrast filtering algorithm, comprising a data acquisition part and a data processing part;
所述数据采集部分包含下述步骤:The data collection part includes the following steps:
步骤a,将光源发出的光倾斜入射到朗伯反射物体表面;Step a, obliquely incident the light emitted by the light source on the surface of the Lambertian reflection object;
步骤c,入射的光在物体表面形成漫反射;Step c, the incident light forms diffuse reflection on the surface of the object;
步骤c,统计物体瑕疵需求分辨率,根据需求的分辨率,计算所需镜头倍率及相机像素数;Step c, count the required resolution of object defects, and calculate the required lens magnification and the number of camera pixels according to the required resolution;
步骤d,将镜头与相机组合放置在物体的正上方形成正交投影收集携带物体表面结构信息的反射光;Step d, the combination of the lens and the camera is placed directly above the object to form an orthogonal projection to collect the reflected light carrying the surface structure information of the object;
步骤e,将相机与计算机相连接,通过计算机上的相机软件拍摄并保存反射光的强度图;Step e, connect the camera to the computer, and shoot and save the intensity map of the reflected light through the camera software on the computer;
步骤f,将光源分别放置在物体的多个方位上倾斜照射物体,重复多次步骤a至步骤e,采集得到多个方位上相应的多幅反射光强度图。In step f, the light sources are respectively placed on multiple orientations of the object to irradiate the object obliquely, and steps a to e are repeated multiple times to collect multiple reflected light intensity maps corresponding to multiple orientations.
优选地,所述数据处理部分包含下述步骤:Preferably, the data processing part includes the following steps:
步骤1,光源方向标定:先在正交投影场景中放置一个光滑的球,并在4个不同光源方向条件下拍摄反射光强度图,将4幅强度图放进MATLAB中计算并拟合出光滑球体的圆边界,并定位出圆心坐标(xci,yci),i为4幅图像的索引;Step 1, light source direction calibration: first place a smooth ball in the orthogonal projection scene, and take the reflected light intensity map under 4 different light source direction conditions, put the 4 intensity maps into MATLAB to calculate and fit a smooth The circle boundary of the sphere, and locate the coordinates of the center of the circle (xc i , yc i ), where i is the index of the 4 images;
步骤2,分别定位4幅图上球体的表面高亮处,高亮处的坐标表示为(hxci,hyci),并以表面高亮处来反映光源的方向;Step 2, respectively locate the bright spots on the surface of the sphere on the 4 pictures, the coordinates of the bright spots are expressed as ( hxci , hyci ), and the bright spots on the surface are used to reflect the direction of the light source;
步骤3,根据下述公式计算光滑球体表面法向量:Step 3, calculate the normal vector of the smooth sphere surface according to the following formula:
n:nx=hxci-xci,ny=hyci-yci, n:n x =hxci -xci , n y = hyci -yci ,
步骤4,估算光照强度:以下述公式定义一个光照参数cost函数:Step 4, estimate the light intensity: define a light parameter cost function with the following formula:
其中,N是每张强度图上的像素数,j是强度图上的像素索引,I是每张强度图上的强度值(像素值),ρ是物体的反射率,是第i个光源方向的单位矢量,λi是第i个光照强度,λi=||ei||; where N is the number of pixels on each intensity map, j is the pixel index on the intensity map, I is the intensity value (pixel value) on each intensity map, ρ is the reflectivity of the object, is the unit vector of the ith light source direction, λ i is the ith light intensity, λ i =||e i ||;
步骤5,执行光度立体求得的物体表面结构反射率ρj和法向量nj:ρj=||bj||, Step 5: Execute the reflectivity ρ j and normal vector n j of the surface structure of the object obtained by the photometric stereo: ρ j =||b j ||,
步骤6,根据仅需要二维图像来判断瑕疵类型及其在图像中的位置的特点,求得的法向量取其第三个通道数据n(3);Step 6, according to the characteristics of only needing a two-dimensional image to judge the defect type and its position in the image, the obtained normal vector takes its third channel data n(3);
步骤7,写一个螺旋相位片函数 Step 7, write a helical phase plate function
步骤8,写一个4f系统,将n(3)作为对象放置于4f系统的物平面位置,做螺旋相衬成像,并在像平面求复函数U:F表示傅里叶变换;Step 8, write a 4f system, place n(3) as the object at the object plane position of the 4f system, do spiral phase contrast imaging, and find the complex function U in the image plane: F stands for Fourier transform;
步骤9,对像平面复函数U取其幅值A: Step 9, take its amplitude A for the image plane complex function U:
步骤10,将得到的幅值A进行伽马压缩得最终物体瑕疵图像Iout:Iout=BAγ。B为常数,γ为校正参数,取小于1的分数,称作编码伽马值。Step 10: Perform gamma compression on the obtained amplitude value A to obtain the final object defect image I out : I out =BA γ . B is a constant, γ is a correction parameter, and the fraction less than 1 is called the coding gamma value.
优选地,所述光源的方向公式为:L=2nz*n-R,其中,R表示相机方向为(0,0,1),若从相机视角看则坐标为(0,0,-1);Preferably, the direction formula of the light source is: L=2n z *nR, where R indicates that the camera direction is (0, 0, 1), and if viewed from the camera perspective, the coordinates are (0, 0, -1);
优选地,cost函数的最小化公式为:Preferably, the minimization formula of the cost function is:
bj=ρjnj表示在j像素处的未知场景属性; b j =ρ j n j represents the unknown scene attribute at j pixel;
优选地,是一个非线性最小二乘问题,可以通过Levenberg-Marquardt算法来求解。Preferably, is a nonlinear least squares problem that can be solved by the Levenberg-Marquardt algorithm.
优选地,对于所有的ei有Ij=LTbj,则根据最小二乘法能够求得bj=(LLT)-1LIj。Preferably, for all e i , I j =L T b j , then b j =(LL T ) -1 LI j can be obtained according to the least squares method.
优选地,所述步骤f中物体的多个方位是指在物体的360°方向上选取多个角度,按0°、90°、180°、270°四个角度为例。Preferably, the multiple orientations of the object in the step f refer to selecting multiple angles in the 360° direction of the object, taking four angles of 0°, 90°, 180°, and 270° as examples.
优选地,所述步骤f的多幅是指3幅以上,其中,优选为4幅。Preferably, the plurality of sheets in the step f refers to more than 3 sheets, wherein, preferably 4 sheets.
优选地,所述步骤f具体为,将光源分别放置在物体的前后左右4个方位上倾斜照射物体,重复四次上述步骤a至步骤e,采集得到4个方位上相应的4幅反射光强度图。Preferably, the step f is specifically as follows: placing the light source on the object in four directions, front, back, left and right, and irradiating the object obliquely, repeating the above steps a to e four times, and collecting and obtaining four corresponding reflected light intensities in the four directions. picture.
与现有技术相比,本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:
1、在光度立体算法中加入螺旋相称滤波,瑕疵位置边缘得到增强,去除了物体表面背景,避免了背景干扰,增强了图像对比度。1. The spiral proportional filter is added to the photometric stereo algorithm, the edge of the defect position is enhanced, the surface background of the object is removed, the background interference is avoided, and the image contrast is enhanced.
2、相比现有的阈值分割背景与瑕疵方法,本发明具有更明显的去除背景效果。2. Compared with the existing threshold segmentation method for background and flaws, the present invention has a more obvious effect of removing background.
3、引入了伽马压缩对图像进行处理,图像更平滑,补偿人类视觉特性。3. Gamma compression is introduced to process the image, the image is smoother, and the human visual characteristics are compensated.
附图说明Description of drawings
图1为提供的从相机视角观测的光源在物体上方0°位置倾斜照明的光度立体成像光学组件示意图。FIG. 1 is a schematic diagram of a photometric stereoscopic imaging optical assembly provided with a light source obliquely illuminated at a position of 0° above an object from a camera perspective.
图2为提供的从相机视角观测的光源在物体上方90°位置倾斜照明的光度立体成像光学组件示意图。FIG. 2 is a schematic diagram of a photometric stereoscopic imaging optical assembly provided with a light source obliquely illuminated at a position of 90° above an object from a camera perspective.
图3为提供的从相机视角观测的光源在物体上方180°位置倾斜照明的光度立体成像光学组件示意图。FIG. 3 is a schematic diagram of a photometric stereoscopic imaging optical assembly provided with a light source obliquely illuminated at a position of 180° above an object from a camera perspective.
图4为提供的从相机视角观测的光源在物体上方270°位置倾斜照明的光度立体成像光学组件示意图。FIG. 4 is a schematic diagram of a photometric stereoscopic imaging optical assembly provided by a light source obliquely illuminated at a position of 270° above an object from a camera perspective.
图5为朗伯反射特性示意图。FIG. 5 is a schematic diagram of Lambertian reflection characteristics.
图6为光源方向标定示意图。FIG. 6 is a schematic diagram of light source direction calibration.
图7为螺旋相位片示意图。FIG. 7 is a schematic diagram of a spiral phase plate.
图8为光源在0°位置照射汽车门钢材相机拍摄强度图。Figure 8 is the intensity map of the light source irradiating the car door steel camera at the 0° position.
图9为光源在90°位置照射汽车门钢材相机拍摄强度图。Figure 9 shows the intensity map of the light source irradiating the car door steel camera at a position of 90°.
图10为光源在180°位置照射汽车门钢材相机拍摄强度图。Figure 10 shows the intensity map of the light source irradiating the car door steel camera at a position of 180°.
图11为光源在270°位置照射汽车门钢材相机拍摄强度图。Figure 11 shows the intensity map of the light source irradiating the car door steel camera at a position of 270°.
图12为图8至图11的4幅拍摄强度图经光度立体算法处理后的图像。FIG. 12 is an image of the four captured intensity maps of FIGS. 8 to 11 after being processed by a photometric stereo algorithm.
图13为图12经过螺旋相衬滤波算法处理后的图像。FIG. 13 is the image of FIG. 12 after being processed by the helical phase contrast filtering algorithm.
图14为图13经伽马压缩后的图像。FIG. 14 is the gamma-compressed image of FIG. 13 .
图15为光源在0°位置照射铁环相机拍摄强度图。Figure 15 is the intensity map of the light source irradiating the iron ring camera at the 0° position.
图16为光源在90°位置照射铁环相机拍摄强度图。Figure 16 shows the intensity map of the light source irradiating the iron ring camera at a position of 90°.
图17为光源在180°位置照射铁环相机拍摄强度图。Figure 17 shows the intensity map of the light source irradiating the iron ring camera at a position of 180°.
图18为光源在270°位置照射铁环相机拍摄强度图。Figure 18 shows the intensity map of the light source irradiating the iron ring camera at a position of 270°.
图19为图15至18的4幅拍摄强度图经光度立体算法处理后的图像。FIG. 19 is an image of the four captured intensity maps of FIGS. 15 to 18 after being processed by a photometric stereo algorithm.
图20为图19经过螺旋相衬滤波算法处理后的图像。Fig. 20 is the image of Fig. 19 processed by the helical phase contrast filtering algorithm.
图21为图20经伽马压缩后的图像。FIG. 21 is the image of FIG. 20 after gamma compression.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
请参阅说明书附图,本发明提供一种技术方案:一种基于螺旋相衬滤波算法的光度立体瑕疵检测方法,包含以下步骤:Referring to the accompanying drawings, the present invention provides a technical solution: a method for detecting photometric stereoscopic defects based on a helical phase contrast filtering algorithm, comprising the following steps:
一、数据采集部分。1. Data collection part.
1.将光源发出的光倾斜入射到朗伯反射物体表面。1. The light emitted by the light source is obliquely incident on the surface of the Lambertian reflecting object.
2.入射光在物体表面形成漫反射。2. Incident light forms diffuse reflection on the surface of the object.
3.统计物体瑕疵需求分辨率,根据需求的分辨率,计算所需镜头倍率及相机像素数。3. Calculate the required resolution of object defects, and calculate the required lens magnification and the number of camera pixels according to the required resolution.
4.将镜头与相机组合放置在物体的正上方形成正交投影收集携带物体表面结构信息的反射光。4. The combination of the lens and the camera is placed directly above the object to form an orthogonal projection to collect the reflected light carrying the surface structure information of the object.
5.将相机与计算机相连接,通过计算机上的相机软件拍摄并保存反射光的强度图。5. Connect the camera to the computer, shoot and save the intensity map of the reflected light through the camera software on the computer.
6.将光源分别放置在物体的前后左右4个方位上倾斜照射物体,重复四次上述步骤1至步骤5,采集得到4个方位上相应的4幅反射光强度图(如果有必要的话,也可采集多幅,但至少应采集3幅,均衡分布在物体的360°方位上)。6. Place the light source on the object in four directions, front, back, left and right, and irradiate the object obliquely. Repeat the above steps 1 to 5 four times to collect the corresponding 4 reflected light intensity maps in the 4 directions (if necessary, also Multiple frames can be collected, but at least 3 frames should be collected, evenly distributed on the 360° azimuth of the object).
二、数据处理部分。Second, the data processing part.
8.光源方向标定:先在正交投影场景中放置一个光滑的球,并在4个不同光源方向条件下拍摄反射光强度图,将4幅强度图放进MATLAB中计算并拟合出光滑球体的圆边界,并定位出圆心坐标(xci,yci),i为4幅图像的索引。8. Light source direction calibration: first place a smooth sphere in the orthogonal projection scene, and capture reflected light intensity maps under 4 different light source directions, put the 4 intensity maps into MATLAB to calculate and fit a smooth sphere , and locate the coordinates of the center of the circle (xc i , yc i ), where i is the index of the 4 images.
9.分别定位4幅图上球体的表面高亮处,高亮处的坐标表示为(hxci,hyci),并以表面高亮处来反映光源的方向。9. Locate the highlights on the surface of the sphere on the 4 images respectively. The coordinates of the highlights are expressed as (hxc i , hyci ), and the surface highlights are used to reflect the direction of the light source.
10.计算光滑球体表面法向量n:nx=hxci-xci,ny=hyci-yci, 10. Calculate the normal vector n of the smooth sphere surface: n x = hxci -xci , n y = hyci -yci ,
11.光源方向L=2nz*n-R,R表示相机方向为(0,0,1),若从相机视角看则坐标为(0,0,-1)。11. The light source direction L=2n z *nR, R indicates that the camera direction is (0, 0, 1), and if viewed from the camera perspective, the coordinates are (0, 0, -1).
12.估算光照强度:定义一个光照参数cost函数,12. Estimate light intensity: define a light parameter cost function,
N是每张强度图上的像素数,j是强度图上的像素索引,I是每张强度图上的强度值(像素值),ρ是物体的反射率,是第i个光源方向的单位矢量,λi是第i个光照强度,λi=||ei||。 N is the number of pixels on each intensity map, j is the pixel index on the intensity map, I is the intensity value (pixel value) on each intensity map, ρ is the reflectivity of the object, is the unit vector of the ith light source direction, λ i is the ith light intensity, λ i =||e i ||.
13.cost函数的最小化为13. The minimization of the cost function is
bj=ρjnj表示在j像素处的未知场景属性。 b j = ρ j n j represents the unknown scene attribute at j pixels.
14.这是一个非线性最小二乘问题,可以通过Levenberg-Marquardt算法来求解。14. This is a nonlinear least squares problem that can be solved by the Levenberg-Marquardt algorithm.
15.对于所有的ei有Ij=LTbj,则根据最小二乘法能够求得bj=(LLT)-1LIj。15. For all e i , I j =L T b j , then b j =(LL T ) -1 LI j can be obtained according to the least squares method.
16.执行光度立体求得的物体表面结构反射率ρj和法向量nj:ρj=||bj||, 16. The reflectivity ρ j and the normal vector n j of the object surface structure obtained by performing the photometric stereo: ρ j =||b j ||,
17.由于仅需要二维图像来判断瑕疵类型及其在图像中的位置,故求得的法向量取其第三个通道数据n(3)。17. Since only a two-dimensional image is needed to determine the type of defect and its position in the image, the obtained normal vector takes its third channel data n(3).
18.写一个螺旋相位片函数 18. Write a spiral phase plate function
19.写一个4f系统,将n(3)作为对象放置于4f系统的物平面位置,做螺旋相衬成像,并在像平面求复函数U:F表示傅里叶变换。19. Write a 4f system, place n(3) as the object at the object plane position of the 4f system, do spiral phase contrast imaging, and find the complex function U in the image plane: F stands for Fourier transform.
20.对像平面复函数U取其幅值A: 20. Take the amplitude A of the complex function U of the image plane:
21.将得到的幅值A进行伽马压缩得最终物体瑕疵图像Iout:Iout=BAγ。B为常数,γ为校正参数,取小于1的分数,称作编码伽马值。21. Perform gamma compression on the obtained amplitude value A to obtain the final object defect image I out : I out =BA γ . B is a constant, γ is a correction parameter, and the fraction less than 1 is called the coding gamma value.
本发明的成像装置包括:4个光强一致的光源,待测物体,物镜和工业相机组,电脑The imaging device of the present invention includes: four light sources with consistent light intensity, an object to be measured, an objective lens and an industrial camera group, a computer
其中物镜和工业相机连接成组合,工业相机的传感器位于物镜的焦面位置。电脑与工业相机通过数据线连接,用来将相机拍摄的4幅反射强度图保存到电脑中,并在电脑上对采集图进行算法处理。The objective lens and the industrial camera are connected to form a combination, and the sensor of the industrial camera is located at the focal plane of the objective lens. The computer is connected with the industrial camera through a data cable, which is used to save the four reflection intensity maps captured by the camera to the computer, and perform algorithmic processing on the acquired images on the computer.
如图1所示,包括如下步骤:As shown in Figure 1, it includes the following steps:
S1.从相机视角看,4个光强一致的光源分别放置在待测物体的0°,90°,180°,270°四个方位上进行照明。4个光源依次打开照射待测物体,一次只开一个光源。S1. From the perspective of the camera, 4 light sources with the same light intensity are placed in four directions of 0°, 90°, 180°, and 270° of the object to be measured for illumination. The 4 light sources are turned on in sequence to illuminate the object to be tested, and only one light source is turned on at a time.
S2.4个光源发出的光依次入射在待测的物体表面形成漫反射。S2. The light emitted by the 4 light sources is incident on the surface of the object to be measured in turn to form diffuse reflection.
S3.物镜和相机组位于待测物体的正上方依次收集从物体上传来的反射光,并在相机上依次形成4个信号。S3. The objective lens and the camera group are located directly above the object to be measured and sequentially collect the reflected light from the object, and form 4 signals on the camera in sequence.
S4.相机上的4个信号依次经数据线传输到电脑上形成4幅图像。S4. The 4 signals on the camera are sequentially transmitted to the computer through the data cable to form 4 images.
在使用的时候,本发明:1、在光度立体算法中加入螺旋相称滤波,瑕疵位置边缘得到增强,去除了物体表面背景,避免了背景干扰,增强了图像对比度。2、相比现有的阈值分割背景与瑕疵方法,本发明具有更明显的去除背景效果。3、引入了伽马压缩对图像进行处理,图像更平滑,补偿人类视觉特性。When in use, the present invention: 1. Adding helical proportional filtering to the photometric stereo algorithm, the edge of the defect position is enhanced, the surface background of the object is removed, the background interference is avoided, and the image contrast is enhanced. 2. Compared with the existing threshold segmentation method for background and flaws, the present invention has a more obvious effect of removing background. 3. Gamma compression is introduced to process the image, the image is smoother, and the human visual characteristics are compensated.
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, and substitutions can be made in these embodiments without departing from the principle and spirit of the invention and modifications, the scope of the present invention is defined by the appended claims and their equivalents.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111174769.1A CN114354607B (en) | 2021-10-09 | 2021-10-09 | Luminosity three-dimensional flaw detection method based on spiral phase contrast filtering algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111174769.1A CN114354607B (en) | 2021-10-09 | 2021-10-09 | Luminosity three-dimensional flaw detection method based on spiral phase contrast filtering algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114354607A true CN114354607A (en) | 2022-04-15 |
CN114354607B CN114354607B (en) | 2023-10-31 |
Family
ID=81096345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111174769.1A Active CN114354607B (en) | 2021-10-09 | 2021-10-09 | Luminosity three-dimensional flaw detection method based on spiral phase contrast filtering algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114354607B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010025652A (en) * | 2008-07-17 | 2010-02-04 | Nippon Steel Corp | Surface flaw inspection device |
CN101872491A (en) * | 2010-05-21 | 2010-10-27 | 清华大学 | Photometric stereo-based free-view re-illumination method and system |
US20110292179A1 (en) * | 2008-10-10 | 2011-12-01 | Carlos Hernandez | Imaging system and method |
CN103363924A (en) * | 2013-07-15 | 2013-10-23 | 中国科学院空间科学与应用研究中心 | Compressing three-dimension calculation ghost imaging system and method |
US20140376003A1 (en) * | 2012-01-05 | 2014-12-25 | Helmee Imaging Oy | Arrangement for optical measurements and related method |
US20150346115A1 (en) * | 2014-05-30 | 2015-12-03 | Eric J. Seibel | 3d optical metrology of internal surfaces |
JP2015232487A (en) * | 2014-06-09 | 2015-12-24 | 株式会社キーエンス | Image inspection apparatus, image inspection method, image inspection program, computer-readable recording medium, and recorded apparatus |
JP2016186421A (en) * | 2015-03-27 | 2016-10-27 | 株式会社Ihi | Image processing method |
CN109596637A (en) * | 2017-09-30 | 2019-04-09 | 湖南海擎智能科技有限责任公司 | Object bumps flaw visible detection method and detection device |
CN110455815A (en) * | 2019-09-05 | 2019-11-15 | 西安多维机器视觉检测技术有限公司 | A kind of method and system of electronic component open defect detection |
CN111896550A (en) * | 2020-03-31 | 2020-11-06 | 广西师范大学 | A surface defect detection device and method |
CN112734756A (en) * | 2021-03-29 | 2021-04-30 | 惠州高视科技有限公司 | Detection method and system based on photometric stereo vision |
CN112734824A (en) * | 2021-01-26 | 2021-04-30 | 中国科学院空天信息创新研究院 | Three-dimensional reconstruction method based on generalized luminosity stereo model |
CN112986284A (en) * | 2021-02-20 | 2021-06-18 | 苏州天准科技股份有限公司 | Combined type light source structure and optical detection device |
CN113252567A (en) * | 2021-06-08 | 2021-08-13 | 菲特(天津)检测技术有限公司 | Method, system, medium and terminal for rapidly detecting multiple defects on surface of aluminum valve plate |
-
2021
- 2021-10-09 CN CN202111174769.1A patent/CN114354607B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010025652A (en) * | 2008-07-17 | 2010-02-04 | Nippon Steel Corp | Surface flaw inspection device |
US20110292179A1 (en) * | 2008-10-10 | 2011-12-01 | Carlos Hernandez | Imaging system and method |
CN101872491A (en) * | 2010-05-21 | 2010-10-27 | 清华大学 | Photometric stereo-based free-view re-illumination method and system |
US20140376003A1 (en) * | 2012-01-05 | 2014-12-25 | Helmee Imaging Oy | Arrangement for optical measurements and related method |
CN103363924A (en) * | 2013-07-15 | 2013-10-23 | 中国科学院空间科学与应用研究中心 | Compressing three-dimension calculation ghost imaging system and method |
US20150346115A1 (en) * | 2014-05-30 | 2015-12-03 | Eric J. Seibel | 3d optical metrology of internal surfaces |
JP2015232487A (en) * | 2014-06-09 | 2015-12-24 | 株式会社キーエンス | Image inspection apparatus, image inspection method, image inspection program, computer-readable recording medium, and recorded apparatus |
JP2016186421A (en) * | 2015-03-27 | 2016-10-27 | 株式会社Ihi | Image processing method |
CN109596637A (en) * | 2017-09-30 | 2019-04-09 | 湖南海擎智能科技有限责任公司 | Object bumps flaw visible detection method and detection device |
CN110455815A (en) * | 2019-09-05 | 2019-11-15 | 西安多维机器视觉检测技术有限公司 | A kind of method and system of electronic component open defect detection |
CN111896550A (en) * | 2020-03-31 | 2020-11-06 | 广西师范大学 | A surface defect detection device and method |
CN112734824A (en) * | 2021-01-26 | 2021-04-30 | 中国科学院空天信息创新研究院 | Three-dimensional reconstruction method based on generalized luminosity stereo model |
CN112986284A (en) * | 2021-02-20 | 2021-06-18 | 苏州天准科技股份有限公司 | Combined type light source structure and optical detection device |
CN112734756A (en) * | 2021-03-29 | 2021-04-30 | 惠州高视科技有限公司 | Detection method and system based on photometric stereo vision |
CN113252567A (en) * | 2021-06-08 | 2021-08-13 | 菲特(天津)检测技术有限公司 | Method, system, medium and terminal for rapidly detecting multiple defects on surface of aluminum valve plate |
Non-Patent Citations (4)
Title |
---|
BANG-HWAN KIM等: "Shape from Shading and Photometric Stereo Using Surface Approximation by Legendre Polynomials", COMPUTER VISION AND IMAGE UNDERSTANDING, vol. 66, no. 03 * |
GEORG RADOW等: "Optimisation of Classic Photometric Stereo by Non-convex Variational Minimisation", JOURNAL OF MATHEMATICAL IMAGING AND VISION, vol. 61 * |
LONG MA等: "A fast LED calibration method under near field lighting based on photometric stereo", OPTICS AND LASERS IN ENGINEERING, vol. 147 * |
程耀瑜等: "基于光度立体技术的地板疵点检测方法", 科学技术与工程, vol. 17, no. 30 * |
Also Published As
Publication number | Publication date |
---|---|
CN114354607B (en) | 2023-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101044507B (en) | Image processing method, image processor | |
CN103286081B (en) | Monocular multi-perspective machine vision-based online automatic sorting device for steel ball surface defect | |
CN101542232B (en) | Normal information generating device and normal information generating method | |
CN112858318B (en) | Method for distinguishing screen foreign matter defect from dust, electronic equipment and storage medium | |
Parot et al. | Photometric stereo endoscopy | |
CN112308832A (en) | Bearing quality detection method based on machine vision | |
CN113252568A (en) | Lens surface defect detection method, system, product and terminal based on machine vision | |
JP7514259B2 (en) | System and method for determining whether a camera component is damaged - Patents.com | |
CN111879791B (en) | A machine vision system and method for enhancing convex features on a pattern surface | |
CN112798298A (en) | Vehicle body paint surface defect detection device and detection method thereof | |
CN112070749A (en) | Paper defect detection method and device | |
CN113865830A (en) | Display screen defect detection method and system | |
CN115015112A (en) | A defect detection device and method | |
US20050275630A1 (en) | Apparatus for capturing and analyzing light and method embodied therein | |
CN114693583A (en) | Defect layering detection method and system based on light field camera and detection production line | |
CN114219758A (en) | Defect detection method, system, electronic device and computer readable storage medium | |
CN116721066A (en) | Metal surface defect detection method, device and storage medium | |
CN108050955A (en) | Based on structured light projection and the relevant high temperature air disturbance filtering method of digital picture | |
CN115484371A (en) | Image acquisition method, image acquisition device and readable storage medium | |
CN104807828B (en) | panel bright spot detection method and system | |
CN114354607A (en) | A Photometric Stereo Defect Detection Method Based on Helical Phase Contrast Filtering Algorithm | |
WO2019117802A1 (en) | A system for obtaining 3d images of objects and a process thereof | |
CN114965498B (en) | Method, electronic device and storage medium for detecting LCD module | |
CN220542797U (en) | Defect detection device | |
CN116385636A (en) | A Photometric Stereo Surface Reconstruction Method and Equipment Based on Photometric Linearization |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20241014 Address after: 2803, Building 1, Huide Building, North Station Community, Minzhi Street, Longhua District, Shenzhen City, Guangdong Province 518000 Patentee after: Hexacon Manufacturing Intelligent Technology (Shenzhen) Co.,Ltd. Country or region after: China Address before: 518000 the third floor of building 6, building 7, office building of Hetai industry (Hefeng Industrial Park), Heping community, Fuyong street, Bao'an District, Shenzhen City, Guangdong Province Patentee before: SEVEN OCEAN METROLOGY (SHENZHEN) CO.,LTD. Country or region before: China |