NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
Classes | Typedefs | Enumerations | Functions | Variables
BiometricEvaluation::Image Namespace Reference

Basic information relating to images. More...

Classes

class  BMP
 A BMP-encoded image. More...
 
struct  Coordinate
 A structure to contain a two-dimensional coordinate without a specified origin. More...
 
class  Image
 Represent attributes common to all images. More...
 
class  JPEG
 A JPEG-encoded image. More...
 
class  JPEG2000
 A JPEG-2000-encoded image. More...
 
class  JPEGL
 A Lossless JPEG-encoded image. More...
 
class  NetPBM
 A NetPBM-encoded image. More...
 
class  PNG
 A PNG-encoded image. More...
 
class  Raw
 An image with no encoding or compression. More...
 
struct  Resolution
 A structure to represent the resolution of an image. More...
 
struct  ROI
 A structure to represent a region of interest (ROI), which is a bounding box and a set of coordinates. More...
 
struct  Size
 A structure to represent the size of an image, in pixels. More...
 
class  TIFF
 A TIFF-encoded image. More...
 
class  WSQ
 A WSQ-encoded image. More...
 

Typedefs

using Coordinate = Coordinate
 
using CoordinateSet = std::vector< Image::Coordinate >
 
using Size = Size
 
using Resolution = Resolution
 
using ROI = ROI
 

Enumerations

enum class  CompressionAlgorithm {
  None = 0 , Facsimile = 1 , WSQ20 = 2 , JPEGB = 3 ,
  JPEGL = 4 , JP2 = 5 , JP2L = 6 , PNG = 7 ,
  NetPBM = 8 , BMP = 9 , TIFF = 10
}
 Image compression algorithms. More...
 
enum class  PixelFormat { MonoWhite = 0 , MonoBlack = 1 , Gray8 = 2 , RGB24 = 3 }
 Image pixel formats. More...
 

Functions

std::string to_string (const Coordinate &c)
 Convert Coordinate to std::string. More...
 
std::ostream & operator<< (std::ostream &, const Coordinate &)
 
bool operator== (const Coordinate &lhs, const Coordinate &rhs)
 
bool operator!= (const Coordinate &lhs, const Coordinate &rhs)
 
std::string to_string (const CoordinateSet &coordinates)
 Convert CoordinateSet to std::string. More...
 
std::ostream & operator<< (std::ostream &stream, const CoordinateSet &coordinates)
 Output stream overload for CoordinateSet. More...
 
std::string to_string (const Size &s)
 Convert Size to std::string. More...
 
std::ostream & operator<< (std::ostream &, const Size &)
 
bool operator== (const Size &lhs, const Size &rhs)
 
bool operator!= (const Size &lhs, const Size &rhs)
 
std::string to_string (const Resolution &r)
 Convert Resolution to std::string. More...
 
std::ostream & operator<< (std::ostream &, const Resolution &)
 
bool operator== (const Resolution &lhs, const Resolution &rhs)
 
bool operator!= (const Resolution &lhs, const Resolution &rhs)
 
float distance (const Coordinate &p1, const Coordinate &p2)
 Calculate the distance between two points. More...
 
BiometricEvaluation::Memory::uint8Array removeComponents (const BiometricEvaluation::Memory::uint8Array &rawData, const uint8_t bitDepth, const std::vector< bool > &components)
 Remove components from a decompressed image's raw byte representation. More...
 
std::string to_string (const ROI &r)
 Convert ROI to std::string. More...
 
std::ostream & operator<< (std::ostream &, const ROI &)
 
bool operator== (const ROI &lhs, const ROI &rhs)
 
bool operator!= (const ROI &lhs, const ROI &rhs)
 

Variables

const double CentimetersPerInch = 2.54
 Number of centimeters in one inch. More...
 
const double MillimetersPerInch = CentimetersPerInch * 10
 Number of millimeters in one inch. More...
 

Detailed Description

Basic information relating to images.

Classes and methods for manipulating images.

The Image package gathers all image related matters, including classes to represent an image, coordinates, and functions for conversion between biometric representations.

Typedef Documentation

◆ Coordinate

Definition at line 96 of file be_image.h.

◆ CoordinateSet

Definition at line 112 of file be_image.h.

◆ Size

Definition at line 178 of file be_image.h.

◆ Resolution

Definition at line 265 of file be_image.h.

◆ ROI

Definition at line 376 of file be_image.h.

Enumeration Type Documentation

◆ CompressionAlgorithm

Image compression algorithms.

Enumerator
None 
Facsimile 
WSQ20 
JPEGB 
JPEGL 
JP2 
JP2L 
PNG 
NetPBM 
BMP 
TIFF 

Definition at line 34 of file be_image.h.

◆ PixelFormat

Image pixel formats.

Enumerator
MonoWhite 

1 bit/pixel, 0 is white, 1 = black

MonoBlack 

1 bit/pixel, 0 is black, 1 = white

Gray8 

8-bit gray

RGB24 

8-bit red/8-bit blue/8-bit green

Definition at line 50 of file be_image.h.

Function Documentation

◆ to_string() [1/5]

std::string BiometricEvaluation::Image::to_string ( const Coordinate c)

Convert Coordinate to std::string.

Parameters
cCoordinate to convert to std::string.
Returns
std::string representation of c.

◆ operator<<() [1/5]

std::ostream & BiometricEvaluation::Image::operator<< ( std::ostream &  ,
const Coordinate  
)

◆ operator==() [1/4]

bool BiometricEvaluation::Image::operator== ( const Coordinate lhs,
const Coordinate rhs 
)

◆ operator!=() [1/4]

bool BiometricEvaluation::Image::operator!= ( const Coordinate lhs,
const Coordinate rhs 
)

◆ to_string() [2/5]

std::string BiometricEvaluation::Image::to_string ( const CoordinateSet coordinates)

Convert CoordinateSet to std::string.

Parameters
coordinatesCoordinateSet to convert to std::string.
Returns
std::string representation of coordinates.

◆ operator<<() [2/5]

std::ostream & BiometricEvaluation::Image::operator<< ( std::ostream &  stream,
const CoordinateSet coordinates 
)

Output stream overload for CoordinateSet.

Parameters
[in]streamStream on which to append formatted CoordinateSet information.
[in]coordinatesCoordinateSet information to append to stream.
Returns
stream with a coordinates textual representation appended.

◆ to_string() [3/5]

std::string BiometricEvaluation::Image::to_string ( const Size s)

Convert Size to std::string.

Parameters
sSize to convert to std::string.
Returns
std::string representation of s.

◆ operator<<() [3/5]

std::ostream & BiometricEvaluation::Image::operator<< ( std::ostream &  ,
const Size  
)

◆ operator==() [2/4]

bool BiometricEvaluation::Image::operator== ( const Size lhs,
const Size rhs 
)

◆ operator!=() [2/4]

bool BiometricEvaluation::Image::operator!= ( const Size lhs,
const Size rhs 
)

◆ to_string() [4/5]

std::string BiometricEvaluation::Image::to_string ( const Resolution r)

Convert Resolution to std::string.

Parameters
rResolution to convert to std::string.
Returns
std::string representation of r.

◆ operator<<() [4/5]

std::ostream & BiometricEvaluation::Image::operator<< ( std::ostream &  ,
const Resolution  
)

◆ operator==() [3/4]

bool BiometricEvaluation::Image::operator== ( const Resolution lhs,
const Resolution rhs 
)

◆ operator!=() [3/4]

bool BiometricEvaluation::Image::operator!= ( const Resolution lhs,
const Resolution rhs 
)

◆ distance()

float BiometricEvaluation::Image::distance ( const Coordinate p1,
const Coordinate p2 
)

Calculate the distance between two points.

Parameters
[in]p1First point.
[in]p2Second point.
Returns
Distance between p1 and p2.

◆ removeComponents()

BiometricEvaluation::Memory::uint8Array BiometricEvaluation::Image::removeComponents ( const BiometricEvaluation::Memory::uint8Array rawData,
const uint8_t  bitDepth,
const std::vector< bool > &  components 
)

Remove components from a decompressed image's raw byte representation.

Parameters
[in]rawDataRaw byte representation of an image.
[in]bitDepthThe number of bits that represents a single component in rawData (only 8 and 16 are supported).
[in]componentsA bitset representing the components of the image, where true values represent components to be removed. For example, in a 4-component image where fourth component should be removed, this parameter would be {false, false, false, true}.
Returns
Copy of rawData with true components removed.
Exceptions
BiometricEvaluation::Error::ParameterErrorInvalid bitDepth parameter.
BiometricEvaluation::Error::StrategyErrorrawData does not appear to be sized large enough for the bitsPerComponent and components provided.

◆ to_string() [5/5]

std::string BiometricEvaluation::Image::to_string ( const ROI r)

Convert ROI to std::string.

Parameters
rROI to convert to std::string.
Returns
std::string representation of r.

◆ operator<<() [5/5]

std::ostream & BiometricEvaluation::Image::operator<< ( std::ostream &  ,
const ROI  
)

◆ operator==() [4/4]

bool BiometricEvaluation::Image::operator== ( const ROI lhs,
const ROI rhs 
)

◆ operator!=() [4/4]

bool BiometricEvaluation::Image::operator!= ( const ROI lhs,
const ROI rhs 
)

Variable Documentation

◆ CentimetersPerInch

const double BiometricEvaluation::Image::CentimetersPerInch = 2.54

Number of centimeters in one inch.

Definition at line 268 of file be_image.h.

◆ MillimetersPerInch

const double BiometricEvaluation::Image::MillimetersPerInch = CentimetersPerInch * 10

Number of millimeters in one inch.

Definition at line 270 of file be_image.h.