analysis_filters2.m

来自「MATLAB Code for Optimal Quincunx Filter 」· M 代码 · 共 18 行

M
18
字号
function [h0_coeff, h1_coeff] = analysis_filters2(A1, A2, x, xn, M)
% compute the analysis filters from the lifting filters
% the first one add channel 1 to channel 0
% Copyright (c) 2006 Yi Chen

[a1_up, td] = upsampling_2d(double(subs(A1, x, xn)), [0,0], M);
[a2_up, td] = upsampling_2d(double(subs(A2, x, xn)), [0,0], M);

d1 = size(a1_up);
h1_coeff = a1_up;
h1_coeff(d1(1)/2+0.5, d1(2)/2+0.5) = h1_coeff(d1(1)/2+0.5, d1(2)/2+0.5)+1;

h0_coeff = conv2(a2_up, h1_coeff);
d0 = size(h0_coeff);
h0_coeff(d0(1)/2+0.5, d0(2)/2+0.5) = h0_coeff(d0(1)/2+0.5, d0(2)/2+0.5)+1;

[h0_coeff, td] = reduce_size(h0_coeff, [0,0], 0);
[h1_coeff, td] = reduce_size(h1_coeff, [0,0], 0);

⌨️ 快捷键说明

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