DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Media::BayerDecoder Class Reference

Detailed Description

Bayer decoder (demosaicing).

Public Types

enum  Method { METHOD_NEAREST, METHOD_BILINEAR, METHOD_HQLINEAR }
 
enum  Tile { TILE_GBRG, TILE_GRBG, TILE_RGGB, TILE_BGGR }
 

Public Member Functions

 BayerDecoder (Tile tile, Method method=METHOD_BILINEAR)
 
void setMethod (Method method)
 
void decodeToRGB24 (const uint8_t *bayer, uint8_t *rgb, int width, int height) const
 

Member Enumeration Documentation

Decoding method.

Enumerator
METHOD_NEAREST 

Nearest neighbor.

METHOD_BILINEAR 

Bilinear interpolation.

METHOD_HQLINEAR 

High-Quality linear interpolation.

Tile format (2x2 sensor alignment).

Enumerator
TILE_GBRG 
TILE_GRBG 
TILE_RGGB 
TILE_BGGR 

Constructor & Destructor Documentation

DUNE::Media::BayerDecoder::BayerDecoder ( Tile  tile,
Method  method = METHOD_BILINEAR 
)

Constructor.

Parameters
[in]tiletile format of Bayer data.
[in]methodconversion method.

References setMethod(), TILE_BGGR, TILE_GBRG, and TILE_GRBG.

Member Function Documentation

void DUNE::Media::BayerDecoder::decodeToRGB24 ( const uint8_t *  bayer,
uint8_t *  rgb,
int  width,
int  height 
) const
inline

Convert Bayer mosaic to RGB24.

Parameters
[in]bayerbayer mosaic.
[out]rgbRGB24 image.
[in]widthwidth of bayer mosaic.
[in]heightheight of bayer mosaic.
void DUNE::Media::BayerDecoder::setMethod ( Method  method)

Set decoding method.

Parameters
[in]methoddecoding method.

References METHOD_HQLINEAR, and METHOD_NEAREST.

Referenced by BayerDecoder().

Collaboration diagram for DUNE::Media::BayerDecoder:
Collaboration graph