Code covered by the BSD License

# Study of various Digital Image Processing concepts using MATLAB

### Amit Nambiar (view profile)

Study of various Digital Image Processing concepts using MATLAB. .txt files for C are also included

Amitroberts.m
```clc;close all;clear all;

I=im2double(I); %convert the image into double from uint8
J=zeros(size(I));
K=J;
L=J;
hx = [+1 0;0 -1]; hy = [0 +1;-1 0]; hxy=hx+hy; %robert operators

[rows cols]=size(I);
for i=1:rows-1
for j=1:cols-1
G1=zeros(2,2);
G2=zeros(2,2);
G3=zeros(2,2);
for k=1:2
for l=1:2
G1(k,l)=hx(3-k,3-l).*I(i+k-1,j+l-1);
J(i,j)=sum(sum(G1));

G2(k,l)=hy(3-k,3-l).*I(i+k-1,j+l-1);
K(i,j)=sum(sum(G2));

G3(k,l)=hxy(3-k,3-l).*I(i+k-1,j+l-1);
L(i,j)=sum(sum(G3));

end
end
end
end
figure()
subplot(2,2,1);
imshow(I);
subplot(2,2,2);
imshow(J);
subplot(2,2,3);
imshow(K);
subplot(2,2,4);
imshow(L);

%Using in-built function
% figure()
% Rx = imfilter(I,hx,'conv','same','replicate');
% Ry = imfilter(I,hy,'conv','same','replicate');
% Rxy=imfilter(I,hxy,'conv','same','replicate');
% subplot(2,2,1);
% imshow(I);
% subplot(2,2,2);
% imshow(Rx);
% subplot(2,2,3);
% imshow(Ry);
% subplot(2,2,4);
% imshow(Rxy);```