Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
YUVImageC::YUVImageC(void)
YUVImageC::YUVImageC(SizeT,SizeT)
YUVImageC::YUVImageC(SizeT,SizeT,ByteYUVValueC *)
YUVImageC::YUVImageC(const ImageRectangleC &)
YUVImageC::YUVImageC(const YUVImageC &,const ImageRectangleC &)
YUVImageC::YUVImageC(const YUVImageC &)
YUVImageC::YUVImageC(const ImageC &)
YUVImageC::YUVImageC(ImageIStreamC &)
YUVImageC::YUVImageC(ImageFileInfoC *,ImageIStreamC &)
YUVImageC::YUVImageC(const ByteImageC &)
YUVImageC::YUVImageC(const RGBImageC &)
YUVImageC::YUVImageC(const RealRGBImageC &)
YUVImageC::YUVImageC(const RealYUVImageC &)
YUVImageC::YUVImageC(const Point3ImageC &)
YUVImageC::RGBChromaticityDiagram(const SizeT) const
YUVImageC::XYZChromaticityDiagram(const SizeT) const
YUVImageC::Y(ByteImageC &) const
YUVImageC::Y(void) const
YUVImageC::Red(void) const
YUVImageC::Green(void) const
YUVImageC::Blue(void) const
YUVImageC::RealY(void) const
YUVImageC::RealRed(void) const
YUVImageC::RealGreen(void) const
YUVImageC::RealBlue(void) const
YUVImageC::U(void) const
YUVImageC::V(void) const
YUVImageC::Yuv(void) const
YUVImageC::Rgb(void) const
YUVImageC::RealRgb(void) const
YUVImageC::RealYuv(void) const
YUVImageC::YUVImage(void) const
YUVImageC::YUVImage(void)
YUVImageC::Copy(const YUVImageC &)
YUVImageC::Copy(const ImageRectangleC &,const PixelC &)
YUVImageC::Copy(void) const
YUVImageC::ACopy(void) const
YUVImageC::AnotherImage(void) const
YUVImageC::Rotate(const Point2dC &,RealT,ByteYUVValueC) const
YUVImageC::ReduceAverage(void) const
YUVImageC::ReduceSample(void) const
YUVImageC::LocalAverage3x3(void)
YUVImageC::operator+=(const YUVImageC &)
YUVImageC::SaveAs(ImageOStreamC &,ImageFileFormatT)
YUVImageC::SaveAs(const FilenameC &,ImageFileFormatT)
YUVImageC::ReadData(ImageIStreamC &)
ImageC::Copy(void) const
ImageC::Copy(const ImageC &)
ImageC::Copy(const ImageRectangleC &,const PixelC &)
ImageC::ACopy(void) const
ImageC::AnotherImage(void) const
ImageC::operator=(const ImageC &)
ImageC::ReflectUp(const ImageRectangleC &)
ImageC::ReflectDown(const ImageRectangleC &)
ImageC::ReflectLeft(const ImageRectangleC &)
ImageC::ReflectRight(const ImageRectangleC &)
ImageC::ReflectFrom(const ImageRectangleC &)
ImageC::Rotate90(const ImageC &)
ImageC::Rotate180(const ImageC &)
ImageC::Rotate270(const ImageC &)
ImageC::Rotate(const Point2dC &,RealT,PValueT) const
ImageC::Rotate(const ImageC &,const Point2dC &,RealT,PValueT)
ImageC::ShiftRowIndexes(const IndexT)
ImageC::ShiftColIndexes(const IndexT)
ImageC::Subsample(IntT) const
ImageC::SetOrigin(const PixelC &)
ImageC::Fill(PValueT)
ImageC::Frame(PValueT)
ImageC::Frame(PValueT,const ImageRectangleC &)
ImageC::Pad(const ImageRectangleC &) const
ImageC::IsValid(void) const
ImageC::operator[](IndexT) const
ImageC::operator[](IndexT)
ImageC::operator[](const Index2dC &)
ImageC::operator[](const Index2dC &) const
ImageC::operator[](const PixelC &)
ImageC::operator[](const PixelC &) const
ImageC::CRow(PixelIndexT) const
ImageC::Row(PixelIndexT)
ImageC::Save(ostream &,BooleanT) const
ImageC::Load(istream &,BooleanT)
ImageC::StartAddress(void) const
ImageC::Buffer(void)
ImageC::Buffer(void) const
ImageC::CMemRow(PixelIndexT) const
ImageC::MemRow(PixelIndexT)
ImageC::ErrNotValid(char *) const
ImageC::AllocData(void)
ImageC::AllocData(PValueT *,BooleanT)
ImageC::DeallocAccess(void)
ImageC::DeallocData(void)
ImageC::operator[](PixelIndexT)
ImageC::operator[](PixelIndexT) const
BaseImageC::Rectangle(void) const
BaseImageC::Origin(void) const
BaseImageC::End(void) const
BaseImageC::ImageFileInfo(void) const
BaseImageC::BaseImage(void) const
BaseImageC::BaseImage(void)
BaseImageC::SetRowSubRange(const IndexT,const IndexT)
BaseImageC::SetColSubRange(const IndexT,const IndexT)
BaseImageC::SetSubRange(const ImageRectangleC &)
BaseImageC::SetFullRectangle(void)
BaseImageC::SetImageFileInfo(ImageFileInfoC *)
BaseImageC::IsEmpty(void) const
BaseImageC::ErrDifferentSize(const BaseImageC &,char *) const
BaseImageC::Rnum(void) const
BaseImageC::Cnum(void) const
BaseImageC::TRow(void) const
BaseImageC::LCol(void) const
BaseImageC::BRow(void) const
BaseImageC::RCol(void) const
BaseImageC::Area(void) const
BaseImageC::Count(void) const
BaseImageC::AllocatedRect(void) const
BaseImageC::IsBlock(void) const
BaseImageC::operator=(const BaseImageC &)
BaseImageC::ChangeInfo(ImageFileInfoC *)
BaseImageC::ShiftRows(const IndexT)
BaseImageC::ShiftCols(const IndexT)
BaseImageC::ErrNotInRange(Index2dC,char *) const
BaseImageC::ErrNotInRange(IndexT,char *) const
BaseImageC::ErrNotInAllocRange(IndexT,char *) const
BaseImageC::LoadImageRect(istream &)
RefCounterC::ToBeDeleted(void) const
RefCounterC::Count(void) const
RefCounterC::IsSingleReference(void)
RefCounterC::operator=(const RefCounterC &)
RefCounterC::ToBeDeletedUpdate(const RefCounterC &)
RefCounterC::ReportInvalidObject(char *)
ImageAC::ACopy(void) const
ImageAC::AnotherImage(void) const
ImageAC::Rectangle(void) const
ImageAC::ShiftRowIndexes(const IndexT)
ImageAC::ShiftColIndexes(const IndexT)
ImageAC::SetRowSubRange(const IndexT,const IndexT)
ImageAC::SetColSubRange(const IndexT,const IndexT)
ImageAC::ImageFileInfo(void) const
RefCounterBaseC::Label(void) const
YUVImageC
 
Colour image, in YUV.
 
include "amma/YUVImage.hh"
User Level:Default
Library:ColorImg
Example:exIter.cc
Section:Image.Image Representations
In Scope:std

Parent Classes:

Derived Classes: Methods:
YUVImageC()
empty image

YUVImageC(SizeT rows,SizeT columns)
a new image of the size < 0..rows-1; 0..columns-1 >

YUVImageC(SizeT rows,SizeT columns,ByteYUVValueC * yuv)
a new image of the size < 0..rows-1; 0..columns-1 >

YUVImageC(const ImageRectangleC & rect)
a new image with the index range determined by the rectangle 'rect'

YUVImageC(const YUVImageC & image,const ImageRectangleC & rect)
another access to the part 'rect' of the 'image'

YUVImageC(const YUVImageC & image)
another access to the 'image'

YUVImageC(const ImageC<ByteYUVValueC> & image)
contructing from template image

YUVImageC(ImageIStreamC & inS)
A new image constructed from the stream 'inS'.

YUVImageC(ImageFileInfoC * info,ImageIStreamC & inS)
Creates a new image and read in data from the stream 'inS'.

YUVImageC(const ByteImageC & y)
Creates a new image. The Y component is set according to the image 'y'. The components U and V are set zero.

YUVImageC(const RGBImageC & rgb)
Converts the image 'rgb' into the YUV color space.

YUVImageC(const RealRGBImageC & rgb)
Converts the image 'rgb' into the YUV color space.

YUVImageC(const RealYUVImageC & yuv)
Converts the image 'yuv' into the YUV color space.

YUVImageC(const Point3ImageC & image)
The image is treated as an image of YUV values and it is converted into byte YUV values. If it is necessary values truncated.

ByteImageC RGBChromaticityDiagram(const SizeT resolution) const
get the chromaticity diagram with the specific 'resolution using chromaticity derived from RGB values

ByteImageC XYZChromaticityDiagram(const SizeT resolution) const
get the chromaticity diagram with the specific 'resolution using chromaticity derived from XYZ values

ByteImageC & Y(ByteImageC & image) const
Copy the Y component into the 'image' and return the result. Conversions between color images. ---------------------------------

ByteImageC Y() const
get the Y component of the image

ByteImageC Red() const
get the red component of the image

ByteImageC Green() const
get the green component of the image

ByteImageC Blue() const
get the blue component of the image

DoubleImageC RealY() const
get the Y component of the image

DoubleImageC RealRed() const
get the red component of the image

DoubleImageC RealGreen() const
get the green component of the image

DoubleImageC RealBlue() const
get the blue component of the image

ByteImageC U() const
get the U component of the image

ByteImageC V() const
get the V component of the image

YUVImageC Yuv() const
Creates another handle into the image

RGBImageC Rgb() const
Converts the image into the image of RGB values

RealRGBImageC RealRgb() const
Converts the image into the image of RGB values

RealYUVImageC RealYuv() const
Converts the image into the image of real YUV values

const YUVImageC & YUVImage() const
access to the whole constant image

YUVImageC & YUVImage()
access to the whole image

void Copy(const YUVImageC & image)
Copyies the values of image 'img' into this image.

void Copy(const ImageRectangleC & rect,const PixelC & newOrigin)
Copies the rectangle domain 'rect' of the image into the position 'newOrigin'.

YUVImageC Copy() const
a physical copy of image

ImageAC * ACopy() const
A physical copy of this image.

ImageAC * AnotherImage() const
Creates a new empty image of the same type and size as this image is.

YUVImageC Rotate(const Point2dC & center,RealT angle,ByteYUVValueC background) const
turn the image in the 'angle'. The value outside of the original image are substituted by the value 'background'

YUVImageC ReduceAverage() const
generate the new image which has half ranges the new pixel values are averages of old ones

YUVImageC ReduceSample() const
generate the new image which has half ranges the new pixel values are samples of old ones

void LocalAverage3x3()
Each pixel value is replaced by the average of 3x3 pixel values.

const YUVImageC & operator+=(const YUVImageC & img)
Adds the values of image 'img' to the values of this image.

void SaveAs(ImageOStreamC & outS,ImageFileFormatT format = PPM_P6)
Saves the image into the stream 'outS' using the 'format'

void SaveAs(const FilenameC & fileName,ImageFileFormatT format = PPM_P6)
Saves the image into the file 'fileName' using the 'format'.

void ReadData(ImageIStreamC & inS)
Read pixel values from the input stream 'inS'

#include "amma/Image.hh"
ImageC<ByteYUVValueC> Copy() const
Creates another physical copy of this image.

void Copy(const ImageC<ByteYUVValueC> & image)
Copies the contents of image "img" into this image.

void Copy(const ImageRectangleC & rect,const PixelC & newOrigin)
Copies the region of the image defined by rectangle "rect" into the region whose origin is "newOrigin".

ImageAC * ACopy() const
A physical copy of this image.

ImageAC * AnotherImage() const
Creates a new empty image of the same type and size as this image is.

const ImageC<ByteYUVValueC> & operator=(const ImageC<ByteYUVValueC> & image)
Assigment of a big object.

void ReflectUp(const ImageRectangleC & rect)
Mirrors the image rectangle along its top edge.

void ReflectDown(const ImageRectangleC & rect)
Mirrors the image rectangle along its bottom edge.

void ReflectLeft(const ImageRectangleC & rect)
Mirrors the image rectangle along its left edge.

void ReflectRight(const ImageRectangleC & rect)
Mirrors the image rectangle along its right edge.

void ReflectFrom(const ImageRectangleC & rect)
Mirrors the image rectangle "rect" along its sides to fill the whole image.

void Rotate90(const ImageC<ByteYUVValueC> & originalImage)
The values of image "originalImage" rotated about PI/2 rad and shifted to have the original upper-left corner and are saved into this image.

void Rotate180(const ImageC<ByteYUVValueC> & originalImage)
The values of image "originalImage" rotated about PI rad and shifted to have the original upper-left corner and are saved into this image.

void Rotate270(const ImageC<ByteYUVValueC> & originalImage)
The values of image "originalImage" rotated about 3/2*PI rad and shifted to have the original upper-left corner and are saved into this image.

ImageC<ByteYUVValueC> Rotate(const Point2dC & center,RealT angle,ByteYUVValueC background) const
The values of this image are rotated about "angle" (in rad) and saved to the result image.
Note the AMMA convention that the 1st or "x" coordinate of Point2dC is associated with the image row no., and the 2nd or "y" coordinate with the image column no.

void Rotate(const ImageC<ByteYUVValueC> & originalImage,const Point2dC & center,RealT angle,ByteYUVValueC background)
The values of image "originalImage" rotated about "angle" rad are saved into this image.
Note the AMMA convention that the 1st or "x" coordinate of Point2dC is associated with the image row no., and the 2nd or "y" coordinate with the image column no.

void ShiftRowIndexes(const IndexT offset)
Row indices of the items will be shifted by "offset".
There must be only one reference to this image.
For +ve "offset", the image is shifted down, or the coordinate system is shifted up.

void ShiftColIndexes(const IndexT offset)
Column indices of the items will be shifted by "offset".
There must be only one reference to this image.
For +ve "offset", the image is shifted down, or the coordinate system is shifted up.

ImageC<ByteYUVValueC> Subsample(IntT factor = 2) const
returns an image subsampled by a factor of "factor"

void SetOrigin(const PixelC & newOrigin)
The image coordinates are changed so that the top left pixel will have coordinates of "newOrigin".
There must be only one reference to this image.

Grey level operations.


ImageC<ByteYUVValueC> & Fill(ByteYUVValueC value)
Fills the image with "value"

ImageC<ByteYUVValueC> & Frame(ByteYUVValueC value)
Fills a 1-pixel-wide border around the image with "value"

ImageC<ByteYUVValueC> & Frame(ByteYUVValueC v,const ImageRectangleC & rect)
Fills a 1-pixel-wide rectangle with "v";
the rectangle is the intersection of "this" with "rect".

ImageC<ByteYUVValueC> Pad(const ImageRectangleC & rect) const
Creates a new image whose frame is from "rect", with pixels copied from "this".
Where the new image lies outside "this", it is padded out with the nearest value from "this".

Logical conditions.


BooleanT IsValid() const
Returns FALSE if the image does not have a valid data area allocated

Access to pixels values.


const RangeBufferAccessC<ByteYUVValueC> operator[](IndexT r) const
Access to the row of the row of pixels.

RangeBufferAccessC<ByteYUVValueC> operator[](IndexT r)
Access to the row of the row of pixels.

ByteYUVValueC & operator[](const Index2dC & pxl)
Returns the content of the pixel.

const ByteYUVValueC & operator[](const Index2dC & pxl) const
Returns the content of the pixel.

ByteYUVValueC & operator[](const PixelC & pxl)
Returns the content of the pixel.

const ByteYUVValueC & operator[](const PixelC & pxl) const
Returns the content of the pixel.

const ByteYUVValueC * CRow(PixelIndexT row) const
Access to the beginning of the row, eg. t
The returned pointer points to the first pixel of the "row".

ByteYUVValueC * Row(PixelIndexT row)
Access to the beginning of the constant "row"
I.e. the returned pointer points to the first pixel of "row".

void Save(ostream & outS,BooleanT useHeader = TRUE) const
Saves templated image to stream.
For byte images it will save them in either PGM or PPM binary format. For other types it will save them in ascii if a suitable stream operator has been written for the templated class. NB. These treat images of ByteGreyValueT specialy, the image values are read as numbers not as charactors.

void Load(istream & outS,BooleanT useHeader = TRUE)
Loads templated image type from ascii stream.
Should not be used for binary PGM/PPM files, but should work on most templated types. NB. These treat images of ByteGreyValueT specialy, the image values are written as numbers not as charactors.

ByteYUVValueC ** StartAddress() const
Returns the pointer to the table of pointers to image.
This being public is really only a hack! EXPERTS ONLY!

BufferRC<ByteYUVValueC> & Buffer()
Access buffer where data is stored.

const BufferRC<ByteYUVValueC> & Buffer() const
Access buffer where data is stored.

const ByteYUVValueC * CMemRow(PixelIndexT row) const
Access to the beginning of the constant allocated row
I.e. the returned pointer points to the first pixel of "row".

ByteYUVValueC * MemRow(PixelIndexT row)
Access to the beginning of the allocated row
I.e. the returned pointer points to the first pixel of "row".

Error checking.


void ErrNotValid(char * functionName) const
Triggers the error event if this image does not contain any data.

void AllocData()
Allocates a memory for image.

void AllocData(ByteYUVValueC * value,BooleanT rowInv = false)
Allocates a access vector to the memory with data

void DeallocAccess()
Deallocates the access vector to the memory with data.

void DeallocData()
Deallocates the access vector and the memory containing data.

RangeBufferAccessC<ByteYUVValueC> operator[](PixelIndexT row)

const RangeBufferAccessC<ByteYUVValueC> operator[](PixelIndexT row) const

#include "amma/BasImage.hh"
const ImageRectangleC & Rectangle() const
Returns the image rectangle.

const Index2dC & Origin() const
Returns the upper-left pixel coordinates of the image rectangle.

const Index2dC & End() const
Returns the lower right pixel coordinates of the image rectangle.

const ImageFileInfoC & ImageFileInfo() const
Access to the origin.

const BaseImageC & BaseImage() const
access to the constant object

BaseImageC & BaseImage()
access to the object
Modification of the object --------------------------

void SetRowSubRange(const IndexT newMin,const IndexT newMax)
The range of indexes of the array will be constrained

void SetColSubRange(const IndexT newMin,const IndexT newMax)
The range of indexes of the array will be constrained.

void SetSubRange(const ImageRectangleC & range)
Constrains the domain of the image.

void SetFullRectangle()
Sets the working rectangle to be allocated rectangle of the image.

void SetImageFileInfo(ImageFileInfoC * newInfo)
Sets a new image file information respecting the current size of the image.

BooleanT IsEmpty() const
Returns TRUE if the image has zero size

void ErrDifferentSize(const BaseImageC & image,char * functionName) const
Triggers an error event if this image has different size from `image'.
The functionName should be the name of the function that triggers the error event.

SizeT Rnum() const
Returns number of rows.

SizeT Cnum() const
Returns number of columns.

IndexT TRow() const
Returns the top row index.

IndexT LCol() const
Returns the left side column index.

IndexT BRow() const
Returns the bottom row index.

IndexT RCol() const
Returns the right side column index.

LongIntT Area() const
Returns the area of the image rectangle expressed in number of indexs.

UIntT Count() const
Returns the number of refrences to this object.
NB. The following definition is now obsolete, The value 0 means there is no other reference to this object.

const ImageRectangleC & AllocatedRect() const
Access allocated rectangle.

BooleanT IsBlock() const
Returns TRUE if the image is allocated as one block of memory.

const BaseImageC & operator=(const BaseImageC & image)
Assigment (as a big object).

ImageFileInfoC * ChangeInfo(ImageFileInfoC * newInfo)
Changes the information about the origin of the image.
The function returns the old information.

void ShiftRows(const IndexT offset)
All indexes of the items will be shift by 'offset'.

void ShiftCols(const IndexT offset)
All indexes of the items will be shift by 'offset'.
Error checking. ---------------

void ErrNotInRange(Index2dC i,char * functionName) const
Triggers the error event if the index 'i' is out of the image range.

void ErrNotInRange(IndexT r,char * functionName) const
Triggers the error event if the row 'r' is out of the image range.

void ErrNotInAllocRange(IndexT r,char * functionName) const
Triggers the error event if the row 'r' is out of the allocated image range.

ImageRectangleC LoadImageRect(istream &)
Load image rectangle from stream.
This contains a hack to load the old coloumb/row stream correctly.

#include "amma/RefCount.hh"
BooleanT ToBeDeleted() const
Returns TRUE if the content should be deleted.

RCCountT Count() const
Returns the number of refrences to this object. NB. The following definition is now obsolete, The value 0 means there is no other reference to this object.

BooleanT IsSingleReference()
Tests is there is only one reference to this object.

const RefCounterC & operator=(const RefCounterC & rC)

BooleanT ToBeDeletedUpdate(const RefCounterC & rC)
This function is the condition and the assigment together. It returns TRUE if the content should be deleted before assigning of the new object. The function automatically solves the reference counter of this object as well as the other object reference counter 'rC'.

void ReportInvalidObject(char * Msg = 0)
This function reports an error to the user if a problem is detected in the refrence counting mechanism.

#include "amma/ImageA.hh"
ImageAC * ACopy() const
A physical copy of the image.

ImageAC * AnotherImage() const
Creates a new empty image of the same type and size as this image is.

const ImageRectangleC & Rectangle() const
Returns the working image rectangle.

void ShiftRowIndexes(const IndexT offset)
all indexes of the items will be shift by 'offset'

void ShiftColIndexes(const IndexT offset)
all indexes of the items will be shift by 'offset'

void SetRowSubRange(const IndexT newMin,const IndexT newMax)
the range of indexes of the array will be constrained

void SetColSubRange(const IndexT newMin,const IndexT newMax)
the range of indexes of the array will be constrained

const ImageFileInfoC & ImageFileInfo() const
access to the const origin

#include "amma/RefCBase.hh"
LabelT Label() const
Returns the label of this reference counter.
The member function is useful mainly to recognize objects during debugging. The value of the label is uniquely defined pointer.


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001