close all;
clear all;
clc;
warning('off');
addpath(genpath(pwd));
dbstop if error
%% INPUT
I=imread('lena.tif');
I=imresize(I,[256 256]);
%% MODE
MD={'1.BFM[Bessel-Fourier Moment]'};for i=1, disp(MD{i}); end
MODE = input('Enter Your Moment:');
K = input('Enter K Value:');
%% COMPUTE
if MODE
[I,It,L,DT,RT,V ]=BFM(I,K)
end
%% OUTPUT
figure;
subplot(121);
imshow(uint8(abs(I)));
title('Original');
subplot(122);
imshow(uint8(abs(It)));
different_a = (abs(abs( double(abs(It))-double(I)))).^2;
different_b = (double(I)).^2;
MSRE = sum(different_a(:))/sum(different_b(:));
clc;
if MODE
disp([MD{MODE},': V=',num2str(V),';']);
else
disp(MD{MODE});
end
disp(table([K;L;DT;RT;MSRE],'RowNames',{'K';'L';'DT';'RT';'MSRE'},'VariableNames',{'Value'}));
title({'Reconstructed'; ['K=',num2str(K),' L=',num2str(L),' MSRE=',num2str(MSRE)]});
THis code work on gray image only , How we can edit it to work on Color Images ???