 |
SaigeVision C/C++
1.4.7
SaigeVision API document for C/C++
|
|
Go to the documentation of this file.
7 #define DLLTYPE_DETECTION
9 #ifdef DLLEXPORT_DETECTION
10 #define DLLTYPE_DETECTION extern "C" __declspec(dllexport)
12 #define DLLTYPE_DETECTION extern "C" __declspec(dllimport)
142 int* numberOfClasses);
210 bool writeOnModelFile =
true);
235 int* scoreThreshold);
243 int* scoreThreshold);
255 bool writeOnModelFile =
true);
285 bool writeOnModelFile =
true);
296 int* numHorizontalCroppedPatches,
297 int* numVerticalCroppedPatches);
340 bool isToStoreCroppedImage,
341 int defaultCropSize = -1,
344 bool writeOnModelFile =
true);
359 float* forwardTimeLimit);
367 bool* bIsToUseForwardTimeLimit);
378 float* forwardTimeLimit,
379 bool* bIsToUseForwardTimeLimit);
388 float forwardTimeLimit,
389 bool writeOnModelFile =
true);
398 bool bIsToUseForwardTimeLimit,
399 bool writeOnModelFile =
true);
411 float forwardTimeLimit,
412 bool bIsToUseForwardTimeLimit,
413 bool writeOnModelFile =
true);
440 const char* imagePath,
449 const wchar_t* imagePath,
460 const unsigned char* imageData,
473 const unsigned char* imageData,
486 const unsigned int* imageData,
539 int* numDetectedBoxes);
547 const int numDetectedBoxes,
561 const int numDetectedBoxes,
564 int* coordinatesXYXY);
579 int* coordinateXYXY);
595 long* inspectionTimeInLong);
601 double* inspectionTimeInDouble);
608 long* imageLoadingTimeInLong);
614 double* imageLoadingTimeInDouble);
645 #ifdef SR_USE_DEPRECATED_FUNCTIONS
650 DLLTYPE_DETECTION
eErrorType SR_GetDetTestOneClassNameWith1byteCharacter(
DetTestHandle handle,
const int index,
char* className);
653 DLLTYPE_DETECTION
eErrorType SR_GetDetTestOneClassName(
DetTestHandle handle,
const int index,
wchar_t* className);
656 DLLTYPE_DETECTION
eErrorType SR_GetDetTestOneThresholdScore(
DetTestHandle handle,
const int index,
int* scoreThreshold);
662 DLLTYPE_DETECTION
eErrorType SR_SetDetTestThresholdScore(
DetTestHandle handle,
int numberOfClasses,
int* scoreThreshold);
eErrorType SR_GetDetTestMinScoreThreshold(DetTestHandle handle, int *scoreThreshold)
Get Detection's score threshold for each class.
eErrorType SR_GetDetTestOneClassNameWithWideChar(DetTestHandle handle, const int classIdx, wchar_t *className)
Get a wide char name of certain class by given index.
DetTestHandle SR_CreateDetTestHandleByWideCharPath(const wchar_t *filePath)
Create a DetTestHandle via wide char path.
eErrorType SR_ApplyDetTestFromImageFileByWideCharPath(DetTestHandle handle, const wchar_t *imagePath, DetTestResult detTestResult)
Apply detection algorithm to image by file path.
eErrorType SR_GetDetTestOneClassNameWithMultiByteChar(DetTestHandle handle, const int classIdx, char *className)
Get a multi byte char name of certain class by given index.
eErrorType SR_GetDetTestMaxStrLenOfClassName(DetTestHandle handle, int *len)
Get a maximum length of class name.
eErrorType SR_ApplyDetTestFromImageFile(DetTestHandle handle, const char *imagePath, DetTestResult detTestResult)
Apply detection algorithm to image by file path.
eErrorType SR_SetDetTestOptionsAsDefault(DetTestHandle handle)
Reset inspection options(Forward time limit, Detection's score threshold etc) as default values.
eErrorType SR_GetDetTestIsToUseForwardTimeLimit(DetTestHandle handle, bool *bIsToUseForwardTimeLimit)
Get the boolean whether the current model is using time limit or not.
eErrorType SR_GetDetTestPixelSizeThreshold(DetTestHandle handle, int *areaThreshold)
Get Detection's area threshold for each class.
eErrorType SR_SetDetTestMinScoreThreshold(DetTestHandle handle, int numOfClasses, int *scoreThreshold, bool writeOnModelFile=true)
Set Detection's score threshold for each class.
eErrorType SR_GetDetTestForwardTimeLimitVariables(DetTestHandle handle, float *forwardTimeLimit, bool *bIsToUseForwardTimeLimit)
Get the Forward time limit variables.
eErrorType SR_GetDetTestNumberOfClasses(DetTestHandle handle, int *numberOfClasses)
Get the number of classes.
eErrorType SR_SetDetTestIsToUseForwardTimeLimit(DetTestHandle handle, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the boolean whether the current model is using time limit or not.
eErrorType SR_GetDetTestForwardTimeLimit(DetTestHandle handle, float *forwardTimeLimit)
Get the Forward time limit.
eErrorType SR_SetDetTestMaxNumberOfDetectionBoxesForEachClass(DetTestHandle handle, int numOfClasses, int *maxNumBoxes, bool writeOnModelFile=true)
Set Max number of boxes.
eErrorType SR_GetDetTestResultNumberOfBoxes(DetTestResult detTestResult, int *numDetectedBoxes)
Get the number of detected boxes.
eErrorType SR_GetDetTestResultDetectedBoxes(DetTestResult detTestResult, const int numDetectedBoxes, SR_DetectedBox *detectedBoxes)
Get SR_DetectedBox.
eErrorType SR_LoadDetTestNetworkInGPU(DetTestHandle handle, int GPUNumber)
Allocate required cpu & gpu memory.
eErrorType SR_DestroyDetTestHandle(DetTestHandle handle)
Destruct a DetTestHandle.
eErrorType SR_GetDetTestLoadImageTimeInDouble(DetTestResult detTestResult, double *imageLoadingTimeInDouble)
Get the image loading time.
eErrorType SR_GetDetTestResultOneBoxInfo(DetTestResult detTestResult, const int boxIndex, int *classIndex, float *score, int *coordinateXYXY)
Get a single detected box.
eErrorType SR_DeleteDetTestResult(DetTestResult detTestResult)
Destruct a DetTestResult.
eErrorType SR_ApplyDetTestFrom8bitCharGrayArray(DetTestHandle handle, const unsigned char *imageData, const int height, const int width, DetTestResult detTestResult)
Apply detection algorithm to 1-channel image by 8-bit data.
eErrorType SR_GetDetTestInspectionTime(DetTestResult detTestResult, long *inspectionTimeInLong)
Get the inspection time.
eErrorType SR_SetDetTestForwardTimeLimit(DetTestHandle handle, float forwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit.
eErrorType SR_GetDetTestOneClassColor(DetTestHandle handle, const int classIdx, int *classColor)
Get a color of certain class by given index.
eErrorType SR_GetDetTestResultNumberOfBoxesBeforeFiltered(DetTestResult detTestResult, int numClasses, int *numRawBoxes)
Get the number of raw detected boxes before filtered by Max number of boxes for each class.
eErrorType SR_ApplyDetTestFrom8bitCharColorArray(DetTestHandle handle, const unsigned char *imageData, const int height, const int width, DetTestResult detTestResult)
Apply detection algorithm to 3-channels(BGR) image by 8-bit data.
eErrorType SR_SetDetTestForwardTimeLimitVariables(DetTestHandle handle, float forwardTimeLimit, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit variables.
eErrorType SR_GetDetTestCropSize(DetTestHandle handle, int *numHorizontalCroppedPatches, int *numVerticalCroppedPatches)
Get the number of horizontally and vertically cropped patches.
eErrorType SR_GetDetTestAlgorithmType(DetTestHandle handle, eAlgorithmType *algoType)
Get a algorithm type(ex, standard, deep) of a detection model.
eErrorType SR_SetDetTestPixelSizeThreshold(DetTestHandle handle, int *areaThreshold, bool writeOnModelFile=true)
Set Detection's area threshold for each class.
Struct describing features of a detected box.
Definition: CommonHeaderDLL.h:213
void * DetTestHandle
Detection file handler.
Definition: DetectorTestDLL.h:52
eErrorType SR_GetDetTestInspectionTimeInDouble(DetTestResult detTestResult, double *inspectionTimeInDouble)
Get the inspection time.
eErrorType SR_PrintDetTestParameters(DetTestHandle handle)
Print a model parameters (Detection's class information, inspection options...)
eErrorType SR_GetDetTestMinScoreThresholdForSingleClass(DetTestHandle handle, const int classIdx, int *scoreThreshold)
Get Detection's score threshold for single class.
DetTestHandle SR_CreateDetTestHandle(const char *filePath)
Create a DetTestHandle via multi byte char path.
eErrorType SR_GetDetTestMaxNumberOfDetectionBoxesForEachClass(DetTestHandle handle, int *maxNumBoxes)
Get Max number of boxes.
eErrorType SR_WriteDetTestOptionsOnModelFile(DetTestHandle handle)
Write inspection options(Forward time limit, Detection's score threshold etc) on model file.
eErrorType SR_ApplyDetTestFromUnsignedIntColorArray(DetTestHandle handle, const unsigned int *imageData, const int height, const int width, DetTestResult detTestResult)
Apply detection algorithm to 4-channels(BGRA) image by 8-bit data.
eErrorType SR_SetDetTestCropDetectedBoxesOptions(DetTestHandle handle, bool isToStoreCroppedImage, int defaultCropSize=-1, eModeOfCropLargeObjects modeOfCropLargeObjects=SR_CROP_BY_OBJECTSIZE_NOT_SQUARE, float margin=0.00, bool writeOnModelFile=true)
Set the parameters of Detection's crop box.
eErrorType SR_GetDetTestLoadImageTime(DetTestResult detTestResult, long *imageLoadingTimeInLong)
Get the image loading time.
eErrorType SR_GetDetTestResultAllBoxesInfo(DetTestResult detTestResult, const int numDetectedBoxes, int *classIndices, float *scores, int *coordinatesXYXY)
Get all the detected boxes.
DetTestResult SR_MakeDetTestResult()
Construct a DetTestResult.
void * DetTestResult
Detection inspection results handler.
Definition: DetectorTestDLL.h:67