
基于计算机视觉的玻璃瓶缺陷在线检测系统的研究与实现硕士学位论文.doc
37页基于计算机视觉的玻璃瓶缺陷检测系统的研究与实现硕士学位论文广西师范大学硕士学位论文基于计算机视觉的玻璃瓶缺陷检测系统的研究与实现姓名:陈常祥申请学位级别:硕士专业:计算机软件与理论指导教师:王强20070101 摘要基于计算机视觉的玻璃瓶缺陷检测系统的研究与实现姓名:陈常祥 导师:王强专业:计算机软件与理论方向:模式识别与图像处理 年级:2004摘要玻璃瓶瓶口、瓶颈裂纹是玻璃瓶质量检测的重要方面目前,国内玻璃瓶生 产厂家大多采用原始的人工灯光目测法该方法不仅效率低、准确性差,而且检验标 准也很难达到一致;另有少部分厂家引进了国外的验瓶机但国外验瓶机大多存在造价高、 灵活性差等缺点因此,开发一个性价比高、检测范围广,而且具有良好的人机交互界面, 升级方便的系统很有必要开发系统的主要目的是适应我国中小型玻璃生产企业的现 状,尽量降低他们的生产成本自从2002年开始,广西师大电子研究所与桂林晶盛玻璃有限公司合作,成 功开发了“啤酒瓶裂纹实时检测系统气此系统运行三年多,效果较好,但形 势的发展提出了更高的要求为了提高系统的性能,我们作了进一步研发,本论文对研发 过程中采用的策略和技术方法进行了论述O因此,本文针对原系统已有检测项目在性能上的不足和检测速度的需要,对 啤酒瓶瓶口裂纹检测系统进行了进一步的完善和改进工作,主要包括以下几个方面:1、针对原系统不能准确对啤酒瓶瓶口定位,而且也不能对广口瓶、白色玻璃 瓶定位。
本文采用了八方向链码搜索来跟踪寻找瓶口边缘点改进算法之后,能准确 地找到各种玻璃瓶的位置使整个系统具备一定的通用性,同时提高了系统的可靠性和效 率2、在裂纹判断算法上,针对背景上光斑和外界光源的干扰,将原来对矩形感 兴趣区域的特征提取方法,改为椭圆拟合法纠正的特征提取方法改进之后,大大的 降低了系统的误判率由原来的0.4%降到0.2%,提高了程序的可靠性3、 为了更加完善系统,同时满足用户的要求,在系统中增加了瓶颈裂纹检测 项目,使得整个裂纹检测系统趋向于完善摒弃了以前人工灯光检测方法,使得产 品的质量更加可靠,从而提高了公司的产品竞争力4、 为了对软件实行版权保护,木文对软件保护作了初步探讨,同时将一些软 件的保护方法用到本文的裂纹检测系统中去本文采用机器指纹的防拷贝技术,并 用MD5加密保存到参数文件中,防止用户对软件的重复使用本方法只是对裂纹检测系 统的初步保护,只是防止系统的一版多用5、 为了解决产品在运输过程中存储介质容易损坏,使用和携带的方便性,软 件执行的可靠性等问题本文采用了闪存卡??工业CF卡作为存储介质用来提高 系统运行的可靠性、易操作性、并增强了软件的安全性裂纹检测系统改进后,裂纹检测系统的速度提高了 3倍,处理一帧坏瓶子的时间从原I摘要来的30ms减少到10ms,系统总的检测速度从原来的120个玻璃瓶/分钟, 提高到现在的150个玻璃瓶/分钟。
误判率漏检率下降了 2倍,从以前的0.4%下降到 0.2%目前,本文修改之后的裂纹检测系统已经在桂林晶盛玻璃有限公司运行了半年多,用户 给予了较高的评价并且,有一台检验线出售给山东景耀玻璃有限公司,也受到了公司的好 评,认为可以和国外的产品相比,甚至瓶颈裂纹检测项目的检测结果可以超过国外的某 些同类产品目前,桂林晶盛玻璃有限公司乂有4条检验线投入运行,为公司节省了大量 开支,创造了效益,提高了公司的品牌形象关键字:瓶口定位 感兴趣区域瓶颈裂纹检测 动态阈值 防拷贝技术N摘要The Research and Implement for Online DetectingSystem of Glass-BottleFaultiness Based on Computer VisionAuthor: Changxiang Chen; Tutor: Qiang Wang; Specialty: Computer Software &Theory;Research direction: Image Processing and Pattern Recognition ;Grade:2004AbstractThe flaw detecting in glass-bottle mouth and bottle-neck is very important in thecourse of production of glass-bottle. At present, many domestic factories adopt theartificial method to detect the quality of their productions, which not only is inefficientand inaccurate but also lacks of uniform inspection standard. Some domestic factoriesintroduce into foreign machines which adopt mechanism-touched mode, but thesemachines are low agility and require high cost. Therefore, it is indispensable to develop adetecting system which has virtues of high cost performance and high applicability aswel 1 as convenient operation interface. The main purpose is a present condition thatadapts our country to produce glass in the small scaled enterprise, lowering theirproduction cost as far as possibleEver since 2002 start, electronics graduate school of Guangxi NormalUniversityand Gui 1 in Jinsheng class bottle co. Ltd cooperated success to develop f1aw detectingsystem in beer bottle mouth. This system has been running for more than three yearson-line , the result is better, but the development of the situation put forward the higherrequest. Therefore, we made the further development for advance the performance. Thisthesis discusses the developing process which adopts strategy and the techniquemethodSo, the work of this thesis is that it has improved the scarceness of the former f1awdetecting system in beer bottle mouth and has met the speed of the output. The workmainly includes several aspects:1 • To be directed against the matter of confirming of the beer bottle mouth, as well asthe jar and the white bottle. The paper uses the method of the eight directions rule ofboundary chain code to improve the former algorithm. The result is that it can confirm themouth of every kinds of bottle. So, it certainly makes the whole system had i n generaluse, raised the credibility and the efficiency of the system at the same time2. In the former crack judge algorithm, because of the interference of the backgroundof the light spot and outside light source, it put forward a way that make a el 1 ipse toIII摘要correct the feature exaction method, which improve its former method that make withseveral rectangles to simulate the curve. So the improvement 1owers the miscarriage ofjustice rate of the system consumedly. Decline to 0. 2% from original0. 4%, raisedependability of the procedures. For the sake of the more perfect system, satisfy the request of the customer at thesame time, increased the bottleneck crack examination item in the system, make thewhole crack examination system incline toward perfect. Abandoned the past artificiallight examination method, make the quantity of the product more of credibility, raised thecompetition ability of the company product4> Tn order to protect the copyright of the software, this thesis makes the first stepstudying the software protection method , and uses some methods of software protectionin the detecting system of flaw. This thesis adopts the method is that use the fingerprintof computer of Ant。












