NAME
enlarge - Enlarges an image to a user-defined size
SYNOPSIS
#include <CVIPimage.h>
#include <CVIPmatrix.h>
#include <CVIPgeometry.h>
Image *enlarge(Image *cvipImage, int row, int col)
<cvipImage> - pointer to an Image structure
<row> - number of rows for enlarged image
<column> - number of columns for enlarged image
PATH
$CVIPHOME/GEOMETRY/enlarge.c
DESCRIPTION
Enlarge allows the user to specify the number of rows and
columns in the resultant image, corresponding to the height
and width of the new image. The integers specified for row
and column sizes must be equal to or greater than the input
image sizes or an error results.
Because the user may enter different values for height and
width, enlarge may be used to geometrically distort the
image in a rubber-sheet fashion.
TYPES AND CONSTANTS
none
RETURN VALUES
Returns enlarged image upon successful completion; returns
NULL upon error in size specification.
EXAMPLE
#include <CVIPtoolkit.h>
#include <CVIPconvert.h>
#include <CVIPimage.h>
#include <CVIPmatrix.h>
#include <CVIPgeometry.h>
void main()
{
Image *cvipImage;
IMAGE_FORMAT format;
char *inputfile, *outputfile;
setDisplay_Image("picture", "Default");
system("ln -s /opt/cvipimages/Gray/cameraman.pgm
cameraman.pgm");
print_CVIP("\nPlease enter the image 'cameraman.pgm' at the
prompt\n\n");
print_CVIP("Enter the Input File Name: ");
inputfile =(char *) getString_CVIP();
format = getFormat_CVIP(inputfile);
cvipImage = read_Image(inputfile, 1);
view_Image(cvipImage, inputfile);
cvipImage = enlarge(cvipImage, 300,420);
print_CVIP("Enter the Output File Name: ");
outputfile = getString_CVIP();
view_Image(cvipImage, outputfile);
write_Image(cvipImage, outputfile,CVIP_NO,CVIP_NO,format,
1);
free(inputfile);
free(outputfile);
}
BUGS
None at this time
SEE ALSO
none
AUTHOR
Copyright (C) 1995 SIUE - by Scott Umbaugh and Kun Luo.