下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
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 移動(dòng)的像素?cái)?shù) %¤Theta運(yùn)動(dòng)方向(逆時(shí)針) >> 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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(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版危險(xiǎn)品運(yùn)輸應(yīng)急響應(yīng)預(yù)案合同3篇
- 二零二五年度寵物領(lǐng)養(yǎng)及終身關(guān)愛計(jì)劃合同3篇
- 二零二五年度生態(tài)循環(huán)大棚租賃經(jīng)營合同范本4篇
- 二零二五年度文化旅游產(chǎn)業(yè)園區(qū)承包經(jīng)營合同4篇
- 2025年度環(huán)保設(shè)備制造項(xiàng)目承包合同范本4篇
- 2025年度大理石石材加工與室內(nèi)裝修一體化合同3篇
- 2025年度茶室智能化裝修與設(shè)備采購合同4篇
- 2025版事業(yè)單位教學(xué)輔助人員勞動(dòng)合同樣本3篇
- 二零二五年度船舶油輪船員聘用合同樣本4篇
- 二零二五版煤炭購銷居間代理傭金結(jié)算及爭(zhēng)議解決合同4篇
- 2025年度房地產(chǎn)權(quán)證辦理委托代理合同典范3篇
- 柴油墊資合同模板
- 湖北省五市州2023-2024學(xué)年高一下學(xué)期期末聯(lián)考數(shù)學(xué)試題
- 城市作戰(zhàn)案例研究報(bào)告
- 【正版授權(quán)】 ISO 12803:1997 EN Representative sampling of plutonium nitrate solutions for determination of plutonium concentration
- 道德經(jīng)全文及注釋
- 2024中考考前地理沖刺卷及答案(含答題卡)
- 多子女贍養(yǎng)老人協(xié)議書范文
- 彩票市場(chǎng)銷售計(jì)劃書
- 支付行業(yè)反洗錢與反恐怖融資
- 基礎(chǔ)設(shè)施綠色施工技術(shù)研究
評(píng)論
0/150
提交評(píng)論