#same as imshow(im, [])
imshow(uint8(255*mat2gray(im_d)));
imwrite(uint8(255*mat2gray(im)), file_out);
MatLab Code
Normalized gray image: