Skip to content

Instantly share code, notes, and snippets.

@juniorhero
Created August 26, 2016 20:20
Show Gist options
  • Save juniorhero/b6009c483b40e0b15e0a5b2689cb8aff to your computer and use it in GitHub Desktop.
Save juniorhero/b6009c483b40e0b15e0a5b2689cb8aff to your computer and use it in GitHub Desktop.
matlab code gamma transformations
a=imread('Penguins.jpg');
subplot(2,2,1);
imshow(a);
title 'Original Image';
b=im2double(a);
a1=input('enter value a');
ga1=input('enter value gamma');
s=(a1*(b.^ga1))*256;
s1=uint8(s);
subplot(2,2,2);
imshow(s1);
title 'Image 1';
a2=input('enter value a');
ga2=input('enter value gamma');
sp=(a2*(b.^ga2))*256;
s2=uint8(sp);
subplot(2,2,3);
imshow(s2);
title 'Image 2';
a3=input('enter value a');
ga3=input('enter value gamma');
sp2=(a3*(b.^ga3))*256;
s3=uint8(sp2);
subplot(2,2,4);
imshow(s3);
title 'Image 3';
@juniorhero
Copy link
Author

img

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