文档介绍:华中科技大学
硕士学位论文
基于DSP的香烟盒封条缺陷识别技术研究
姓名:余凡
申请学位级别:硕士
专业:物理电子学
指导教师:吴裕斌
20051027
摘要
数字图像处理技术在人类的工业、农业、军事、日常生活中有着广泛的应用前景。
将基于图像处理的智能化机器视觉系统引入产品流水线,实现全自动在线检测能大
大提高劳动生产率,在现代化的大规模生产中大有用武之地。
由于图像处理运算量特别大,对硬件平台的要求很高。数字信号处理器(DSP)
是专门用于实时信号处理、具有特殊硬件结构的微处理器。数字信号处理器为数字
图像处理提供了良好的实现平台。
本文提出并实现了一种能够运行在 DSP 嵌入式系统的针对软包装香烟盒上封条
的缺陷识别快速算法。该算法使用图像处理的手段,具有学习功能,通过对不同样
品的学习可以用于检测不同品牌的香烟。算法具有很好的鲁棒性,对平移和任意角
度旋转都不敏感。算法的可移植性非常好,先后在 MATLAB、VC、DSP 三个平台实
现。
MATLAB 上的仿真结果显示,此算法方案合理可行。算法在 VC 平台上用 C 语
言开发,测试结果显示算法判别准确可行,profile 的结果显示算法在 PC 机上消耗的
时间在 20 个毫秒内。算法最终移植到 TI 公司的 6711 DSK 板上,并做了大量的优化。
DSP 平台测试结果显示程序在嵌入式平台上的运行结果和 PC 机一致,运行时间在
60 毫秒左右。大量实验结果表明该烟盒缺陷识别算法高效可靠,可以满足流水线上
的实时在线检测的要求。
关键词:包装检测图像处理图像配准边缘检测 DSP
I
Abstract
Image processing technique is widely used in industry, agriculture, military, and our daily
lives. Machine vision system based on image processing can greatly increase efficiency of
manufacture.
Image processing needs large quantity of calculation. Digital signal processor (DSP) is a
kind of micro processor with special architecture designed for real time signal processing.
Image processing algorithms can run very well on DSP platform.
This paper provides a fast defect detecting algorithm for the seal of cigarette case. This
image processing algorithm can be used on DSP platforms. It has learning function, and
can be used for different cigarette case after learning different model case. This algorithm
is robust and not sensitive to position and rotation. It is implemented in MATLAB and C,
and can be ported to other platforms easily.
The result of simulation on MATLAB shows that this algorithm is accurate. The algorithm
is written in C on VC platform. And the accuracy of this algorithm in C is acceptable. The
profile result shows that it takes less than 20ms on PC. It is finally ported to 6711DSK and
refined in many ways. The test result on embedded system shows that it takes about 60ms
on 6711DSK. So th