fbpx
维基百科

Coiflet小波

Coiflet小波英格麗·多貝西羅納德·科夫曼的要求所設計的一種離散小波。Coiflet小波的調整函式(scaling function)及小波函式(wavelet function)能同時擁有高消失動量,且其波形接近對稱,常被用於數位訊號處理[1]

Coiflet with two vanishing moments

性質 编辑

  • 定義
一個正交小波(orthogonal wavelet)系統若符合以下條件,則稱為Generalized Coiflet Wavelet(GOC)。
 
其中 為小波函式, 為調整函式
  • 濾波器長度與消失動量
 為濾波器長度,而 為系統消失動量,則最小的 為:
 
  • 近線性相位(Near-linear phase)濾波器
 夠小時,GOC的低通濾波器頻率響應擁有漸進型態(asymptotic form):
 
其中  則為常數項。因此 具有漸近線性相位(asymptotic linear phase)的特性:
 

應用 编辑

Coiflet小波除了被使用在影像壓縮外,目前也有被使用在電力系統訊號監測上[2]

係數 编辑

下表為coiflet小波調整函式C6~30的係數,小波函式的係數可以藉由每兩個係數變換一次符號來推導(例如C6 wavelet = {−0.022140543057, 0.102859456942, 0.544281086116, −1.205718913884, 0.477859456942, 0.102859456942})
Coiflets係數
k C6 C12 C18 C24 C30
-10 -0.0002999290456692
-9 0.0005071055047161
-8 0.0012619224228619 0.0030805734519904
-7 -0.0023044502875399 -0.0058821563280714
-6 -0.0053648373418441 -0.0103890503269406 -0.0143282246988201
-5 0.0110062534156628 0.0227249229665297 0.0331043666129858
-4 0.0231751934774337 0.0331671209583407 0.0377344771391261 0.0398380343959686
-3 -0.0586402759669371 -0.0930155289574539 -0.1149284838038540 -0.1299967565094460
-2 -0.1028594569415370 -0.0952791806220162 -0.0864415271204239 -0.0793053059248983 -0.0736051069489375
-1 0.4778594569415370 0.5460420930695330 0.5730066705472950 0.5873348100322010 0.5961918029174380
0 1.2057189138830700 1.1493647877137300 1.1225705137406600 1.1062529100791000 1.0950165427080700
1 0.5442810861169260 0.5897343873912380 0.6059671435456480 0.6143146193357710 0.6194005181568410
2 -0.1028594569415370 -0.1081712141834230 -0.1015402815097780 -0.0942254750477914 -0.0877346296564723
3 -0.0221405430584631 -0.0840529609215432 -0.1163925015231710 -0.1360762293560410 -0.1492888402656790
4 0.0334888203265590 0.0488681886423339 0.0556272739169390 0.0583893855505615
5 0.0079357672259240 0.0224584819240757 0.0354716628454062 0.0462091445541337
6 -0.0025784067122813 -0.0127392020220977 -0.0215126323101745 -0.0279425853727641
7 -0.0010190107982153 -0.0036409178311325 -0.0080020216899011 -0.0129534995030117
8 0.0015804102019152 0.0053053298270610 0.0095622335982613
9 0.0006593303475864 0.0017911878553906 0.0034387669687710
10 -0.0001003855491065 -0.0008330003901883 -0.0023498958688271
11 -0.0000489314685106 -0.0003676592334273 -0.0009016444801393
12 0.0000881604532320 0.0004268915950172
13 0.0000441656938246 0.0001984938227975
14 -0.0000046098383254 -0.0000582936877724
15 -0.0000025243583600 -0.0000300806359640
16 0.0000052336193200
17 0.0000029150058427
18 -0.0000002296399300
19 -0.0000001358212135

濾波器 编辑

這邊列出6, 12 ,18點的filter消失點(vanish moment)也就是k/6。

這邊的g是低頻的濾波器,h是高頻的濾波器。

可以看出 ,這邊採用python的語法,h會是g的反序,且n為奇數時要乘上-1

Daubechies filter

 

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
  -0.0727 -0.3378 0.8525 -0.38486 -0.0727 0.0156
  -0.0156 -0.0727 0.38486 0.8525 0.3378 -0.0727
  0.0010 -0.0026 0.0079 -0.0335 0.0841 -0.1082 0.5897 -1.1494 0.5460 -0.0953 -0.0586 -0.0232
  0.0232 0.0586 0.0953 0.5460 1.1494 0.5897 0.1082 0.0841 0.0335 0.0079 0.0026 0.0010
  -0.003793 -0.007782 0.023452 0.065771 -0.06112 -0.40517 0.79377 -0.42848 -0.071799 0.082301 0.034555 -0.015880 -0.0090079 0.002574 -0.001117 0.000466 -0.00007098 -0.0000345
  -0.0000345 -0.00007098 0.000466 0.001117 -0.002574 -0.0090079 0.015880 0.034555 -0.082301 -0.071799 0.42848 0.79377 0.40517 -0.06112 -0.065771 0.023452 0.007782 -0.003793

Matlab程式 编辑

F = coifwavf(W)會回傳N=str2num(W)的coiflet小波的調整函式,其中N只能為1~5的整數。[3]

Python程式 编辑

這邊根據上面所提供的高頻和低頻的濾波器去實作出離散小波轉換並且應用到影像壓縮上面,

透過小波轉換良好的性質,嘗試實作出連續的影像壓縮。

這邊單純是在示範小波轉換進行多次壓縮和反壓縮的結果,

如果不想轉換這麼多次修改Jmax即可。

import numpy as np def subsampling(x, d): if d == 1: y = x[::2, :] elif d == 2: y = x[:, ::2] return y def upsampling(x, d): s = x.shape if d == 1: y = np.zeros((p * s[0], s[1])) y[::2, :] = x elif d == 2: y = np.zeros((s[0], p * s[1])) y[:, ::2] = x return y def cconv(x, h, d): if d == 2: return np.transpose(cconv(np.transpose(x), h, 1)) y = np.zeros(x.shape) p = len(h) pc = int(round( float((p - 1) / 2 ))) for i in range(0, p): y = y + h[i] * np.roll(x, i - pc, axis=0) return y def DWT_compression(image, h, g): # discrete wavelet transformation Jmin = 0 Jmax = log2(n)-1 fW = image.copy() j = int(np.log2(image.shape[0])-1) A = fW[:2**(j+1):,:2**(j+1):] for j in arange(Jmax,Jmin-1,-1): A = fW[:2**(j+1):,:2**(j+1):] for d in arange(1,3): Coarse = subsampling(cconv(A,h,d),d) Detail = subsampling(cconv(A,g,d),d) A = concatenate( (Coarse, Detail), axis=d-1 ) fW[:2**(j+1):,:2**(j+1):] = A j1 = Jmax-j return fW def iDWT_decompression(image, fW, h, g): #image is original, fW is after DWT of that. Jmin = 0 Jmax = int(np.log2(image.shape[0])-1) f1 = fW.copy() j = int(np.log2(image.shape[0])-1) A = f1[:2**(j+1):,:2**(j+1):] h1 = h[::-1] g1 = g[::-1] for j in arange(Jmin,Jmax+1): A = f1[:2**(j+1):,:2**(j+1):] for d in arange(1,3): if d==1: Coarse = A[:2**j:,:] Detail = A[2**j:2**(j+1):,:] else: Coarse = A[:,:2**j:] Detail = A[:,2**j:2**(j+1):] Coarse = cconv(upsampling(Coarse,d),h1,d) Detail = cconv(upsampling(Detail,d),g1,d) A = Coarse + Detail j1 = Jmax-j if j1>0 and j1<5: imageplot(A, 'j=' + str(int(j)), [2,2,j1]) f1[:2**(j+1):,:2**(j+1):] = A return f1 


雙正交Coiflet小波 编辑

  • 定義
一個order為 的雙正交Coiflet小波需符合以下條件:
 
  • 性質
 為偶數時, 會對稱於原點: 。這讓雙正交coiflet在圖片壓縮方面能有較好的峰值信噪比(PSNR)。

参考资料 编辑

  1. ^ (PDF). [2016-01-25]. (原始内容 (PDF)存档于2016-03-05). 
  2. ^ Coiflet wavelet transform applied to inspect power system disturbance-generated signals. Shyh-Jier Huang, and Cheng-Tao Hsieh. 2002. 
  3. ^ coifwavf. http://www.mathworks.com/. [22 January 2015]. (原始内容于2016-05-22). 

coiflet小波, 是英格麗, 多貝西應羅納德, 科夫曼的要求所設計的一種離散小波, 的調整函式, scaling, function, 及小波函式, wavelet, function, 能同時擁有高消失動量, 且其波形接近對稱, 常被用於數位訊號處理, coiflet, with, vanishing, moments, 目录, 性質, 應用, 係數, 濾波器, matlab程式, python程式, 雙正交, 参考资料性質, 编辑定義一個正交小波, orthogonal, wavelet, 系統若符合以下條. Coiflet小波是英格麗 多貝西應羅納德 科夫曼的要求所設計的一種離散小波 Coiflet小波的調整函式 scaling function 及小波函式 wavelet function 能同時擁有高消失動量 且其波形接近對稱 常被用於數位訊號處理 1 Coiflet with two vanishing moments 目录 1 性質 2 應用 3 係數 4 濾波器 5 Matlab程式 6 Python程式 7 雙正交Coiflet小波 8 参考资料性質 编辑定義一個正交小波 orthogonal wavelet 系統若符合以下條件 則稱為Generalized Coiflet Wavelet GOC M ps 0 l 0 for l 0 1 L 1 M ϕ t 0 l d l for l 0 1 L 1 displaystyle begin array lcl mathcal M tilde psi 0 l 0 amp mbox for l mbox 0 1 L 1 mathcal M tilde phi t 0 l delta l amp mbox for l mbox 0 1 L 1 end array nbsp dd 其中ps displaystyle psi nbsp 為小波函式 ϕ displaystyle phi nbsp 為調整函式濾波器長度與消失動量若N displaystyle N nbsp 為濾波器長度 而L displaystyle L nbsp 為系統消失動量 則最小的N displaystyle N nbsp 為 N 3 L 1 if L is odd 3 L if L is even displaystyle N begin cases 3L 1 amp mbox if L mbox is odd 3L amp mbox if L mbox is even end cases nbsp dd 近線性相位 Near linear phase 濾波器當 w displaystyle w nbsp 夠小時 GOC的低通濾波器的頻率響應擁有漸進型態 asymptotic form H w t 0 w C w L O w L 2 displaystyle angle H w t 0 w C cdot w L O w L 2 nbsp dd 其中L 2 L 2 1 displaystyle L 2 left lfloor L 2 right rfloor 1 nbsp C displaystyle C nbsp 則為常數項 因此h displaystyle h nbsp 具有漸近線性相位 asymptotic linear phase 的特性 lim L H w t 0 w displaystyle lim L to infty angle H w t 0 w nbsp dd 應用 编辑Coiflet小波除了被使用在影像壓縮外 目前也有被使用在電力系統訊號監測上 2 係數 编辑下表為coiflet小波調整函式C6 30的係數 小波函式的係數可以藉由每兩個係數變換一次符號來推導 例如C6 wavelet 0 022140543057 0 102859456942 0 544281086116 1 205718913884 0 477859456942 0 102859456942 Coiflets係數 k C6 C12 C18 C24 C30 10 0 0002999290456692 9 0 0005071055047161 8 0 0012619224228619 0 0030805734519904 7 0 0023044502875399 0 0058821563280714 6 0 0053648373418441 0 0103890503269406 0 0143282246988201 5 0 0110062534156628 0 0227249229665297 0 0331043666129858 4 0 0231751934774337 0 0331671209583407 0 0377344771391261 0 0398380343959686 3 0 0586402759669371 0 0930155289574539 0 1149284838038540 0 1299967565094460 2 0 1028594569415370 0 0952791806220162 0 0864415271204239 0 0793053059248983 0 0736051069489375 1 0 4778594569415370 0 5460420930695330 0 5730066705472950 0 5873348100322010 0 59619180291743800 1 2057189138830700 1 1493647877137300 1 1225705137406600 1 1062529100791000 1 09501654270807001 0 5442810861169260 0 5897343873912380 0 6059671435456480 0 6143146193357710 0 61940051815684102 0 1028594569415370 0 1081712141834230 0 1015402815097780 0 0942254750477914 0 08773462965647233 0 0221405430584631 0 0840529609215432 0 1163925015231710 0 1360762293560410 0 14928884026567904 0 0334888203265590 0 0488681886423339 0 0556272739169390 0 05838938555056155 0 0079357672259240 0 0224584819240757 0 0354716628454062 0 04620914455413376 0 0025784067122813 0 0127392020220977 0 0215126323101745 0 02794258537276417 0 0010190107982153 0 0036409178311325 0 0080020216899011 0 01295349950301178 0 0015804102019152 0 0053053298270610 0 00956223359826139 0 0006593303475864 0 0017911878553906 0 003438766968771010 0 0001003855491065 0 0008330003901883 0 002349895868827111 0 0000489314685106 0 0003676592334273 0 000901644480139312 0 0000881604532320 0 000426891595017213 0 0000441656938246 0 000198493822797514 0 0000046098383254 0 000058293687772415 0 0000025243583600 0 000030080635964016 0 000005233619320017 0 000002915005842718 0 000000229639930019 0 0000001358212135濾波器 编辑這邊列出6 12 18點的filter消失點 vanish moment 也就是k 6 這邊的g是低頻的濾波器 h是高頻的濾波器 可以看出h n 1 n g n displaystyle h n 1 n g n nbsp 這邊採用python的語法 h會是g的反序 且n為奇數時要乘上 1 Daubechies filter g k h k displaystyle g k h k nbsp 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17h 6 displaystyle h 6 nbsp 0 0727 0 3378 0 8525 0 38486 0 0727 0 0156g 6 displaystyle g 6 nbsp 0 0156 0 0727 0 38486 0 8525 0 3378 0 0727h 12 displaystyle h 12 nbsp 0 0010 0 0026 0 0079 0 0335 0 0841 0 1082 0 5897 1 1494 0 5460 0 0953 0 0586 0 0232g 12 displaystyle g 12 nbsp 0 0232 0 0586 0 0953 0 5460 1 1494 0 5897 0 1082 0 0841 0 0335 0 0079 0 0026 0 0010h 18 displaystyle h 18 nbsp 0 003793 0 007782 0 023452 0 065771 0 06112 0 40517 0 79377 0 42848 0 071799 0 082301 0 034555 0 015880 0 0090079 0 002574 0 001117 0 000466 0 00007098 0 0000345g 18 displaystyle g 18 nbsp 0 0000345 0 00007098 0 000466 0 001117 0 002574 0 0090079 0 015880 0 034555 0 082301 0 071799 0 42848 0 79377 0 40517 0 06112 0 065771 0 023452 0 007782 0 003793Matlab程式 编辑F coifwavf W 會回傳N str2num W 的coiflet小波的調整函式 其中N只能為1 5的整數 3 Python程式 编辑這邊根據上面所提供的高頻和低頻的濾波器去實作出離散小波轉換並且應用到影像壓縮上面 透過小波轉換良好的性質 嘗試實作出連續的影像壓縮 這邊單純是在示範小波轉換進行多次壓縮和反壓縮的結果 如果不想轉換這麼多次修改Jmax即可 import numpy as np def subsampling x d if d 1 y x 2 elif d 2 y x 2 return y def upsampling x d s x shape if d 1 y np zeros p s 0 s 1 y 2 x elif d 2 y np zeros s 0 p s 1 y 2 x return y def cconv x h d if d 2 return np transpose cconv np transpose x h 1 y np zeros x shape p len h pc int round float p 1 2 for i in range 0 p y y h i np roll x i pc axis 0 return y def DWT compression image h g discrete wavelet transformation Jmin 0 Jmax log2 n 1 fW image copy j int np log2 image shape 0 1 A fW 2 j 1 2 j 1 for j in arange Jmax Jmin 1 1 A fW 2 j 1 2 j 1 for d in arange 1 3 Coarse subsampling cconv A h d d Detail subsampling cconv A g d d A concatenate Coarse Detail axis d 1 fW 2 j 1 2 j 1 A j1 Jmax j return fW def iDWT decompression image fW h g image is original fW is after DWT of that Jmin 0 Jmax int np log2 image shape 0 1 f1 fW copy j int np log2 image shape 0 1 A f1 2 j 1 2 j 1 h1 h 1 g1 g 1 for j in arange Jmin Jmax 1 A f1 2 j 1 2 j 1 for d in arange 1 3 if d 1 Coarse A 2 j Detail A 2 j 2 j 1 else Coarse A 2 j Detail A 2 j 2 j 1 Coarse cconv upsampling Coarse d h1 d Detail cconv upsampling Detail d g1 d A Coarse Detail j1 Jmax j if j1 gt 0 and j1 lt 5 imageplot A j str int j 2 2 j1 f1 2 j 1 2 j 1 A return f1雙正交Coiflet小波 编辑定義一個order為 L L displaystyle L tilde L nbsp 的雙正交Coiflet小波需符合以下條件 M ϕ 0 l d l for l 0 1 L 1 M ps 0 l 0 for l 0 1 L 1 M ϕ 0 l d l for l 0 1 L 1 M ps 0 l 0 for l 0 1 L 1 displaystyle begin array lcl mathcal M tilde phi 0 l delta l amp mbox for l mbox 0 1 L 1 mathcal M tilde psi 0 l 0 amp mbox for l mbox 0 1 L 1 mathcal M phi 0 l delta l amp mbox for l mbox 0 1 L 1 mathcal M psi 0 l 0 amp mbox for l mbox 0 1 tilde L mbox 1 end array nbsp dd 性質當L displaystyle L nbsp 為偶數時 h displaystyle h nbsp 會對稱於原點 h n h n displaystyle h n h n nbsp 這讓雙正交coiflet在圖片壓縮方面能有較好的峰值信噪比 PSNR 参考资料 编辑 COIFLET TYPE WAVELETS THEORY DESIGN AND APPLICATIONS PDF 2016 01 25 原始内容 PDF 存档于2016 03 05 Coiflet wavelet transform applied to inspect power system disturbance generated signals Shyh Jier Huang and Cheng Tao Hsieh 2002 缺少或 url 为空 帮助 coifwavf http www mathworks com 22 January 2015 原始内容存档于2016 05 22 取自 https zh wikipedia org w index php title Coiflet小波 amp oldid 78676106, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。