Image processing code explanation.
Show older comments
lambda = 4;%8
theta = 0;
psi = [0 pi/2];
gamma = 0.5;
bw = 1;
N = 12;
bp_filter_input_image = sharpened_original_image;
bp_filtered_image = zeros(size(bp_filter_input_image, 1),
size(bp_filter_input_image, 2), N);
img_out_disp = zeros(size(bp_filter_input_image, 1),
size(bp_filter_input_image, 2), N);
% display 12 images in one window
figure;
for n=1:N
mean_filter = BP_fn(bw,gamma,psi(1),lambda,theta) +
1i * BP_fn(bw,gamma,psi(2),lambda,theta);
% filter output to the n-th channel
bp_filtered_image(:, :, n) = imfilter(bp_filter_input_image,
mean_filter, 'symmetric');
% next orientation
theta = theta + pi/N;
% default superposition method, L2-norm
image_vector = [];
image_vector = sum(abs(bp_filtered_image(:,:,n)).^2, 3).^0.5;
% normalize
img_out_disp(:,:,n) = image_vector./max(image_vector(:));
%result show
str=sprintf('BP theta=pi/%d',n);
subplot(3,4,n),imshow(img_out_disp(:,:,n));xlabel(str);
end
I have the following questions:
(1) What is the target/end-result of this entire routine?
(2) What is going on in the following line of code? What is 1i?
mean_filter = BP_fn(bw,gamma,psi(1),lambda,theta) +
1i * BP_fn(bw,gamma,psi(2),lambda,theta);
(3) What is going on in the following line of code?
image_vector = sum(abs(bp_filtered_image(:,:,n)).^2, 3).^0.5;
2 Comments
Ba Ba Black Sheep!
on 13 Feb 2017
Edited: Ba Ba Black Sheep!
on 13 Feb 2017
Mallikarjun umadi
on 3 Jan 2020
Edited: Mallikarjun umadi
on 3 Jan 2020
can anyone suggest code for skin disease identification using matlab code?only for herpes, psoriasis and dermatitis
Accepted Answer
More Answers (0)
Categories
Find more on Image Filtering in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!