Advertisement
tareq1988

contrast stretching

Feb 24th, 2012
1,170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.17 KB | None | 0 0
  1. I = imread('p.jpg');
  2. figure(1);
  3. imshow(I);
  4. a = min(I(:));%minimum pixel of image I
  5. b = max(I(:));%maximum pixel of image I
  6. I = (I-a).*(255/(b-a));
  7. figure(2);
  8. imshow(I);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement