【正文】
哈爾濱理工大學(xué)學(xué)士學(xué)位論文 I 基于 VB 的圖像預(yù)處理 摘要 VB 全稱(chēng)為 Visual Basic,它是 Windows 環(huán)境下最受歡迎的程序設(shè)計(jì)工具之一。利用計(jì)算機(jī)來(lái)進(jìn)行圖像處理,稱(chēng)為數(shù)字圖像處理。數(shù)字圖像處理是許多領(lǐng)域最具有挑戰(zhàn)性的研究課題之一,利用 VB 進(jìn)行數(shù)字圖像處理比其它語(yǔ)言進(jìn)行處理,具有簡(jiǎn)單易學(xué)、用法比較靈活、編程效率較高等特點(diǎn)。 本文介紹了 VB 程序設(shè)計(jì)的開(kāi)發(fā)環(huán)境,數(shù)字圖像處理的基本原理,同時(shí)也分析了 VB 設(shè)計(jì)語(yǔ)言的 設(shè)計(jì) 特點(diǎn)。設(shè) 計(jì)了一套 基于 VB 的數(shù)字圖像處理的程序,該程序包括了界面設(shè)計(jì)和程序設(shè)計(jì)兩方面:界面設(shè)計(jì)方面包括菜單欄 、工具欄、圖片 欄以及其它控件設(shè)計(jì)部分;程序設(shè)計(jì)方面包括圖像的讀取、灰度化 、 直方圖、二值化 以及一些常用圖像處理的算法程序。最后通過(guò)實(shí)例應(yīng)用說(shuō)明 了 VB 源程序的調(diào)用方法以及實(shí)現(xiàn)的數(shù)字圖像處理效果。本設(shè)計(jì)在界面設(shè)計(jì)上較為簡(jiǎn)單,軟件程序易于接受,同時(shí)在進(jìn)行設(shè)計(jì)過(guò)程中可以靈活多變,可以改變部分程序?qū)崿F(xiàn)其他的圖像處理功能。此項(xiàng)設(shè)計(jì)滿足大眾的基本圖像處理要求,同時(shí)為那些對(duì)圖像需要進(jìn)行特殊處理的專(zhuān)業(yè)要求提供了方便的渠道。 關(guān)鍵詞 VB; 灰度化;直方圖 ;二值化 哈爾濱理工大學(xué)學(xué)士學(xué)位論文 II Image Preprocessing based on VB Abstract The full name of VB is Visual Basic, which is one of the most popular programming tools under the Window environment. Digital manage processing refers to the processing of images by using the puter. This technique is one of the most challenging researches in many technical area. It would be much easier, more flexible, and efficient to process images by using VB, than any other language. This paper introduced the environment of development of VB, and the basic principle of digital image processing. Meanwhile, it also analysis the design features of VB. It also designs a program based on VB digital image processing, including interface design and programming: The inter faces contains the menu bar, tool bar, image field, as well as other design of the control part. The design of the program includes reading images, gray, the histogram, binary as well as some algorithms programs of mon image processing. At last, through the examples, it describes the methods of calling the VB source code, and the results achieved by digital image processing. This program is relatively simple on the interface design, and meanwhile can be flexible during the design progress, and also can change other procedure to fulfill other image processing function. This design can be used to meet publics’ basic requirement of image processing. It also provides convenient channel for those who need the special treatment to images. Keywords VB。 Gray。 Gradation。 Binaryzation 哈爾濱理工大學(xué)學(xué)士學(xué)位論文 III 目錄 摘要 …… ............................................................................................................... I Abstract ................................................................................................................II 第 1 章 緒論 ........................................................................................................ 1 圖 像預(yù)處理的概述 ................................................................................... 1 圖像預(yù)處理的目的 ............................................................................ 1 圖像預(yù)處理的基本理論 .................................................................... 1 圖像預(yù)處理的重要性 ........................................................................ 1 圖像預(yù)處理在研究中的應(yīng)用領(lǐng)域 ........................................................... 2 本課題研究?jī)?nèi)容介紹 ............................................................................... 3 第 2 章 圖像的讀取 ............................................................................................ 5 讀取圖像的界面設(shè)計(jì) ............................................................................... 5 Visual 的開(kāi)發(fā)環(huán)境 ............................................................... 5 界面設(shè)計(jì) ............................................................................................ 9 讀取圖像文件的程序設(shè)計(jì) ..................................................................... 10 數(shù)字圖像文件格式 .......................................................................... 10 BMP 文件格式 ................................................................................. 11 圖像的讀取 ...................................................................................... 13 第 3 章 圖像預(yù)處理 .......................................................................................... 16 彩色圖像灰度化 ..................................................................................... 16 彩色圖像灰度化的方法 .................................................................. 16 灰度圖像處理程序 .......................................................................... 17 灰度圖像平滑處理 ................................................................................. 21 噪聲的分類(lèi) ...................................................................................... 21 模板操作和卷積運(yùn)算 ...................................................................... 22 中值濾波法去噪 .............................................................................. 22 直方圖 ..................................................................................................... 27 直方圖的基本概念 .......................................................................... 27 直方圖的性質(zhì) .................................................................................. 27 直方圖的計(jì)算與簡(jiǎn)單繪制 .............................................................. 28 灰度圖像二值化處理 ............................................................................. 29 結(jié)論 .................................................................................................................... 33 致謝 .................................................................................................................... 34 參考文獻(xiàn) ............................................................................................................ 35 附錄 A ................................................................................................................ 36 附錄 B ................................................................................................................ 44 哈爾濱理工大學(xué)學(xué)士學(xué)位論文 1 第 1章 緒論 圖像預(yù)處理的 概述 圖像預(yù)處理的目的 圖像 預(yù)處理是 為數(shù)字圖像 處理做的初級(jí)處理階段,為以后的圖像處理服務(wù)的。 它的目的是通過(guò)對(duì)原始圖像進(jìn)行一系列的數(shù)學(xué)運(yùn)算,最終得到一幅失真最小、目標(biāo)信號(hào)和背景信號(hào)完全分離的圖像。 如對(duì)圖像進(jìn)行灰度化處理,去除圖像中的噪聲,二值化處理等 ,從而改善圖像的質(zhì)量,以達(dá)到或真實(shí)的、或清晰的、或色彩豐