數位影像中熵的計算與應用 義守大學 資訊工程學系 黃健興 Outline Entropy Applications Conclusions • Definition • Entropy of images • Visual Surveillance System • Background Extraction Concept of Entropy Rudolf Julius Emanuel Clausius , 1864 化學及熱力學 • 測量在動力學方面不能做功的能量總數 • 計算一個系統中的失序現象 • 描述系統狀態的函數 • 經常用熵的參考值和變化量進行分析比較 Information Theory Claude Elwood Shannon , 1948 運用機率論與數理統計的方法研究資訊 • • • • • • • 編碼學 密碼學與密碼分析學 數據傳輸 數據壓縮 檢測理論 估計理論 數據加密 Definition H ( X ) E ( I ( X )) • E is the expected value, • I is the information content of X. n n i 1 i 1 H ( X ) p( xi ) I ( xi ) p( xi ) log b p( xi ) • p denotes the probability mass function of X Advantage Whole Image Histogram Entropy • M×N Matrix • N×1 Vector • Single value Entropy of Image Pixel Color Pixel Distribution Texture • Horizontal • Vertical The Statistic of gray-level Position Information Normalize the size of image Edge Detection • Sobel • Canny Horizontal Projection Vertical Projection Sobel Edge Detection Sobel Filter m1 m2 m3 m4 m5 m6 m7 m8 m9 1 2 0 0 1 2 1 0 1 1 2 1 0 2 1 0 1 0 1 45 0 0 0 1 2 1 90 0 1 2 0 1 2 1 0 1 2 1 0 135 Sobel Edge Detection(cont.) s0 m7 2m8 m9 m1 2m2 m3 s45 m6 2m8 m9 m1 2m2 m4 s90 m3 2m6 m9 m1 2m4 m7 s135 m2 2m3 m6 m4 2m7 m8 S s0 s45 s90 s135 T S s0 s45 s90 s135 T Sobel Edge Detection(cont.) Horizontal Projection 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240 0 0 7 2 2 2 7 0 0 Horizontal Projection(cont.) Vertical Projection 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 2 2 2 2 2 7 0 0 0 320 Vertical Projection(cont.) Local Binary Pattern Pattern Texture T t ( g 0 g c ,..., g p1 g c ) • Pattern T t ( g , g ,..., g ) • Center Pixel gc • Surrounding Pixel gi(i=0, 1,…,p-1) • T t (s( g g ),..., s( g g )) c 0 c p 1 0 p 1 c 1 x 0 s ( x) 0 x 0 • Label p 1 LBPP ,R ( xc , yc ) s( g p g c )2 p p 0 Local Binary Pattern(cont.) g0 g1 g2 0 0 0 g3 gc g4 1 gc 1 g5 g6 g7 0 0 0 g0 gc 0 g1 g c 0 g2 gc 0 g3 gc 0 gc g4 gc 0 g5 gc 0 g6 gc 0 g7 gc 0 LBPP, R ( xc , yc ) 0 20 0 21 0 22 1 23 1 24 0 25 0 26 0 27 24 Definition H ( X ) E ( I ( X )) • E is the expected value, • I is the information content of X. n n i 1 i 1 H ( X ) p( xi ) I ( xi ) p( xi ) log b p( xi ) • p denotes the probability mass function of X Applications Visual Surveillance System Background Extraction • variance of video information • Block for pixel Visual Surveillance System F2 F 20 F 63 F 45 F 68 F 60 F 69 Visual Surveillance System Gray Prediction – GM(1,1) Gray Prediction – GM(1,1) (cont.) Step 1: X 0 x0 1, x0 2,, x0 n 1 1 1 1 n X x 1 , x 2 , , x Step 2: k x 1 k x 0 i i 0 k 1,2, , n 1 1 1 k 1 z k x k x Step 3: 2 k 2,3,, n 1 Gray Prediction – GM(1,1) (cont.) Step 4: Step 5: z 1 2 1 z 3 B 1 z n x 0 2 0 x 3 Y 0 x n 1 1 1 x 0 k az 1 k u a a u B B T 1 BT YN Gray Prediction – GM(1,1) (cont.) Step 6: dx t ax t u dt 1 u ak u 0 k 1 x 1 e x a a k 1,2,, n 0 1 1 Step 7: x k 1 x k 1 x k 0 u 0 a ak k 1 x 1 1 e e x a k 1,2, , n Visual Surveillance System Visual Surveillance System Background Extraction Non-recursive approaches • Selective update using temporal averaging • Selective update using temporal median • Selective update using non-foreground pixels • Non-parametric model • Time Interval (It-L,It-L+1,It-1) • Probability Density Function 1 t 1 f ( I t u ) K (u I i ) L i t L Background Extraction Recursive approaches • Kalman filter • Mixture of Gaussians (MoG) • Parametric model f ( I u) w • Matching I T • Updata w (1 )w t t i, j i , j 1 K i 1 i, j i , j 1 i , j 1 i , j (1 p ) i , j 1 pI t i2, j (1 p ) i2, j 1 p ( I t i , j ) p (u; i , j ; i , j ) (u; i , j ; i , j ) Improved Method Treat the n×n block as a pixel Improved Method(cont.) Conclusions Reduce Memory Size Enhanced Performance • Quantize the content of image • Judgment of the variance
© Copyright 2026 Paperzz