LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::bayerDemosaicing Class Reference

This functor makes a color interpolation of common BAYER Patterns used in digital cameras. More...

#include <ltiBayerDemosaicing.h>

Inheritance diagram for lti::bayerDemosaicing:
Inheritance graph
[legend]
Collaboration diagram for lti::bayerDemosaicing:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 The parameters for the class bayerDemosaicing. More...

Public Types

enum  eBayerPattern {
  NoBayer, RGGB, BGGR, GBRG,
  GRBG
}
enum  eBayerMethod { Simple, NearestNeighbor }

Public Member Functions

 bayerDemosaicing ()
 bayerDemosaicing (const parameters &par)
 bayerDemosaicing (const bayerDemosaicing &other)
virtual ~bayerDemosaicing ()
virtual const char * getTypeName () const
bool apply (const matrix< ubyte > &src, matrix< rgbPixel > &dest) const
bayerDemosaicingcopy (const bayerDemosaicing &other)
bayerDemosaicingoperator= (const bayerDemosaicing &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

This functor makes a color interpolation of common BAYER Patterns used in digital cameras.


Member Enumeration Documentation

Enumeration of supported interpolation methods.

Enumerator:
Simple 

Do averaging of two green values per pixel.

NearestNeighbor 

Take the nearest (vertical) green value for each pixel.

In a Bayer pattern there are three different color filters used in front of the actual pixels of the CCD chip.

They have the colors red(R), green(G), and blue(B). On a 2x2 grid of pixels two are always green and these always lie on a diagonal. This results in four possible constellations for the three colors.

If NoBayer is chosen then no demosaicing takes place. This makes sense for mono cameras or to avoid demosaicing.

Enumerator:
NoBayer 

no Bayer pattern used, no demosaicing, mono camera

RGGB 

Red, Green in first row, Green, Blue in second.

BGGR 

Blue, Green in first row, Green, Red in second.

GBRG 

Green, Blue in first row, Red, Green in second.

GRBG 

Green, Red in first row, Blue, Green in second.


Constructor & Destructor Documentation

lti::bayerDemosaicing::bayerDemosaicing (  ) 

Default constructor.

lti::bayerDemosaicing::bayerDemosaicing ( const parameters par  ) 

Construct a functor using the given parameters.

lti::bayerDemosaicing::bayerDemosaicing ( const bayerDemosaicing other  ) 

Copy constructor.

Parameters:
other the object to be copied
virtual lti::bayerDemosaicing::~bayerDemosaicing (  )  [virtual]

Destructor.


Member Function Documentation

bool lti::bayerDemosaicing::apply ( const matrix< ubyte > &  src,
matrix< rgbPixel > &  dest 
) const

operates on a copy of the given parameters.

Parameters:
src matrix<ubyte> with the source data.
dest matrix<ubyte> where the result will be left.
Returns:
true if apply successful or false otherwise.
virtual functor* lti::bayerDemosaicing::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Implements lti::functor.

bayerDemosaicing& lti::bayerDemosaicing::copy ( const bayerDemosaicing other  ) 

Copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

const parameters& lti::bayerDemosaicing::getParameters (  )  const

Returns used parameters.

Reimplemented from lti::transform.

virtual const char* lti::bayerDemosaicing::getTypeName (  )  const [virtual]

Returns the name of this type ("bayerDemosaicing").

Reimplemented from lti::transform.

bayerDemosaicing& lti::bayerDemosaicing::operator= ( const bayerDemosaicing other  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.


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

Generated on Sat Apr 10 15:27:02 2010 for LTI-Lib by Doxygen 1.6.1