Skip to content

Instantly share code, notes, and snippets.

@yusufcakal
Last active January 8, 2018 09:45
Show Gist options
  • Save yusufcakal/8c8eecc6b006b2f16f69c2efef87dd19 to your computer and use it in GitHub Desktop.
Save yusufcakal/8c8eecc6b006b2f16f69c2efef87dd19 to your computer and use it in GitHub Desktop.
SideImage
I = imread('image.PNG');
%I = rgb2gray(I);
[r c] = size(I);
result = zeros(r,c);
sub = I;
figure;
imshow(I)
title('Original Image');
for i=2:r-1
for j=2:c-1
result(i,j) = (I(i,j+1)) + (I(i,j-1)) + (I(i+1,j)) + (I(i-1,j)) - (4*I(i,j)); % ikinci türev
sub(i,j) = I(i,j) - result(i,j); % daha keskin bir görüntü
sub(i,j) = I(i,j) - sub(i,j); % kenar görüntü
end
end
figure;
imshow(sub)
title('Side Image');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment