下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、>> f=checkerboard (8);>> imshow (f)>> PSF=fspecial ('motion', 7, 45);>> gb = imfilter( f, PSF, ' circular' );>> noise = imnoise(zeros(size(f),'gaussian',0,0.001);>> g = gb + noise; F Gb Noise G% 可用MATLAB的fspecial建立PSF模型 %¤PSF = fspecia
2、l(motion,len,theta) %¤Len 移動的像素數(shù) %¤Theta運動方向(逆時針) >> help fspecial FSPECIAL Create predefined 2-D filters. H = FSPECIAL (TYPE) creates a two-dimensional filter H of the specified type. Possible values for TYPE are: 'average' averaging filter 'disk' circular averaging
3、filter 'gaussian' Gaussian lowpass filter 'laplacian' filter approximating the 2-D Laplacian operator 'log' Laplacian of Gaussian filter 'motion' motion filter 'prewitt' Prewitt horizontal edge-emphasizing filter 'sobel' Sobel horizontal edge-emphasizi
4、ng filter 'unsharp' unsharp contrast enhancement filter Depending on TYPE, FSPECIAL may take additional parameters which you can supply. These parameters all have default values. H = FSPECIAL ('average', HSIZE) returns an averaging filter H of size HSIZE. HSIZE can be a vector specif
5、ying the number of rows and columns in H or a scalar, in which case H is a square matrix. The default HSIZE is 3 3. H = FSPECIAL('disk',RADIUS) returns a circular averaging filter (pillbox) within the square matrix of side 2*RADIUS+1. The default RADIUS is 5. H = FSPECIAL('gaussian',
6、HSIZE,SIGMA) returns a rotationally symmetric Gaussian lowpass filter of size HSIZE with standard deviation SIGMA (positive). HSIZE can be a vector specifying the number of rows and columns in H or a scalar, in which case H is a square matrix. The default HSIZE is 3 3, the default SIGMA is 0.5. H =
7、FSPECIAL('laplacian',ALPHA) returns a 3-by-3 filter approximating the shape of the two-dimensional Laplacian operator. The parameter ALPHA controls the shape of the Laplacian and must be in the range 0.0 to 1.0. The default ALPHA is 0.2. H = FSPECIAL('log',HSIZE,SIGMA) returns a rota
8、tionally symmetric Laplacian of Gaussian filter of size HSIZE with standard deviation SIGMA (positive). HSIZE can be a vector specifying the number of rows and columns in H or a scalar, in which case H is a square matrix. The default HSIZE is 5 5, the default SIGMA is 0.5. H = FSPECIAL('motion
9、39;,LEN,THETA) returns a filter to approximate, once convolved with an image, the linear motion of a camera by LEN pixels, with an angle of THETA degrees in a counter-clockwise direction. The filter becomes a vector for horizontal and vertical motions. The default LEN is 9, the default THETA is 0, w
10、hich corresponds to a horizontal motion of 9 pixels. H = FSPECIAL('prewitt') returns 3-by-3 filter that emphasizes horizontal edges by approximating a vertical gradient. If you need to emphasize vertical edges, transpose the filter H: H'. 1 1 1;0 0 0;-1 -1 -1. H = FSPECIAL('sobel'
11、;) returns 3-by-3 filter that emphasizes horizontal edges utilizing the smoothing effect by approximating a vertical gradient. If you need to emphasize vertical edges, transpose the filter H: H'. 1 2 1;0 0 0;-1 -2 -1. H = FSPECIAL('unsharp',ALPHA) returns a 3-by-3 unsharp contrast enhanc
12、ement filter. FSPECIAL creates the unsharp filter from the negative of the Laplacian filter with parameter ALPHA. ALPHA controls the shape of the Laplacian and must be in the range 0.0 to 1.0. The default ALPHA is 0.2. Class Support - H is of class double. Example - I = imread('cameraman.tif'
13、;); subplot(2,2,1);imshow(I);title('Original Image'); H = fspecial('motion',20,45); MotionBlur = imfilter(I,H,'replicate'); subplot(2,2,2);imshow(MotionBlur);title('Motion Blurred Image'); H = fspecial('disk',10); blurred = imfilter(I,H,'replicate'); s
14、ubplot(2,2,3);imshow(blurred);title('Blurred Image'); H = fspecial('unsharp'); sharpened = imfilter(I,H,'replicate'); subplot(2,2,4);imshow(sharpened);title('Sharpened Image'); See also conv2, edge, filter2, fsamp2, fwind1, fwind2, imfilter. Reference page in Help bro
15、wser doc fspecial>> help imfilter IMFILTER N-D filtering of multidimensional images. B = IMFILTER(A,H) filters the multidimensional array A with the multidimensional filter H. A can be logical or it can be a nonsparse numeric array of any class and dimension. The result, B, has the same size a
16、nd class as A. Each element of the output, B, is computed using double-precision floating point. If A is an integer or logical array, then output elements that exceed the range of the given type are truncated, and fractional values are rounded. B = IMFILTER(A,H,OPTION1,OPTION2,.) performs multidimen
17、sional filtering according to the specified options. Option arguments can have the following values: - Boundary options X Input array values outside the bounds of the array are implicitly assumed to have the value X. When no boundary option is specified, IMFILTER uses X = 0. 'symmetric' Inpu
18、t array values outside the bounds of the array are computed by mirror-reflecting the array across the array border. 'replicate' Input array values outside the bounds of the array are assumed to equal the nearest array border value. 'circular' Input array values outside the bounds of
19、the array are computed by implicitly assuming the input array is periodic. - Output size options (Output size options for IMFILTER are analogous to the SHAPE option in the functions CONV2 and FILTER2.) 'same' The output array is the same size as the input array. This is the default behavior
20、when no output size options are specified. 'full' The output array is the full filtered result, and so is larger than the input array. - Correlation and convolution 'corr' IMFILTER performs multidimensional filtering using correlation, which is the same way that FILTER2 performs filt
21、ering. When no correlation or convolution option is specified, IMFILTER uses correlation. 'conv' IMFILTER performs multidimensional filtering using convolution. Notes - On some Intel Architecture processors, IMFILTER can take advantage of the Intel Performance Primitives Library (IPPL), thus accelerating its execution time. IPPL is activated only if A and H are both two dimensional and A is uint8, int16 or sin
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度橋梁欄桿采購合同模板6篇
- 2025年度口腔診所投資合作與風(fēng)險分擔(dān)合同3篇
- 二零二五版材料采購合同補充協(xié)議:技術(shù)創(chuàng)新共享2篇
- 二零二五版抵押借款合同與借款合同簽訂流程與風(fēng)險防范3篇
- 二零二五版國有房產(chǎn)出售合同(智慧社區(qū)共建協(xié)議)3篇
- 2025年度餐飲業(yè)中央廚房租賃合同3篇
- 二零二五年度35KV變電站電氣設(shè)備技術(shù)改造合同3篇
- 二零二五年房地產(chǎn)項目鄉(xiāng)村振興戰(zhàn)略合作開發(fā)合同3篇
- 二零二五版班組分包道路養(yǎng)護合同3篇
- 2025版金融產(chǎn)品股權(quán)及債權(quán)轉(zhuǎn)讓與風(fēng)險管理合同3篇
- 公務(wù)員考試工信部面試真題及解析
- GB/T 15593-2020輸血(液)器具用聚氯乙烯塑料
- 2023年上海英語高考卷及答案完整版
- 西北農(nóng)林科技大學(xué)高等數(shù)學(xué)期末考試試卷(含答案)
- 金紅葉紙業(yè)簡介-2 -紙品及產(chǎn)品知識
- 《連鎖經(jīng)營管理》課程教學(xué)大綱
- 《畢淑敏文集》電子書
- 頸椎JOA評分 表格
- 員工崗位能力評價標(biāo)準(zhǔn)
- 定量分析方法-課件
- 朱曦編著設(shè)計形態(tài)知識點
評論
0/150
提交評論