首页|嵌入式系统|显示技术|模拟IC/电源|元件与制造|其他IC/制程|消费类电子|无线/通信|汽车电子|工业控制|医疗电子|测试测量
首页 > 分享下载 > 消费类电子 > mathcad_ median filtering in t...

mathcad_ median filtering in t...

资料介绍
mathcad_ median filtering in two dimensionGRAPHING AND VISUALIZATION

Median Filtering in Two Dimensions

This QuickSheet illustrates smoothing of a 2D image using 3 x 3 or 5 x 5 median filtering. S := READBMP( "cross" ) g( x) := if( rnd( 1) < 0.1 , 255 , x) → S := g( S) First example Adds noise

M := READBMP( "mona" ) K := submatrixM ( , 60 , 160 , 50 , 150) → K := g( K) Second example

Input parameter k is 3 or 5 or 7. . . medflt ( M , k) := I0 ← J0 ← k1
2

k1
2

I1 ← rows ( M) J1 ← cols ( M) for i ∈ I0 .. I1 for j ∈ J0 .. J1

k+1
2

k+1
2

for r ∈ 0 .. k 1 for s ∈ 0 .. k 1 Ar , s ← M
i+ r k1
2

, j+s

k 1
2

Ni , j ← median ( A) N T := medflt ( S , 5) Noisy image Smoothed image

S

T

L := medflt ( K , 3)

K

L

mathcad_ median filtering in t...
本地下载

评论