Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

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

Open
@lixiaohui2020

Description

@lixiaohui2020

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions