Main Page | Class Hierarchy | Class List | Class Members

Image32 Class Reference

List of all members.

Public Member Functions

int setSize (const int &width, const int &height)
Image32operator= (const Image32 &img)
int width (void) const
int height (void) const
Pixel32operator() (const int &x, const int &y)
const Pixel32operator() (const int &x, const int &y) const
Pixel32pixel (const int &x, const int &y)
const Pixel32pixel (const int &x, const int &y) const
int AddRandomNoise (const float &noise, Image32 &outputImage) const
int Brighten (const float &brightness, Image32 &outputImage) const
int Luminance (Image32 &outputImage) const
int Contrast (const float &contrast, Image32 &outputImage) const
int Saturate (const float &saturation, Image32 &outputImage) const
int Quantize (const int &bits, Image32 &outputImage) const
int RandomDither (const int &bits, Image32 &outputImage) const
int OrderedDither2X2 (const int &bits, Image32 &outputImage) const
int FloydSteinbergDither (const int &bits, Image32 &outputImage) const
int Blur3X3 (Image32 &outputImage) const
int EdgeDetect3X3 (Image32 &outputImage) const
int ScaleNearest (const float &scaleFactor, Image32 &outputImage) const
int ScaleBilinear (const float &scaleFactor, Image32 &outputImage) const
int ScaleGaussian (const float &scaleFactor, Image32 &outputImage) const
int RotateNearest (const float &angle, Image32 &outputImage) const
int RotateBilinear (const float &angle, Image32 &outputImage) const
int RotateGaussian (const float &angle, Image32 &outputImage) const
int SetAlpha (const Image32 &matte)
int Composite (const Image32 &overlay, Image32 &outputImage) const
int Crop (const int &x1, const int &y1, const int &x2, const int &y2, Image32 &outputImage) const
int FunFilter (Image32 &outputImage) const
int Warp (const OrientedLineSegmentPairs &olsp, Image32 &outputImage) const
Pixel32 NearestSample (const float &x, const float &y) const
Pixel32 BilinearSample (const float &x, const float &y) const
Pixel32 GaussianSample (const float &x, const float &y, const float &variance, const float &radius) const
int ReadImage (char *fileName)
int WriteImage (char *fileName)

Static Public Member Functions

static int BeierNeelyMorph (const Image32 &source, const Image32 &destination, const OrientedLineSegmentPairs &olsp, const float &timeStep, Image32 &ouputImage)
static int CrossDissolve (const Image32 &source, const Image32 &destination, const float &blendWeight, Image32 &ouputImage)

Detailed Description

This class represents an RGBA image with 8 bits per channel.


Member Function Documentation

int Image32::AddRandomNoise const float &  noise,
Image32 outputImage
const
 

This method adds random noise to each pixel and writes out the new image to outputImage. The value of the input parameter should be in the range [0,1] representing the fraction of noise that should be added. The actual amount of noise added is in the range [-noise,noise]. The method returns 1 if it has been implemented.

int Image32::BeierNeelyMorph const Image32 source,
const Image32 destination,
const OrientedLineSegmentPairs olsp,
const float &  timeStep,
Image32 ouputImage
[static]
 

This static method applies a Beier-Neely morph and writes out the new image to outputImage. The method uses the set of line segment pairs to define correspondences between the source and destination image. The time-step parameter, in the range of [0,1], specifies the point in the morph at which the output image should be obtained. The method returns 1 if it has been implemented.

Pixel32 Image32::BilinearSample const float &  x,
const float &  y
const
 

This method returns the value of the image, sampled at position (x,y) using bilinear-weighted sampling. The variance of the Gaussian and the radius over which the weighted summation is performed are specified by the parameters.

int Image32::Blur3X3 Image32 outputImage  )  const
 

This method blurs the image using a 3x3 mask. The method returns 1 if it has been implemented.

int Image32::Brighten const float &  brightness,
Image32 outputImage
const
 

This method brightens each pixel and writes out the new image to outputImage. The value of the input parameter is the scale by which the image should be brightened. The method returns 1 if it has been implemented.

int Image32::Composite const Image32 overlay,
Image32 outputImage
const
 

This method composites the overlay image on top of the current image and writes out the new image to outputImage. The method uses the values in the alpha-channel of the overlay image to determine how pixels should be blended. The method returns 1 if it has been implemented.

int Image32::Contrast const float &  contrast,
Image32 outputImage
const
 

This method changes the contrast of the image and writes out the new image to outputImage. The value of the input parameter is the scale by which the contrast of the image should be changed. The method returns 1 if it has been implemented.

int Image32::Crop const int &  x1,
const int &  y1,
const int &  x2,
const int &  y2,
Image32 outputImage
const
 

This method crops the image and writes out the new image to outputImage The values of the input parameters specify the corners of the cropping rectangle. The method returns 1 if it has been implemented.

int Image32::CrossDissolve const Image32 source,
const Image32 destination,
const float &  blendWeight,
Image32 ouputImage
[static]
 

This static method cross-dissolves two image and writes out the new image to outputImage. The method generates an image which is the blend of the source and destination, using the blend-weight in the range [0,1] to determine what faction of the source and destination images should be used to generate the final output. The method returns 1 if it has been implemented.

int Image32::EdgeDetect3X3 Image32 outputImage  )  const
 

This method computes the edges of the image using a 3x3 mask and writes out the new image to outputImage. The method returns 1 if it has been implemented.

int Image32::FloydSteinbergDither const int &  bits,
Image32 outputImage
const
 

This method transforms the image so that each color is represented by a fixed number of bits and writes out the new image to outputImage. The final pixel values are obtained by using Floyd-Steinberg dithering for propogating quantization errors. The value of the input parameter is the number of bits that should be used to represent a color component in the output image. The method returns 1 if it has been implemented.

int Image32::FunFilter Image32 outputImage  )  const
 

This method applies a fun-filter to the current image and writes out the new image to outputImage. The method returns 1 if it has been implemented.

Pixel32 Image32::GaussianSample const float &  x,
const float &  y,
const float &  variance,
const float &  radius
const
 

This method returns the value of the image, sampled at position (x,y) using Gaussian-weighted sampling. The variance of the Gaussian and the radius over which the weighted summation is performed are specified by the parameters.

int Image32::height void   )  const
 

This method returns the height of the image

int Image32::Luminance Image32 outputImage  )  const
 

This method transforms a color image into a gray image and writes out the new image to outputImage. The method returns 1 if it has been implemented.

Pixel32 Image32::NearestSample const float &  x,
const float &  y
const
 

This method returns the value of the image, sampled at position (x,y) using nearest-point sampling. The variance of the Gaussian and the radius over which the weighted summation is performed are specified by the parameters.

const Pixel32 & Image32::operator() const int &  x,
const int &  y
const
 

This method returns a reference to the indexed pixel.

Pixel32 & Image32::operator() const int &  x,
const int &  y
 

This method returns a reference to the indexed pixel.

Image32 & Image32::operator= const Image32 img  ) 
 

This overloaded operator copies the input image into the current image.

int Image32::OrderedDither2X2 const int &  bits,
Image32 outputImage
const
 

This method transforms the image so that each color is represented by a fixed number of bits and writes out the new image to outputImage. The final pixel values are obtained by using a 2x2 dithering matrix to determine how values should be quantized. The value of the input parameter is the number of bits that should be used to represent a color component in the output image. The method returns 1 if it has been implemented.

const Pixel32 & Image32::pixel const int &  x,
const int &  y
const
 

This method returns a reference to the indexed pixel.

Pixel32 & Image32::pixel const int &  x,
const int &  y
 

This method returns a reference to the indexed pixel.

int Image32::Quantize const int &  bits,
Image32 outputImage
const
 

This method transforms the image so that each color is represented by a fixed number of bits and writes out the new image to outputImage. The final pixel values are obtained by quantizing. The value of the input parameter is the number of bits that should be used to represent a color component in the output image. The method returns 1 if it has been implemented.

int Image32::RandomDither const int &  bits,
Image32 outputImage
const
 

This method transforms the image so that each color is represented by a fixed number of bits and writes out the new image to outputImage. The final pixel values are obtained by adding noise to the pixel color channels and then quantizing. The value of the input parameter is the number of bits that should be used to represent a color component in the output image. The method returns 1 if it has been implemented.

int Image32::ReadImage char *  fileName  ) 
 

This method reads in an image from the specified file. It uses the file extension to determine if the file should be read in as a BMP file or as a JPEG file.

int Image32::RotateBilinear const float &  angle,
Image32 outputImage
const
 

This method rotates an image using bilinear-interpolation to obtain pixel values and writes out the new image to outputImage. The value of the input parameter is the angle of rotation (in degrees). The method returns 1 if it has been implemented.

int Image32::RotateGaussian const float &  angle,
Image32 outputImage
const
 

This method rotates an image using Gaussian-weighting to obtain pixel values and writes out the new image to outputImage. The value of the input parameter is the angle of rotation (in degrees). The method returns 1 if it has been implemented.

int Image32::RotateNearest const float &  angle,
Image32 outputImage
const
 

This method rotates an image using nearest point sampling to obtain pixel values and writes out the new image to outputImage. The value of the input parameter is the angle of rotation (in degrees). The method returns 1 if it has been implemented.

int Image32::Saturate const float &  saturation,
Image32 outputImage
const
 

This method changes the saturation of each pixel and writes out the new image to outputImage. The value of the input parameter is the scale by which the saturation of the pixel should be changed. The method returns 1 if it has been implemented.

int Image32::ScaleBilinear const float &  scaleFactor,
Image32 outputImage
const
 

This method scales an image using bilinear-interpolation to obtain pixel values and writes out the new image to outputImage. The value of the input parameter is the factor by which the image is to be scaled. The method returns 1 if it has been implemented.

int Image32::ScaleGaussian const float &  scaleFactor,
Image32 outputImage
const
 

This method scales an image using Gaussian-weighting to obtain pixel values and writes out the new image to outputImage. The value of the input parameter is the factor by which the image is to be scaled. The method returns 1 if it has been implemented.

int Image32::ScaleNearest const float &  scaleFactor,
Image32 outputImage
const
 

This method scales an image using nearest point sampling to obtain pixel values and writes out the new image to outputImage. The value of the input parameter is the factor by which the image is to be scaled. The method returns 1 if it has been implemented.

int Image32::SetAlpha const Image32 matte  ) 
 

This method sets the alpha-channel of the current image using the information provided in the matte image. The method returns 1 if it has been implemented.

int Image32::setSize const int &  width,
const int &  height
 

This method sets the dimension of the image.

int Image32::Warp const OrientedLineSegmentPairs olsp,
Image32 outputImage
const
 

This method uses the correspondences defined by the line segment pairs to warp the current image into the output image. The method returns 1 if it has been implemented.

int Image32::width void   )  const
 

This method returns the width of the image

int Image32::WriteImage char *  fileName  ) 
 

This method writes in an image out to the specified file. It uses the file extension to determine if the file should be written out as a BMP file or as a JPEG file.


Generated on Wed Feb 22 15:44:22 2006 for Assignment 2 by  doxygen 1.4.1