 |
SaigeVision C/C++
1.4.7
SaigeVision API document for C/C++
|
|
Go to the documentation of this file.
7 #define DLLTYPE_SEGMENTATION
9 #ifdef DLLEXPORT_SEGMENTATION
10 #define DLLTYPE_SEGMENTATION extern "C" __declspec(dllexport)
12 #define DLLTYPE_SEGMENTATION extern "C" __declspec(dllimport)
65 SR_MULTI_CLASS_HEATMAP_OUTPUT = 4,
66 SR_MULTI_CLASS_ARRAY_OUTPUT = 5,
185 int* numberOfClasses);
244 int* scoreThreshold);
256 bool writeOnModelFile =
true);
288 bool writeOnModelFile =
true);
306 bool writeOnModelFile =
true);
320 unsigned long long maxGPUMemorySizeInByte);
339 int maxInspectionHeight,
340 int maxInspectionWidth,
341 bool writeOnModelFile =
true);
351 int* maxInspectionHeight,
352 int* maxInspectionWidth);
368 float* forwardTimeLimit);
376 bool* bIsToUseForwardTimeLimit);
387 float* forwardTimeLimit,
388 bool* bIsToUseForwardTimeLimit);
397 float forwardTimeLimit,
398 bool writeOnModelFile =
true);
407 bool bIsToUseForwardTimeLimit,
408 bool writeOnModelFile =
true);
420 float forwardTimeLimit,
421 bool bIsToUseForwardTimeLimit,
422 bool writeOnModelFile =
true);
477 bool isToStoreCroppedImage,
481 bool writeOnModelFile =
true);
491 bool* isToStoreCroppedImage,
492 int* defaultCropSize,
515 bool isToCalcObjectScores,
516 bool writeOnModelFile =
true);
523 bool* isToCalcObjectScores);
544 bool isToCalcAverageColors,
545 bool writeOnModelFile =
true);
552 bool* isToCalcAverageColors);
644 const char* imagePath,
654 const wchar_t* imagePath,
666 const unsigned char* imageData,
680 const unsigned char* imageData,
694 const unsigned int* imageData,
708 const unsigned char* imageData,
722 const unsigned char* imageData,
736 const unsigned int* imageData,
752 unsigned char** imageData,
768 unsigned char** imageData,
785 unsigned int** imageData,
803 unsigned char** imageData,
819 const wchar_t** imagePaths,
832 const char** imagePaths,
910 int* scoreMatrixChannel,
911 int* scoreMatrixSize);
919 unsigned char* scoreMatrixData);
929 int* xROI,
int* yROI,
int* wROI,
int* hROI);
936 int* numberOfSegmentedObjects);
951 int* numberOfDeletedObjects);
975 long* inspectionTimeInLong);
981 double* inspectionTimeInDouble);
988 long* imageLoadingTimeInLong);
994 double* imageLoadingTimeInDouble);
1029 DLLTYPE_SEGMENTATION
eErrorType SR_SetSegTestOutputMode(
SegTestHandle handle,
int outputMode,
bool writeOnModel);
1032 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestResultPixelArray(
SegTestResult segTestResult,
int arraySize,
int* indexArray,
unsigned char* valueArray);
1035 #ifdef SR_USE_DEPRECATED_FUNCTIONS
1049 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestNumberOfClassesWithBG(
SegTestHandle handle,
int* numberOfClasses);
1052 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassNameWithWideCharByIdxWithBG(
SegTestHandle handle,
const int index,
wchar_t* className);
1055 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithBG(
SegTestHandle handle,
const int index,
char* className);
1058 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassColorByIdxWithBG(
SegTestHandle handle,
const int index,
int* classColor);
1061 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestMinScoreThresholdWithBG(
SegTestHandle handle,
int* scoreThreshold);
1064 DLLTYPE_SEGMENTATION
eErrorType SR_SetSegTestMinScoreThresholdWithBG(
SegTestHandle handle,
int numberOfClasses,
int* scoreThreshold);
1073 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassName(
SegTestHandle handle,
const int index,
wchar_t* className);
1076 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassNameWith1byteCharacter(
SegTestHandle handle,
const int index,
char* className);
1079 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassColor(
SegTestHandle handle,
const int index,
int* classColor);
1088 DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestMinimumPixelSizeThreshold(
SegTestHandle handle,
int* minimumPixelSizeThreshold);
1091 DLLTYPE_SEGMENTATION
eErrorType SR_SetSegTestMinimumPixelSizeThreshold(
SegTestHandle handle,
int* minimumPixelSizeThreshold);
eErrorType SR_ApplySegTestFromMultipleUnsignedIntColorArrays(SegTestHandle handle, int numberOfImages, unsigned int **imageData, int *heights, int *widths, SegTestResult *segTestResults, int flag)
Apply segmentation algorithm to 4-channels(BGRA) images by 8-bit data (Batch inspection mode).
eErrorType SR_SetSegTestForwardTimeLimit(SegTestHandle handle, float forwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit.
eErrorType SR_GetSegTestOnePageNameWithWideChar(SegTestHandle handle, const int pageIdx, wchar_t *pageName)
Get a wide char name of certain page by given index.
eErrorType SR_SetSegTestModeOfFilteringByPixelSize(SegTestHandle handle, eModeOfPixelSizeFilter modeOfFiltering, bool writeOnModelFile=true)
Set the mode of filtering by Segmentation's area threshold.
eErrorType SR_GetSegTestLoadImageTimeInDouble(SegTestResult segTestResult, double *imageLoadingTimeInDouble)
Get the image loading time.
eErrorType SR_SetSegTestMinPixelSizeThresholdWithoutBG(SegTestHandle handle, int numOfClasses, int *areaThreshold, bool writeOnModelFile=true)
Set Segmentation's area threshold for each class.
SegTestResult SR_MakeSegTestResult()
Construct a SegTestResult.
eErrorType SR_GetSegTestIsToCalcAverageColor(SegTestHandle handle, bool *isToCalcAverageColors)
Get the boolean indicating whether calculate SR_SegmentedObject::averageColor or not.
eErrorType SR_SetSegTestForwardTimeLimitVariables(SegTestHandle handle, float forwardTimeLimit, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit variables.
@ SR_MULTI_CLASS_CV_CONTOUR_OUTPUT
Definition: SegmentationTestDLL.h:64
@ SR_MULTI_CLASS_MATRIX_OUTPUT
Definition: SegmentationTestDLL.h:62
eErrorType SR_GetSegTestInspectionTime(SegTestResult segTestResult, long *inspectionTimeInLong)
Get the inspection time.
eErrorType SR_ApplySegTestFrom16bitCharGrayArray(SegTestHandle handle, const unsigned char *imageData, const int height, const int width, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to 1-channel image by 16-bit data.
eErrorType SR_ApplySegTestFromUnsignedIntColorArray(SegTestHandle handle, const unsigned int *imageData, const int height, const int width, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to 4-channels(BGRA) image by 8-bit data.
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:108
eErrorType SR_ApplySegTestFromImageFileByWideCharPath(SegTestHandle handle, const wchar_t *imagePath, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to image by file path.
@ SR_ONE_CLASS_CV_CONTOUR_OUTPUT
Definition: SegmentationTestDLL.h:63
eErrorType SR_GetSegTestMaxInspectionSize(SegTestHandle handle, int *maxInspectionHeight, int *maxInspectionWidth)
Get Segmentation's max inspection size.
eErrorType SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithoutBG(SegTestHandle handle, const int classIdx, char *className)
Get a multi byte char name of certain class by given index.
eErrorType SR_ApplySegTestFromMultiPageImageFileByMultiByteCharPath(SegTestHandle handle, int numOfPages, const char **imagePaths, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to multi-page image by file path (multi-page).
eErrorType SR_GetSegTestDeletedObjects(SegTestResult segTestResult, SR_SegmentedObject *deletedObjects)
Get deleted SR_SegmentedObject s by filter process Segmentation's area threshold.
eErrorType SR_GetSegTestNumberOfSegmentedObjects(SegTestResult segTestResult, int *numberOfSegmentedObjects)
Get the number of SR_SegmentedObject.
eErrorType SR_GetSegTestIsToCalcObjectScores(SegTestHandle handle, bool *isToCalcObjectScores)
Get the boolean indicating whether calculate SR_SegmentedObject::scores or not.
eErrorType SR_SetSegTestMaxGPUMemorySizeInByte(SegTestHandle handle, unsigned long long maxGPUMemorySizeInByte)
Set the maximum size of gpu memory to use for inspections in byte.
eErrorType SR_GetSegTestROI(SegTestResult segTestResult, int *xROI, int *yROI, int *wROI, int *hROI)
Get ROI.
@ SR_ONE_CLASS_MATRIX_OUTPUT
Definition: SegmentationTestDLL.h:61
eErrorType SR_ApplySegTestFromMultiple8bitCharGrayArrays(SegTestHandle handle, int numberOfImages, unsigned char **imageData, int *heights, int *widths, SegTestResult *segTestResults, int flag)
Apply segmentation algorithm to 1-channel images by 8-bit data (Batch inspection mode).
eErrorType SR_ApplySegTestFromMultiPage8bitCharArrays(SegTestHandle handle, int numOfPages, unsigned char **imageData, int height, int width, int *channels, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to multi-page image by 8-bit data (multi-page).
eErrorType SR_LoadSegTestNetworkInGPU(SegTestHandle handle, int GPUNumber, int batchSize=1)
Allocate required cpu & gpu memory.
eErrorType SR_SetSegTestIsToStoreCroppedImage(SegTestHandle handle, bool isToStoreCroppedImage, int defaultCropSize, eModeOfCropLargeObjects modeOfCropLargeObjects=SR_CROP_BY_OBJECTSIZE_N_RESIZE_TO_CROPSIZE, float margin=0.05, bool writeOnModelFile=true)
Set the parameters of Segmentation's crop object.
eErrorType SR_GetSegTestResultOriginalImageSize(SegTestResult segTestResult, int *width, int *height)
Get the size of inspected image.
eErrorType SR_GetSegTestMinScoreThresholdWithoutBG(SegTestHandle handle, int *scoreThreshold)
Get Segmentation's score threshold for each class.
SegTestHandle SR_CreateSegTestHandleByWideCharPath(const wchar_t *filePath)
Create a SegTestHandle via wide char path.
eErrorType SR_GetSegTestForwardTimeLimitVariables(SegTestHandle handle, float *forwardTimeLimit, bool *bIsToUseForwardTimeLimit)
Get the Forward time limit variables.
eErrorType SR_DeleteSegTestResult(SegTestResult segTestResult)
Destruct a SegTestResult.
eErrorType SR_ApplySegTestFromDetectedBoxes(SegTestHandle handle, int numberOfBoxes, SR_DetectedBox *detectedBoxes, SegTestResult *segTestResults, int flag)
Apply segmentation algorithm to SR_DetectedBox::croppedImage.
eErrorType SR_ApplySegTestFrom8bitCharColorArray(SegTestHandle handle, const unsigned char *imageData, const int height, const int width, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to 3-channels(BGR) image by 8-bit data.
eErrorType SR_SetSegTestIsToCalcAverageColor(SegTestHandle handle, bool isToCalcAverageColors, bool writeOnModelFile=true)
Set the boolean indicating whether calculate SR_SegmentedObject::averageColor or not.
eErrorType SR_ApplySegTestFrom16bitUnsignedIntColorArray(SegTestHandle handle, const unsigned int *imageData, const int height, const int width, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to 4-channels(BGRA) image by 16-bit data.
eErrorType SR_GetSegTestOnePageNameWithMultiByteChar(SegTestHandle handle, const int pageIdx, char *pageName)
Get a multi byte char name of certain page by given index.
eErrorType SR_GetSegTestLoadImageTime(SegTestResult segTestResult, long *imageLoadingTimeInLong)
Get the image loading time.
eErrorType SR_GetSegTestOneClassColorByIdxWithoutBG(SegTestHandle handle, const int classIdx, int *classColor)
Get a color of certain class by given index.
eErrorType SR_GetSegTestForwardTimeLimit(SegTestHandle handle, float *forwardTimeLimit)
Get the Forward time limit.
eErrorType SR_GetSegTestNumberOfDeletedObjects(SegTestResult segTestResult, int *numberOfDeletedObjects)
Get the number of deleted SR_SegmentedObject s by filter process Segmentation's area threshold.
eSegTestOutputType
Segmentation output type.
Definition: SegmentationTestDLL.h:60
eErrorType SR_GetSegTestAlgorithmType(SegTestHandle handle, eAlgorithmType *algoType)
Get a algorithm type(ex, standard, deep) of a segmentation model.
Struct describing features of a detected box.
Definition: CommonHeaderDLL.h:213
eErrorType SR_SetSegTestMaxInspectionSize(SegTestHandle handle, int maxInspectionHeight, int maxInspectionWidth, bool writeOnModelFile=true)
Set Segmentation's max inspection size.
eErrorType SR_DestroySegTestHandle(SegTestHandle handle)
Destruct a SegTestHandle.
eErrorType SR_SetSegTestMinScoreThresholdWithoutBG(SegTestHandle handle, int numOfClasses, int *scoreThreshold, bool writeOnModelFile=true)
Set Segmentation's score threshold for each class.
eErrorType SR_SetSegTestIsToCalcObjectScores(SegTestHandle handle, bool isToCalcObjectScores, bool writeOnModelFile=true)
Set the boolean indicating whether calculate SR_SegmentedObject::scores or not.
SegTestHandle SR_CreateSegTestHandle(const char *filePath)
Create a SegTestHandle via multi byte char path.
void * SegTestHandle
Segmentation file handler.
Definition: SegmentationTestDLL.h:90
eErrorType SR_ApplySegTestFrom16bitCharColorArray(SegTestHandle handle, const unsigned char *imageData, const int height, const int width, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to 3-channels(BGR) image by 16-bit data.
eErrorType SR_ApplySegTestFromMultiple8bitCharColorArrays(SegTestHandle handle, int numberOfImages, unsigned char **imageData, int *heights, int *widths, SegTestResult *segTestResults, int flag)
Apply segmentation algorithm to 3-channels(BGR) images by 8-bit data (Batch inspection mode).
eErrorType SR_ApplySegTestFromImageFile(SegTestHandle handle, const char *imagePath, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to image by file path.
void * SegTestResult
Segmentation inspection results handler.
Definition: SegmentationTestDLL.h:105
eErrorType SR_PrintSegTestParametersWithoutBG(SegTestHandle handle)
Print a model parameters (Segmentation's class information, inspection options...)
eErrorType SR_GetSegTestOutputMatrixSizeInfo(SegTestResult segTestResult, int *scoreMatrixChannel, int *scoreMatrixSize)
Get the size of Score matrix.
eErrorType SR_WriteSegTestOptionsOnModelFile(SegTestHandle handle)
Write inspection options(Forward time limit, Segmentation's score threshold etc) on the model file.
eErrorType SR_ApplySegTestFromMultiPageImageFileByWideCharPath(SegTestHandle handle, int numOfPages, const wchar_t **imagePaths, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to multi-page image by file path (multi-page).
eErrorType SR_ApplySegTestFrom8bitCharGrayArray(SegTestHandle handle, const unsigned char *imageData, const int height, const int width, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to 1-channel image by 8-bit data.
eErrorType SR_GetSegTestIsToUseForwardTimeLimit(SegTestHandle handle, bool *bIsToUseForwardTimeLimit)
Get the boolean whether the current model is using time limit or not.
eErrorType SR_GetSegTestOutputMatrix(SegTestResult segTestResult, int scoreMatrixSize, unsigned char *scoreMatrixData)
Get Score matrix.
eErrorType SR_GetSegTestIsToStoreCroppedImage(SegTestHandle handle, bool *isToStoreCroppedImage, int *defaultCropSize, eModeOfCropLargeObjects *modeOfCropLargeObjects, float *margin)
Get the parameters of Segmentation's crop object.
eErrorType SR_GetSegTestMaxStrLenOfPageName(SegTestHandle handle, int *len)
Get a maximum length of page name.
eErrorType SR_GetSegTestMaxStrLenOfClassName(SegTestHandle handle, int *len)
Get a maximum length of class name.
eErrorType SR_GetSegTestCropParamsUsedForExportingResults(SegTestHandle handle, int *cropHeight, int *cropWidth, eModeOfCropLargeObjects *mode, float *margin)
Get cropping parameters (crop height & width, mode, margin) used for exporting segmented objects.
eErrorType SR_GetSegTestInspectionTimeInDouble(SegTestResult segTestResult, double *inspectionTimeInDouble)
Get the inspection time.
eErrorType SR_GetSegTestModeOfFilteringByPixelSize(SegTestHandle handle, eModeOfPixelSizeFilter *modeOfFiltering)
Get the mode of filtering by Segmentation's area threshold.
eErrorType SR_SetSegTestIsToUseForwardTimeLimit(SegTestHandle handle, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the boolean whether the current model is using time limit or not.
eErrorType SR_GetSegTestMinPixelSizeThresholdWithoutBG(SegTestHandle handle, int *areaThreshold)
Get Segmentation's area threshold for each class.
eErrorType SR_GetSegTestNumberOfClassesWithoutBG(SegTestHandle handle, int *numberOfClasses)
Get the number of classes.
eErrorType SR_GetSegTestSegmentedObjects(SegTestResult segTestResult, SR_SegmentedObject *segmentedObjects)
Get SR_SegmentedObject s.
eErrorType SR_GetSegTestNumberOfPages(SegTestHandle handle, int *numberOfPages)
Get the number of pages.
eErrorType SR_GetSegTestOneClassNameWithWideCharByIdxWithoutBG(SegTestHandle handle, const int classIdx, wchar_t *className)
Get a wide char name of certain class by given index.
eErrorType SR_SetSegTestOptionsAsDefault(SegTestHandle handle)
Reset inspection options(Forward time limit, Segmentation's score threshold etc) as default values.