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

📄 smooth_wv.m

📁 mean shift
💻 M
字号:
function Smoothed = Smooth_wv(G_image)

[Low, High, Low_i, High_i] = symlets(12);



[Rows, Cols] = size(G_image);

Log_size = floor(log2(max(Rows, Cols)));

New_size = 2^Log_size;

Resized = imresize(G_image, [New_size, New_size], 'bilinear');



Forward = wt2d(Resized, Low, High, Log_size);

Forward_r = -abs(reshape(Forward, 1, New_size*New_size));

Forward_s = sort(Forward_r);

Cutoff = -Forward_s(floor(New_size*New_size*0.1));		% taking 10%

To_take = abs(Forward) > Cutoff;

Forward = Forward .* To_take;



% Forward(New_size/2+1:New_size, :) = ...

%   zeros(size(Forward(New_size/2+1:New_size, :)));

% Forward(:, New_size/2+1:New_size) = ...

%     zeros(size(Forward(:, New_size/2+1:New_size)));

Smoothed = iwt2d(Forward, Low_i, High_i, Log_size, New_size, New_size);

Smoothed = imresize(Smoothed, [Rows, Cols], 'bilinear');

Smoothed = Smoothed .* (Smoothed >= 0);

⌨️ 快捷键说明

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