Skip to content

Instantly share code, notes, and snippets.

@juniorhero
Created August 26, 2016 20:17
Show Gist options
  • Save juniorhero/03aa10a656e93687a69b539f09b35bad to your computer and use it in GitHub Desktop.
Save juniorhero/03aa10a656e93687a69b539f09b35bad to your computer and use it in GitHub Desktop.
matlab code log transformations
a=imread('Penguins.jpg')
subplot(2,2,1)
imshow(a);
title 'Original Image'
b=im2double(a)
s=(1*log(1+b))*256;
s1=uint8(s)
subplot(2,2,2)
imshow(s1);
title 'c=1'
sp=(2*log(1+b))*256;
s2=uint8(sp)
subplot(2,2,3)
imshow(s2);
title 'c=2'
sp2=(3*log(1+b))*256;
s3=uint8(sp2)
subplot(2,2,4)
imshow(s3);
title 'c=3'
@juniorhero
Copy link
Author

log_transform

@tawheedalabed1
Copy link

جميييييل

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment