INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydroimage::ImageFormat Class Reference

An class that represents a particular image format and all of the information needed by various algorithms to work with it. More...

#include <formats.h>

Inherited by hydroimage::BayerBG8, hydroimage::BayerGB8, hydroimage::BayerGR8, hydroimage::BayerRG8, hydroimage::BGR8, hydroimage::BGRA8, hydroimage::GRAY8, hydroimage::RAW8, hydroimage::RGB8, and hydroimage::RGBA8.

List of all members.

Static Public Member Functions

static ImageFormat find (const std::string &format)
 Given the input string, the particular image format object will be returned which in turn can be queried about particular properties.

Protected Member Functions

 ImageFormat (std::string formatString, unsigned int channels, unsigned int bits, unsigned int bytes)
 Each particular image format class will call this constructor which automatically adds this to the list of known formats.

Static Protected Member Functions

static void initialize ()
 Instantiates all the classes representing each of the formats This will add each format to the list of known formats that can be queried.
static void add (ImageFormat formatObject)
 add the image format to the list of known formats

Detailed Description

An class that represents a particular image format and all of the information needed by various algorithms to work with it.

The class will return the properties (such as depth and number of channels) of an image format given a representative string. Typical usage:

#include <hydroimage/formats.h>
// ... other code
string format = "RGB8";
ImageFormat imageFormat = ImageFormat::find( format );
int numChannels = imageFormat.getNumberOfChannels();
        

Constructor & Destructor Documentation

ImageFormat::ImageFormat ( std::string  formatString,
unsigned int  channels,
unsigned int  bits,
unsigned int  bytes 
) [protected]

Each particular image format class will call this constructor which automatically adds this to the list of known formats.

Parameters:
[in] formatString string defining the image format
[in] channels number of channels eg. RGB has 3 channels
[in] bits number of bits per pixel eg. RGB has 8 bits per channel so has 24 bits per pixel
[in] bytes number of bytes ber pixel = bits/8
Returns:
The particular image format object that is defined by the input string

References add().


The documentation for this class was generated from the following files:
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5