【缺陷检测】基于计算机视觉实现芯片缺陷检测附matlab代码

文章利用MATLAB进行图像预处理和机器视觉技术,对BGA芯片的焊球区域进行分析,通过点分析方法标记和比较判断芯片是否合格及缺陷类型。实验结果显示该方法能有效识别缺陷并保证检测速度和可靠性。
摘要由CSDN通过智能技术生成

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信       无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机 

⛄ 内容介绍

文章应用机器视觉技术,采集回流之前的球栅阵列(BGA)芯片图像,对图像进行预处理后,运用点分析方法对图像中各个焊球区域进行标记,建立判断标准并依次序对这些信息进行比对,从而判断芯片合格与否,并对不合格芯片判断其缺陷类型;研究采用MATLAB完成图像预处理以及具体的检测程序编写;实验结果证明,此方法可以正确识别缺陷类型,在检测速度以及可靠性方面有很好的保证.

⛄ 部分代码

% Program to find the two lung regions in a CT cross sectional image.

clc;    % Clear the command window.

close all;  % Close all figures (except those of imtool.)

imtool close all;  % Close all imtool figures if you have the Image Processing Toolbox.

clear;  % Erase all existing variables. Or clearvars if you want.

workspace;  % Make sure the workspace panel is showing.

format long g;

format compact;

fontSize = 22;

%===============================================================================

% Check that user has the Image Processing Toolbox installed.

hasIPT = license('test', 'image_toolbox');

if ~hasIPT

% User does not have the toolbox installed.

message = sprintf('Sorry, but you do not seem to have the Image Processing Toolbox.\nDo you want to try to continue anyway?');

reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');

if strcmpi(reply, 'No')

% User said No, so exit.

return;

end

end

%===============================================================================

% 读取芯片图像.

folder = pwd;

baseFileName = 'sr.bmp';

% Get the full filename, with path prepended.

fullFileName = fullfile(folder, baseFileName);

% Check if file exists.

if ~exist(fullFileName, 'file')

% File doesn't exist -- didn't find it there.  Check the search path for it.

fullFileNameOnSearchPath = baseFileName; % No path this time.

if ~exist(fullFileNameOnSearchPath, 'file')

% Still didn't find it.  Alert user.

errorMessage = sprintf('Error: %s does not exist in the search path folders.', fullFileName);

uiwait(warndlg(errorMessage));

return;

end

end

grayImage = imread(fullFileName);

% Get the dimensions of the image.  

% numberOfColorBands should be = 1.

[rows, columns, numberOfColorBands] = size(grayImage);

if numberOfColorBands > 1

% It's not really gray scale like we expected - it's color.

% Convert it to gray scale.

grayImage = rgb2gray(grayImage); % Take green channel.

end

% 对图像进行中值滤波

% grayImage = medfilt2(grayImage,[5,5]);

% Display the original gray scale image.

subplot(2, 3, 1);

imshow(grayImage,[]);

axis on;

title('Original Grayscale Image', 'FontSize', fontSize);

% Enlarge figure to full screen.

set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);

% Give a name to the title bar.

set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off') 

⛄ 运行结果

⛄ 参考文献

[1] 夏链, 贾伟妙, 崔鹏,等. 基于机器视觉的BGA芯片缺陷检测及其MATLAB实现[J]. 合肥工业大学学报:自然科学版, 2009, 32(11):4.

[2] 吴文轩, 陈方斯, 刘建锋,等. 基于MATLAB软件的图像处理技术在电子元器件引脚缺陷检测的应用[J]. 福建轻纺, 2018(1):5.

[3] 杨飞, 祝诗平, 邱青苗. 基于计算机视觉的花椒外观品质检测及其MATLAB实现[J]. 农业工程学报, 2008, 24(1):5.

[4] 李帮建. 基于计算机视觉的表面缺陷检测及应用[D]. 东南大学, 2016.

⛳️ 代码获取关注我

❤️部分理论引用网络文献,若有侵权联系博主删除

❤️ 关注我领取海量matlab电子书和数学建模资料

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matlab科研助手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值