Created
August 26, 2016 20:17
-
-
Save juniorhero/03aa10a656e93687a69b539f09b35bad to your computer and use it in GitHub Desktop.
matlab code log transformations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment