Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
export_fig help needed

Subject: export_fig help needed

From: cartonn

Date: 13 Jul, 2009 15:15:06

Message: 1 of 7

Hi all,

I need to set some parameters for export_fig.m (FEX: 23629)
how can I change the quality of the output image?
export_fig new_file -r600 -jpg does not work

also, can I change the anti-aliasing level? (myaa had 4 as default, and you could change it using something like myaa(2)

thanks

Subject: export_fig help needed

From: Oliver Woodford

Date: 14 Jul, 2009 11:36:03

Message: 2 of 7

"cartonn " <cartonn30gel@yahoo.com> wrote in message <h3fj1q$ofm$1@fred.mathworks.com>...
> Hi all,
>
> I need to set some parameters for export_fig.m (FEX: 23629)
> how can I change the quality of the output image?
> export_fig new_file -r600 -jpg does not work
>
> also, can I change the anti-aliasing level? (myaa had 4 as default, and you could change it using something like myaa(2)
>
> thanks

To change resolution simply resize the figure. There is no input option to change anti-aliasing level or jpeg quality, as indicated by the help text. To change jpeg quality edit the line which reads:

imwrite(A, [name '.jpg'], 'Quality', 95);

Anti-aliasing level can be changed by replacing the 4 in lines 103, 109, 149, 153 & 318 with whatever factor you choose, but note this will only work if you have the image processing toolbox.

Oliver

Subject: export_fig help needed

From: cartonn

Date: 15 Jul, 2009 11:01:02

Message: 3 of 7

thank you

Subject: export_fig help needed

From: Oliver Woodford

Date: 30 Jul, 2009 15:00:16

Message: 4 of 7

"cartonn " wrote:
> Hi all,
>
> I need to set some parameters for export_fig.m (FEX: 23629)
> how can I change the quality of the output image?
> export_fig new_file -r600 -jpg does not work
>
> also, can I change the anti-aliasing level? (myaa had 4 as default, and you could change it using something like myaa(2)
>
> thanks

There is now the option to change anti-aliasing level.

Subject: export_fig help needed

From: Oliver Woodford

Date: 9 Oct, 2009 16:18:02

Message: 5 of 7

"cartonn" wrote
> I need to set some parameters for export_fig.m (FEX: 23629)
> how can I change the quality of the output image?
> export_fig new_file -r600 -jpg does not work

export_fig now accepts an optional parameter: -m<value>, where <value> specifies the factor to magnify the on-screen figure by when exporting to bitmap. For example:
   export_fig -m2.5 test.jpg

Subject: export_fig help needed

From: a b

Date: 12 Oct, 2009 17:13:06

Message: 6 of 7

Hi, I'm trying to compress an image at a certain quality and then study the difference between the original image and the compressed image. However i get a total black image as result.

Bu=imread('baboon.jpg');
Bu=rgb2gray(Bu);
imwrite(Bu,'baboonQ0.jpg','quality',30);
Su=imread('baboonQ0.jpg');
sub=Su-Bu;
figure,imshow(sub),title('Image at Q')

Please help!



"Oliver Woodford" <o.j.woodford.98@cantab.net> wrote in message <h3hqj3$mbr$1@fred.mathworks.com>...
> "cartonn " <cartonn30gel@yahoo.com> wrote in message <h3fj1q$ofm$1@fred.mathworks.com>...
> > Hi all,
> >
> > I need to set some parameters for export_fig.m (FEX: 23629)
> > how can I change the quality of the output image?
> > export_fig new_file -r600 -jpg does not work
> >
> > also, can I change the anti-aliasing level? (myaa had 4 as default, and you could change it using something like myaa(2)
> >
> > thanks
>
> To change resolution simply resize the figure. There is no input option to change anti-aliasing level or jpeg quality, as indicated by the help text. To change jpeg quality edit the line which reads:
>
> imwrite(A, [name '.jpg'], 'Quality', 95);
>
> Anti-aliasing level can be changed by replacing the 4 in lines 103, 109, 149, 153 & 318 with whatever factor you choose, but note this will only work if you have the image processing toolbox.
>
> Oliver

Subject: export_fig help needed

From: ImageAnalyst

Date: 12 Oct, 2009 17:22:45

Message: 7 of 7

On Oct 12, 1:13 pm, "a b" <vinet...@yahoo.co.in> wrote:
> Hi, I'm trying to compress an image at a certain quality and then study the difference between the original image and the compressed image. However i get a total black image as result.
>
> Bu=imread('baboon.jpg');
> Bu=rgb2gray(Bu);                                        
> imwrite(Bu,'baboonQ0.jpg','quality',30);                        
> Su=imread('baboonQ0.jpg');
> sub=Su-Bu;
> figure,imshow(sub),title('Image at Q')
>
> Please help!
>
>
>
> "Oliver Woodford" <o.j.woodford...@cantab.net> wrote in message <h3hqj3$mb...@fred.mathworks.com>...
> > "cartonn " <cartonn30...@yahoo.com> wrote in message <h3fj1q$of...@fred.mathworks.com>...
> > > Hi all,
>
> > > I need to set some parameters for export_fig.m (FEX: 23629)
> > > how can I change the quality of the output image?
> > > export_fig new_file -r600 -jpg     does not work
>
> > > also, can I change the anti-aliasing level? (myaa had 4 as default, and you could change it using something like myaa(2)
>
> > > thanks
>
> > To change resolution simply resize the figure. There is no input option to change anti-aliasing level or jpeg quality, as indicated by the help text. To change jpeg quality edit the line which reads:
>
> > imwrite(A, [name '.jpg'], 'Quality', 95);
>
> > Anti-aliasing level can be changed by replacing the 4 in lines 103, 109, 149, 153 & 318 with whatever factor you choose, but note this will only work if you have the image processing toolbox.
>
> > Oliver- Hide quoted text -
>
> - Show quoted text -

------------------------------------------------------------------------------------
Start a new thread. This has nothing to do with Oliver's (very nice)
export_fig() routine.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us