ffcc icon indicating copy to clipboard operation
ffcc copied to clipboard

Consult the problems about the function ChannelizeImage() and preconditioner.F_fft * model_precond.F_fft

Open lixiaohui2020 opened this issue 4 years ago • 1 comments

Hi, @jonbarron , thanks for sharing the ffcc project.
I am researching the ffcc project and have met two problems as follows. First, I can not understand why use the MaskedLocalAbsoluteDeviation to compute the im_channels{2}, and i debug the computational process of the im_channel.

function im_channels = ChannelizeImage(im, mask)
% Generate feature images (color and gradient) and combine them into
% different cell channels.

assert(isa(mask, 'logical'));
im_channels = {};

im_channels{1} = cast(bsxfun(@times, double(im), mask), 'like', im);
im_channels{2} = cast(MaskedLocalAbsoluteDeviation(im, mask), 'like', im);

im_channels = ChannelizeImage(im, mask);  %  256*384*3, 256*384*3
......                                   % histrogram feature 
X = Xc ;                                 % 64*64*2
......                                   % get the fourier transformation(F_fft and X_fft) of the model param and X, 
FX_fft = sum(bsxfun(@times, X_fft, F_fft), 3)  

Second, how to understand the computational preconditioner.F_fft * model_precond.F_fft to get the model.F_fft. Why not just use the variable model_precond as model.F_fft. I disconver the values of the variable preconditioner.F_fft are approximate zeros.

% the computational process of the preconditioner.F_fft  
u_variation_fft = abs(fft2([-1; 1]/sqrt(8), X_sz(1), X_sz(2))).^2;
v_variation_fft = abs(fft2([-1, 1]/sqrt(8), X_sz(1), X_sz(2))).^2;
total_variation_fft = u_variation_fft + v_variation_fft;

% A helper function for applying a scale and shift to a stack of images.
apply_scale_shift = @(x, m, b)bsxfun(@plus, bsxfun(@times, x, permute(m(:), [2,3,1])), permute(b(:), [2,3,1]));

@jonbarron,i will be looking forward to your reply!Thanks!

lixiaohui2020 avatar Oct 12 '21 03:10 lixiaohui2020

hello!Do you reproduce this paper?

ToChangeBetter avatar Apr 10 '22 01:04 ToChangeBetter