Nail to Nail Fingerprint Capture Challenge
API for participant-specific one-to-many template generation and template matching.
Public Member Functions | List of all members
BiometricEvaluation::Image::Raw Class Reference

An image with no encoding or compression. More...

#include <be_image_raw.h>

+ Inheritance diagram for BiometricEvaluation::Image::Raw:

Public Member Functions

 Raw (const uint8_t *data, const uint64_t size, const Size dimensions, const uint32_t colorDepth, const uint16_t bitDepth, const Resolution resolution, const bool hasAlphaChannel, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
 
 Raw (const BiometricEvaluation::Memory::uint8Array &data, const Size dimensions, const uint32_t colorDepth, const uint16_t bitDepth, const Resolution resolution, const bool hasAlphaChannel, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
 
Memory::uint8Array getRawData () const
 Accessor for the raw image data. More...
 
Memory::uint8Array getRawGrayscaleData (uint8_t depth) const
 Accessor for decompressed data in grayscale. More...
 
- Public Member Functions inherited from BiometricEvaluation::Image::Image
 Image (const uint8_t *data, const uint64_t size, const Size dimensions, const uint32_t colorDepth, const uint16_t bitDepth, const Resolution resolution, const CompressionAlgorithm compression, const bool hasAlphaChannel, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
 Parent constructor for all Image classes. More...
 
 Image (const uint8_t *data, const uint64_t size, const CompressionAlgorithm compression, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
 Parent constructor for all Image classes. More...
 
CompressionAlgorithm getCompressionAlgorithm () const
 Accessor for the CompressionAlgorithm of the image. More...
 
Resolution getResolution () const
 Accessor for the resolution of the image. More...
 
Memory::uint8Array getData () const
 Accessor for the image data. More...
 
virtual Memory::uint8Array getRawData (const bool removeAlphaChannelIfPresent) const
 Accessor for the raw image data. More...
 
Size getDimensions () const
 Accessor for the dimensions of the image in pixels. More...
 
uint32_t getColorDepth () const
 Accessor for the color depth of the image in bits. More...
 
uint16_t getBitDepth () const
 Accessor for the number of bits per color component. More...
 
bool hasAlphaChannel () const
 Accessor for the presence of an alpha channel. More...
 
statusCallback_t getStatusCallback () const
 Get handle to status callback function. More...
 
std::string getIdentifier () const
 Obtain the assigned image identifier. More...
 

Additional Inherited Members

- Public Types inherited from BiometricEvaluation::Image::Image
using statusCallback_t = std::function< void(const Framework::Status)>
 
- Static Public Member Functions inherited from BiometricEvaluation::Image::Image
static uint64_t valueInColorspace (uint64_t color, uint64_t maxColorValue, uint8_t depth)
 Calculate an equivalent color value for a color in an alternate colorspace. More...
 
static std::shared_ptr< ImageopenImage (const uint8_t *data, const uint64_t size, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
 Determine the image type of a buffer of image data and create an Image object. More...
 
static std::shared_ptr< ImageopenImage (const Memory::uint8Array &data, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
 Determine the image type of a buffer of image data and create an Image object. More...
 
static std::shared_ptr< ImageopenImage (const std::string &path, const statusCallback_t &statusCallback=Image::defaultStatusCallback)
 Determine the image type of an image file and create an Image object. More...
 
static CompressionAlgorithm getCompressionAlgorithm (const uint8_t *data, const uint64_t size)
 Determine the compression algorithm of a buffer of image data. More...
 
static CompressionAlgorithm getCompressionAlgorithm (const Memory::uint8Array &data)
 Determine the compression algorithm of a buffer of image data. More...
 
static CompressionAlgorithm getCompressionAlgorithm (const std::string &path)
 Determine the compression algorithm of a file. More...
 
static BiometricEvaluation::Image::Raw getRawImage (const std::shared_ptr< BiometricEvaluation::Image::Image > &image)
 Obtain Image::Raw version of an Image::Image. More...
 
static void defaultStatusCallback (const Framework::Status &status)
 Default handling of statuses sent from image processing libraries. More...
 
- Protected Member Functions inherited from BiometricEvaluation::Image::Image
void setResolution (const Resolution resolution)
 Mutator for the resolution of the image . More...
 
void setDimensions (const Size dimensions)
 Mutator for the dimensions of the image in pixels. More...
 
void setColorDepth (const uint32_t colorDepth)
 Mutator for the color depth of the image in bits. More...
 
void setBitDepth (const uint16_t bitDepth)
 Mutator for the number of bits per component for color components in the image, in bits. More...
 
const uint8_t * getDataPointer () const
 
uint64_t getDataSize () const
 
void setHasAlphaChannel (const bool hasAlphaChannel)
 Mutator for the presence of an alpha channel. More...
 

Detailed Description

An image with no encoding or compression.

Member Function Documentation

◆ getRawData()

Memory::uint8Array BiometricEvaluation::Image::Raw::getRawData ( ) const
virtual

Accessor for the raw image data.

The data returned should not be compressed or encoded.

@important Bit depth of data returned from this method is at least 8. If getBitDepth() < 8, data is losslessly converted to use 8 bits to represent a single color channel.

Returns
AutoArray holding raw image data.
Exceptions
Error::DataErrorError decompressing image data.

Implements BiometricEvaluation::Image::Image.

◆ getRawGrayscaleData()

Memory::uint8Array BiometricEvaluation::Image::Raw::getRawGrayscaleData ( uint8_t  depth) const
virtual

Accessor for decompressed data in grayscale.

Parameters
depthThe desired bit depth of the resulting raw image. This value may either be 16, 8, or 1.
Returns
AutoArray holding raw grayscale image data.
Exceptions
Error::DataErrorError decompressing image data.
Error::NotImplementedUnsupported conversion based on source color depth.
Error::ParameterErrorInvalid value for depth.
Note
This method does not save a cached copy of the decompressed image because the bit depth of the image can be changed between calls.
When depth is 1, this method returns an image that uses 8 bits to represent a single pixel. The depth parameter is used to adjust the number of gray levels. When depth is 1, there are only 2 gray levels (black and white), despite using 8 bits to represent each pixel.
Alpha channels are completely ignored when converting to grayscale.

Implements BiometricEvaluation::Image::Image.