Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::RGBColorImage< T > Class Template Reference

#include <RGBColorImage.h>

Inheritance diagram for prapi::RGBColorImage< T >:

Matrix< T > Object List of all members.

Detailed Description

template<class T = int>
class prapi::RGBColorImage< T >

A class that provides methods for easily handling RGB color data.


Public Methods

 RGBColorImage (int size=1)
 Create a square matrix with the given number of rows and columns.

 RGBColorImage (int rows, int columns)
 Create an matrix with the given number of rows and columns.

 RGBColorImage (RGBColorImage &other)
 Copy an RGB color image.

template<class U>  RGBColorImage (const Matrix< U > &other)
 Copy an RGB color image of another content type.

RGBColorImage & operator= (const RGBColorImage &other)
 Copy an RGB color image.

RGBColorImage & operator= (const RGBColor< T > &value)
 Set each pixel in this image to the given value.

Matrix< T > getRed (void) const
 Get the red channel as a monochrome matrix.

Matrix< T > getGreen (void) const
 Get the green channel as a monochrome matrix.

Matrix< T > getBlue (void) const
 Get the blue channel as a monochrome matrix.

template<class U> void transform (Matrix< U > &mat) throw (MatrixException&)
 Multiply each multi-channel color pixel with the given transformation matrix.

template<class U> RGBColorImage getTransform (Matrix< U > &mat) const throw (MatrixException&)
 Create a copy of this image and multiply each multi-channel color pixel in it with the given transformation matrix.

RGBColorImage< double > getNormalizedImage (void) const
 Copy this image and transform each pixel in the copy to normalized RGB color space.

Matrix< double > getNormalizedRed (void) const
 Get normalized red channel.

Matrix< double > getNormalizedGreen (void) const
 Get normalized green channel.

Matrix< double > getNormalizedBlue (void) const
 Get normalized blue channel.


Member Function Documentation

template<class T>
RGBColorImage< double > prapi::RGBColorImage< T >::getNormalizedImage void    const
 

Copy this image and transform each pixel in the copy to normalized RGB color space.

Each channel is divided by the intensity of the pixel.

template<class T>
template<class U>
RGBColorImage< T > prapi::RGBColorImage< T >::getTransform Matrix< U > &    mat const throw (MatrixException&)
 

Create a copy of this image and multiply each multi-channel color pixel in it with the given transformation matrix.

This method can be used to transform the whole image to another color space without altering the original image.

template<class T>
template<class U>
void prapi::RGBColorImage< T >::transform Matrix< U > &    mat throw (MatrixException&)
 

Multiply each multi-channel color pixel with the given transformation matrix.

This method can be used to transform the whole image to another color space.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.