How to save figure image as .png

  • Follow


Hello,
I removed some noises from image and show the denoised image, I have used imwrite function to save the denoised image as follow:
.....
figure(2);clf;
imshow(a,[0 255]); 
imwrite(a,'abc.png','png');

but the saved image is almost blank, a white background with few dot on it, any advise
0
Reply Dariush 11/22/2010 5:35:04 PM

any solution???? is that possible to save the figure image or No,,,, pls reply


"Dariush " <persianfriend12@yahoo.com> wrote in message <ice9k8$g3t$1@fred.mathworks.com>...
> Hello,
> I removed some noises from image and show the denoised image, I have used imwrite function to save the denoised image as follow:
> ....
> figure(2);clf;
> imshow(a,[0 255]); 
> imwrite(a,'abc.png','png');
> 
> but the saved image is almost blank, a white background with few dot on it, any advise
0
Reply Dariush 11/23/2010 2:27:03 PM


Well, what is the value of a?
Is it a uint8?  Or a double?
0
Reply ImageAnalyst 11/23/2010 2:29:14 PM

100 X 100 double...


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <a8ce9a2f-326d-4cdb-b2bc-b7e8478d420a@q14g2000yqe.googlegroups.com>...
> Well, what is the value of a?
> Is it a uint8?  Or a double?
0
Reply Dariush 11/23/2010 2:59:04 PM

On Nov 23, 9:59=A0am, "Dariush " <persianfrien...@yahoo.com> wrote:
> 100 X 100 double...
>
> ImageAnalyst <imageanal...@mailinator.com> wrote in message <a8ce9a2f-326=
d-4cdb-b2bc-b7e8478d4...@q14g2000yqe.googlegroups.com>...
> > Well, what is the value of a?
> > Is it a uint8? =A0Or a double?

-------------------------------------------------
Maybe PNG doesn't like doubles.  Try passing "a" into mat2gray()
before you save it with imwrite().
0
Reply ImageAnalyst 11/23/2010 3:03:27 PM

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <45bd90f8-0b4b-46ed-879f-e4a2c897ba70@s9g2000vby.googlegroups.com>...
> On Nov 23, 9:59 am, "Dariush " <persianfrien...@yahoo.com> wrote:
> > 100 X 100 double...
> >
> > ImageAnalyst <imageanal...@mailinator.com> wrote in message <a8ce9a2f-326d-4cdb-b2bc-b7e8478d4...@q14g2000yqe.googlegroups.com>...
> > > Well, what is the value of a?
> > > Is it a uint8?  Or a double?
> 
> -------------------------------------------------
> Maybe PNG doesn't like doubles.  Try passing "a" into mat2gray()
> before you save it with imwrite().

it works, thank u so much
0
Reply Dariush 11/23/2010 3:14:04 PM

5 Replies
448 Views

(page loaded in 0.058 seconds)

Similiar Articles:













7/26/2012 11:18:39 PM


Reply: