| Face Engine SDK 5.2.0 A face detection, recognition and tracking engine.

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
fsdk::Format Struct Reference

Image format. More...

`#include <Format.h>`

## Public Types
enum | Type { Unknown, B8G8R8X8, R8G8B8X8, B8G8R8, R8G8B8, R8, R16, IR_X8X8X8, YUV_NV21, YUV_NV12 }
| Format type enumeration. More...

## Public Member Functions
int | getChannelCount () const noexcept
| Get color channel count. More...
int | getChannelStep () const noexcept
| Get channel step. More...
int | getChannelSize () const noexcept
| Get color channel size in bits. More...
int | getBitDepth () const noexcept
| Get number of bits per pixel. More...
int | getByteDepth () const noexcept
| Get number of bytes per pixel. More...
int | computePitch (int rowWidth) const noexcept
| Compute row size in bytes. More...
bool | isPadded () const noexcept
bool | isBGR () const noexcept
bool | isYUV () const noexcept
bool | isBlock () const noexcept
bool | isValid () const noexcept
| Format () noexcept
| Initializes format structure. More...
| Format (Type type) noexcept
| Initializes format structure. More...
| operator Type () const noexcept
| Implicit cast to Type.

## Protected Attributes
Type | m_type
| Format type.

## Detailed Description

Image format.

## Member Enumeration Documentation

enum fsdk::Format::Type

Format type enumeration.

Enumerator
Unknown | unknown format.
B8G8R8X8 | 3 channel, 8 bit per channel, B-G-R color order format with 8 bit padding before next pixel;
R8G8B8X8 | 3 channel, 8 bit per channel, R-G-B color order format with 8 bit padding before next pixel;
B8G8R8 | 3 channel, 8 bit per channel, B-G-R color order format;
R8G8B8 | 3 channel, 8 bit per channel, R-G-B color order format;
R8 | 1 channel, 8 bit per channel format;
R16 | 1 channel, 16 bit per channel format;
IR_X8X8X8 | 3 channel, 8 bit per channel format with InfraRed semantics;
YUV_NV21 | 4:2:0 planar format with a plane of 8-bit Y samples followed by interleaved 2x2 subsampled V/U 8-bit chroma samples(YYYYYYYYVUVU);
YUV_NV12 | 4:2:0 planar format with a plane of 8-bit Y samples followed by interleaved 2x2 subsampled U/V 8-bit chroma samples(YYYYYYYYUVUV).

## Constructor & Destructor Documentation

fsdk::Format::Format | ( |  | ) |
| inline noexcept

Initializes format structure.

Sets format type to Unknown.

fsdk::Format::Format | ( | Type | type | ) |
| inline noexcept

Initializes format structure.

Parameters

  [in] | type | type value to set.

## Member Function Documentation

int fsdk::Format::computePitch | ( | int | rowWidth | ) | const
| inline noexcept

Compute row size in bytes.

Parameters

  [in] | rowWidth | row width in pixels.

Returns
  row size in bytes.

int fsdk::Format::getBitDepth | ( |  | ) | const
| inline noexcept

Get number of bits per pixel.

Returns
  number of bits per pixel.

int fsdk::Format::getByteDepth | ( |  | ) | const
| inline noexcept

Get number of bytes per pixel.

Returns
  number of bytes per pixel.

int fsdk::Format::getChannelCount | ( |  | ) | const
| inline noexcept

Get color channel count.

Returns
  color channel count.

Note
  returns actual color channel count for padded formats; i.e. padding is not a channel.

int fsdk::Format::getChannelSize | ( |  | ) | const
| inline noexcept

Get color channel size in bits.

Returns
  color channel size in bits.

int fsdk::Format::getChannelStep | ( |  | ) | const
| inline noexcept

Get channel step.

Returns
  channel step.

Note
  padding bytes are considered spare channels.

bool fsdk::Format::isBGR | ( |  | ) | const
| inline noexcept

Returns
  true if image format has 3 channels in B-G-R order, false otherwise.

Note
  padding is ignored for padded channels.

bool fsdk::Format::isBlock | ( |  | ) | const
| inline noexcept

Returns
  true if image format is one of block types, i.e. B8G8R8X8_BLOCK.

Note
  this currently is a stub.

bool fsdk::Format::isPadded | ( |  | ) | const
| inline noexcept

Returns
  true if image format has padding bytes.

bool fsdk::Format::isValid | ( |  | ) | const
| inline noexcept

Returns
  true if image format is one of valid types, i.e. not Unknown.

bool fsdk::Format::isYUV | ( |  | ) | const
| inline noexcept

Returns
  true if image format is in YUV color encoding system.

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

- include/fsdk/Types/Format.h