メインコンテンツ

2 次元連続ウェーブレット変換

2 次元連続ウェーブレット変換 (CWT) は、膨張、回転、位置を表す 4 つの変数で 2 次元データ (イメージ データ) を表現します。膨張と回転は実数値のスカラーであり、位置は実数値の要素をもつ 2 次元ベクトルです。x を実数の 2 要素ベクトルとします。

f(x)L2(2)

が平面上で二乗可積分である場合、2 次元 CWT は次のように定義されます。

WTf(a,b,θ)=2f(x)1aψ¯(rθ(xba))dx,a+,x,b2,

ここで、バーは複素共役を表し、rθ は次の 2 次元回転行列です。

rθ=(cos(θ)sin(θ)sin(θ)cos(θ)),θ[0,2π).

2 次元 CWT は、イメージの空間スケール表現です。スケールの逆数と回転角度を合わせて空間周波数変数と見なすことができるため、2 次元 CWT は空間周波数表現であると解釈されます。

すべての 2 次元許容ウェーブレットにおいて、2 次元 CWT はスケールと位置に関してイメージのローカル フィルターとして機能します。ウェーブレットが等方性である場合、解析結果は角度に依存しません。メキシカン ハット ウェーブレット (リッカー ウェーブレットとも呼ばれる) は、等方性ウェーブレットの例です。等方性ウェーブレットは、イメージの点ごとの解析に適しています。ウェーブレットが異方性である場合、解析結果は角度に依存し、2 次元 CWT はスケール、位置、角度に関してイメージのローカル フィルターとして機能します。コーシー ウェーブレットは異方性ウェーブレットの例です。フーリエ領域では、これはウェーブレットの空間周波数サポートが原点に頂点をもつ凸円錐であることを意味します。異方性ウェーブレットは、イメージ内の方向に関する特徴を検出するのに適しています。

ウェーブレット イメージ アナライザー アプリを使用すると、イメージの連続ウェーブレット分解を可視化できます。このアプリを使用すると、分解結果をワークスペースにエクスポートしたり、結果を再現するためのスクリプトを生成したりすることができます。

等方性ウェーブレットと異方性ウェーブレットを使用したイメージの 2 次元 CWT の取得

イメージを読み込みます。

imdata = imread("triangle.jpg");
imagesc(imdata)

Figure contains an axes object. The axes object contains an object of type image.

等方性ウェーブレット

等方性ウェーブレットを指定し、スケール 2、4、8、角度 0、π/6π/3π/2 におけるイメージの 2 次元 CWT を取得します。

wav = "mexh";
sca = [2 4 8];
rot = [0 1 2 3]*(pi/6);
imdata_CWT = cwtft2(imdata,Wavelet=wav,Scales=sca, ...
    Angles=rot);

すべてのスケールと角度における係数の大きさを表示します。補助関数 helperPlot2DCWT を使用します。このウェーブレットは等方性であるため、解析結果は角度に依存しません。等方性ウェーブレットは、イメージの点ごとの解析に適しています。

cfs = imdata_CWT.cfs;
figure(Position=[0 0 560 700])
helperPlot2DCWT(cfs,"Isotropic Wavelet")

Figure contains 12 axes objects. Axes object 1 with title Scale: 2, ylabel Angle: 0\times\pi/6 Rad contains an object of type image. Axes object 2 with title Scale: 4 contains an object of type image. Axes object 3 with title Scale: 8 contains an object of type image. Axes object 4 with ylabel Angle: 1\times\pi/6 Rad contains an object of type image. Axes object 5 contains an object of type image. Axes object 6 contains an object of type image. Axes object 7 with ylabel Angle: 2\times\pi/6 Rad contains an object of type image. Axes object 8 contains an object of type image. Axes object 9 contains an object of type image. Axes object 10 with ylabel Angle: 3\times\pi/6 Rad contains an object of type image. Axes object 11 contains an object of type image. Axes object 12 contains an object of type image.

異方性ウェーブレット

同じスケールと角度でイメージの 2 次元 CWT を取得しますが、今回は異方性ウェーブレットを指定します。

wav = "morlet";
sca = [2 4 8];
rot = [0 1 2 3]*(pi/6);
imdata_CWT = cwtft2(imdata,Wavelet=wav,Scales=sca, ...
    Angles=rot);

すべてのスケールと角度における係数の大きさを表示します。このウェーブレットは異方性であるため、解析結果は角度に依存します。異方性ウェーブレットは、イメージ内の方向に関する特徴を検出するのに適しています。

cfs = imdata_CWT.cfs;
figure(Position=[0 0 560 700])
helperPlot2DCWT(cfs,"Anisotropic Wavelet")

Figure contains 12 axes objects. Axes object 1 with title Scale: 2, ylabel Angle: 0\times\pi/6 Rad contains an object of type image. Axes object 2 with title Scale: 4 contains an object of type image. Axes object 3 with title Scale: 8 contains an object of type image. Axes object 4 with ylabel Angle: 1\times\pi/6 Rad contains an object of type image. Axes object 5 contains an object of type image. Axes object 6 contains an object of type image. Axes object 7 with ylabel Angle: 2\times\pi/6 Rad contains an object of type image. Axes object 8 contains an object of type image. Axes object 9 contains an object of type image. Axes object 10 with ylabel Angle: 3\times\pi/6 Rad contains an object of type image. Axes object 11 contains an object of type image. Axes object 12 contains an object of type image.

補助関数

function helperPlot2DCWT(cfs,str)
% This function is only intended to support this Wavelet example.
% It may change or be removed in a future release.
t=tiledlayout(4,3);
for i=1:4
    for j=1:3
        nexttile
        imagesc(abs(cfs(:,:,1,j,i)))
        if j==1
            ylabel("Angle: "+num2str(i-1)+"\times\pi/6 Rad", ...
                FontWeight="bold");
        end
        if i==1
            title("Scale: "+num2str(2^j));
        end
        xticks([])
        yticks([])
    end
end
title(t,str)
end

参考

アプリ

関数

トピック