7 #define DLLTYPE_CLASSIFICATION
9 #ifdef DLLEXPORT_CLASSIFICATION
10 #define DLLTYPE_CLASSIFICATION extern "C" __declspec(dllexport)
12 #define DLLTYPE_CLASSIFICATION extern "C" __declspec(dllimport)
172 int* numberOfClasses);
215 int* trainedVersionMajor,
216 int* trainedVersionMinor,
217 int* trainedVersionPatch);
244 int* additionalScores);
254 int* additionalScores,
255 bool writeOnModelFile =
true);
270DLLTYPE_CLASSIFICATION
eErrorType SR_GetClsTestIsToStoreActivationMap(
ClsTestHandle handle,
bool* isToStoreCam);
272DLLTYPE_CLASSIFICATION
eErrorType SR_SetClsTestIsToStoreActivationMap(
ClsTestHandle handle,
bool isToStoreCam,
bool writeOnModelFile =
true);
289 float* forwardTimeLimit);
297 bool* bIsToUseForwardTimeLimit);
308 float* forwardTimeLimit,
309 bool* bIsToUseForwardTimeLimit);
318 float forwardTimeLimit,
319 bool writeOnModelFile =
true);
328 bool bIsToUseForwardTimeLimit,
329 bool writeOnModelFile =
true);
341 float forwardTimeLimit,
342 bool bIsToUseForwardTimeLimit,
343 bool writeOnModelFile =
true);
376 const char* imagePath,
384 const wchar_t* imagePath,
394 const unsigned char* imageData,
406 const unsigned char* imageData,
418 const unsigned int* imageData,
432 unsigned char** imageData,
446 unsigned char** imageData,
461 unsigned int** imageData,
523 const int numClasses,
525 bool includeAddScore =
false);
541 long* inspectionTimeInLong);
547 double* inspectionTimeInDouble);
554 long* imageLoadingTimeInLong);
560 double* imageLoadingTimeInDouble);
571 int* xROI,
int* yROI,
int* wROI,
int* hROI);
602 const char* imagePath,
608DLLTYPE_CLASSIFICATION
eErrorType SR_ApplyClsTestFromImageFileWithActivationMapByWideCharPath(
ClsTestHandle handle,
609 const wchar_t* imagePath,
617 int* activationMapWidthOutput,
618 int* activationMapHeightOutput);
622 float* activationMapOutput);
625#ifdef SR_USE_DEPRECATED_FUNCTIONS
630DLLTYPE_CLASSIFICATION
eErrorType SR_GetClsTestOneClassName(
ClsTestHandle handle,
const int index,
wchar_t* classNameOutput);
633DLLTYPE_CLASSIFICATION
eErrorType SR_GetClsTestOneClassNameWith1byteCharacter(
ClsTestHandle handle,
const int index,
char* classNameOutput);
eErrorType SR_GetClsTestMedianImageSize(ClsTestHandle handle, int *height, int *width)
Get the median value of image sizes used for training.
eErrorType SR_WriteClsTestOptionsOnModelFile(ClsTestHandle handle)
Write inspection options(Forward time limit, Additional scores) on model file.
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_SetClsTestOptionsAsDefault(ClsTestHandle handle)
Reset inspection options(Forward time limit, Additional scores) as default values.
eErrorType SR_GetClsTestROI(ClsTestResult clsTestResult, int *xROI, int *yROI, int *wROI, int *hROI)
Get ROI.
eErrorType SR_SetClsTestAdditionalScore(ClsTestHandle handle, int numOfClasses, int *additionalScores, bool writeOnModelFile=true)
Set Additional scores.
eErrorType SR_GetClsTestAdditionalScore(ClsTestHandle handle, int *additionalScores)
Get Additional scores.
eErrorType SR_GetClsTestOneClassColor(ClsTestHandle handle, const int classIdx, int *classColor)
Get a color of certain class by given index.
eErrorType SR_GetClsTrainedVersion(ClsTestHandle handle, int *trainedVersionMajor, int *trainedVersionMinor, int *trainedVersionPatch)
Get a trained version of model file, -1 means before v1.4.8.
eErrorType SR_GetClsTestOneClassNameWithWideChar(ClsTestHandle handle, const int classIdx, wchar_t *className)
Get a wide char name of certain class by given index.
eErrorType SR_GetClsTestMaxStrLenOfClassName(ClsTestHandle handle, int *len)
Get a maximum length of class name.
eErrorType SR_GetClsTestNumberOfClasses(ClsTestHandle handle, int *numberOfClasses)
Get the number of classes.
eErrorType SR_GetClsTestOneClassNameWithMultiByteChar(ClsTestHandle handle, const int classIdx, char *className)
Get a multi byte char name of certain class by given index.
eErrorType SR_GetClsTestForwardTimeLimitVariables(ClsTestHandle handle, float *forwardTimeLimit, bool *bIsToUseForwardTimeLimit)
Get the Forward time limit variables.
eErrorType SR_SetClsTestForwardTimeLimitVariables(ClsTestHandle handle, float forwardTimeLimit, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit variables.
eErrorType SR_GetClsTestForwardTimeLimit(ClsTestHandle handle, float *forwardTimeLimit)
Get the Forward time limit.
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_GetClsTestIsToUseForwardTimeLimit(ClsTestHandle handle, bool *bIsToUseForwardTimeLimit)
Get the boolean whether the current model is using time limit or not.
eErrorType SR_SetClsTestForwardTimeLimit(ClsTestHandle handle, float forwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit.
eErrorType SR_CreateClsTestHandle_ErrorType(ClsTestHandle *clsTestHandle, const char *filePath)
Create a ClsTestHandle via multi byte char path.
void * ClsTestHandle
Classification file handler.
Definition: ClassifierTestDLL.h:56
eErrorType SR_MakeClsTestResult_ErrorType(ClsTestResult *clsTestResult)
Construct a ClsTestResult.
eErrorType SR_CreateClsTestHandleByWideCharPath_ErrorType(ClsTestHandle *clsTestHandle, const wchar_t *filePath)
Create a ClsTestHandle via wide char path.
void * ClsTestResult
Classification inspection results handler.
Definition: ClassifierTestDLL.h:71
ClsTestResult SR_MakeClsTestResult()
Construct a ClsTestResult.
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_DeleteClsTestResult(ClsTestResult clsTestResult)
Destruct a ClsTestResult.
eErrorType SR_DestroyClsTestHandle(ClsTestHandle handle)
Destruct a ClsTestHandle.
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_ApplyClsTestFromImageFileByWideCharPath(ClsTestHandle handle, const wchar_t *imagePath, ClsTestResult clsTestResult)
Apply classification algorithm to image by file path.
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).
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).
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_ApplyClsTestFromImageFile(ClsTestHandle handle, const char *imagePath, ClsTestResult clsTestResult)
Apply classification algorithm to image by file path.
eErrorType SR_ApplyClsTestFromSegmentedObjects(ClsTestHandle handle, int numberOfObjects, SR_SegmentedObject *segmentedObjects, ClsTestResult *clsTestResults)
Apply classification algorithm to SR_SegmentedObject::croppedImage (batch-inspection).
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).
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.
eErrorType SR_GetClsTestInspectionTime(ClsTestResult clsTestResult, long *inspectionTimeInLong)
Get the inspection time.
eErrorType SR_GetClsTestResultScore(ClsTestResult clsTestResult, const int numClasses, int *scores, bool includeAddScore=false)
Get scores for each class.
eErrorType SR_GetClsTestLoadImageTime(ClsTestResult clsTestResult, long *imageLoadingTimeInLong)
Get the image loading time.
eErrorType SR_GetClsTestLoadImageTimeInDouble(ClsTestResult clsTestResult, double *imageLoadingTimeInDouble)
Get the image loading time.
eErrorType SR_GetClsTestClassifiedResult(ClsTestResult clsTestResult, SR_ClassifiedResult *classifiedResult)
Get SR_ClassifiedResult.
eErrorType SR_GetClsTestInspectionTimeInDouble(ClsTestResult clsTestResult, double *inspectionTimeInDouble)
Get the inspection time.
eErrorType SR_GetClsTestResultClass(ClsTestResult clsTestResult, int *classIdx)
Get final class index.
eErrorType SR_LoadClsTestNetworkInGPU(ClsTestHandle handle, int GPUNumber, int batchSize=1)
Allocate required cpu & gpu memory.
Struct describing result of classification.
Definition: CommonHeaderDLL.h:289
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:122