 |
SaigeVision C/C++
1.4.7
SaigeVision API document for C/C++
|
|
Go to the documentation of this file.
7 #define DLLTYPE_CLASSIFICATION
9 #ifdef DLLEXPORT_CLASSIFICATION
10 #define DLLTYPE_CLASSIFICATION extern "C" __declspec(dllexport)
12 #define DLLTYPE_CLASSIFICATION extern "C" __declspec(dllimport)
150 int* numberOfClasses);
211 int* additionalScores);
221 int* additionalScores,
222 bool writeOnModelFile =
true);
238 float* forwardTimeLimit);
246 bool* bIsToUseForwardTimeLimit);
257 float* forwardTimeLimit,
258 bool* bIsToUseForwardTimeLimit);
267 float forwardTimeLimit,
268 bool writeOnModelFile =
true);
277 bool bIsToUseForwardTimeLimit,
278 bool writeOnModelFile =
true);
290 float forwardTimeLimit,
291 bool bIsToUseForwardTimeLimit,
292 bool writeOnModelFile =
true);
325 const char* imagePath,
333 const wchar_t* imagePath,
343 const unsigned char* imageData,
355 const unsigned char* imageData,
367 const unsigned int* imageData,
381 unsigned char** imageData,
395 unsigned char** imageData,
410 unsigned int** imageData,
463 const int numClasses,
465 bool includeAddScore =
false);
479 long* inspectionTimeInLong);
485 double* inspectionTimeInDouble);
492 long* imageLoadingTimeInLong);
498 double* imageLoadingTimeInDouble);
530 const char* imagePath,
536 DLLTYPE_CLASSIFICATION
eErrorType SR_ApplyClsTestFromImageFileWithActivationMapByWideCharPath(
ClsTestHandle handle,
537 const wchar_t* imagePath,
542 int* activationMapWidthOutput,
543 int* activationMapHeightOutput);
547 float* activationMapOutput);
550 #ifdef SR_USE_DEPRECATED_FUNCTIONS
555 DLLTYPE_CLASSIFICATION
eErrorType SR_GetClsTestOneClassName(
ClsTestHandle handle,
const int index,
wchar_t* classNameOutput);
558 DLLTYPE_CLASSIFICATION
eErrorType SR_GetClsTestOneClassNameWith1byteCharacter(
ClsTestHandle handle,
const int index,
char* classNameOutput);
eErrorType SR_DestroyClsTestHandle(ClsTestHandle handle)
Destruct a ClsTestHandle.
void * ClsTestHandle
Classification file handler.
Definition: ClassifierTestDLL.h:56
eErrorType SR_GetClsTestOneClassNameWithWideChar(ClsTestHandle handle, const int classIdx, wchar_t *className)
Get a wide char name of certain class by given index.
eErrorType SR_GetClsTestOneClassColor(ClsTestHandle handle, const int classIdx, int *classColor)
Get a color of certain class by given index.
eErrorType SR_GetClsTestInspectionTimeInDouble(ClsTestResult clsTestResult, double *inspectionTimeInDouble)
Get the inspection time.
ClsTestHandle SR_CreateClsTestHandleByWideCharPath(const wchar_t *filePath)
Create a ClsTestHandle via wide char path.
ClsTestHandle SR_CreateClsTestHandle(const char *filePath)
Create a ClsTestHandle via multi byte char path.
eErrorType SR_GetClsTestNumberOfClasses(ClsTestHandle handle, int *numberOfClasses)
Get the number of classes.
eErrorType SR_SetClsTestAdditionalScore(ClsTestHandle handle, int numOfClasses, int *additionalScores, bool writeOnModelFile=true)
Set Additional scores.
eErrorType SR_GetClsTestOneClassNameWithMultiByteChar(ClsTestHandle handle, const int classIdx, char *className)
Get a multi byte char name of certain class by given index.
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:108
eErrorType SR_GetClsTestMedianImageSize(ClsTestHandle handle, int *height, int *width)
Get the median value of image sizes used for training.
eErrorType SR_GetClsTestResultScore(ClsTestResult clsTestResult, const int numClasses, int *scores, bool includeAddScore=false)
Get scores for each class.
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 mode).
eErrorType SR_GetClsTestLoadImageTimeInDouble(ClsTestResult clsTestResult, double *imageLoadingTimeInDouble)
Get the image loading time.
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 mode).
eErrorType SR_GetClsTestAlgorithmType(ClsTestHandle handle, eAlgorithmType *algoType)
Get a algorithm type(ex, standard, deep) of a classification model.
eErrorType SR_LoadClsTestNetworkInGPU(ClsTestHandle handle, int GPUNumber, int batchSize=1)
Allocate required cpu & gpu memory.
eErrorType SR_GetClsTestMaxStrLenOfClassName(ClsTestHandle handle, int *len)
Get a maximum length of class name.
eErrorType SR_DeleteClsTestResult(ClsTestResult clsTestResult)
Destruct a ClsTestResult.
eErrorType SR_SetClsTestIsToUseForwardTimeLimit(ClsTestHandle handle, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the boolean whether the current model is using time limit or not.
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.
ClsTestResult SR_MakeClsTestResult()
Construct a ClsTestResult.
eErrorType SR_ApplyClsTestFromImageFile(ClsTestHandle handle, const char *imagePath, ClsTestResult clsTestResult)
Apply classification algorithm to image by file path.
eErrorType SR_GetClsTestForwardTimeLimitVariables(ClsTestHandle handle, float *forwardTimeLimit, bool *bIsToUseForwardTimeLimit)
Get the Forward time limit variables.
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.
eErrorType SR_SetClsTestForwardTimeLimit(ClsTestHandle handle, float forwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit.
eErrorType SR_GetClsTestInspectionTime(ClsTestResult clsTestResult, long *inspectionTimeInLong)
Get the inspection time.
eErrorType SR_ApplyClsTestFromSegmentedObjects(ClsTestHandle handle, int numberOfObjects, SR_SegmentedObject *segmentedObjects, ClsTestResult *clsTestResults)
Apply classification algorithm to SR_SegmentedObject::croppedImage (Batch inspection mode).
eErrorType SR_GetClsTestAdditionalScore(ClsTestHandle handle, int *additionalScores)
Get Additional scores.
eErrorType SR_GetClsTestResultClass(ClsTestResult clsTestResult, int *classIdx)
Get final class index.
eErrorType SR_GetClsTestLoadImageTime(ClsTestResult clsTestResult, long *imageLoadingTimeInLong)
Get the image loading time.
eErrorType SR_GetClsTestIsToUseForwardTimeLimit(ClsTestHandle handle, bool *bIsToUseForwardTimeLimit)
Get the boolean whether the current model is using time limit or not.
eErrorType SR_WriteClsTestOptionsOnModelFile(ClsTestHandle handle)
Write inspection options(Forward time limit, Additional scores) on model file.
eErrorType SR_SetClsTestOptionsAsDefault(ClsTestHandle handle)
Reset inspection options(Forward time limit, Additional scores) as default values.
eErrorType SR_PrintClsTestParameters(ClsTestHandle handle)
Print a model parameters (Classification's class information, inspection options.....
eErrorType SR_SetClsTestForwardTimeLimitVariables(ClsTestHandle handle, float forwardTimeLimit, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit variables.
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.
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 mode).
eErrorType SR_GetClsTestForwardTimeLimit(ClsTestHandle handle, float *forwardTimeLimit)
Get the Forward time limit.
eErrorType SR_ApplyClsTestFromImageFileByWideCharPath(ClsTestHandle handle, const wchar_t *imagePath, ClsTestResult clsTestResult)
Apply classification algorithm to image by file path.
void * ClsTestResult
Classification inspection results handler.
Definition: ClassifierTestDLL.h:71