% deteccion de bordes 2da derivada
clear all
clc
A=imread('c:\moon.jpg');
[fila,columna]=size(A);
B=zeros(fila,columna);
for y=1:fila
for x=2:columna-1
B(y,x)=A(y,x+1)+A(y,x-1)-(2*A(y,x));
y
end
end
Z=uint8(B);
imshow(Z)
figure
imshow(A)