Sample Image List (Sil.dll) 15.0
SIL Creation and Handling

Exported functions for SIL handling. More...

Typedefs

typedef void * TSIL
 

Functions

cvbres_t SilAddItem (TSIL Sil, TSILDATA Data, TSILLABEL Label)
 Add a new entry into the SIL. More...
 
cvbres_t SilAddNamedImageItem (TSIL Sil, const char *szName, IMG srcImage, cvbdim_t nPosX, cvbdim_t nPosY)
 Add a new image data entry to a SIL under a class name. More...
 
cvbres_t SilAddNamedImageItemEx (TSIL Sil, const char *szName, IMG srcImage, cvbdim_t nOriginPosX, cvbdim_t nOriginPosY)
 Add a new image data entry to a SIL under a class name. More...
 
cvbres_t SilAddNamedImageItemExW (TSIL Sil, const wchar_t *szName, IMG srcImage, cvbdim_t nOriginPosX, cvbdim_t nOriginPosY)
 Add a new image data entry to a SIL under a class name. More...
 
cvbres_t SilAddNamedImageItemW (TSIL Sil, const wchar_t *szName, IMG srcImage, cvbdim_t nPosX, cvbdim_t nPosY)
 Add a new image data entry to a SIL under a class name. More...
 
cvbres_t SilAddNamedVectorItem (TSIL Sil, const char *szName, const float *pData, size_t numEntries)
 Add a new vector data entry to a SIL under a class name. More...
 
cvbres_t SilAddNamedVectorItemW (TSIL Sil, const wchar_t *szName, const float *pData, size_t numEntries)
 Add a new vector data entry to a SIL under a class name. More...
 
cvbres_t SilAddRegressionImageItem (TSIL Sil, const float *pLabel, size_t labelSize, IMG srcImage, cvbdim_t nPosX, cvbdim_t nPosY)
 Add a new image data entry to a SIL under a class name. More...
 
cvbres_t SilAddRegressionImageItemEx (TSIL Sil, const float *pLabel, size_t labelSize, IMG srcImage, cvbdim_t nOriginPosX, cvbdim_t nOriginPosY)
 Add a new image data entry to a SIL under a class name. More...
 
cvbres_t SilAddRegressionVectorItem (TSIL Sil, const float *pLabel, size_t labelSize, const float *pData, size_t numEntries)
 Add a new vector data entry to a SIL under a class name. More...
 
cvbres_t SilChangeStringLabel (TSIL Sil, cvbval_t LabelIndex, const char *szString)
 Modify a string label's contents. More...
 
cvbres_t SilChangeStringLabelW (TSIL Sil, cvbval_t LabelIndex, const wchar_t *szString)
 Modify a string label's contents. More...
 
cvbres_t SilChangeVectorLabel (TSIL Sil, cvbval_t LabelIndex, float *pData, size_t nDimension)
 Modify a vector label's contents. More...
 
TSIL SilCreate (TSILLABELTYPE LabelType, TSILDATATYPE DataType)
 Creates a Sample Image List using the indicated label and data type. More...
 
cvbres_t SilDeleteData (TSIL Sil, cvbval_t Index)
 Remove an entry from a SIL's data list. More...
 
cvbres_t SilDeleteDataByLabel (TSIL Sil, cvbval_t LabelIndex, cvbval_t DataIndex)
 Remove an entry from a SIL label's data list. More...
 
cvbres_t SilDeleteLabel (TSIL Sil, cvbval_t Index)
 Remove an entry from a TSIL's label list. More...
 
cvbres_t SilGetComment (TSIL Sil, char *szComment, size_t &CommentSize)
 Gets the comment string from a SIL. More...
 
cvbres_t SilGetCommentW (TSIL Sil, wchar_t *szComment, size_t &CommentSize)
 Gets the comment string from a SIL. More...
 
cvbres_t SilGetCreationDate (TSIL Sil, SYSTEMTIME &Date)
 Get the system time at creation of the SIL. More...
 
TSILDATA SilGetData (TSIL Sil, cvbval_t Index)
 Get a SIL data list entry. More...
 
TSILDATA SilGetDataByLabel (TSIL Sil, cvbval_t LabelIndex, cvbval_t DataIndex)
 Get a SIL data list entry associated with a specific label. More...
 
cvbval_t SilGetDataIndex (TSIL Sil, TSILDATA Data)
 Get the index of a data object inside a TSIL object's data list. More...
 
TSILDATA SilGetDataReference (TSILLABEL Label, cvbval_t nIndex)
 Get the data list item of a label at the specified index. More...
 
TSILDATATYPE SilGetDataType (TSIL Sil)
 Gets the data type descriptor object of a SIL. More...
 
TSilDataType SilGetDataTypeEnum (TSIL Sil)
 Gets the data type of the SIL object as an enumerated value. More...
 
TSILLABEL SilGetLabel (TSIL Sil, cvbval_t Index)
 Get a SIL label list entry. More...
 
cvbval_t SilGetLabelIndex (TSIL Sil, TSILLABEL Label)
 Get the index of a label object inside a TSIL object's label list. More...
 
TSILLABEL SilGetLabelReference (TSILDATA Data, cvbval_t nIndex)
 Get the label for a data object. More...
 
TSILLABELTYPE SilGetLabelType (TSIL Sil)
 Gets the label type descriptor object of SIL. More...
 
TSilLabelType SilGetLabelTypeEnum (TSIL Sil)
 Gets the label type of the SIL object as an enumerated value. More...
 
TSILDATA SilGetMaskData (TSIL Sil)
 Gets the mask data of the SIL. More...
 
cvbres_t SilGetModificationDate (TSIL Sil, SYSTEMTIME &Date)
 Get the system time at the last modification of the SIL. More...
 
cvbval_t SilGetNumDataEntries (TSIL Sil)
 Gets the number entries in a SIL's data list. More...
 
cvbval_t SilGetNumDataReferences (TSILLABEL Label)
 Retrieve the number of data entries associated with the input label. More...
 
cvbval_t SilGetNumDataReferencesByLabel (TSIL Sil, cvbval_t LabelIndex)
 Retrieve the number of data entries associated with a label. More...
 
cvbval_t SilGetNumLabelEntries (TSIL Sil)
 Gets the number of label entries in a SIL's label list. More...
 
cvbval_t SilGetNumLabelReferences (TSILDATA Data)
 Retrieve the number of labels associated with the input data. More...
 
cvbres_t SilGetStatistics (TSIL Sil, size_t &NumClasses, size_t &MinSampleCount, size_t &MaxSampleCount, double &AverageSampleCount)
 Get the class statistics of a Sil. More...
 
cvbres_t SilImportFromManto (const char *szSil, TSIL &sil)
 Import a Manto 1 SIL into Manto2. More...
 
cvbres_t SilImportFromMantoW (const wchar_t *szSil, TSIL &sil)
 Import a Manto 1 SIL into Manto2. More...
 
cvbres_t SilLoad (const char *szFile, TSIL &Sil)
 Load a SIL from disc. More...
 
cvbres_t SilLoadW (const wchar_t *szFile, TSIL &Sil)
 Load a SIL from disc. More...
 
cvbres_t SilSetComment (TSIL Sil, const char *szComment)
 Sets the comment string in the given SIL object. More...
 
cvbres_t SilSetCommentW (TSIL Sil, const wchar_t *szComment)
 Sets the comment string in the given SIL object. More...
 
cvbres_t SilSetMaskData (TSIL Sil, TSILDATA MaskData)
 Sets the mask data of the SIL. More...
 
cvbres_t SilStore (TSIL Sil, const char *szFile)
 Saves the SIL to disc. More...
 
cvbres_t SilStoreW (TSIL Sil, const wchar_t *szFile)
 Saves the SIL to disc. More...
 
cvbres_t SilTransformDataList (TSIL SilIn, pfTransformSilData Callback, void *pPrivate, TSIL &SilOut)
 Transform the data list of a SIL with a user-definable callback. More...
 
cvbres_t SilTransformLabelList (TSIL SilIn, pfTransformSilLabel Callback, void *pPrivate, TSIL &SilOut)
 Transform the label list of a SIL with a user-definable callback. More...
 

Detailed Description

Exported functions for SIL handling.

Author
VGi
Since
1.0.0 First version. (VGi, 22.04.2009)

Typedef Documentation

◆ TSIL

typedef void* TSIL

Handle to a SIL.

Function Documentation

◆ SilAddItem()

cvbres_t SilAddItem ( TSIL  Sil,
TSILDATA  Data,
TSILLABEL  Label 
)

Add a new entry into the SIL.

An entry consists of the combination of data plus label. The data entry will always be added to the Sil no matter whether an identical entry is already present. The label entry however will be substituted for an already present entry if an identical entry is already inside the list of labels (thus avoiding duplicate entries in the Sil's label list).

Parameters
[in]SilSample Image List to be modified.
[in]DataData entry to be added.
[in]LabelLabel to be added.
Returns
HRESULT (< 0: error)

◆ SilAddNamedImageItem()

cvbres_t SilAddNamedImageItem ( TSIL  Sil,
const char *  szName,
IMG  srcImage,
cvbdim_t  nPosX,
cvbdim_t  nPosY 
)

Add a new image data entry to a SIL under a class name.

Attention
Please note that the extraction position is given as the location of the feature window's top left corner. See als SilAddNamedImageItemEx.

Provides a convenient way of adding a new image data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]szNameZero terminated string containing the label under which to add the image.
[in]srcImageImage object to extract the new image data from.
[in]nPosXPosition at which to extract the image data.
[in]nPosYPosition at which to extract the image data.
Returns
HRESULT (<0: error)

◆ SilAddNamedImageItemEx()

cvbres_t SilAddNamedImageItemEx ( TSIL  Sil,
const char *  szName,
IMG  srcImage,
cvbdim_t  nOriginPosX,
cvbdim_t  nOriginPosY 
)

Add a new image data entry to a SIL under a class name.

Attention
This function differs from SilAddNamedImageItem in that it assumes that the extraction position is given as the position of the origin.

Provides a convenient way of adding a new image data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]szNameZero terminated string containing the label under which to add the image.
[in]srcImageImage object to extract the new image data from.
[in]nOriginPosXPosition at which to extract the image data.
[in]nOriginPosYPosition at which to extract the image data.
Returns
HRESULT (<0: error)

◆ SilAddNamedImageItemExW()

cvbres_t SilAddNamedImageItemExW ( TSIL  Sil,
const wchar_t *  szName,
IMG  srcImage,
cvbdim_t  nOriginPosX,
cvbdim_t  nOriginPosY 
)

Add a new image data entry to a SIL under a class name.

Attention
This function differs from SilAddNamedImageItemW in that it assumes that the extraction position is given as the position of the origin.

Provides a convenient way of adding a new image data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]szNameZero terminated string containing the label under which to add the image.
[in]srcImageImage object to extract the new image data from.
[in]nOriginPosXPosition at which to extract the image data.
[in]nOriginPosYPosition at which to extract the image data.
Returns
HRESULT (<0: error)

◆ SilAddNamedImageItemW()

cvbres_t SilAddNamedImageItemW ( TSIL  Sil,
const wchar_t *  szName,
IMG  srcImage,
cvbdim_t  nPosX,
cvbdim_t  nPosY 
)

Add a new image data entry to a SIL under a class name.

Attention
Please note that the extraction position is given as the location of the feature window's top left corner. See als SilAddNamedImageItemExW.

Provides a convenient way of adding a new image data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]szNameZero terminated string containing the label under which to add the image.
[in]srcImageImage object to extract the new image data from.
[in]nPosXPosition at which to extract the image data.
[in]nPosYPosition at which to extract the image data.
Returns
HRESULT (<0: error)

◆ SilAddNamedVectorItem()

cvbres_t SilAddNamedVectorItem ( TSIL  Sil,
const char *  szName,
const float *  pData,
size_t  numEntries 
)

Add a new vector data entry to a SIL under a class name.

Provides a convenient way of adding a new vector data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]szNameZero terminated string containing the label under which to add the image.
[in]pDataPointer to the vector data to be added.
[in]numEntriesNumber of floating point values pointed to by pData.
Returns
HRESULT (<0: error)

◆ SilAddNamedVectorItemW()

cvbres_t SilAddNamedVectorItemW ( TSIL  Sil,
const wchar_t *  szName,
const float *  pData,
size_t  numEntries 
)

Add a new vector data entry to a SIL under a class name.

Provides a convenient way of adding a new vector data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]szNameZero terminated string containing the label under which to add the image.
[in]pDataPointer to the vector data to be added.
[in]numEntriesNumber of floating point values pointed to by pData.
Returns
HRESULT (<0: error)

◆ SilAddRegressionImageItem()

cvbres_t SilAddRegressionImageItem ( TSIL  Sil,
const float *  pLabel,
size_t  labelSize,
IMG  srcImage,
cvbdim_t  nPosX,
cvbdim_t  nPosY 
)

Add a new image data entry to a SIL under a class name.

Provides a convenient way of adding a new image data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]pLabelPointer to the floating point array to be used as the label for the data.
[in]labelSizeNumber of floating point values pointed to by pLabel.
[in]srcImageImage object to extract the new image data from.
[in]nPosXPosition at which to extract the image data.
[in]nPosYPosition at which to extract the image data.
Returns
HRESULT (<0: error)

◆ SilAddRegressionImageItemEx()

cvbres_t SilAddRegressionImageItemEx ( TSIL  Sil,
const float *  pLabel,
size_t  labelSize,
IMG  srcImage,
cvbdim_t  nOriginPosX,
cvbdim_t  nOriginPosY 
)

Add a new image data entry to a SIL under a class name.

Attention
This function differs from SilAddRegressionImageItem in that it expects the extraction position to be specified as the position of the feature window origin.

Provides a convenient way of adding a new image data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]pLabelPointer to the floating point array to be used as the label for the data.
[in]labelSizeNumber of floating point values pointed to by pLabel.
[in]srcImageImage object to extract the new image data from.
[in]nOriginPosXPosition at which to extract the image data.
[in]nOriginPosYPosition at which to extract the image data.
Returns
HRESULT (<0: error)

◆ SilAddRegressionVectorItem()

cvbres_t SilAddRegressionVectorItem ( TSIL  Sil,
const float *  pLabel,
size_t  labelSize,
const float *  pData,
size_t  numEntries 
)

Add a new vector data entry to a SIL under a class name.

Provides a convenient way of adding a new vector data entry to a classification SIL (i.e. a SIL that uses string labels).

Parameters
[in]SilSample image list on which to operate.
[in]pLabelPointer to the floating point array to be used as the label for the data.
[in]labelSizeNumber of floating point values pointed to by pLabel.
[in]pDataPointer to the vector data to be added.
[in]numEntriesNumber of floating point values pointed to by pData.
Returns
HRESULT (<0: error)

◆ SilChangeStringLabel()

cvbres_t SilChangeStringLabel ( TSIL  Sil,
cvbval_t  LabelIndex,
const char *  szString 
)

Modify a string label's contents.

This effectively renames the existing class with the given LabelIndex. If a class with the new label szString already exists, the contents of the class LabelIndex will be merged into that class.

Parameters
[in]Silsample image list on which to operate
[in]LabelIndexlabel to be updated
[in]szStringnew string to be set
Returns
HRESULT (<0: error)

◆ SilChangeStringLabelW()

cvbres_t SilChangeStringLabelW ( TSIL  Sil,
cvbval_t  LabelIndex,
const wchar_t *  szString 
)

Modify a string label's contents.

This effectively renames the existing class with the given LabelIndex. If a class with the new label szString already exists, the contents of the class LabelIndex will be merged into that class.

Parameters
[in]Silsample image list on which to operate
[in]LabelIndexlabel to be updated
[in]szStringnew string to be set
Returns
HRESULT (<0: error)

◆ SilChangeVectorLabel()

cvbres_t SilChangeVectorLabel ( TSIL  Sil,
cvbval_t  LabelIndex,
float *  pData,
size_t  nDimension 
)

Modify a vector label's contents.

This effectively relabels the existing class with the given LabelIndex. If a class with the new label pData already exists, the contents of the class LabelIndex will be merged into that class.

Parameters
[in]Silsample image list on which to operate
[in]LabelIndexlabel to be updated
[in]pDatavector data with which to update the label
[in]nDimensionlength of the data pointed to by vector (in number of floating point values)
Returns
HRESULT (<0: error)

◆ SilCreate()

TSIL SilCreate ( TSILLABELTYPE  LabelType,
TSILDATATYPE  DataType 
)

Creates a Sample Image List using the indicated label and data type.

Note that the general data and label type of a SIL cannot be changed after the SIL has been created.

See also
SilCreateLabelTypeFloatVector, SilCreateLabelTypeString, SilCreateDataTypeImage, SilCreateDataTypeImageEx, SilCreateDataTypeFloatVector
Parameters
[in]LabelTypelabel type of the SIL
[in]DataTypedata type of the SIL
Returns
SIL handle or NULL

◆ SilDeleteData()

cvbres_t SilDeleteData ( TSIL  Sil,
cvbval_t  Index 
)

Remove an entry from a SIL's data list.

If the removed data entry was the last one to which a label referred, then that label will also be removed from the label list as a side effect! (the aim is to never have a class with zero entries in the SIL).

Parameters
[in]SilSample image list on which to remove the entry.
[in]IndexData list index of the entry to be removed.
Returns
HRESULT (< 0: error)

◆ SilDeleteDataByLabel()

cvbres_t SilDeleteDataByLabel ( TSIL  Sil,
cvbval_t  LabelIndex,
cvbval_t  DataIndex 
)

Remove an entry from a SIL label's data list.

Note the difference between this function and SilDeleteData: The latter uses an index based on the SIL's "global" data entry list, whereas this function uses a label index to access a label's list of associated data entries.

If the removed data entry was the last one to which a label referred, then that label will also be removed from the label list as a side effect! (the aim is to never have a class with zero entries in the SIL).

Parameters
[in]SilSample image list on which to remove the entry.
[in]LabelIndexLabel list index of the entry to be removed.
[in]DataIndexData list index of the entry to be removed.
Returns
HRESULT (< 0: error)

◆ SilDeleteLabel()

cvbres_t SilDeleteLabel ( TSIL  Sil,
cvbval_t  Index 
)

Remove an entry from a TSIL's label list.

Removing a label entry will automatically also remove all associated data entries!

Parameters
[in]SilSample image list on which to remove the entry.
[in]IndexIndex of the label to be removed.
Returns
HRESULT (< 0: error)

◆ SilGetComment()

cvbres_t SilGetComment ( TSIL  Sil,
char *  szComment,
size_t &  CommentSize 
)

Gets the comment string from a SIL.

Parameters
[in]SilInput Sample Image List object.
[in]szCommentBuffer to which the comment is to be copied .
[in,out]CommentSizeSize of the buffer upon function entry, number of copied characters upon function exit. If szComment buffer is too small, no characters will be copied and an error will be returned. In this case, CommentSize will receive the number of characters to be copied.
Returns
HRESULT (<0 = error)

◆ SilGetCommentW()

cvbres_t SilGetCommentW ( TSIL  Sil,
wchar_t *  szComment,
size_t &  CommentSize 
)

Gets the comment string from a SIL.

Parameters
[in]SilInput Sample Image List object.
[in]szCommentBuffer to which the comment is to be copied .
[in,out]CommentSizeSize of the buffer upon function entry, number of copied characters upon function exit. If szComment buffer is too small, no characters will be copied and an error will be returned. In this case, CommentSize will receive the number of characters to be copied.
Returns
HRESULT (<0 = error)

◆ SilGetCreationDate()

cvbres_t SilGetCreationDate ( TSIL  Sil,
SYSTEMTIME &  Date 
)

Get the system time at creation of the SIL.

Parameters
[in]SilList from which to get the information.
[out]DateCreation date of the SIL.
Returns
HRESULT (< 0 = error)

◆ SilGetData()

TSILDATA SilGetData ( TSIL  Sil,
cvbval_t  Index 
)

Get a SIL data list entry.

Note that the reference count of the returned object will not be incremented by this function. If the caller plan's on using the handle over a longer period, it is recommendable to call ShareObject on it.

See also
SilGetDataByLabel
Parameters
[in]SilSil object handle.
[in]IndexIndex of the data list entry to retrieve.
Returns
handle to the indexed data object or NULL on errors

◆ SilGetDataByLabel()

TSILDATA SilGetDataByLabel ( TSIL  Sil,
cvbval_t  LabelIndex,
cvbval_t  DataIndex 
)

Get a SIL data list entry associated with a specific label.

Unlike SilGetData, which accesses the SIL's global data list (which in some cases makes index handling slightly inconvenient), this function accesses the data entries by class/label (i.e. it accesses the list of associated data in the label entry identified by LabelIndex).

Note that the reference count of the returned object will not be incremented by this function. If the caller plan's on using the handle over a longer period, it is recommendable to call ShareObject on it.

Parameters
[in]SilSil object handle.
[in]LabelIndexIndex of the label.
[in]DataIndexIndex of the data list entry in the label identified by the index LabelIndex.
Returns
handle to the indexed data object or NULL on errors

◆ SilGetDataIndex()

cvbval_t SilGetDataIndex ( TSIL  Sil,
TSILDATA  Data 
)

Get the index of a data object inside a TSIL object's data list.

Parameters
[in]SilTSIL object handle.
[in]DataTSILDATA object handle.
Returns
Index or -1 if the object pointed to by Data is not part of the Sil.

◆ SilGetDataReference()

TSILDATA SilGetDataReference ( TSILLABEL  Label,
cvbval_t  nIndex 
)

Get the data list item of a label at the specified index.

Note that the reference count of the returned object will not be incremented by this function. If the caller plan's on using the handle over a longer period, it is recommendable to call ShareObject on it.

Parameters
[in]LabelLabel handle on which to retrieve the data object.
[in]nIndexPosition at which to retrieve the data object.
Returns
data object handle or NULL on errors

◆ SilGetDataType()

TSILDATATYPE SilGetDataType ( TSIL  Sil)

Gets the data type descriptor object of a SIL.

Note that the reference count of the returned object will not be incremented by this function. If the caller plan's on using the handle over a longer period, it is recommendable to call ShareObject on it.

Parameters
[in]SilInput Sample Image List.
Returns
NULL if the Sil handle is invalid, the data type descriptor object handle otherwise.

◆ SilGetDataTypeEnum()

TSilDataType SilGetDataTypeEnum ( TSIL  Sil)

Gets the data type of the SIL object as an enumerated value.

This function has been added as a convenient alternative to the similar SilGetDataType call.

Parameters
[in]SilInput SIL object.
Returns
enum describing the data type of the SIL (undefined if Sil did not refer to a valid SIL object).

◆ SilGetLabel()

TSILLABEL SilGetLabel ( TSIL  Sil,
cvbval_t  Index 
)

Get a SIL label list entry.

Note that the reference count of the returned object will not be incremented by this function. If the caller plan's on using the handle over a longer period, it is recommendable to call ShareObject on it.

Parameters
[in]SilSil object handle.
[in]IndexIndex of the label entry to retrieve.
Returns
handle to the indexed data object or NULL on errors

◆ SilGetLabelIndex()

cvbval_t SilGetLabelIndex ( TSIL  Sil,
TSILLABEL  Label 
)

Get the index of a label object inside a TSIL object's label list.

Parameters
[in]SilTSIL object handle.
[in]LabelTSILLABEL object handle.
Returns
Index or -1 of the Label is not part of the Sil.

◆ SilGetLabelReference()

TSILLABEL SilGetLabelReference ( TSILDATA  Data,
cvbval_t  nIndex 
)

Get the label for a data object.

Parameters
[in]DataData handle on which to retrieve the data object.
[in]nIndexPosition at which to retrieve the label object (currently only 0 is valid).
Returns
label object handle or NULL on errors

◆ SilGetLabelType()

TSILLABELTYPE SilGetLabelType ( TSIL  Sil)

Gets the label type descriptor object of SIL.

Note that the reference count of the returned object will not be incremented by this function. If the caller plan's on using the handle over a longer period, it is recommendable to call ShareObject on it.

Parameters
[in]SilInput Sample Image List
Returns
NULL if the Sil handle is invalid, the label type descriptor object handle otherwise.

◆ SilGetLabelTypeEnum()

TSilLabelType SilGetLabelTypeEnum ( TSIL  Sil)

Gets the label type of the SIL object as an enumerated value.

This function has been added as a convenient alternative to the similar SilGetLabelType call.

Parameters
[in]SilInput SIL object.
Returns
enum describing the label type of the SIL (undefined if Sil did not refer to a valid SIL object).

◆ SilGetMaskData()

TSILDATA SilGetMaskData ( TSIL  Sil)

Gets the mask data of the SIL.

Parameters
[in]SilSIL object handle.
Returns
Mask data object or NULL if no mask data exists or the handle is not valid

◆ SilGetModificationDate()

cvbres_t SilGetModificationDate ( TSIL  Sil,
SYSTEMTIME &  Date 
)

Get the system time at the last modification of the SIL.

Parameters
[in]SilList from which to get the information.
[out]DateModification date of the SIL.
Returns
HRESULT (< 0 = error)

◆ SilGetNumDataEntries()

cvbval_t SilGetNumDataEntries ( TSIL  Sil)

Gets the number entries in a SIL's data list.

Parameters
[in]SilSample Image List to be queried.
Returns
entry count (< 0: error)

◆ SilGetNumDataReferences()

cvbval_t SilGetNumDataReferences ( TSILLABEL  Label)

Retrieve the number of data entries associated with the input label.

Parameters
[in]LabelLabel object handle.
Returns
# of associated data entries (-1 on errors)

◆ SilGetNumDataReferencesByLabel()

cvbval_t SilGetNumDataReferencesByLabel ( TSIL  Sil,
cvbval_t  LabelIndex 
)

Retrieve the number of data entries associated with a label.

Parameters
[in]SilSIL object handle.
[in]LabelIndexIndex of the label entry for which to query the number of reference.
Returns
# of associated data entries (-1 on errors)

◆ SilGetNumLabelEntries()

cvbval_t SilGetNumLabelEntries ( TSIL  Sil)

Gets the number of label entries in a SIL's label list.

Parameters
[in]SilSample Image List to be queried.
Returns
entry count (< 0: error)

◆ SilGetNumLabelReferences()

cvbval_t SilGetNumLabelReferences ( TSILDATA  Data)

Retrieve the number of labels associated with the input data.

Possible return values are in theory 0 or 1, however empty classes are not currently supported, so return value will always be zero.

Parameters
[in]DataData object handle.
Returns
# of associated data entries (-1 on errors)

◆ SilGetStatistics()

cvbres_t SilGetStatistics ( TSIL  Sil,
size_t &  NumClasses,
size_t &  MinSampleCount,
size_t &  MaxSampleCount,
double &  AverageSampleCount 
)

Get the class statistics of a Sil.

Parameters
[in]SilSample image list to work on.
[out]NumClassesTotal number of classes/labels in the SIL.
[out]MinSampleCountNumber of samples in the smallest class.
[out]MaxSampleCountNumber of samples in the biggest class.
[out]AverageSampleCountAverage number of samples per class/label.
Returns
HRESULT (< 0: error)

◆ SilImportFromManto()

cvbres_t SilImportFromManto ( const char *  szSil,
TSIL sil 
)

Import a Manto 1 SIL into Manto2.

With this function one can import SIL generated with the first version of Manto for use in Manto2. Please note, however, that there are a few restrictions involved, as Manto1 and Manto2 are not entirely feature compatible:

  • Manto2 does not use automatic instance generation, therefore the settings that are involved in automatic instance generation will be skipped during import.
  • Manto2 does not support "named" SILs, therefore the SIL name will be skipped during import.

Upon import the version 1 SIL will be automatically converted to a version 2 SIL object that can be saved, reloaded, queried and manipulated using the functions from iSIL.h.

Parameters
[in]szSilFile name of the sample image list to be imported.
[out]silHandle to the imported sample image list.

◆ SilImportFromMantoW()

cvbres_t SilImportFromMantoW ( const wchar_t *  szSil,
TSIL sil 
)

Import a Manto 1 SIL into Manto2.

With this function one can import SIL generated with the first version of Manto for use in Manto2. Please note, however, that there are a few restrictions involved, as Manto1 and Manto2 are not entirely feature compatible:

  • Manto2 does not use automatic instance generation, therefore the settings that are involved in automatic instance generation will be skipped during import.
  • Manto2 does not support "named" SILs, therefore the SIL name will be skipped during import.

Upon import the version 1 SIL will be automatically converted to a version 2 SIL object that can be saved, reloaded, queried and manipulated using the functions from iSIL.h.

Parameters
[in]szSilFile name of the sample image list to be imported.
[out]silHandle to the imported sample image list.

◆ SilLoad()

cvbres_t SilLoad ( const char *  szFile,
TSIL Sil 
)

Load a SIL from disc.

Parameters
[in]szFileFile to load.
[out]SilLoaded SIL (if no error returned).
Returns
HRESULT (<0: error)

◆ SilLoadW()

cvbres_t SilLoadW ( const wchar_t *  szFile,
TSIL Sil 
)

Load a SIL from disc.

Parameters
[in]szFileFile to load.
[out]SilLoaded SIL (if no error returned).
Returns
HRESULT (<0: error)

◆ SilSetComment()

cvbres_t SilSetComment ( TSIL  Sil,
const char *  szComment 
)

Sets the comment string in the given SIL object.

Parameters
[in]SilInput Sample Image List object.
[in]szCommentZero terminated comment string to be set.
Returns
HRESULT (< 0 = error)

◆ SilSetCommentW()

cvbres_t SilSetCommentW ( TSIL  Sil,
const wchar_t *  szComment 
)

Sets the comment string in the given SIL object.

Parameters
[in]SilInput Sample Image List object.
[in]szCommentZero terminated comment string to be set.
Returns
HRESULT (< 0 = error)

◆ SilSetMaskData()

cvbres_t SilSetMaskData ( TSIL  Sil,
TSILDATA  MaskData 
)

Sets the mask data of the SIL.

Note that in the previous implementation the mask had to match the size of the feature window and had only one plane. Now, the mask has to match the size of the images and be of identical dimension (making it possible to mask different locations for the different planes if necessary). The values in the mask image may be taken from the full range of what the pixel data types permit - they will be mapped to the range [0.0, ... 1.0] while processing the mask.

Parameters
[in]SilSIL object handle.
[in]MaskDataMask data to be set. May be NULL, in which case only the current set of mask data will be erased, but not replaced with anything new.
Returns
HRESULT (<0: error)

◆ SilStore()

cvbres_t SilStore ( TSIL  Sil,
const char *  szFile 
)

Saves the SIL to disc.

Parameters
[in]szFileFile to store the SIL in.
[in]SilSIL object to be stored.
Returns
HRESULT (<0: error)

◆ SilStoreW()

cvbres_t SilStoreW ( TSIL  Sil,
const wchar_t *  szFile 
)

Saves the SIL to disc.

Parameters
[in]szFileFile to store the SIL in.
[in]SilSIL object to be stored.
Returns
HRESULT (<0: error)

◆ SilTransformDataList()

cvbres_t SilTransformDataList ( TSIL  SilIn,
pfTransformSilData  Callback,
void *  pPrivate,
TSIL SilOut 
)

Transform the data list of a SIL with a user-definable callback.

Parameters
[in]SilInSIL to be transformed.
[in]CallbackTransformation callback to be applied to all data entries in the SilIn.
[in]pPrivateUser data to be passed into the callback.
[out]SilOutNew SIL with transformed data.
Returns
HRESULT (<0: error)

◆ SilTransformLabelList()

cvbres_t SilTransformLabelList ( TSIL  SilIn,
pfTransformSilLabel  Callback,
void *  pPrivate,
TSIL SilOut 
)

Transform the label list of a SIL with a user-definable callback.

Parameters
[in]SilInSIL to be transformed.
[in]CallbackTransformation callback to be applied to all labels.
[in]pPrivateUser data to be passed into the callback.
[out]SilOutNew SIL with transformed labels.
Returns
HRESULT (<0: error)