tareq1988

contrast stretching

Feb 24th, 2012
1,146
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data