EMアルゴリズムを使用したウェーブレット領域の隠れマルコフモデルのパラメータトレーニング

1.問題の説明:

 EMアルゴリズムを使用したウェーブレット領域の隠れマルコフモデルのパラメータトレーニング

2.プログラムの一部:

 

クリア;
すべて閉じる;
clc;
%==================画像を開く(水中カラー画像)==============
[imname 、pathname] = uigetfile({'*。jpg'; ...
    '* .bmp'; ...
    '* .gif'; ...
    '* .png'; ...
    '* .tif'}、 ...
    '画像のファイルを開く');
%===================================== ================================================== ================================================== ================================================== ================================================ == ================
%==================クラシック演算子============= ================================================== ================================================== ================================================== ================================================== ============================================== ==== ===============
I = imread(imname);
I1 = im2double(I);%カラー
画像シーケンスを倍精度に変換I2 = rgb2gray(I1);%カラー画像を変換灰色の画像に
[thr、sorh、keepapp] = ddencmp( 'den'、 'wv'、I2);%ddencmpはデフォルトのしきい値(ソフトまたはハード)エントロピー標準を取得します  
I3 = wdencmp( 'gbl'、I2、 'sym4 '、2、thr、sorh、keepapp);%ウェーブレットノイズ除去
I4 = medfilt2(I3、[9 9]);%中央値フィルター
I5 = imresize(I4,0.8、'バイキュービック');%画像サイズ

                

BW1 = edge(I5、 'sobel');%sobel画像エッジ抽出
BW2 = edge(I5、 'roberts');%roberts画像エッジ抽出
BW3 = edge(I5、 'prewitt');%prewitt画像エッジ抽出
BW4 = edge(I5、 'log');%log画像エッジ抽出
BW5 = edge(I5、 'canny');%canny画像エッジ抽出
図;
subplot(1,2,1);%画像は3つの画像に分割されます1行、最初の画像
imshow(I);%plot
title( 'original image');%annotation
subplot(1,2,2);
imshow(I5);
title( 'median filtered image');%3番目の画像
% =================古典的な演算子検出表示=========================
図;
subplot( 2,3,1);
imshow(BW1);
title( 'Sobel operator');
subplot(
2,3,2 ); imshow(BW2);
title( 'Roberts operator');
subplot(2、3,3 ) ;
imshow(BW3);
title( 'Prewitt演算子');
subplot(2,3,4);
imshow(BW4);
title( 'log operator');
subplot(2,3,5);
imshow(BW5);
title( 'Canny operator');
%============ == ===========================================
%====== ================================================== ================================================== ================================================== ================================================== ========================================ウェーブレットエッジ検出======= ===================
%@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@
%使用したウェーブレット関数
%wname = 'bior4.4';
I5 = double(I5);
%= ===============画像のウェーブレット分解============================== ================================================== ================================================== ================================================== ================================================== ================= ================
[c、s] = wavedec2(I5,3、 'bior4.4' );
%=======================リファクタリング======================= ==
a0 = wrcoef2( 'a'、c、s、 'bior4.4'、0);
a1 = wrcoef2( 'a'、c、s、 'bior4.4'、1);
a2 = wrcoef2( 'a '、c、s、' bior4.4 '、2);
a3 = wrcoef2(' a '、c、s、' bior4.4 '、3);

3.シミュレーションの結論:

D-14

おすすめ

転載: blog.csdn.net/ccsss22/article/details/115019712