SaigeVision C/C++ 1.5.0
SaigeVision API document for C/C++
 
Loading...
Searching...
No Matches
ClassifierTestDLL.h File Reference

Header file for Classification Module. More...

#include "CommonHeaderDLL.h"

Go to the source code of this file.

Typedefs

typedef void * ClsTestHandle
 Classification file handler. More...
 
typedef void * ClsTestResult
 Classification inspection results handler. More...
 

Functions

ClsTestHandle SR_CreateClsTestHandle (const char *filePath)
 Create a ClsTestHandle via multi byte char path. More...
 
eErrorType SR_CreateClsTestHandle_ErrorType (ClsTestHandle *clsTestHandle, const char *filePath)
 Create a ClsTestHandle via multi byte char path. More...
 
ClsTestHandle SR_CreateClsTestHandleByWideCharPath (const wchar_t *filePath)
 Create a ClsTestHandle via wide char path. More...
 
eErrorType SR_CreateClsTestHandleByWideCharPath_ErrorType (ClsTestHandle *clsTestHandle, const wchar_t *filePath)
 Create a ClsTestHandle via wide char path. More...
 
ClsTestResult SR_MakeClsTestResult ()
 Construct a ClsTestResult. More...
 
eErrorType SR_MakeClsTestResult_ErrorType (ClsTestResult *clsTestResult)
 Construct a ClsTestResult. More...
 
eErrorType SR_LoadClsTestNetworkInGPU (ClsTestHandle handle, int GPUNumber, int batchSize=1)
 Allocate required cpu & gpu memory. More...
 
eErrorType SR_GetClsTestAlgorithmType (ClsTestHandle handle, eAlgorithmType *algoType)
 Get a algorithm type(ex, standard, deep) of a classification model.
 
eErrorType SR_PrintClsTestParameters (ClsTestHandle handle)
 Print a model parameters (Classification's class information, inspection options...)
 
eErrorType SR_GetClsTestNumberOfClasses (ClsTestHandle handle, int *numberOfClasses)
 Get the number of classes. More...
 
eErrorType SR_GetClsTestMaxStrLenOfClassName (ClsTestHandle handle, int *len)
 Get a maximum length of class name. More...
 
eErrorType SR_GetClsTestOneClassNameWithWideChar (ClsTestHandle handle, const int classIdx, wchar_t *className)
 Get a wide char name of certain class by given index. More...
 
eErrorType SR_GetClsTestOneClassNameWithMultiByteChar (ClsTestHandle handle, const int classIdx, char *className)
 Get a multi byte char name of certain class by given index. More...
 
eErrorType SR_GetClsTestOneClassColor (ClsTestHandle handle, const int classIdx, int *classColor)
 Get a color of certain class by given index. More...
 
eErrorType SR_GetClsTrainedVersion (ClsTestHandle handle, int *trainedVersionMajor, int *trainedVersionMinor, int *trainedVersionPatch)
 Get a trained version of model file, -1 means before v1.4.8. More...
 
eErrorType SR_GetClsTestMedianImageSize (ClsTestHandle handle, int *height, int *width)
 Get the median value of image sizes used for training.
 
eErrorType SR_GetClsTestAdditionalScore (ClsTestHandle handle, int *additionalScores)
 Get Additional scores. More...
 
eErrorType SR_SetClsTestAdditionalScore (ClsTestHandle handle, int numOfClasses, int *additionalScores, bool writeOnModelFile=true)
 Set Additional scores. More...
 
eErrorType SR_GetClsTestForwardTimeLimit (ClsTestHandle handle, float *forwardTimeLimit)
 Get the Forward time limit. More...
 
eErrorType SR_GetClsTestIsToUseForwardTimeLimit (ClsTestHandle handle, bool *bIsToUseForwardTimeLimit)
 Get the boolean whether the current model is using time limit or not. More...
 
eErrorType SR_GetClsTestForwardTimeLimitVariables (ClsTestHandle handle, float *forwardTimeLimit, bool *bIsToUseForwardTimeLimit)
 Get the Forward time limit variables. More...
 
eErrorType SR_SetClsTestForwardTimeLimit (ClsTestHandle handle, float forwardTimeLimit, bool writeOnModelFile=true)
 Set the Forward time limit. More...
 
eErrorType SR_SetClsTestIsToUseForwardTimeLimit (ClsTestHandle handle, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
 Set the boolean whether the current model is using time limit or not. More...
 
eErrorType SR_SetClsTestForwardTimeLimitVariables (ClsTestHandle handle, float forwardTimeLimit, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
 Set the Forward time limit variables. More...
 
eErrorType SR_ApplyClsTestFromImageFile (ClsTestHandle handle, const char *imagePath, ClsTestResult clsTestResult)
 Apply classification algorithm to image by file path. More...
 
eErrorType SR_ApplyClsTestFromImageFileByWideCharPath (ClsTestHandle handle, const wchar_t *imagePath, ClsTestResult clsTestResult)
 Apply classification algorithm to image by file path. More...
 
eErrorType SR_ApplyClsTestFrom8bitCharGrayArray (ClsTestHandle handle, const unsigned char *imageData, const int height, const int width, ClsTestResult clsTestResult)
 Apply classification algorithm to 1-channel image by 8-bit data. More...
 
eErrorType SR_ApplyClsTestFrom8bitCharColorArray (ClsTestHandle handle, const unsigned char *imageData, const int height, const int width, ClsTestResult clsTestResult)
 Apply classification algorithm to 3-channels(BGR) image by 8-bit data. More...
 
eErrorType SR_ApplyClsTestFromUnsignedIntColorArray (ClsTestHandle handle, const unsigned int *imageData, const int height, const int width, ClsTestResult clsTestResult)
 Apply classification algorithm to 4-channels(BGRA) image by 8-bit data. More...
 
eErrorType SR_ApplyClsTestFromMultiple8bitCharGrayArrays (ClsTestHandle handle, int numberOfImages, unsigned char **imageData, int *heights, int *widths, ClsTestResult *clsTestResults)
 Apply classification algorithm to 1-channel images by 8-bit data (batch-inspection). More...
 
eErrorType SR_ApplyClsTestFromMultiple8bitCharColorArrays (ClsTestHandle handle, int numberOfImages, unsigned char **imageData, int *heights, int *widths, ClsTestResult *clsTestResults)
 Apply classification algorithm to 3-channels(BGR) images by 8-bit data (batch-inspection). More...
 
eErrorType SR_ApplyClsTestFromMultipleUnsignedIntColorArrays (ClsTestHandle handle, int numberOfImages, unsigned int **imageData, int *heights, int *widths, ClsTestResult *clsTestResults)
 Apply classification algorithm to 4-channels(BGRA) images by 8-bit data (batch-inspection). More...
 
eErrorType SR_ApplyClsTestFromSegmentedObjects (ClsTestHandle handle, int numberOfObjects, SR_SegmentedObject *segmentedObjects, ClsTestResult *clsTestResults)
 Apply classification algorithm to SR_SegmentedObject::croppedImage (batch-inspection). More...
 
eErrorType SR_GetClsTestClassifiedResult (ClsTestResult clsTestResult, SR_ClassifiedResult *classifiedResult)
 Get SR_ClassifiedResult. More...
 
eErrorType SR_GetClsTestResultScore (ClsTestResult clsTestResult, const int numClasses, int *scores, bool includeAddScore=false)
 Get scores for each class. More...
 
eErrorType SR_GetClsTestResultClass (ClsTestResult clsTestResult, int *classIdx)
 Get final class index. More...
 
eErrorType SR_GetClsTestInspectionTime (ClsTestResult clsTestResult, long *inspectionTimeInLong)
 Get the inspection time. More...
 
eErrorType SR_GetClsTestInspectionTimeInDouble (ClsTestResult clsTestResult, double *inspectionTimeInDouble)
 Get the inspection time. More...
 
eErrorType SR_GetClsTestLoadImageTime (ClsTestResult clsTestResult, long *imageLoadingTimeInLong)
 Get the image loading time. More...
 
eErrorType SR_GetClsTestLoadImageTimeInDouble (ClsTestResult clsTestResult, double *imageLoadingTimeInDouble)
 Get the image loading time. More...
 
eErrorType SR_GetClsTestROI (ClsTestResult clsTestResult, int *xROI, int *yROI, int *wROI, int *hROI)
 Get ROI. More...
 
eErrorType SR_DestroyClsTestHandle (ClsTestHandle handle)
 Destruct a ClsTestHandle.
 
eErrorType SR_DeleteClsTestResult (ClsTestResult clsTestResult)
 Destruct a ClsTestResult.
 
eErrorType SR_SetClsTestOptionsAsDefault (ClsTestHandle handle)
 Reset inspection options(Forward time limit, Additional scores) as default values. More...
 
eErrorType SR_WriteClsTestOptionsOnModelFile (ClsTestHandle handle)
 Write inspection options(Forward time limit, Additional scores) on model file.
 

Detailed Description

Header file for Classification Module.

Function Documentation

◆ SR_GetClsTestROI()

eErrorType SR_GetClsTestROI ( ClsTestResult  clsTestResult,
int *  xROI,
int *  yROI,
int *  wROI,
int *  hROI 
)

Get ROI.

Parameters
clsTestResult
[out]xROI
[out]yROI
[out]wROI
[out]hROI
Examples
ExampleClsRuntime.cpp.

◆ SR_SetClsTestOptionsAsDefault()

eErrorType SR_SetClsTestOptionsAsDefault ( ClsTestHandle  handle)

Reset inspection options(Forward time limit, Additional scores) as default values.