⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rundemo.m

📁 image thresholding otsu method
💻 M
字号:

%
%
% Demo of mutual information thresholding
%
%


N = 100; % image dimensions
SNR = 5; % signal-to-noise ratio

src = zeros(N,N);
Na = round(5*N/12);
Nb = round(7*N/12);
src(Na:Nb,Na:Nb) = 1;


src1 = abs(SNR*src + randn(N,N));
src2 = abs(SNR*src + randn(N,N));

subplot(1,2,1); shownormimage(src1);
title('Data Source 1');
subplot(1,2,2); shownormimage(src1);
title('Data Source 2');
pause

disp('Performing Mutual Information Thresholding...');
[T1, T2, mi, imT1, imT2, imF, quality, miscore] = mutualinfoThreshold(src1, src2);

disp(sprintf('Computed thresholds: T1=%2.3f, T2=%2.3f', T1, T2));
disp(sprintf('Agreement values: Mutual information=%2.3f, Quality=%2.3f', miscore, quality));

subplot(1,2,1); shownormimage(mi);
title('Mutual Information Surface');
subplot(2,2,2); shownormimage(imT1);
title('Source 1: Thresholded');
subplot(2,2,4); shownormimage(imT2);
title('Source 2: Thresholded');
pause



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -