From: Alberto Bedin on 15 Jun 2010 08:09 You told me that imagesc() scales values between [1 61], so I tried this: img = imread('lena.bmp'); img_double = double(img); output = img_double ./ max(max(img_double)); output = output .* 61; output = uint8(output); imwrite(output,gray,'output/lenaSaved.bmp','bmp'); Now lenaSaved.bmp looks really like lena.bmp but it is not perfectly the same: lena.bmp seems a bit lighter (it seems with "a bit more gamma"). How can I configure imadjust() to modify the image as imagesc or how can I modify the code above to get the same result? Thanks |