From: ImageAnalyst on
On Apr 8, 8:13 am, "PinkLab " <pink...(a)pinklab.com> wrote:
> This one shows original image and the second plot is empty with salt&pepper noise on it

--------------------------------------------
Very strange (since my code didn't add any noise to the image).
What are your display adapter settings - how many bits? Are you
running 24 or 32 bits?
From: PinkLab on
If i change double to im2double than it gives me image.

Any idea why double is just giving white background with color salt n pepper noise and im2double is working with normal image.

From: ImageAnalyst on
On Apr 8, 8:26 am, "PinkLab " <pink...(a)pinklab.com> wrote:
> If i change double to im2double than it gives me image.
>
> Any idea why double is just giving white background with color salt n pepper noise and im2double is working with normal image.

------------------------------------------------------------------------------------------------------------------
Well I just ran this again, adding a third image which I get via
im2double(), and they all look fine. So you either didn't copy and
paste exactly, and I do really mean EXACTLY, what I had or your system
is really screwed up. And I'm not sure why you ignored my question
about your display adapter settings..... So I guess you might want to
reinstall or call the Mathworks.

% Read in standard MATLAB demo image.
grayImage = imread('cameraman.tif');
subplot(2, 2, 1);
imshow(grayImage, []);
title('Original Grayscale UINT8 Image');
set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.

dblImage1 = double(grayImage);
subplot(2, 2, 2);
imshow(dblImage1, []);
title('Double Image via double()');

dblImage2 = im2double(grayImage);
subplot(2, 2, 3);
imshow(dblImage2, []);
title('Double Image via im2double()');