From: Jessica on
I am displaying images (.bmp) with the imshow command. I
then am trying to save the images with the saveas command.
However, when I open up the saved images, their color is
altered and not as it is in the origianl image. For
example, an image showing a Caucasian person's face has a
somwhat pinkish blotched tint to the saved image. Is it
possible to save the images as they appeared originally?

Thanks!!
From: Devdatt Lad on
Jessica wrote:
> I am displaying images (.bmp) with the imshow command. I
> then am trying to save the images with the saveas command.
> However, when I open up the saved images, their color is
> altered and not as it is in the origianl image. For
> example, an image showing a Caucasian person's face has a
> somwhat pinkish blotched tint to the saved image. Is it
> possible to save the images as they appeared originally?
>
> Thanks!!

Try using the function IMWRITE.

--
Devdatt Lad
The MathWorks, Inc.
From: Jessica on
Devdatt Lad <Devdatt.Lad(a)mathworks.com> wrote in message
<g3dmjj$66j$1(a)fred.mathworks.com>...
> Jessica wrote:
> > I am displaying images (.bmp) with the imshow command. I
> > then am trying to save the images with the saveas command.
> > However, when I open up the saved images, their color is
> > altered and not as it is in the origianl image. For
> > example, an image showing a Caucasian person's face has a
> > somwhat pinkish blotched tint to the saved image. Is it
> > possible to save the images as they appeared originally?
> >
> > Thanks!!
>
> Try using the function IMWRITE.
>
> --
> Devdatt Lad
> The MathWorks, Inc.


Thanks for the suggestion.

IMWRITE doesn't actually work for me because I am first
displaying an image, overlaying points atop of it, and
saving the final product. Unless I use imshow, I only end up
saving an image with the points. This is my code:

a=imshow('F_01.bmp'); %Show the original image
hold on
h=scatter(x,y,'.k'),a; %X and Y are a list of coordinates

saveas(h,'F_01_HeatMap.bmp') %Saves image with coordinates

atop of it
From: Devdatt Lad on
Jessica wrote:
> IMWRITE doesn't actually work for me because I am first
> displaying an image, overlaying points atop of it, and
> saving the final product. Unless I use imshow, I only end up
> saving an image with the points. This is my code:
>
> a=imshow('F_01.bmp'); %Show the original image
> hold on
> h=scatter(x,y,'.k'),a; %X and Y are a list of coordinates
>
> saveas(h,'F_01_HeatMap.bmp') %Saves image with coordinates
>
> atop of it

I see. Then try,

print -dbmp F_01_HeatMap.bmp

instead of your SAVEAS command. Does it give better results?

Devdatt

--
Devdatt Lad
The MathWorks, Inc.
From: Jessica on
Devdatt Lad <Devdatt.Lad(a)mathworks.com> wrote in message
<g3ef90$2uq$1(a)fred.mathworks.com>...
> Jessica wrote:
> > IMWRITE doesn't actually work for me because I am first
> > displaying an image, overlaying points atop of it, and
> > saving the final product. Unless I use imshow, I only end up
> > saving an image with the points. This is my code:
> >
> > a=imshow('F_01.bmp'); %Show the original image
> > hold on
> > h=scatter(x,y,'.k'),a; %X and Y are a list of coordinates
> >
> > saveas(h,'F_01_HeatMap.bmp') %Saves image with coordinates
> >
> > atop of it
>
> I see. Then try,
>
> print -dbmp F_01_HeatMap.bmp
>
> instead of your SAVEAS command. Does it give better results?
>
> Devdatt
>
> --
> Devdatt Lad
> The MathWorks, Inc.


Yes, the colors are now true to the original image.
However,the resolution of the new image is less than the
original one. Maybe this can't be helped.

Also, would you have any ideas about making the x-y
coordinates displayed as a heat map atop the image rather
than as single points?