# Outepspng

## PURPOSE

Outepspng - Generate png and eps figures.

## SYNOPSIS

function Outepspng(pic, outname)

## DESCRIPTION

     Outepspng - Generate png and eps figures.

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- OutputActiveBasisTemplate OutputActiveBasisTemplate - Generates figures and captions.
- OutputAdaboostTemplate OutputAdaboostTemplate - Generates figures for adaboost strong classifier.

## SOURCE CODE

    0001 function Outepspng(pic, outname)
    0002 % Outepspng - Generate png and eps figures.
    0003
    0004 [y x c] = size(pic);
    0005 figure('Units','Pixels','Resize','off',...
    0006    'Position',[100 100 x y],'PaperUnit','points',...
    0007    'PaperPosition',[0 0 x y]);
    0008 axes('position',[0 0 1 1]);
    0009 imshow(pic, []);
    0010 axis off
    0011 saveas(gcf, outname, 'epsc');
    0012
    0013 towrite = double(pic);
    0014 towrite = uint8(255 * (towrite-min(towrite(:)))/(max(towrite(:))-min(towrite(:))));
    0015 imwrite(towrite, [outname '.png'],'png');
    0016 close all