FbsImageCollection.h File Reference

Describes the FbsImageCollectionHandle, a packet of FbsImageHandle each associated with an FbsImageDescriptorHandle. More...

#include "FbsTypes.h"
#include "FbsImage.h"
#include "FbsImageDescriptor.h"
#include "FoundationBridgeSDKDll.h"

Typedefs

typedef ImageCollectionStruct * FbsImageCollectionHandle

Functions

FbsImageCollectionHandle fbsCreateImageCollection ()
bool fbsDestroyImageCollection (FbsImageCollectionHandle &handle)
bool fbsImageCollectionAddImage (FbsImageCollectionHandle handle, FBSuint64 sampleId, FbsImageHandle &imageRef, FbsImageDescriptorHandle &imageDescriptorRef)
bool fbsImageCollectionGetImage (FbsImageCollectionHandle handle, FBSuint64 sampleId, FbsImageHandle &imageRef)
bool fbsImageCollectionGetImageDescriptor (FbsImageCollectionHandle handle, FBSuint64 sampleId, FbsImageDescriptorHandle &descHandleRef)
bool fbsImageCollectionGetSampleId (FbsImageCollectionHandle handle, int index, FBSuint64 &sampleId)
bool fbsImageCollectionGetSize (FbsImageCollectionHandle handle, int &size)
bool fbsImageCollectionGetStatus (FbsImageCollectionHandle handle, FbsStatus &status)
bool fbsImageCollectionGetModalityQuality (FbsImageCollectionHandle handle, FbsModality modality, FbsQualityHandle &qualityHandle)


Detailed Description

Describes the FbsImageCollectionHandle, a packet of FbsImageHandle each associated with an FbsImageDescriptorHandle.

The FbsImageCollectionHanlde is used as the main input to template creation. After template creation the resulting FbsIdRecordHandle can be used directly as input to an FbsTemplateMatcherHandle. As such, the interface for adding and FbsImageHandle to an FbsImageCollectionHandle takes in a sampleId is used to uniquely identify each image withing the collection. If the FbsIdRecordHandle is directly added to the FbsTemplateMatcherHandle the sampleId are preserved. If the individual algorithmic template blocks are serialized out then the sampleIds are not preserved and one may use default or dummy sampleIds.

Besides being a method of collating a set of different images from possibly different modalities, the FbsImageCollectionHanlde module has a series of accessor functions to access the individual FbsImageHandle and FbsImageDescriptorHandle post template creation. This is important when information about the template creation needs to be assesed or retrieved. For instance, eye location information can be retrieved from the FbsImageDescriptorHandle of a specific image given its sampleId.

As far as memory allocation/deallocation paradigms, please remember the following rules.

2: If an input handle is passed by reference, there is no need to call destroy on that handle anymore. That handle is now considered the property of some other module or handle. To emphasize this point the reference will be set to 0, so the variable in the client code will be set to 0, emphasizing the loss of control for that handle. Adding a FbsImageHandle to another FbsImageCollectionHandle is considered a modification function.

The above rules are especially important when retrieving the FbsImageDescriptorHandle and the FbsImageHandle from an FbsImageCollectionHandle. The returned handles should not be destroyed or modified with any of the modification function. The modification functions will all return an error but the accessor functions should work as described.

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

Typedef Documentation

typedef ImageCollectionStruct* FbsImageCollectionHandle

Stores a colletion of FbsImageHandle. Is added to the FbsTemplateCreatorHandle to generate an FbsIdRecordHandle.


Function Documentation

FbsImageCollectionHandle fbsCreateImageCollection (  ) 

bool fbsDestroyImageCollection ( FbsImageCollectionHandle &  handle  ) 

Destroy an FbsImageCollectionHandle

Parameters:
handle FbsImageCollectionHandle to be destroyed. Reference will be set to 0.

bool fbsImageCollectionAddImage ( FbsImageCollectionHandle  handle,
FBSuint64  sampleId,
FbsImageHandle &  imageRef,
FbsImageDescriptorHandle &  imageDescriptorRef 
)

Adds the given FbsImageHandle and FbsImageDescriptorHandle to the FbsImageCollectionHandle. The unique sampleId can be used later to retrieve either the FbsImageHandle or FbsImageDescriptorHandle from the FbsImageCollectionHandle

Parameters:
handle destination FbsImageCollectionHandle which will house this image and descriptor
sampleId the id of this sample. This has to be unique for this modality and instance within this FbsImageCollectionHandle.
imageRef reference to the FbsImageHandle that will be stored in this FbsImageCollectionHandle, The ownership will moved to collection and the reference will set to 0
imageDescriptorRef reference to the FbsImageDescriptorHandle that will be stored in this FbsImageCollectionHandle The ownership will moved to collection and the reference will set to 0

bool fbsImageCollectionGetImage ( FbsImageCollectionHandle  handle,
FBSuint64  sampleId,
FbsImageHandle &  imageRef 
)

Returns the FbsImageHandle of the given sample id. The ownership is still in the image collection. No modification or destroy functions should be called on this handle.

Parameters:
handle source FbsImageCollectionHandle which houses this image
sampleId the sampleId of the FbsImageHandle which should be returned
imageRef the FbsImageHandle to the internal image Returns a read-only reference to the internal data and not a copy, do not destroy or call modification function on this handle. If you destroy the collection, the handle is invalid.

bool fbsImageCollectionGetImageDescriptor ( FbsImageCollectionHandle  handle,
FBSuint64  sampleId,
FbsImageDescriptorHandle &  descHandleRef 
)

Returns the FbsImageDescriptorHandle of the given sample id. The ownership is still in the image collection. No modification or destroy functions should be called on this handle.

Parameters:
handle source FbsImageCollectionHandle which houses this image descriptor
sampleId the sampleId of the image whose FbsImageDescriptorHandle should be returned
descHandleRef the FbsImageDescriptorHandle to the the internal image descriptorReturns oa read-only reference to the internal image descriptor, do not destroy or call modification function on this handle. If you destroy the collection, the handle is invalid.

bool fbsImageCollectionGetModalityQuality ( FbsImageCollectionHandle  handle,
FbsModality  modality,
FbsQualityHandle &  qualityHandle 
)

Returns the overall score (minimum) of all samples of the specified modality. You must call this *after* the call to fbsTemplateCreatorCreateTemplates. To get the overall quality returned by this function, call fbsQualityGetOverallQualityResult for the returned FbsQualityHandle.

Parameters:
handle source FbsImageCollectionHandle
modality the modality of the images for which the overall score will be returned.
qualityHandle the FbsQualityHandle that contains the overall quality Returns a reference to the internal quality handle, do not destroy or call any modification functions on this handle. Modification and destroy function will return error if client attempts to do so

bool fbsImageCollectionGetSampleId ( FbsImageCollectionHandle  handle,
int  index,
FBSuint64 &  sampleId 
)

Returns the sample id of the given index.

Parameters:
handle source FbsImageCollectionHandle
index index of sampleId to be returned. Range is 0 to fbsImageCollectionGetSize-1.
sampleId output parameter specifying the sampleId for this index. SampleId can be used to retrieve from the collection the specific FbsImageHandle or FbsImageDescriptorHandle

bool fbsImageCollectionGetSize ( FbsImageCollectionHandle  handle,
int &  size 
)

Returns the number of elements of this collection

Parameters:
handle source FbsImageCollectionHandle
size output parameter specifying size of collection

bool fbsImageCollectionGetStatus ( FbsImageCollectionHandle  handle,
FbsStatus &  status 
)

Returns the status of this collection

Parameters:
handle source FbsImageCollectionHandle
status output parameter which is used to indicate the success, partial success, or failure of the template creation process as a whole.


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