FbsImage.h File Reference

Describes the FbsImageHandle, a wrapper for image data that also provides a series of image functions. More...

#include "FbsTypes.h"
#include "FbsCommon.h"
#include "FbsLandmarkList.h"
#include "FoundationBridgeSDKDll.h"

Typedefs

typedef ImageStruct * FbsImageHandle
typedef
WriteImageDescriptorStruct * 
FbsWriteImageDescriptorHandle

Functions

FbsImageHandle fbsCreateImage ()
bool fbsDestroyImage (FbsImageHandle &handle)
bool fbsImageRead (FbsImageHandle handle, const char *filename)
bool fbsImageLoadRaw (FbsImageHandle handle, const char *dataPtr, int w, int h, FBSImageChannelSequence channelSequence, FBSImageDataOrder dataOrder)
bool fbsImageReadMem (FbsImageHandle handle, const char *blobPtr, int blobSizeA, FBSuint64 checksum)
bool fbsImageReadBlob (FbsImageHandle handle, FbsBlobHandle blob, FBSuint64 checksum)
bool fbsImageGetHeight (FbsImageHandle handle, int &height)
bool fbsImageGetWidth (FbsImageHandle handle, int &width)
bool fbsImageGetBitCount (FbsImageHandle handle, int &bitCount)
bool fbsImageWriteBlob (FbsImageHandle handle, FBSImageFormat formatA, FbsWriteImageDescriptorHandle writeImageDesc, FbsBlobHandle &blob)
FbsWriteImageDescriptorHandle fbsCreateWriteImageDescriptor ()
bool fbsDestroyWriteImageDescriptor (FbsWriteImageDescriptorHandle &descHandle)
bool fbsWriteImageDescriptorSetCompressionQuality (FbsWriteImageDescriptorHandle descHandle, FBSImageFormat format, unsigned int uQuality)
bool fbsWriteImageDescriptorSetCompressionRatio (FbsWriteImageDescriptorHandle descHandle, FBSImageFormat format, float fCompressionRatio)
bool fbsWriteImageDescriptorSetNumberOfRegions (FbsWriteImageDescriptorHandle descHandle, FBSImageFormat format, int nNumRegions)
bool fbsWriteImageDescriptorSetMaximumDataSize (FbsWriteImageDescriptorHandle descHandle, FBSImageFormat format, int nMaxDataSize)
bool fbsImageGetGrayscaleBlob (FbsImageHandle handle, FbsBlobHandle &grayscaleBlob)
bool fbsImageGetRgbBlob (FbsImageHandle handle, FbsBlobHandle &rgbBlob)
bool fbsImageGenerateToken (FbsImageHandle handle, FbsLandmarkListHandle landmarks, int tokenImageWidth, FbsImageHandle &token)
bool fbsImageWriteJpegTokenBlob (FbsImageHandle handle, FbsWriteImageDescriptorHandle writeImageDesc, FbsBlobHandle &blob)
bool fbsImageCrop (FbsImageHandle handle, int outW, int outH, int inX1, int inY1, int inX2, int inY2, int outX1, int outY1, int outX2, int outY2, FbsImageHandle &cropped)


Detailed Description

Describes the FbsImageHandle, a wrapper for image data that also provides a series of image functions.

The FbsImageHandle can load in image data from any format specified by the FBSImageFormat enumerator. Writing to any one of these formats is also supported. Acessor functions to retrieve image information such as dimensions and format are provided as well. There are also functions that allow the creation of modified images, token images, rotated images, etc. Finally FbsWriteImageDescriptorHandle has been provided to store all of the output options that would be used when saving image to a specified format.

Copyright 2008:
L1 Identiy Solutions
Project:
Foundation Bridge
Language and Compiler:
C, tested with Microsoft Visual C++ 8.0 SP1

Typedef Documentation

typedef ImageStruct* FbsImageHandle

Handle to image wrapper structure.

typedef WriteImageDescriptorStruct* FbsWriteImageDescriptorHandle

Handle to structure describing all output format options (compression quality, etc). One can reuse the same FbsWriteImageDescriptorHandle repeatedly for multiple image saves.


Function Documentation

FbsImageHandle fbsCreateImage (  ) 

Creates an empty FbsImageHandle

Returns:
FbsImageHandle

FbsWriteImageDescriptorHandle fbsCreateWriteImageDescriptor (  ) 

Create an empty FbsWriteImageDescriptorHandle with default settings. This descriptor in used to store all possible parameters controlling the saving of an image to any specified format. Tthe same FbsWriteImageDescriptorHandle can be used multiple times.

Returns:
FbsWriteImageDescriptor

bool fbsDestroyImage ( FbsImageHandle &  handle  ) 

Destroy an FbsImageHandle. The incoming handle reference will be set to 0.

Parameters:
handle FbsImageHandle to be destroyed. Reference will be set to 0. If this handle was retrieved from a function such as fbsImageCollectionGetImage, the handle is considered to be controlled by the FbsImageCollection and is considered read-only. All modification and destroy functions will return false.

bool fbsDestroyWriteImageDescriptor ( FbsWriteImageDescriptorHandle &  descHandle  ) 

Destroy FbsWriteImageDescriptorHandle

Parameters:
descHandle FbsWriteImageDescriptorHandle to be destroyed. All FbsWriteImageDescriptorHandle created by fbsCreateWriteImageDescriptor should be destroyed eventually by calling this function.

bool fbsImageCrop ( FbsImageHandle  handle,
int  outW,
int  outH,
int  inX1,
int  inY1,
int  inX2,
int  inY2,
int  outX1,
int  outY1,
int  outX2,
int  outY2,
FbsImageHandle &  cropped 
)

Create a cropped image - rotate, scale and transform (affine)

Parameters:
handle the handle of the original image
outW the width of the output image
outH the height of the output image
inX1 the x coordinate of the first point in the input
inY1 the y coordinate of the first point in the input
inX2 the x coordinate of the second point in the input
inY2 the y coordinate of the second point in the input
outX1 the x coordinate of the pointer that the first point in the input is projected to
outY1 the y coordinate of the pointer that the first point in the input is projected to
outX2 the x coordinate of the pointer that the second point in the input is projected to
outY2 the y coordinate of the pointer that the second point in the input is projected to
cropped the handle of the output cropped image

bool fbsImageGenerateToken ( FbsImageHandle  handle,
FbsLandmarkListHandle  landmarks,
int  tokenImageWidth,
FbsImageHandle &  token 
)

Create a token face image

Parameters:
handle the handle of the original image
landmarks the handle of the landmark list containing eye positions in the original image
tokenImageWidth the token image width
token the handle of the output token image

bool fbsImageGetBitCount ( FbsImageHandle  handle,
int &  bitCount 
)

Retrieve the bit count of the image

Parameters:
handle FbsImageHandle to be queried
bitCount image bit count will be returned

bool fbsImageGetGrayscaleBlob ( FbsImageHandle  handle,
FbsBlobHandle &  grayscaleBlob 
)

Retrieve the grayscale data into the given Blob

Parameters:
handle the handle of the image
grayscaleBlob the handle of the output grayscale blob

bool fbsImageGetHeight ( FbsImageHandle  handle,
int &  height 
)

Retrieve the height of the image

Parameters:
handle FbsImageHandle to be queried
height image height will be returned

bool fbsImageGetRgbBlob ( FbsImageHandle  handle,
FbsBlobHandle &  rgbBlob 
)

Retrieve the RGB data into the given Blob

Parameters:
handle the handle of the image
rgbBlob the handle of the output grayscale blob

bool fbsImageGetWidth ( FbsImageHandle  handle,
int &  width 
)

Retrieve the width of the image

Parameters:
handle FbsImageHandle to be queried
width image width will be returned

bool fbsImageLoadRaw ( FbsImageHandle  handle,
const char *  dataPtr,
int  w,
int  h,
FBSImageChannelSequence  channelSequence,
FBSImageDataOrder  dataOrder 
)

Load image from raw data blob. Image data is unformatted bitmap.

See also:
FBSImageChannelSequence
Parameters:
handle destination FbsImageHandle which will house the image
dataPtr source pointer to the raw image data
w the width of the image
h the height of the image
channelSequence FBSImageChannelSequence specifying for now grayscale and RGB.
dataOrder FBSImageDataOrder specifiying if RGB data is stored (RRRRR...GGGG..BBBBB or RGBRGBRGBRGB...RGBRGB)

bool fbsImageRead ( FbsImageHandle  handle,
const char *  filename 
)

Read an image from the file system.

Parameters:
handle destination FbsImageHandle which will now house the image stored in the file.
filename source path to image file to be read in.

bool fbsImageReadBlob ( FbsImageHandle  handle,
FbsBlobHandle  blob,
FBSuint64  checksum 
)

Reads formatted image data (e.g. jpeg blobs) from FbsBlobHandle

Parameters:
handle destination FbsImageHandle which will house the image
blob source FbsBlobHandle comntaining the formatted image data
checksum checksum of source data blob. If data blob is found to be inconsistent with this checksum false will be returned. Pass in 0 if no check is required.

bool fbsImageReadMem ( FbsImageHandle  handle,
const char *  blobPtr,
int  blobSizeA,
FBSuint64  checksum 
)

Reads streamed formatted image data (e.g. jpeg blobs).

Parameters:
handle destination FbsImageHandle which will house the image
blobPtr pointer to the source image data
blobSizeA the size of the source image data
checksum checksum of source data blob. If data blob is found to be inconsistent with this checksum false will be returned. Pass in 0 if no check is required.

bool fbsImageWriteBlob ( FbsImageHandle  handle,
FBSImageFormat  formatA,
FbsWriteImageDescriptorHandle  writeImageDesc,
FbsBlobHandle &  blob 
)

Write the image data to the given FbsBlobHandle

Parameters:
handle source FbsImageHandle which houses the image
writeImageDesc FbsWriteImageDescriptor which specifies the output parameters for the written image
blob destination FbsBlobHandle which will contain all of the FbsIdRecordHandle contents as a data blob. FbsBlobHandle does not need to be created by calling fbsCreateBlob, but if it isn't it should be set equal to 0.
FbsBlobHandle fblobHandle= 0;

fbsImageWriteBlob(fbsImageHandleL, FBSImageFormatJpegC, writeImageDescM, fblobHandle);

OR

FbsBlobHandle fblobHandle= fbsCreateBlob();

fbsImageWriteBlob(fbsImageHandleL, FBSImageFormatJpegC, writeImageDescM, fblobHandle);

In either case call fbsDestroyBlob when done.

bool fbsImageWriteJpegTokenBlob ( FbsImageHandle  handle,
FbsWriteImageDescriptorHandle  writeImageDesc,
FbsBlobHandle &  blob 
)

Write the token image to a blob in Jpeg ROI compressed format

Parameters:
handle the handle of the original token image
writeImageDesc FbsWriteImageDescriptor which specifies the output parameters for the written token image
blob destination FbsBlobHandle which will contain Jpeg ROI compressed data. FbsBlobHandle does not need to be created by calling fbsCreateBlob, but if it isn't it should be set equal to 0.

bool fbsWriteImageDescriptorSetCompressionQuality ( FbsWriteImageDescriptorHandle  descHandle,
FBSImageFormat  format,
unsigned int  uQuality 
)

Set the compression quality parameter in an FbsWriteImageDescriptorHandle. Parameter used for JPEG images.

Parameters:
descHandle FbsWriteImageDescriptorHandle to be modified
format specifies FBSImageFormat that this compression quality value will be used with
uQuality compression quality value with a range of 0 to 100 for jpeg. Different formats may support different ranges.
Returns:
bool returns false if compression quality parameter is not compatible wth the image format specified or if value specified is out of range.

bool fbsWriteImageDescriptorSetCompressionRatio ( FbsWriteImageDescriptorHandle  descHandle,
FBSImageFormat  format,
float  fCompressionRatio 
)

Set the compression ratio parameter in an FbsWriteImageDescriptorHandle. Parameter used for JPEG2000 and WSQ images.

Parameters:
descHandle FbsWriteImageDescriptorHandle to be modified
format specifies FBSImageFormat that this compression ratio value will be used with
fCompressionRatio compression ratio with a range of 0 to 1.
Returns:
bool returns false if compression ratio parameter is not compatible wth the image format specified or if value specified is out of range.

bool fbsWriteImageDescriptorSetMaximumDataSize ( FbsWriteImageDescriptorHandle  descHandle,
FBSImageFormat  format,
int  nMaxDataSize 
)

Set the max data size parameter in an FbsWriteImageDescriptorHandle. Parameter used for JPEG Token images.

Parameters:
descHandle FbsWriteImageDescriptorHandle to be modified
format specifies FBSImageFormat that this maximum data size value will be used with
nMaxDataSize number of regions with a range of 0 to 3.
Returns:
bool

bool fbsWriteImageDescriptorSetNumberOfRegions ( FbsWriteImageDescriptorHandle  descHandle,
FBSImageFormat  format,
int  nNumRegions 
)

Set the number of regions parameter in an FbsWriteImageDescriptorHandle. Parameter used for JPEG Token images.

Parameters:
descHandle FbsWriteImageDescriptorHandle to be modified
format specifies FBSImageFormat that this number of regions value will be used with
nNumRegions number of regions with a range of 0 to 3.
Returns:
bool returns false if the number of regions is out of range.


Generated on Wed Jun 17 16:45:08 2009 for ABIS Foundation SDK by  doxygen 1.5.8