CN117092113A - Camera mould welding quality detection device and system thereof - Google Patents
Camera mould welding quality detection device and system thereof Download PDFInfo
- Publication number
- CN117092113A CN117092113A CN202311107997.6A CN202311107997A CN117092113A CN 117092113 A CN117092113 A CN 117092113A CN 202311107997 A CN202311107997 A CN 202311107997A CN 117092113 A CN117092113 A CN 117092113A
- Authority
- CN
- China
- Prior art keywords
- image
- welding
- camera module
- camera
- welding area
- 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
- 238000003466 welding Methods 0.000 title claims abstract description 144
- 238000001514 detection method Methods 0.000 title claims abstract description 63
- 230000007547 defect Effects 0.000 claims description 69
- 229910000679 solder Inorganic materials 0.000 claims description 68
- 238000007689 inspection Methods 0.000 claims description 48
- 238000000034 method Methods 0.000 claims description 30
- 230000004927 fusion Effects 0.000 claims description 18
- 238000012549 training Methods 0.000 claims description 18
- 230000002950 deficient Effects 0.000 claims description 14
- 238000007781 pre-processing Methods 0.000 claims description 9
- 238000003384 imaging method Methods 0.000 claims description 8
- 238000012634 optical imaging Methods 0.000 claims description 8
- 238000003860 storage Methods 0.000 claims description 7
- 238000012360 testing method Methods 0.000 claims description 6
- 238000000605 extraction Methods 0.000 claims description 5
- 238000005493 welding type Methods 0.000 claims description 5
- 238000013528 artificial neural network Methods 0.000 claims description 4
- 230000014759 maintenance of location Effects 0.000 claims description 4
- 238000003062 neural network model Methods 0.000 claims description 4
- 238000010276 construction Methods 0.000 claims description 3
- 238000003708 edge detection Methods 0.000 claims description 3
- 230000004907 flux Effects 0.000 claims description 3
- 238000007499 fusion processing Methods 0.000 claims description 3
- 239000012535 impurity Substances 0.000 claims description 3
- 238000010801 machine learning Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 claims description 3
- 230000001133 acceleration Effects 0.000 claims description 2
- 238000005286 illumination Methods 0.000 claims description 2
- 230000000877 morphologic effect Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 description 8
- 230000009286 beneficial effect Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 238000001914 filtration Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000011179 visual inspection Methods 0.000 description 3
- 238000013398 bayesian method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000007500 overflow downdraw method Methods 0.000 description 2
- 206010058031 Joint adhesion Diseases 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000007921 spray Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
- G01N2021/0106—General arrangement of respective parts
- G01N2021/0112—Apparatus in one mechanical, optical or electronic block
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8854—Grading and classifying of flaws
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
Landscapes
- Chemical & Material Sciences (AREA)
- Pathology (AREA)
- Analytical Chemistry (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biochemistry (AREA)
- Immunology (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
Description
技术领域Technical field
本发明涉及焊接质量检测技术领域,具体为一种摄像头模具焊接质量检测装置及其系统。The invention relates to the technical field of welding quality detection, specifically a camera mold welding quality detection device and its system.
背景技术Background technique
随着智能设备行业的快速发展,摄像头模组CCM的需求量快速增加。同时设备规格有往超薄及高像素方向发展的趋势,造成设备相机模组的尺寸持续微型化。高像素相机模组主要由Lens(镜头)、VCM(音圈马达)、底座支架、SensorIC(图像传感器)及PCB/FPC(电路板)等元件构成。生产CCM的过程中,元器件间的焊接是重要的一部分,其中CCM产品的VCM焊接引脚数量有2个到20个不等,通过激光锡球喷射焊接等方法与PCB连接。在焊接过程中,由于焊接机器误差等原因可能会导致摄像头模组的焊接出现缺陷,进而影响模组内集成电路的可靠性,例如漏焊、少焊、焊点粘连(桥接)等。如果将此类缺陷模组应用到电子产品中,会导致产品出现质量问题,甚至导致整个产品报废。因此,实现CCM焊接缺陷的有效检测,对提高电子产品的质量以及可靠性至关重要。With the rapid development of the smart device industry, the demand for camera modules CCM is increasing rapidly. At the same time, equipment specifications are trending toward ultra-thin and high-pixel dimensions, resulting in continued miniaturization of equipment camera modules. High-pixel camera modules are mainly composed of Lens (lens), VCM (voice coil motor), base bracket, SensorIC (image sensor) and PCB/FPC (circuit board) and other components. In the process of producing CCM, the welding between components is an important part. The number of VCM welding pins of CCM products ranges from 2 to 20, and they are connected to the PCB through laser solder ball spray welding and other methods. During the welding process, welding machine errors and other reasons may cause welding defects in the camera module, which in turn affects the reliability of the integrated circuits in the module, such as missing solders, missing solders, solder joint adhesion (bridging), etc. If such defective modules are applied to electronic products, it will cause quality problems in the product and even cause the entire product to be scrapped. Therefore, effective detection of CCM welding defects is crucial to improving the quality and reliability of electronic products.
机器视觉检测技术,指在产品质量检测中采用工业相机采集待检测产品的图像,然后通过图像处理技术判断待检测产品质量问题的非接触检测方法,其在电子元器件自动化生产线中,能够很好地实现焊前、焊后检测。由于待测CCM焊接表面存在局部高光反射、复杂光照环境、相机的畸变及背景干扰等因素干扰,使得CCM表面焊接缺陷的视觉检测成为一项具有挑战的任务摄像头模组焊点与普通PCB焊点不同,存在无标志点角焊和多面连通焊接,使得现有的检测技术还无法较好的应用到实际CCM生产线上。现有质量检测方案存在成本高、误判率大、效率较低的不足,并且依赖于二次人工目检以最终确定缺陷,但人工检测过程中易受外界因素及检测工人熟练程度等影响,并且难以保证产品质量一致性,不能满足检测精度和识别速度要求较高的摄像头模组焊接缺陷检测。Machine vision inspection technology refers to a non-contact inspection method that uses industrial cameras to collect images of products to be inspected during product quality inspection, and then uses image processing technology to determine the quality problems of the products to be inspected. It can be used very well in automated production lines of electronic components. Realize pre-weld and post-weld inspection. Due to the interference of local high light reflection, complex lighting environment, camera distortion, background interference and other factors on the CCM welding surface to be tested, visual inspection of CCM surface welding defects has become a challenging task. Camera module solder joints and ordinary PCB solder joints Differently, there are unmarked spot fillet welding and multi-side connected welding, which makes the existing detection technology unable to be well applied to actual CCM production lines. Existing quality inspection solutions have the disadvantages of high cost, high misjudgment rate, and low efficiency, and rely on secondary manual visual inspection to ultimately determine defects. However, the manual inspection process is easily affected by external factors and the proficiency of inspection workers. Moreover, it is difficult to ensure product quality consistency and cannot meet the detection of camera module welding defects that require high detection accuracy and recognition speed.
针对上述的问题,为此,我们提供了一种摄像头模具焊接质量检测装置及其系统。In response to the above problems, we provide a camera mold welding quality inspection device and its system.
发明内容Contents of the invention
本发明的目的在于提供一种摄像头模具焊接质量检测装置及其系统,以解决上述背景技术中提出的问题。The purpose of the present invention is to provide a camera mold welding quality detection device and its system to solve the problems raised in the above background technology.
为了解决上述的技术问题,本发明采用了如下技术方案:In order to solve the above technical problems, the present invention adopts the following technical solutions:
一种摄像头模具焊接质量检测装置及其系统,包括底座(1),所述底座(1)的上方设置有工作仓(2),所述工作仓(2)的内部设置有储物抽屉(3),所述储物抽屉(3)的上方设置有把手(4),所述工作仓(2)的上方设置有检测结构(5),所述检测结构(5)的左侧设置有支架(6),所述支架(6)的上方设置有支杆(7),所述支杆(7)的内部设置有蜂鸣器(9),所述蜂鸣器(9)的下方设置有机器视觉结构(10),所述机器视觉结构(10)的左侧设置有照明灯(8),所述蜂鸣器(9)的右侧设置有控制单元(11)。A camera mold welding quality inspection device and its system, including a base (1), a work chamber (2) provided above the base (1), and a storage drawer (3) provided inside the work chamber (2) ), a handle (4) is provided above the storage drawer (3), a detection structure (5) is provided above the work compartment (2), and a bracket (5) is provided on the left side of the detection structure (5) 6). A support rod (7) is provided above the bracket (6). A buzzer (9) is provided inside the support rod (7). A machine is provided below the buzzer (9). Vision structure (10), a lighting lamp (8) is provided on the left side of the machine vision structure (10), and a control unit (11) is provided on the right side of the buzzer (9).
优选的,所述检测结构(5)包括第一电机(501),所述第一电机(501)的上方设置有第一螺纹筒(502),所述第一螺纹筒(502)的内部设置有第一螺纹杆(503),所述第一螺纹筒(502)与第一螺纹杆(503)螺纹连接,所述第一螺纹杆(503)的上方设置有放置板(504),所述放置板(504)的上方设置有吸盘(505),所述支架(6)的内部设置有第二螺纹筒(506),所述第二螺纹筒(506)的内部设置有第二螺纹杆(507),所述第二螺纹筒(506)与第二螺纹杆(507)螺纹连接,所述第二螺纹筒(506)的外端设置有驱动电机(508)。Preferably, the detection structure (5) includes a first motor (501), a first threaded barrel (502) is provided above the first motor (501), and a first threaded barrel (502) is provided inside. There is a first threaded rod (503), the first threaded barrel (502) is threadedly connected to the first threaded rod (503), and a placement plate (504) is provided above the first threaded rod (503). A suction cup (505) is provided above the placing plate (504), a second threaded barrel (506) is provided inside the bracket (6), and a second threaded rod (506) is provided inside the second threaded barrel (506). 507), the second threaded barrel (506) is threadedly connected to the second threaded rod (507), and a driving motor (508) is provided at the outer end of the second threaded barrel (506).
优选的,所述第二螺纹杆(507)的右侧设置有安装板(509),所述安装板(509)的右侧设置有第二电机(510),所述第二电机(510)的右侧设置有夹紧板(511),所述夹紧板(511)的右侧设置有防滑垫(512),所述防滑垫(512)与夹紧板(511)粘合连接,所述第二电机(510)的下方设置有第一限制杆(513)。Preferably, a mounting plate (509) is provided on the right side of the second threaded rod (507), and a second motor (510) is provided on the right side of the mounting plate (509). The second motor (510) A clamping plate (511) is provided on the right side of the clamping plate (511), and an anti-slip pad (512) is provided on the right side of the clamping plate (511). The anti-slip pad (512) is adhesively connected to the clamping plate (511), so A first limiting rod (513) is provided below the second motor (510).
优选的,所述机器视觉结构(10)包括第一固定板(1001),所述第一固定板(1001)的下方设置有连接杆(1002),所述连接杆(1002)的下方设置有第二固定板(1003),所述连接杆(1002)与第一固定板(1001)通过螺纹连接。Preferably, the machine vision structure (10) includes a first fixed plate (1001), a connecting rod (1002) is provided below the first fixed plate (1001), and a connecting rod (1002) is provided below the connecting rod (1002). The second fixing plate (1003), the connecting rod (1002) is connected to the first fixing plate (1001) through threads.
优选的,所述第二固定板(1003)的下方设置有第二限制杆(1004),所述第二限制杆(1004)的左侧设置有第三电机(1005),所述第三电机(1005)与第二固定板(1003)螺纹连接,所述第三电机(1005)的下方设置有连接板(1006),所述连接板(1006)的下方设置有摄像头(1007)。Preferably, a second limiting rod (1004) is provided below the second fixed plate (1003), and a third motor (1005) is provided on the left side of the second limiting rod (1004). The third motor (1005) is threadedly connected to the second fixing plate (1003), a connecting plate (1006) is provided below the third motor (1005), and a camera (1007) is provided below the connecting plate (1006).
一种摄像头模具焊接质量检测系统,包括:A camera mold welding quality inspection system, including:
图像采集单元,获取待检测摄像头模组图像序列;The image acquisition unit acquires the image sequence of the camera module to be detected;
图像预处理单元,对获取的待检测图像序列进行焊接区域定位和序列图像融合处理,以得到高质量的焊接区域图像;The image preprocessing unit performs welding area positioning and sequence image fusion processing on the acquired image sequence to be detected to obtain high-quality welding area images;
焊接质量检测单元,以模组为单位进行摄像头模组焊接质量的初步质量检测和以焊点为单位进行摄像头模组焊接质量的神经网络二次缺陷判定;The welding quality inspection unit performs preliminary quality inspection of the welding quality of the camera module on a module basis and neural network secondary defect determination of the welding quality of the camera module on a solder point basis;
显示单元,显示摄像头模组焊接的质量检测结果并标记存在焊接缺陷的位置及类型。The display unit displays the quality inspection results of the camera module welding and marks the location and type of welding defects.
优选的,所述图像序列由光学成像单元采集,其中,所述光学成像单元包括:Preferably, the image sequence is collected by an optical imaging unit, wherein the optical imaging unit includes:
图像采集单元,采集摄像头模组图像序列,所述图像序列为不同曝光时间下采集的摄像头模组图像;照明单元,摄像头模组焊接区域与图像采集设备预设固定角度,用于获取焊锡与焊盘对比度大的焊接区域成像;The image acquisition unit collects the camera module image sequence, and the image sequence is the camera module image collected under different exposure times; the lighting unit has a preset fixed angle between the camera module welding area and the image acquisition equipment, and is used to acquire the solder and solder Imaging of welding areas with high disc contrast;
所述图像预处理单元,包括:The image preprocessing unit includes:
焊接区域定位单元,用于对摄像头模组焊接区域自动精准定位,获取采集的摄像头模组图像序列中每一张图像的焊接区域位置信息;The welding area positioning unit is used to automatically and accurately position the welding area of the camera module and obtain the welding area position information of each image in the collected camera module image sequence;
图像序列融合单元,用于将获取的焊接区域图像序列进行融合,得到曝光均匀、细节信息丰富的焊接区域图像;The image sequence fusion unit is used to fuse the acquired welding area image sequences to obtain a welding area image with uniform exposure and rich detailed information;
所述焊接区域定位单元,包括:The welding area positioning unit includes:
模板区域选择组件,用于利用焊接区域相对于摄像头模组空间位置固定的原理,采用模板匹配方法进行区域匹配定位时选用的模板图像;The template area selection component is used to use the principle that the welding area is fixed relative to the camera module's spatial position, and uses the template matching method to select the template image for area matching and positioning;
相似度比较组件,用于比较计算模板图像和原图中的搜索子图相似程度,最大相似度子图位置即为目标位置;The similarity comparison component is used to compare and calculate the similarity between the template image and the search sub-image in the original image. The position of the maximum similarity sub-image is the target position;
搜索加速组件,用于加速匹配定位的速度,采用金字塔分层搜索策略,预设起始搜索坐标点,首先进行粗匹配后再精准匹配;The search acceleration component is used to accelerate the speed of matching and positioning. It adopts a pyramid hierarchical search strategy and presets the starting search coordinate point. It first performs rough matching and then precise matching;
焊接区域裁剪组件,用于获取匹配定位坐标后,通过预设焊接区域的长度与宽度,将图像序列中每一幅图像的焊接区域裁剪并储存为尺寸较小、背景区域较少的焊接区域图像;The welding area cropping component is used to obtain the matching positioning coordinates, and by presetting the length and width of the welding area, crop the welding area of each image in the image sequence and store it as a welding area image with a smaller size and less background area. ;
所述图像序列融合单元,包括:The image sequence fusion unit includes:
图像对齐组件,用于获取的焊接区域图像序列对应像素位置配准对齐;The image alignment component is used to align the corresponding pixel positions of the acquired welding area image sequence;
图像融合组件,用于根据曝光度权重和局部细节保留权重两个指标计算每一个图像像素权重值得到综合权重图,进而获得高质量的融合焊接区域图像;The image fusion component is used to calculate the weight value of each image pixel based on the two indicators of exposure weight and local detail retention weight to obtain a comprehensive weight map, thereby obtaining a high-quality fused welding area image;
所述质量检测单元,包括:The quality inspection unit includes:
初步质量检测单元,用于快速判定摄像头模组焊接质量是否合格,并对结果进行输出;The preliminary quality inspection unit is used to quickly determine whether the welding quality of the camera module is qualified and output the results;
二次缺陷检测单元,用于进一步对初步质量检测单元判定为不合格的模组进行二次质量检查,剔除误判为存在缺陷的合格模组,并对不合格模组所存在缺陷类型及位置进行识别和标记。The secondary defect detection unit is used to further conduct secondary quality inspections on modules that are judged to be unqualified by the preliminary quality inspection unit, eliminate qualified modules that are mistakenly judged to be defective, and check the types and locations of defects in unqualified modules. Identify and label.
优选的,所述初步质量检测单元,包括:Preferably, the preliminary quality detection unit includes:
图像增强组件,用于改善焊接区域助焊剂杂质干扰增强边缘轮廓信息,提高后续特征提取的准确性;Image enhancement component, used to improve the interference of flux impurities in the welding area, enhance edge contour information, and improve the accuracy of subsequent feature extraction;
特征提取组件,用于有效表征各类焊接缺陷的特征,图像增强组件处理后的焊接区域通过边缘检测算法识别焊点边缘轮廓,并通过孔洞填充、形态学操作后获取焊点轮廓,进而计算焊点轮廓特征;The feature extraction component is used to effectively characterize the characteristics of various types of welding defects. The welding area processed by the image enhancement component uses an edge detection algorithm to identify the edge contour of the solder joint, and obtains the solder joint contour through hole filling and morphological operations, and then calculates the solder joint. Point outline features;
初步分类组件,用于提取摄像头模组焊接缺陷特征后,对合格摄像头模组和不合格摄像头模组进行初步分类,采用可调节输出类别的机器学习方法进行质量判定,以使存在缺陷的摄像头模组全部被检出。The preliminary classification component is used to initially classify qualified camera modules and unqualified camera modules after extracting the welding defect characteristics of the camera module. It uses a machine learning method with adjustable output categories to make quality judgments so that defective camera modules can be identified. All groups are detected.
优选的,所述二次缺陷检测单元,包括:Preferably, the secondary defect detection unit includes:
数据集构建组件,用于构建待检测摄像头模组焊点的数据集,采用模板区域预设焊盘位置对焊接区域进行裁剪,获取每个焊点的目标图像,根据焊点缺陷类型进行分类,并按一定比例划分为样本训练集和样本测试集;The data set construction component is used to build a data set of the solder joints of the camera module to be detected. It uses the preset pad positions in the template area to crop the welding area, obtains the target image of each solder joint, and classifies the solder joint defects according to the type. And divided into sample training set and sample test set according to a certain proportion;
模型训练组件,用于训练识别焊点缺陷类型的神经网络模型,利用所述样本训练集进行参数迭代优化,直至训练模型输入所述样本测试集达到预期的预测精度停止训练,获得焊点缺陷分类模型;The model training component is used to train a neural network model for identifying solder joint defect types, and uses the sample training set to perform parameter iterative optimization until the training model inputs the sample test set and reaches the expected prediction accuracy to stop training and obtain the solder joint defect classification. Model;
缺陷检测组件,用于判定输入焊点图像是否存在缺陷及存在何种类型的缺陷。The defect detection component is used to determine whether there are defects in the input solder joint image and what type of defects there are.
优选的,所述显示单元,包括:Preferably, the display unit includes:
第一显示屏,用于显示当前检测摄像头模组图像和焊接区域图像,并对是否合格进行标记,查看存在缺陷的焊点位置及类型;The first display screen is used to display the current inspection camera module image and the welding area image, mark whether it is qualified, and check the location and type of defective solder joints;
第二显示屏,用于显示参数设置,供设置基于机器视觉的摄像头模组焊接缺陷检测装置及方法中涉及的可调参数。The second display screen is used to display parameter settings for setting adjustable parameters involved in the machine vision-based camera module welding defect detection device and method.
上述描述可以看出,通过本申请的上述的技术方案,必然可以解决本申请要解决的技术问题。It can be seen from the above description that the technical problems to be solved by the present application can certainly be solved through the above technical solutions of the present application.
同时,通过以上技术方案,本发明至少具备以下有益效果:At the same time, through the above technical solutions, the present invention at least has the following beneficial effects:
本发明通过光学成像单元获取待检测摄像头模组的图像序列;对图像序列进行图像预处理,获取高质量、曝光均匀的焊接区域图像;通过质量检测单元对待检测摄像头模组进行质量判定,并识别存在焊接缺陷的焊点位置及类型,检测方法可更好地适用于缺陷样本数量较少、合格模组远大于缺陷模组的实际生产线,满足了高精高效的实际生产要求,避免了人工目检的不足。The invention obtains the image sequence of the camera module to be detected through the optical imaging unit; performs image preprocessing on the image sequence to obtain high-quality, uniformly exposed welding area images; performs quality judgment on the camera module to be detected through the quality detection unit, and identifies The location and type of solder joints with welding defects, the detection method can be better applied to actual production lines where the number of defective samples is small and the number of qualified modules is much larger than the defective modules. It meets the actual production requirements of high precision and efficiency and avoids manual inspection. Insufficient inspection.
附图说明Description of the drawings
图1为本发明正视结构示意图;Figure 1 is a schematic front view of the structure of the present invention;
图2为本发明正视剖面结构示意图;Figure 2 is a front cross-sectional structural schematic diagram of the present invention;
图3为本发明检测结构示意图;Figure 3 is a schematic diagram of the detection structure of the present invention;
图4为本发明图3中A处结构示意图;Figure 4 is a schematic structural diagram of position A in Figure 3 of the present invention;
图5为本发明机器视觉结构示意图;Figure 5 is a schematic diagram of the machine vision structure of the present invention;
图6为本发明实施例中整体流程示意图;Figure 6 is a schematic diagram of the overall process in the embodiment of the present invention;
图7为本发明实施例中焊接区域定位单元流程图;Figure 7 is a flow chart of the welding area positioning unit in the embodiment of the present invention;
图8为本发明实施例中图像序列融合单元流程图;Figure 8 is a flow chart of the image sequence fusion unit in the embodiment of the present invention;
图9为本发明实施例中初步质量检测单元流程图;Figure 9 is a flow chart of the preliminary quality detection unit in the embodiment of the present invention;
图10为本发明实施例中二次缺陷检测单元神经网络结构示意图。Figure 10 is a schematic structural diagram of the neural network of the secondary defect detection unit in the embodiment of the present invention.
图中:1、底座;2、工作仓;3、储物抽屉;4、把手;5、检测结构;501、第一电机;502、第一螺纹筒;503、第一螺纹杆;504、放置板;505、吸盘;506、第二螺纹筒;507、第二螺纹杆;508、驱动电机;509、安装板;510、第二电机;511、夹紧板;512、防滑垫;513、第一限制杆;6、支架;7、支杆;8、照明灯;9、蜂鸣器;10、机器视觉结构;1001、第一固定板;1002、连接杆;1003、第二固定板;1004、第二限制杆;1005、第三电机;1006、连接板;1007、摄像头;11、控制单元。In the picture: 1. Base; 2. Working compartment; 3. Storage drawer; 4. Handle; 5. Detection structure; 501. First motor; 502. First threaded barrel; 503. First threaded rod; 504. Placement plate; 505, suction cup; 506, second threaded barrel; 507, second threaded rod; 508, drive motor; 509, mounting plate; 510, second motor; 511, clamping plate; 512, anti-slip pad; 513, No. 1. Limiting rod; 6. Bracket; 7. Support rod; 8. Light; 9. Buzzer; 10. Machine vision structure; 1001. First fixed plate; 1002. Connecting rod; 1003. Second fixed plate; 1004 , second limiting rod; 1005, third motor; 1006, connecting plate; 1007, camera; 11, control unit.
具体实施方式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 and embodiments. 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.
实施案例一Implementation case one
如附图1和图2所示,本发明提供一种技术方案:一种摄像头模具焊接质量检测装置及其系统,包括底座1,底座1的上方设置有工作仓2,工作仓2的内部设置有储物抽屉3,储物抽屉3的上方设置有把手4,工作仓2的上方设置有检测结构5,检测结构5的左侧设置有支架6,支架6的上方设置有支杆7,支杆7的内部设置有蜂鸣器9,蜂鸣器9的下方设置有机器视觉结构10,机器视觉结构10的左侧设置有照明灯8,蜂鸣器9的右侧设置有控制单元11。As shown in Figures 1 and 2, the present invention provides a technical solution: a camera mold welding quality detection device and its system, including a base 1, a working chamber 2 arranged above the base 1, and an internal setting of the working chamber 2 There is a storage drawer 3. A handle 4 is provided above the storage drawer 3. A detection structure 5 is provided above the working compartment 2. A bracket 6 is provided on the left side of the detection structure 5. A support rod 7 is provided above the support 6. A buzzer 9 is provided inside the rod 7 , a machine vision structure 10 is provided below the buzzer 9 , a lighting lamp 8 is provided on the left side of the machine vision structure 10 , and a control unit 11 is provided on the right side of the buzzer 9 .
实施例二Embodiment 2
下面结合具体的工作方式对实施例一中的方案进行进一步的介绍,详见下文描述:The solution in Embodiment 1 will be further introduced below in conjunction with the specific working methods. For details, see the description below:
如图3和图4所示,作为优选的实施方式,在上述方式的基础上,进一步的,检测结构5包括第一电机501,第一电机501的上方设置有第一螺纹筒502,第一螺纹筒502的内部设置有第一螺纹杆503,第一螺纹杆503的上方设置有放置板504,放置板504的上方设置有吸盘505,支架6的内部设置有第二螺纹筒506,第二螺纹筒506的内部设置有第二螺纹杆507,第二螺纹筒506的外端设置有驱动电机508,第二螺纹杆507的右侧设置有安装板509,安装板509的右侧设置有第二电机510,第二电机510的右侧设置有夹紧板511,夹紧板511的右侧设置有防滑垫512,第二电机510的下方设置有第一限制杆513,第一螺纹筒502与第一螺纹杆503螺纹连接,第二螺纹筒506与第二螺纹杆507螺纹连接,防滑垫512与夹紧板511粘合连接,物品放置在放置板504上与吸盘505接触,放置物品掉落,第一电机501开始工作,通过第一螺纹筒502与第一螺纹杆503之间的螺纹连接带动物品到夹紧板511之间,驱动电机508开始工作,通过第二螺纹筒506与第二螺纹杆507之间的螺纹连接带动夹紧板511对物品进行夹紧,在通过第二电机510的工作,带动物品转动,能够全方位的进行检测。As shown in Figures 3 and 4, as a preferred embodiment, based on the above method, further, the detection structure 5 includes a first motor 501, and a first threaded barrel 502 is provided above the first motor 501. A first threaded rod 503 is provided inside the threaded barrel 502. A placing plate 504 is provided above the first threaded rod 503. A suction cup 505 is provided above the placing plate 504. A second threaded barrel 506 is provided inside the bracket 6. A second threaded rod 507 is provided inside the threaded barrel 506, a driving motor 508 is provided at the outer end of the second threaded barrel 506, a mounting plate 509 is provided on the right side of the second threaded rod 507, and a third mounting plate 509 is provided on the right side of the mounting plate 509. Two motors 510. A clamping plate 511 is provided on the right side of the second motor 510. An anti-slip pad 512 is provided on the right side of the clamping plate 511. A first limiting rod 513 is provided below the second motor 510. The first threaded barrel 502 It is threadedly connected with the first threaded rod 503, the second threaded barrel 506 is threadedly connected with the second threaded rod 507, the anti-slip pad 512 is adhesively connected with the clamping plate 511, the object is placed on the placing plate 504 and contacts with the suction cup 505, and the placed object falls out. After falling, the first motor 501 starts to work and drives the object to the clamping plate 511 through the threaded connection between the first threaded barrel 502 and the first threaded rod 503. The driving motor 508 starts to work. Through the second threaded barrel 506 and the first The threaded connection between the two threaded rods 507 drives the clamping plate 511 to clamp the object, and through the work of the second motor 510, the object is driven to rotate, enabling all-round detection.
如图5所示,作为优选的实施方式,在上述方式的基础上,进一步的,机器视觉结构10包括第一固定板1001,第一固定板1001的下方设置有连接杆1002,连接杆1002的下方设置有第二固定板1003,第二固定板1003的下方设置有第二限制杆1004,第二限制杆1004的左侧设置有第三电机1005,第三电机1005的下方设置有连接板1006,连接板1006的下方设置有摄像头1007,连接杆1002与第一固定板1001通过螺纹连接,第三电机1005与第二固定板1003螺纹连接,摄像头1007通过连接板1006与第三电机1005固定连接,第三电机1005通过连接杆1002与第一固定板1001螺纹连接,可以方便的进行拆卸和安装维修,在连接板1006与第二固定板1003之间通过第二限制杆1004连接,可以防止摄像头1007在转动时晃动。As shown in Figure 5, as a preferred embodiment, on the basis of the above method, the machine vision structure 10 further includes a first fixed plate 1001, and a connecting rod 1002 is provided below the first fixed plate 1001. The connecting rod 1002 A second fixed plate 1003 is provided below, a second limiting rod 1004 is provided below the second fixed plate 1003, a third motor 1005 is provided on the left side of the second limiting rod 1004, and a connecting plate 1006 is provided below the third motor 1005 , a camera 1007 is provided below the connecting plate 1006, the connecting rod 1002 is threadedly connected to the first fixed plate 1001, the third motor 1005 is threadedly connected to the second fixed plate 1003, and the camera 1007 is fixedly connected to the third motor 1005 through the connecting plate 1006 , the third motor 1005 is threadedly connected to the first fixed plate 1001 through the connecting rod 1002, which can be easily disassembled, installed and repaired. The connecting plate 1006 and the second fixed plate 1003 are connected through the second limiting rod 1004 to prevent the camera. 1007 shakes when turning.
实施例1:Example 1:
如图6、图7、图8、图9和图10所示,本发明实施例提供的摄像头模组焊接缺陷检测系统,包括:As shown in Figures 6, 7, 8, 9 and 10, the camera module welding defect detection system provided by the embodiment of the present invention includes:
光学成像单元,用于摄像头模组焊接区域的成像及图像序列采集;Optical imaging unit, used for imaging and image sequence collection of the welding area of the camera module;
图像预处理单元,用于对获取的待检测图像序列进行焊接区域定位和序列图像融合处理,以得到高质量、易处理的焊接区域图像;The image preprocessing unit is used to perform welding area positioning and sequence image fusion processing on the acquired image sequence to be detected, so as to obtain high-quality, easy-to-process welding area images;
质量检测单元,用于待检测焊接区域的焊接质量检测,以模组为单位进行摄像头模组焊接质量的初步质量检测和以焊点为单位进行摄像头模组焊接质量的神经网络二次缺陷判定;The quality inspection unit is used for welding quality inspection of the welding area to be inspected. It conducts preliminary quality inspection of the welding quality of the camera module on a module basis and performs neural network secondary defect determination on the welding quality of the camera module on a solder point basis;
显示单元,用于显示处理后的摄像头模组和焊接区域图像,并显示标记存在缺陷位置及类型。The display unit is used to display the processed camera module and welding area images, and display the location and type of marked defects.
该实例中,图像预处理单元分别与光学成像单元和质量检测单元连接,显示单元与质量检测单元连接;In this example, the image preprocessing unit is connected to the optical imaging unit and the quality detection unit respectively, and the display unit is connected to the quality detection unit;
该实例中,为避免一次成像往往出现曝光不均匀的情况,导致焊接区域反光较大或边缘不清晰,成像质量较差,成像装置采集不同曝光时间的图像序列,具体的,曝光时间设置为低、中、高三种,同一摄像头模组采集三张图像;In this example, in order to avoid the uneven exposure that often occurs in one imaging, resulting in greater reflection in the welding area or unclear edges, and poor imaging quality, the imaging device collects image sequences with different exposure times. Specifically, the exposure time is set to low , medium and high, the same camera module collects three images;
该实例中,焊接区域定位方法采用金字塔搜索策略优化的特征匹配算法,定位只在高曝光图像进行,获取定位坐标后所有图像序列数据共享;In this example, the welding area positioning method uses a feature matching algorithm optimized by the pyramid search strategy. The positioning is only performed on high-exposure images. After the positioning coordinates are obtained, all image sequence data are shared;
该实例中,为进一步提高算法速度,图像序列融合只融合定位焊接区域后裁剪的焊接区域图像;In this example, in order to further improve the speed of the algorithm, image sequence fusion only fuses the welding area images cropped after positioning the welding area;
该实例中,初步质量检测中焊接区域焊点特征提取为焊点的轮廓几何特征,具体的,特征量依次为面积、周长、区域凸性、紧密度、角度、纵横比;通过可调节决策面的机器学习方法进行摄像头模组焊接质量是否合格的判定;In this example, the solder joint features of the welding area in the preliminary quality inspection are extracted as the contour geometric features of the solder joint. Specifically, the feature quantities are area, perimeter, regional convexity, tightness, angle, and aspect ratio; through adjustable decision-making Use the above machine learning method to determine whether the welding quality of the camera module is qualified;
该实例中,二次缺陷判定方法神经网络模型通过焊点数据集训练得到,输入图像为经过图像融合后的高质量焊点图像,输出为焊点是否合格及缺陷的类型及位置;In this example, the neural network model of the secondary defect determination method is obtained through training on the solder joint data set. The input image is a high-quality solder joint image after image fusion, and the output is whether the solder joint is qualified and the type and location of the defect;
上述技术方案的有益效果:为了改变以往人工目检的易疲劳、速度慢等缺点,设定了基于机器视觉的检测方法,通过采集单元采集待检物品的图像,由图像预处理单元处理后通过质量检测单元将其根据合格标准进行质量判定,并将检测结果传输到显示单元进行显示,便于工作人员查看。Beneficial effects of the above technical solution: In order to change the shortcomings of manual visual inspection such as fatigue and slow speed in the past, an inspection method based on machine vision is set up. The image of the item to be inspected is collected through the acquisition unit, and is processed by the image preprocessing unit. The quality inspection unit determines the quality according to the qualification standards, and transmits the inspection results to the display unit for display, making it easier for staff to view.
实施例2:Example 2:
在实施例1的基础上,本发明实施例提供的摄像头模组焊接缺陷检测系统,光学成像单元,包括:Based on Embodiment 1, the camera module welding defect detection system and optical imaging unit provided by this embodiment of the present invention include:
图像采集单元,用于采集摄像头模组图像,利用预先设置的图像采集曝光时间与图像序列包含图像数量,对同一待检测摄像头模组采集预设数量的不同曝光时间图像;The image acquisition unit is used to collect camera module images, and uses the preset image acquisition exposure time and the number of images contained in the image sequence to collect a preset number of images with different exposure times for the same camera module to be detected;
照明单元,采用摄像头模组焊接区域与图像采集设备预设固定角度,用于获取焊锡与焊盘对比度大的焊接区域成像;The lighting unit uses a preset fixed angle between the welding area of the camera module and the image acquisition device to obtain images of the welding area with a high contrast between the solder and the pad;
该实例中,图像采集单元可使用低成本的CMOS工业相机及普通工业镜头,须满足的条件是可获取高清晰度的焊点图像以及可通过编程自由设置曝光时间等参数;In this example, the image acquisition unit can use low-cost CMOS industrial cameras and ordinary industrial lenses. The conditions that must be met are that high-definition solder joint images can be obtained and parameters such as exposure time can be freely set through programming;
该实例中,为获取焊点与焊盘对比度较大的图像,具体的照明方式选择低角度的环形光源暗场照明,且焊盘与光源需存在一定角度,使焊盘反射光线不进入相机而在成像中属于阴暗区域;In this example, in order to obtain an image with a high contrast between the solder joints and the solder pad, the specific lighting method is a low-angle ring light source dark field illumination, and the solder pad and the light source need to be at a certain angle so that the light reflected by the solder pad does not enter the camera. It is a dark area in imaging;
上述技术方案的有益效果:采集多张不同曝光时间的图像可使用图像处理算法方式进一步消除焊点反光,增强图像细节;所采用照明单元成本较低,焊接区域成像清晰、缺陷特征明显,可进一步方便后续图像处理步骤。The beneficial effects of the above technical solution: collecting multiple images with different exposure times can use image processing algorithms to further eliminate solder joint reflections and enhance image details; the cost of the lighting unit used is low, the welding area has clear images and obvious defect characteristics, which can further Convenient for subsequent image processing steps.
实施例3:Example 3:
在实施例1的基础上,一种基于机器视觉的摄像头模组焊接缺陷检测装置和方法,图像预处理单元,包括:Based on Embodiment 1, a machine vision-based camera module welding defect detection device and method, image preprocessing unit, includes:
焊接区域定位单元,采用金字塔分层搜索策略的特征匹配方法对摄像头模组焊接区域自动精准定位,获取采集的摄像头模组图像序列中每一张图像的焊接区域位置信息;The welding area positioning unit uses the feature matching method of the pyramid hierarchical search strategy to automatically and accurately locate the welding area of the camera module, and obtains the welding area position information of each image in the collected camera module image sequence;
图像序列融合单元,采用曝光度函数和局部细节保留度共同确定像素权重的多曝光图像融合方法将获取的焊接区域图像序列进行融合,得到曝光均匀、细节信息丰富的焊接区域图像。The image sequence fusion unit uses a multi-exposure image fusion method in which the exposure function and local detail retention jointly determine pixel weights to fuse the acquired welding area image sequences to obtain a welding area image with uniform exposure and rich detail information.
该实例中搜索过程引入金字塔分层策略后,首先确定金字塔层数。然后优化搜索过程为在金字塔顶层低分辨率图像的粗定位和上一层高分辨率图像的精定位两部分。具体地,粗定位部分在顶层低分辨率图像进行,对每个侯选位置产生的搜索子图与模板图像进行穷尽对比,顶层图像因其尺寸较小,所产生的搜索子图也较少。因此,首先在低分辨率的顶层图像粗定位排除无关区域进而缩小精定位搜索范围,可以极大的提升搜索速度,同时在顶层粗定位搜索时适当降低判断阈值以降低低分辨率丢失图像细节的影响,将符合要求的候选点区域传入精准定位流程。精定位在图像金字塔每层搜索只选择上一层定位区域附近的位置搜索,并计算相似度。以此方式循环搜索定位至金字塔底层的原图像,图像定位精度在原图时最高。In this example, after the pyramid layering strategy is introduced into the search process, the number of pyramid layers is first determined. Then the optimization search process is divided into two parts: coarse positioning of low-resolution images at the top of the pyramid and fine positioning of high-resolution images in the upper layer. Specifically, the coarse positioning part is performed on the top-level low-resolution image, and the search sub-image generated at each candidate position is compared exhaustively with the template image. The top-level image generates fewer search sub-images due to its smaller size. Therefore, firstly, coarse positioning of the low-resolution top image excludes irrelevant areas and then narrows the fine positioning search range, which can greatly improve the search speed. At the same time, during the top-level coarse positioning search, the judgment threshold is appropriately lowered to reduce the risk of losing image details at low resolution. Impact, the candidate point areas that meet the requirements are passed into the precise positioning process. The precise positioning search at each level of the image pyramid only selects the position near the positioning area of the previous layer to search, and calculates the similarity. In this way, the original image positioned at the bottom of the pyramid is searched cyclically, and the image positioning accuracy is highest in the original image.
该实例中,特征匹配采用几何不变矩特征,在金字塔第一层模板匹配精确定位后,按照单目模组和双目模组模板选取位置,在x和y方向分别偏移后获取焊接区域。以焊接区域焊盘为基准定义每组模板焊盘位置及宽高用于后续焊点图像缺陷判定。In this example, feature matching uses geometric invariant moment features. After the first layer of the pyramid template is accurately positioned, the position is selected according to the monocular module and binocular module templates, and the welding area is obtained after being offset in the x and y directions respectively. . Define the position, width and height of each group of template pads based on the pads in the welding area for subsequent solder joint image defect determination.
该实例中,多曝光图像融合是以一定的图像融合规则使较暗区域信息和反光区域的信息均在一副图像呈现,最终得到反光较低、曝光均匀的焊接区域图像。In this example, multi-exposure image fusion uses certain image fusion rules to present both darker area information and reflective area information in one image, ultimately obtaining a welding area image with low reflection and uniform exposure.
上述技术方案的有益效果:以定位的焊接区域为图像处理对象,提高后续图像处理的速度并降低非检测区域的干扰;细节增强的多曝光图像融合方法对采集的不同曝光时间的摄像头模组焊接区域图像序列进行融合处理,获得高质量的焊接区域成像,可以进一步提高质量检测的准确性。The beneficial effects of the above technical solution: taking the positioned welding area as the image processing object, improving the speed of subsequent image processing and reducing interference in non-detection areas; the detail-enhanced multi-exposure image fusion method can weld the collected camera modules with different exposure times Regional image sequences are fused to obtain high-quality welding area imaging, which can further improve the accuracy of quality inspection.
实施例4:Example 4:
在实施例3的基础上,本发明实施例提供的摄像头模组焊接缺陷检测系统,图像序列融合单元,包括:On the basis of Embodiment 3, the camera module welding defect detection system and image sequence fusion unit provided by this embodiment of the present invention include:
图像对齐组件,用于获取的焊接区域图像序列对应像素位置配准对齐;The image alignment component is used to align the corresponding pixel positions of the acquired welding area image sequence;
图像融合组件,用于根据曝光度权重和局部细节保留权重两个指标计算每一个图像像素权重值得到综合权重图,进而获得高质量的融合图像。The image fusion component is used to calculate the weight value of each image pixel based on the two indicators of exposure weight and local detail retention weight to obtain a comprehensive weight map, thereby obtaining a high-quality fused image.
该实例中,在图像融合之前为了避免不同曝光时间图像之间存在微小偏移,从而造成融合图像出现伪影模糊等现象,首先需要对待融合图像进行配准校正,使其像素点对齐,步骤如下:首先对图像进行灰度化,确定图像像素的中值,以中值为阈值获得中值阈值位图,然后构建图像金字塔进行偏移量计算得到偏移量(Δx,Δy),将待配准图像在水平方向移动Δx,在垂直方向移动Δy,得到最终的配准图像序列。In this example, before image fusion, in order to avoid slight offsets between images with different exposure times, resulting in blurred artifacts and other phenomena in the fused image, the images to be fused first need to be registered and corrected to align their pixels. The steps are as follows : First, grayscale the image, determine the median value of the image pixels, use the median value as the threshold to obtain the median threshold bitmap, and then construct the image pyramid to calculate the offset to obtain the offset (Δx, Δy). The quasi-image is moved by Δx in the horizontal direction and Δy in the vertical direction to obtain the final registration image sequence.
该实例中,曝光度权重函数构建如式(Ⅰ):In this example, the exposure weight function is constructed as formula (I):
式中α和β为权重函数中的平衡系数,可以平衡图像全局亮度与局部细节;In the formula, α and β are the balance coefficients in the weight function, which can balance the global brightness and local details of the image;
该实例中,局部细节保留度采用同态滤波算法增强局部细节信息量获取细节权重图。同态滤波在频域中进行处理,可以在压缩图像灰度范围的同时增强对比度,使图像中的低频信息减少并且增加高频信息,从而降低亮度变化并锐化图像边缘细节;In this example, the homomorphic filtering algorithm is used to preserve local details to enhance the amount of local detail information to obtain the detail weight map. Homomorphic filtering is processed in the frequency domain, which can enhance the contrast while compressing the grayscale range of the image, reducing the low-frequency information in the image and increasing the high-frequency information, thereby reducing brightness changes and sharpening image edge details;
对于图像序列中每一幅图像进行同态滤波操作获得k幅图像Tk(i,j),其与对应原图像的差即可获得图像中细节最丰富区域。权重函数如式(Ⅱ):Perform a homomorphic filtering operation on each image in the image sequence to obtain k images T k (i, j), and the difference between them and the corresponding original image can obtain the area with the richest details in the image. The weight function is as shown in formula (II):
该实例中,最终进行综合权值计算,综合考虑上述两种因素计算图像的权重值。首先,将两个权重指标相乘,归一化处理后得到图像中每个像素的权重。综合权值计算如(Ⅲ):In this example, a comprehensive weight calculation is finally performed, taking the above two factors into consideration to calculate the weight value of the image. First, the two weight indicators are multiplied and normalized to obtain the weight of each pixel in the image. The comprehensive weight calculation is as follows (III):
其中,σ为一个避免分母为零的极小正数,本文取σ=10-7,μ1,μ2为权重参数的权重值,实施例中取其值均为1;Among them, σ is a very small positive number that avoids the denominator being zero. This article takes σ = 10 -7 , μ 1 and μ 2 are the weight values of the weight parameters. In the embodiment, their values are all 1;
该实例中,为获得更好的图像质量,优化权重图融合,降低融合图像的伪影产生,使用多尺度金字塔的方法进行图像融合。In this example, in order to obtain better image quality, optimize weight map fusion, and reduce artifacts in the fused image, a multi-scale pyramid method is used for image fusion.
上述技术方案的有益效果:融合后的焊接区域周围层次清晰,高光抑制较好,细节信息相比其他方法保留更多,有利于后期特征的提取和最终缺陷的检测。The beneficial effects of the above technical solution: the fused welding area has clear layers around it, better highlight suppression, and retains more detailed information than other methods, which is beneficial to later feature extraction and final defect detection.
实施例5;Example 5;
在实施例1的基础上,本发明实施例提供的摄像头模组焊接缺陷检测系统,质量检测单元,包括:Based on Embodiment 1, the camera module welding defect detection system and quality inspection unit provided by this embodiment of the present invention include:
初步质量检测单元,用于快速判定摄像头模组焊接质量是否合格,并对结果进行输出;The preliminary quality inspection unit is used to quickly determine whether the welding quality of the camera module is qualified and output the results;
二次缺陷检测单元,用于进一步对初步质量检测单元判定为不合格的模组进行二次质量检查,剔除误判为存在缺陷的合格模组,并对不合格模组所存在缺陷类型及位置进行识别和标记。The secondary defect detection unit is used to further conduct secondary quality inspections on modules that are judged to be unqualified by the preliminary quality inspection unit, eliminate qualified modules that are mistakenly judged to be defective, and check the types and locations of defects in unqualified modules. Identify and label.
该实例中,初步质量检测单元的输入为图像序列中高曝光焊接区域图像,通过非线性图像增强方法增强焊接区域图像去除助焊剂杂质的干扰增强边缘信息,然后通过边缘检测算法提取焊点边缘轮廓,获取焊点几何轮廓特征,输入可调节风险函数的最小风险贝叶斯决策算法进行模组是否合格的判定;In this example, the input of the preliminary quality inspection unit is the high-exposure welding area image in the image sequence. The welding area image is enhanced through a nonlinear image enhancement method to remove the interference of flux impurities and enhance the edge information. Then the edge contour of the solder joint is extracted through an edge detection algorithm. Obtain the geometric contour characteristics of the solder joints and input the minimum risk Bayesian decision-making algorithm of the adjustable risk function to determine whether the module is qualified;
非线性图像增强方法,首先,考虑到焊点检测的实时性要求,采用快速中值滤波算法对焊点四周干扰进行滤除;其次,基于自适应Gamma算法提高焊接区域与非焊接区域之间的灰度值差异。Nonlinear image enhancement method. First, taking into account the real-time requirements of solder joint detection, a fast median filtering algorithm is used to filter out interference around the solder joint; secondly, based on the adaptive Gamma algorithm, the image quality between the welding area and the non-welding area is improved. Gray value difference.
该实例中,通过引入风险因子函数衡量错误发生时的风险,以使缺陷模组尽可能被检出,在此过程存在少量合格摄像头模组误判为缺陷。In this example, a risk factor function is introduced to measure the risk when an error occurs, so that defective modules can be detected as much as possible. In this process, a small number of qualified camera modules are misjudged as defects.
实施例6:Example 6:
在实施例5的基础上,本发明实施例提供的摄像头模组焊接缺陷检测系统,二次缺陷检测单元,包括:On the basis of Embodiment 5, the camera module welding defect detection system and secondary defect detection unit provided by this embodiment of the present invention include:
数据集构建组件,用于构建待检测摄像头模组焊点的数据集,采用模板区域预设焊盘位置对焊接区域进行裁剪,获取每个焊点的目标图像,根据焊点缺陷类型进行分类,并按一定比例划分为样本训练集和样本测试集;The data set construction component is used to build a data set of the solder joints of the camera module to be detected. It uses the preset pad positions in the template area to crop the welding area, obtains the target image of each solder joint, and classifies the solder joint defects according to the type. And divided into sample training set and sample test set according to a certain proportion;
模型训练组件,用于训练识别焊点缺陷类型的神经网络模型,利用样本训练集进行参数迭代优化,直至训练模型输入样本测试集达到预期的预测精度停止训练,获得焊点缺陷分类模型;The model training component is used to train the neural network model for identifying solder joint defect types, and uses the sample training set to iteratively optimize the parameters until the training model input sample test set reaches the expected prediction accuracy to stop training and obtain the solder joint defect classification model;
缺陷检测组件,用于判定输入焊点图像是否存在缺陷及存在何种类型的缺陷。The defect detection component is used to determine whether there are defects in the input solder joint image and what type of defects there are.
该实例中,模型训练组件中数据集,选取经过多曝光图像融合后的高质量焊点图像制作数据集,在提取的焊接区域中预定义每个焊盘中心点,按照尺寸大鱼焊盘尺寸截取焊点图像,以保证相邻焊点有重合区域,最后通过人工筛选后得到若干焊点图像。此外,由于样本量较少本文通过数据增强的方式扩充焊点数据集样本量,结合摄像头模组焊接的实际情况使用镜像翻转和添加噪声扰动的扩充方式。经过扩充后,获得最终焊点数据集。随机取数据集70%数据作为训练集,30%为验证集,包含合格、桥接、漏焊和少焊四种焊接类型。In this example, in the data set in the model training component, high-quality solder spot images after multi-exposure image fusion are selected to create a data set, and the center point of each solder pad is predefined in the extracted welding area, and the size of the solder pad is determined according to the size. The solder spot images are intercepted to ensure that adjacent solder spots have overlapping areas, and finally several solder spot images are obtained through manual screening. In addition, due to the small sample size, this article uses data enhancement to expand the sample size of the solder joint data set, and uses mirror flipping and adding noise perturbation to expand the sample size based on the actual situation of camera module welding. After expansion, the final solder joint data set is obtained. Randomly select 70% of the data set as the training set, and 30% as the verification set, including four welding types: qualified, bridge, missing welding and less welding.
该实例中,由于需要检测的缺陷类型不多,且样本量较少输入图像较小,考虑基于浅层简单的LeNet-5卷积神经网络结构使用贝叶斯方法优化,并加入批标准化设计网络结构。In this example, since there are not many types of defects that need to be detected, and the sample size is small and the input image is small, consider using the Bayesian method to optimize the shallow and simple LeNet-5 convolutional neural network structure, and add the batch normalization design network structure.
上述技术方案的有益效果:针对工业实际生产中的实时性要求和缺陷模组样本较少易出现过拟合的问题,设计以模组为单位的初步检测和以焊点为单位的两次检测。由于工业实际中出现缺陷模组的概率较小,为保证实时性要求,对图像增强处理后提取焊点几何特征输入最小风险的贝叶斯决策算法进行决策,通过调整风险函数保证带有焊接缺陷的模组全部检出。由于第一步将部分合格模组误判以及需要确定焊接缺陷类型及位置,第二步检测设计了贝叶斯方法改进的卷积神经网络结构,算法在摄像头模组焊接数据集上准确率和预测速度方面均取得了较好的效果。本摄像头模组缺陷检测方案解决了工业实时检测的问题和降低了对摄像头模组焊接缺陷的误判,提高了检测的效率与精度。Beneficial effects of the above technical solution: In view of the real-time requirements in actual industrial production and the fact that defective module samples are less prone to over-fitting problems, a preliminary inspection based on modules and two inspections based on solder joints are designed. . Since the probability of defective modules in industrial practice is small, in order to ensure real-time requirements, a Bayesian decision-making algorithm is used to extract the geometric features of solder joints after image enhancement processing and input the minimum risk, and adjust the risk function to ensure that there are welding defects. All modules are checked out. Due to the misjudgment of some qualified modules in the first step and the need to determine the type and location of welding defects, the second step of detection designed a convolutional neural network structure improved by the Bayesian method. The accuracy of the algorithm on the camera module welding data set is as high as Good results have been achieved in terms of prediction speed. This camera module defect detection solution solves the problem of industrial real-time detection and reduces misjudgment of camera module welding defects, improving detection efficiency and accuracy.
实施例7:Example 7:
在实施例1的基础上,本发明实施例提供的摄像头模组焊接缺陷检测系统,显示单元,包括:Based on Embodiment 1, the camera module welding defect detection system and display unit provided by the embodiment of the present invention include:
第一显示屏,用于显示当前检测摄像头模组图像和焊接区域图像,并对是否合格进行标记,查看存在缺陷的焊点位置及类型。The first display screen is used to display the current inspection camera module image and the welding area image, mark whether it is qualified, and check the location and type of defective solder joints.
第二显示屏,用于显示参数设置,供设置基于机器视觉的摄像头模组焊接缺陷检测装置及方法中涉及的可调参数。The second display screen is used to display parameter settings for setting adjustable parameters involved in the machine vision-based camera module welding defect detection device and method.
该实例中,本发明所涉及的所有参数均可在第二显示屏中调节,结果在第一显示屏中显示。In this example, all parameters involved in the present invention can be adjusted on the second display screen, and the results are displayed on the first display screen.
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art will understand that various changes, modifications, and substitutions can be made to these embodiments without departing from the principles and spirit of the invention. and modifications, the scope of the invention is defined by the appended claims and their equivalents.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311107997.6A CN117092113A (en) | 2023-08-30 | 2023-08-30 | Camera mould welding quality detection device and system thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311107997.6A CN117092113A (en) | 2023-08-30 | 2023-08-30 | Camera mould welding quality detection device and system thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117092113A true CN117092113A (en) | 2023-11-21 |
Family
ID=88773093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311107997.6A Pending CN117092113A (en) | 2023-08-30 | 2023-08-30 | Camera mould welding quality detection device and system thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117092113A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118071759A (en) * | 2024-04-25 | 2024-05-24 | 苏州杰锐思智能科技股份有限公司 | Method and device for detecting exposed defects of element pins and electronic equipment |
CN119091236A (en) * | 2024-11-08 | 2024-12-06 | 河北鼎瓷电子科技有限公司 | Ceramic packaging substrate detection method and system based on visual inspection and meta-learning |
-
2023
- 2023-08-30 CN CN202311107997.6A patent/CN117092113A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118071759A (en) * | 2024-04-25 | 2024-05-24 | 苏州杰锐思智能科技股份有限公司 | Method and device for detecting exposed defects of element pins and electronic equipment |
CN119091236A (en) * | 2024-11-08 | 2024-12-06 | 河北鼎瓷电子科技有限公司 | Ceramic packaging substrate detection method and system based on visual inspection and meta-learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117092113A (en) | Camera mould welding quality detection device and system thereof | |
CN107945184B (en) | Surface-mounted component detection method based on color image segmentation and gradient projection positioning | |
CN108765416A (en) | PCB surface defect inspection method and device based on fast geometric alignment | |
CN101261234B (en) | Surface defect detection device | |
CN112881419B (en) | Chip detection method, electronic device and storage medium | |
CN208207914U (en) | PCB surface defect detecting device based on fast geometric alignment | |
WO2007062563A1 (en) | On-line automatic inspection method for detecting surface flaws of steel during the pretreatment of the ship steel | |
CN109142381B (en) | High-speed visual detection and identification equipment | |
CN105021628A (en) | Detection method for surface defects of optical fiber image inverter | |
CN114136975A (en) | A kind of microwave bare chip surface defect intelligent detection system and method | |
CN108021926A (en) | A kind of vehicle scratch detection method and system based on panoramic looking-around system | |
CN103279956A (en) | Method for detecting positional accuracy of components of chip mounter | |
CN105181713A (en) | Detection device used for optical fiber image inverter surface defects | |
CN114518526A (en) | Automatic testing machine control system suitable for PCB board ICT | |
CN119198754B (en) | A visual inspection system for appearance defects of pressure sensors | |
CN116883434B (en) | A method for detecting packaging defects of acceleration sensor chips based on semantic segmentation | |
CN111307812A (en) | Appearance inspection method of solder joints based on machine vision | |
CN114894808A (en) | Machine vision-based heat pipe nozzle defect detection device and method | |
CN114965272A (en) | A test method for a chip defect detection platform | |
CN118566248A (en) | Chip patch precision visual detection method | |
CN116681684A (en) | Tunnel disease monitoring method and system based on image recognition | |
CN114392940B (en) | A pin detection method and device for special-shaped components | |
CN114460087A (en) | Welding spot defect detection system and method based on machine vision | |
CN117871406B (en) | Automatic optical detection method and system | |
CN117078674B (en) | Intelligent PCBA appearance defect detection method and detection system |
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 |