From: us on
"PinkLab " <pinklab(a)pinklab.com> wrote in message <hpk9u5$fo$1(a)fred.mathworks.com>...
> I have poste my code above and any modification or better working code will be helpful

did you look at what i've showed you(?)...
did you try it(?)...

us
From: PinkLab on
Yes, I did but can't think of anything really, already spent couple of hours on this
From: ImageAnalyst on
On Apr 8, 6:22 am, "PinkLab " <pink...(a)pinklab.com> wrote:
> Yes, I did but can't think of anything really, already spent couple of hours on this

---------------------------------------------------------------------------
Two hours to learn how to use double()??? You got to be kidding me!

What happens if you try this:

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

dblImage = double(grayImage);
subplot(1, 2, 2);
imshow(dblImage, []);
title('Double Image');
From: PinkLab on
This one shows original image and the second plot is empty with salt&pepper noise on it
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.