




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、解:(1)源代碼:close all;clear all;clc;%產(chǎn)生如圖所示二值圖像%image1=zeros(256,256);for x=64:192 for y=112:144 image1(x,y)=1; endendfigure(1);subplot(1,2,1);imshow(image1);title('題圖所示圖像');I=fft2(image1);Image1=log(abs(I);subplot(1,2,2)imshow(Image1,-3,5);title('圖像幅度譜');(2)源代碼:%for x=1:256 for y=1:256
2、 f2(x,y)=(-1)(x+y)*image1(x,y); endendfigure(2);subplot(1,2,1);imshow(f2);title('改變后圖像');I2=fft2(f2);Image2=log(abs(I2);subplot(1,2,2)imshow(Image2,-3,5);title('圖像幅度譜');(3)源代碼:%f3=imrotate(image1,90);figure(3)subplot(1,3,1);imshow(f3);title('改變后的圖像');I3=fft2(f3);Image3=log(ab
3、s(I3);subplot(1,3,2)imshow(Image1,-3,5);title('原圖像幅度譜');subplot(1,3,3)imshow(Image3,-3,5);title('改變后圖像幅度譜');(4)源代碼:%f4=f3;for x=1:256 for y=1:256 f5(x,y)=image1(x,y)+f3(x,y); endendfigure(4)subplot(1,3,1);I5=fft2(f5);Image5=log(abs(I5);imshow(Image5,-3,5);title('F5圖像幅度譜');sub
4、plot(1,3,2)imshow(Image1,-3,5);title('F1圖像幅度譜');subplot(1,3,3)imshow(Image3,-3,5);title('F4圖像幅度譜');(5)源代碼:%for x=1:256 for y=1:256 f6(x,y)=f2(x,y)+f3(x,y); endendfigure(5)subplot(1,3,1);I6=fft2(f6);Image6=log(abs(I6);imshow(Image6,-3,5);title('F6圖像幅度譜');subplot(1,3,2)imshow(I
5、mage2,-3,5);title('F2圖像幅度譜');subplot(1,3,3)imshow(Image3,-3,5);title('F3圖像幅度譜');figure(6)subplot(1,2,1);imshow(Image5,-3,5);title('F5圖像幅度譜');subplot(1,2,2)imshow(Image6,-3,5);title('F6圖像幅度譜');解:源代碼:close all;clear all;clc;%產(chǎn)生P104頁(yè)圖ͼ%x=zeros(16,16);x(1:8,1:8
6、)=1;x(9:16,9:16)=1;y=repmat(x,4,4);figure(1);subplot(1,3,1)imshow(y);title('原圖像');%3*3濾波%subplot(1,3,2)h1=0.125*1,1,1;1,0,1;1,1,1;K1=conv2(y,h1);%3*3平均濾波imshow(K1);title('3*3平均濾波');K2=medfilt2(y,3 3,'symmetric');%3*3中值濾波¨subplot(1,2,2)imshow(K2);title('3*3中值濾波')解
7、:源代碼:close all;clear all;clc;%產(chǎn)生P104頁(yè)圖%image=zeros(256,256);for i=1:9 image(29:228,(27+i+24*(i-1):27+(8*i)+17*(i-1)=255;endfigure(1);imshow(image);subplot(2,4,1)imshow(image);title('原圖像');%加入噪聲%J1=imnoise(image,'gaussian',0.05);%加入高斯白噪聲J2=imnoise(image,'salt & pepper',0.0
8、5);%加入椒鹽噪聲subplot(2,4,2)imshow(J1);title('加入高斯白噪聲');subplot(2,4,6)imshow(J2);title('加入椒鹽噪聲');%3*3濾波%subplot(2,4,3)h1=0.125*1,1,1;1,0,1;1,1,1;KJ11=conv2(J1,h1);%3*3平均濾波imshow(KJ11);title('3*3平均濾波');KJ12=medfilt2(J1,3 3,'symmetric');%3*3椒鹽濾波subplot(2,4,4)imshow(KJ12,);t
9、itle('3*3椒鹽濾波')subplot(2,4,7)KJ21=conv2(J2,h1);%3*3平均濾波imshow(KJ21);title('3*3平均濾波');KJ22=medfilt2(J2,3 3,'symmetric');%3*3椒鹽濾波subplot(2,4,8)imshow(KJ22,);title('3*3椒鹽濾波')解:源代碼:close all;clear all;clc;image=imread('E:lesson數(shù)字圖像處理image3.jpg');%讀入圖像I=rgb2gray(im
10、age);%轉(zhuǎn)化為灰度圖像figure(1)subplot(2,3,1)imshow(I);title('原圖像');IR1=edge(I,'roberts');%roberts邊緣檢測(cè)subplot(2,4,2)imshow(IR1);title('roberts邊緣檢測(cè)');IP1=edge(I,'prewitt');%prewitt邊緣檢測(cè)subplot(2,4,3)imshow(IP1);title('prewitt邊緣檢測(cè)');IS1=edge(I,'sobel');%sobel邊緣檢測(cè)s
11、ubplot(2,4,4)imshow(IS1);title('sobel邊緣檢測(cè)');H2=fspecial('prewitt');IP2=filter2(H2,I);%prewitt銳化圖像subplot(2,4,7)imshow(IP2,);title('prewitt銳化圖像');H3=fspecial('sobel');IS2=filter2(H3,I);%sobel銳化圖像subplot(2,4,8)imshow(IS2,);title('sobel銳化圖像');解:源代碼:close all;clear all;clc;I=imread('E:lesson數(shù)字圖像吃力image1.jpg');%讀入圖像image=rgb2gray(I);%圖像灰度化figure(1)subplot(2,2,1)imshow(I);%顯示原圖像title('原圖像');subplot(2,2,2)imshow(image);%顯示灰度圖像title('灰
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度全新競(jìng)業(yè)協(xié)議失效一個(gè)月競(jìng)業(yè)限制解除申請(qǐng)函
- 家具配送糾紛管轄法律適用
- 二零二五年度股東借款及股權(quán)激勵(lì)計(jì)劃協(xié)議
- 代理簽訂貿(mào)易合同范本
- 塑料改性液堿配送協(xié)議
- 教育機(jī)構(gòu)裝修工程設(shè)計(jì)協(xié)議
- 2025年度安防行業(yè)用電安全保障服務(wù)協(xié)議
- 2025年度農(nóng)村承包個(gè)人土地承包經(jīng)營(yíng)權(quán)流轉(zhuǎn)與農(nóng)業(yè)產(chǎn)業(yè)結(jié)構(gòu)調(diào)整合同
- 2025年檢驗(yàn)設(shè)備行業(yè)深度研究分析報(bào)告
- 傳單宣傳合同范本模板
- 四川家庭農(nóng)場(chǎng)補(bǔ)貼標(biāo)準(zhǔn)2023年
- 智能人體秤市場(chǎng)需求分析報(bào)告
- 2023新北師大版高中英語(yǔ)選擇性必修三全冊(cè)課文翻譯(英漢對(duì)照)
- 設(shè)備采購(gòu)供貨安裝實(shí)施方案
- 初中生物《病毒》說課課件
- 國(guó)網(wǎng)考試企業(yè)文化能源與戰(zhàn)略題庫(kù)
- 智聯(lián)招聘行測(cè)題庫(kù)2023
- 小工考勤表記工模板
- 編輯學(xué)概論-課件
- 理發(fā)店個(gè)人門面轉(zhuǎn)讓合同
- 03J111-1 輕鋼龍骨內(nèi)隔墻
評(píng)論
0/150
提交評(píng)論