【正文】
Ⅰ 摘要 非真實(shí)感繪制是計(jì)算機(jī)圖像學(xué)的一類, 在動畫、藝術(shù)等領(lǐng)域有著廣泛的應(yīng)用,而漫畫 作為一種 具有 特殊 代表性的藝術(shù)表現(xiàn)形式受越來越多人歡迎。 漫畫的建圖、描線、上色等操作都需要人來進(jìn)行操作, 消耗人力和物力 。本論文以實(shí)現(xiàn)圖像的漫畫效果為目的, 通過使用 matlab 對圖像進(jìn)行處理,簡要闡述了開發(fā)背景與環(huán)境, 在保證圖像核心結(jié)構(gòu)不改變的情況下 進(jìn)行 以下幾個操作: 1 根據(jù)需求,選擇雙邊濾波器對圖像進(jìn)行濾波,達(dá)到去除噪聲,提高圖像質(zhì)量方便特征提取的目的。 2 分別對 RGB 顏色空間和 Lab 顏色空間 進(jìn)行比較,選擇更合適的進(jìn)行量化處理, ,減少 圖 像 中 的 顏 色 。 3 根據(jù)邊緣完整性和速度的需求,選擇 DOG 算子進(jìn)行邊緣檢測,對邊緣強(qiáng)度進(jìn)行加強(qiáng)、開閉運(yùn)算等操作,最后使 圖像具有漫畫效果 ,實(shí)現(xiàn)非真實(shí)感繪制 ,與現(xiàn)有的其他相似方法進(jìn)行比較,總 結(jié)該方法達(dá)到了漫畫效果 。 關(guān)鍵詞 : 非真實(shí)感繪制 雙邊濾波 顏色 量化 邊緣檢測 Ⅱ ABSTRACT Nonphotorealistic rendering is one types of puter iconography,it is widely used in the field of animation, art and other fields. Cartoon, as a special representative of an artistic form, is weled by more and more people. Due to the demands of Cartoon,which human beings is needed to work on build pictures, Drawing Lines, color, this is the waste of the manpower and the physical resource. Aiming at make the photo to be cartoon, this paper briefly describes the development background and environment of the way to deal with photos by matlab. Perform the following operations while ensuring the image without changing the core structure of the case: 1. Based on needs, a bilateral filter to select the image is filtered, in order to remove noise and improve image quality for the purpose of convenience feature extraction. 2. By paring withe RGB color space and Lab color space, choose the better one to achieve color quantization, and reduce the colors in the image. 3. According to the needs of marginal integrity and speed, Dog operator is used to do edge detection, then make the edge stronger and use imopen and imclose. Finally to make the image seems to be cartoon, and realize of nonphotorealistic rendering. Compare with other existing similar methods, we can sum up that this paper achieve making the photo to be cartoon. Keywords: Nonphotorealistic rendering, Bilateral filter, Color quantization, edge detection. 1 目錄 目錄 摘要 ........................................................................................................................................... Ⅰ ABSTRACT ................................................................................................................................... Ⅱ 目錄 ............................................................................................................................................. 1 第一章 緒論 ................................................................................................................................ 3 研究背景 ............................................................................................................................ 3 國內(nèi)外研究狀況 ................................................................................................................. 4 研究意義 ............................................................................................................................ 6 第二章 漫畫效果圖像處理 .......................................................................................................... 7 漫畫效果分析 ..................................................................................................................... 7 漫畫效果流程圖 ................................................................................................................ 7 第三章 雙邊濾波 ......................................................................................................................... 8 工具介紹 ............................................................................................................................ 9 簡介 ................................................................................................................... 9 優(yōu)點(diǎn) ................................................................................................................... 9 濾波器簡介及選擇 ............................................................................................................ 10 雙邊濾波原理 ................................................................................................................... 11 實(shí)現(xiàn)雙邊濾波 ................................................................................................................... 13 小結(jié) .................................................................................................................................. 13 第四章 顏色量化 ....................................................................................................................... 15 量化選擇 .......................................................................................................................... 15 實(shí)現(xiàn)量化 .......................................................................................................................... 17 小結(jié) .................................................................................................................................. 17 第五章 邊緣檢測 ....................................................................................................................... 19 領(lǐng)域運(yùn)算 .......................................................................................................................... 19 算子的比較選擇 ............................................................................................................... 20 邊緣檢測 .......................................................................................................................... 21 2 閾值處理 .......................................................................................................................... 21 開運(yùn)算和閉運(yùn)算 ............................................................................................................... 23 圖像合成 .......................................................................................................................... 23 小結(jié) .......................................................................................................................