Main Page | Alphabetical List | Class List | File List | Class Members | File Members

_SimplePixelImage Struct Reference

A simple data type to store computer images. More...

#include <SimplePixelImage.h>

List of all members.

Public Attributes

ImageType SimplePixelImageType
 Image type BW, RGB, HUE,...

PixelSize SinglePixelSize
 Structure containing memory size of the pixel.

PixelPlaneucPlanesArray
 Holds image pixels planes.

unsigned uNumCols
 Number of image columns.

unsigned uNumRows
 Number of image rows.

unsigned uPlanesNumber
 Number of image planes.


Detailed Description

A simple data type to store computer images.

This structure data type can hold any pixel image.
It is only needed to initialize in a appropriate manner this structure and save the pixels information in ucPlanesArray array of planes.
Nevertheless there is a completely straightforward way to store Portable Map files image ( .ppm , .pgm ,...) into SimplePixelImage data type: through readPortableMapToSimplePixelImage.

How is stored the information of a pixel:
Every pixel is characterized by a pair of integers $ (row, col) $, which are its position expressed in rows and columns. In addition each pixels contains a certain colour information which is usually expressed as a vector with different components: RGB $ (r, g, b) $, CMYK $ (c, m, y, k) $, ...
Gathering together the same component of every pixel, a plane (matrix) is defined where each point coordinates are the pixels coordinates $ (row, col) $ and the value of each point is the component value. Thus the image is descomposed in as many planes as pixel components, each plane of the same dimension as the image dimension.
For Instance:
In an RGB image every pixel has 3 components $ (r, g, b) $. If we take apart The $ r $ component of each RGB pixel. We have a plane where every $ (row, col) $ position holds the $ r $ value of the corresponding red component of the pixel. Repeating the process for the GREEN and BLUE components we have de RGB image decomposed in 3 planes.


The documentation for this struct was generated from the following file:
Generated on Wed Jul 14 17:25:05 2004 for Segmentation by doxygen 1.3.7