SaigeVision C/C++ 1.5.0
SaigeVision API document for C/C++
 
Loading...
Searching...
No Matches
SegmentationTestDLL.h
Go to the documentation of this file.
1
4#pragma once
5
6#ifdef __linux__
7 #define DLLTYPE_SEGMENTATION
8#elif _WIN32
9 #ifdef DLLEXPORT_SEGMENTATION
10 #define DLLTYPE_SEGMENTATION extern "C" __declspec(dllexport)
11 #else
12 #define DLLTYPE_SEGMENTATION extern "C" __declspec(dllimport)
13 #endif
14#endif
15
16#include "CommonHeaderDLL.h"
17
59typedef enum
60{
65 SR_MULTI_CLASS_HEATMAP_OUTPUT = 4,
66 SR_MULTI_CLASS_ARRAY_OUTPUT = 5,
68
90typedef void* SegTestHandle;
105typedef void* SegTestResult;
106
113DLLTYPE_SEGMENTATION SegTestHandle SR_CreateSegTestHandle(const char* filePath);
114
121DLLTYPE_SEGMENTATION eErrorType SR_CreateSegTestHandle_ErrorType(SegTestHandle* segTestHandle, const char* filePath);
122
129DLLTYPE_SEGMENTATION SegTestHandle SR_CreateSegTestHandleByWideCharPath(const wchar_t* filePath);
130
137DLLTYPE_SEGMENTATION eErrorType SR_CreateSegTestHandleByWideCharPath_ErrorType(SegTestHandle* segTestHandle, const wchar_t* filePath);
138
142DLLTYPE_SEGMENTATION SegTestResult SR_MakeSegTestResult();
143
148DLLTYPE_SEGMENTATION eErrorType SR_MakeSegTestResult_ErrorType(SegTestResult* segTestResult);
161 int GPUNumber,
162 int batchSize = 1);
163
166 eAlgorithmType* algoType);
167
170
171
207 int* numberOfClasses);
208
214 int* len);
215
222 const int classIdx,
223 wchar_t* className);
224
231 const int classIdx,
232 char* className);
233
240 const int classIdx,
241 int* classColor);
242
250 int* trainedVersionMajor,
251 int* trainedVersionMinor,
252 int* trainedVersionPatch);
253
278 int* scoreThreshold);
279
288 int numOfClasses,
289 int* scoreThreshold,
290 bool writeOnModelFile = true);
310 int* areaThreshold);
311
320 int numOfClasses,
321 int* areaThreshold,
322 bool writeOnModelFile = true);
323
330 eModeOfPixelSizeFilter* modeOfFiltering);
331
339 eModeOfPixelSizeFilter modeOfFiltering,
340 bool writeOnModelFile = true);
358
364DLLTYPE_SEGMENTATION eErrorType SR_GetSegFilterObjSimpleParameters(SegTestHandle handle, float* simpleParams);
365
372DLLTYPE_SEGMENTATION eErrorType SR_SetSegFilterObjByRegion(SegTestHandle handle, eFilterObjByRegionType filterObjType, bool writeOnModelFile = true);
373
380DLLTYPE_SEGMENTATION eErrorType SR_SetSegFilterObjSimpleParameters(SegTestHandle handle, float* simpleParams, bool writeOnModelFile = true);
381
396 unsigned long long maxGPUMemorySizeInByte);
397
398
415 int maxInspectionHeight,
416 int maxInspectionWidth,
417 bool writeOnModelFile = true);
418
427 int* maxInspectionHeight,
428 int* maxInspectionWidth);
444 float* forwardTimeLimit); /* milliseconds */
445
452 bool* bIsToUseForwardTimeLimit);
453
463 float* forwardTimeLimit, /* milliseconds */
464 bool* bIsToUseForwardTimeLimit);
465
473 float forwardTimeLimit, /* milliseconds */
474 bool writeOnModelFile = true);
475
483 bool bIsToUseForwardTimeLimit,
484 bool writeOnModelFile = true);
485
496 float forwardTimeLimit, /* milliseconds */
497 bool bIsToUseForwardTimeLimit,
498 bool writeOnModelFile = true);
507 int* cropHeight,
508 int* cropWidth,
510 float* margin);
511
553 bool isToStoreCroppedImage,
554 int defaultCropSize,
556 float margin = 0.05,
557 bool writeOnModelFile = true);
558
567 bool* isToStoreCroppedImage,
568 int* defaultCropSize,
569 eModeOfCropLargeObjects* modeOfCropLargeObjects,
570 float* margin);
591 bool isToCalcObjectScores,
592 bool writeOnModelFile = true);
593
599 bool* isToCalcObjectScores);
620 bool isToCalcAverageColors,
621 bool writeOnModelFile = true);
622
628 bool* isToCalcAverageColors);
647 bool isMatrixOutputIncluded,
648 bool writeOnModelFile = true);
649
655 bool* isMatrixOutputIncluded);
686 int* numberOfPages);
687
693 int* len);
694
701 const int pageIdx,
702 wchar_t* pageName);
703
710 const int pageIdx,
711 char* pageName);
747 const char* imagePath,
748 SegTestResult segTestResult,
749 int flag);
757 const wchar_t* imagePath,
758 SegTestResult segTestResult,
759 int flag);
769 const unsigned char* imageData,
770 const int height,
771 const int width,
772 SegTestResult segTestResult,
773 int flag);
783 const unsigned char* imageData,
784 const int height,
785 const int width,
786 SegTestResult segTestResult,
787 int flag);
797 const unsigned int* imageData,
798 const int height,
799 const int width,
800 SegTestResult segTestResult,
801 int flag);
811 const unsigned char* imageData,
812 const int height,
813 const int width,
814 SegTestResult segTestResult,
815 int flag);
825 const unsigned char* imageData,
826 const int height,
827 const int width,
828 SegTestResult segTestResult,
829 int flag);
839 const unsigned int* imageData,
840 const int height,
841 const int width,
842 SegTestResult segTestResult,
843 int flag);
854 int numberOfImages,
855 unsigned char** imageData,
856 int* heights,
857 int* widths,
858 SegTestResult* segTestResults,
859 int flag);
870 int numberOfImages,
871 unsigned char** imageData,
872 int* heights,
873 int* widths,
874 SegTestResult* segTestResults,
875 int flag);
876
887 int numberOfImages,
888 unsigned int** imageData,
889 int* heights,
890 int* widths,
891 SegTestResult* segTestResults,
892 int flag);
893
905 int numOfPages,
906 unsigned char** imageData,
907 int height,
908 int width,
909 int* channels,
910 SegTestResult segTestResult,
911 int flag);
912
921 int numOfPages,
922 const wchar_t** imagePaths,
923 SegTestResult segTestResult,
924 int flag);
925
934 int numOfPages,
935 const char** imagePaths,
936 SegTestResult segTestResult,
937 int flag);
946 int numberOfBoxes,
947 SR_DetectedBox* detectedBoxes,
948 SegTestResult* segTestResults,
949 int flag);
950
961 const void* imageData,
962 const int height,
963 const int width,
964 const int channels,
965 const unsigned int binarySizeInBytes,
966 void* binaryOut);
967
1031 int* scoreMatrixChannel,
1032 int* scoreMatrixSize);
1038DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOutputMatrix(SegTestResult segTestResult,
1039 int scoreMatrixSize,
1040 unsigned char* scoreMatrixData);
1041
1049DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestROI(SegTestResult segTestResult,
1050 int* xROI, int* yROI, int* wROI, int* hROI);
1051
1057 int* numberOfSegmentedObjects);
1058
1064DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestSegmentedObjects(SegTestResult segTestResult,
1065 SR_SegmentedObject* segmentedObjects);
1066
1072 int* numberOfDeletedObjects);
1073
1079DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestDeletedObjects(SegTestResult segTestResult,
1080 SR_SegmentedObject* deletedObjects);
1081
1088 int* width,
1089 int* height);
1090
1095DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestInspectionTime(SegTestResult segTestResult,
1096 long* inspectionTimeInLong); /* milliseconds */
1102 double* inspectionTimeInDouble); /* milliseconds */
1103
1108DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestLoadImageTime(SegTestResult segTestResult,
1109 long* imageLoadingTimeInLong); /* milliseconds */
1115 double* imageLoadingTimeInDouble); /* milliseconds */
1116
1122 bool* isExceededMaxInspectionSize);
1123
1128DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestIsImageCropped(SegTestResult segTestResult,
1129 bool* isImageCropped);
1130
1141
1143DLLTYPE_SEGMENTATION eErrorType SR_DeleteSegTestResult(SegTestResult segTestResult);
1158
1161
1162
1163#ifdef SR_USE_DEPRECATED_FUNCTIONS
1164/***********************************************************************************************************************
1165* These Functions are provided for users who started using Saige Vision API before v1.2.0
1166* which cares the background class for some reasons.
1167* We recommed to change these functions to above functions with "WithoutBG".
1168*
1169* 아래 함수들은 세이지 비젼 API를 v1.2.0 이전부터 사용해오던 유저를 위하여 제공됩니다.
1170* v1.2.0이전에는 Saige Vision UI와 달리 API에서는 Background를 포함시켰었기 때문에 이와 같은 함수들을 제공합니다.
1171* 하지만 background를 고려하지 않는 WithoutBG 함수들로 교체하는 것을 권장합니다.
1172***********************************************************************************************************************/
1173/* Print a model parameters including background (class name, class colors, score threshold...)*/
1174DLLTYPE_SEGMENTATION eErrorType SR_PrintSegTestParametersWithBG(SegTestHandle handle);
1175
1176/* Get the number of classes including background*/
1177DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestNumberOfClassesWithBG(SegTestHandle handle, int* numberOfClasses);
1178
1179/* Get a wide char name of certain class by given index including background*/
1180DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassNameWithWideCharByIdxWithBG(SegTestHandle handle, const int index, wchar_t* className);
1181
1182/* Get a multi byte char name of certain class by given index including background*/
1183DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithBG(SegTestHandle handle, const int index, char* className);
1184
1185/* Get a color of certain class by given index including background*/
1186DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassColorByIdxWithBG(SegTestHandle handle, const int index, int* classColor);
1187
1188/* Get minimum score thresholds for each class except for background*/
1189DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestMinScoreThresholdWithBG(SegTestHandle handle, int* scoreThreshold);
1190
1191/* Set minimum score thresholds for each class except for background*/
1192DLLTYPE_SEGMENTATION eErrorType SR_SetSegTestMinScoreThresholdWithBG(SegTestHandle handle, int numberOfClasses, int* scoreThreshold);
1193
1194/* This function behaves identically with SR_PrintSegTestParametersWithBG*/
1195DLLTYPE_SEGMENTATION eErrorType SR_PrintSegTestParameters(SegTestHandle handle);
1196
1197/* This function behaves identically with SR_GetSegTestNumberOfClassesWithBG*/
1198DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestNumberOfClasses(SegTestHandle handle, int* numberOfClasses);
1199
1200/* This function behaves identically with SR_GetSegTestOneClassNameWithWideCharByIdxWithBG*/
1201DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassName(SegTestHandle handle, const int index, wchar_t* className);
1202
1203/* This function behaves identically with SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithBG*/
1204DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassNameWith1byteCharacter(SegTestHandle handle, const int index, char* className);
1205
1206/* This function behaves identically with SR_GetSegTestOneClassColorByIdxWithBG*/
1207DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassColor(SegTestHandle handle, const int index, int* classColor);
1208
1209/* This function behaves identically with SR_GetSegTestMinScoreThresholdWithBG*/
1210DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestEachClassThreshold(SegTestHandle handle, int* threshold);
1211
1212/* This function behaves identically with SR_SetSegTestMinScoreThresholdWithBG*/
1213DLLTYPE_SEGMENTATION eErrorType SR_SetSegTestEachClassThreshold(SegTestHandle handle, int* threshold);
1214
1215/* This function behaves identically with SR_GetSegTestMinPixelSizeThresholdWithoutBG*/
1216DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestMinimumPixelSizeThreshold(SegTestHandle handle, int* minimumPixelSizeThreshold);
1217
1218/* This function behaves identically with SR_SetSegTestMinPixelSizeThresholdWithoutBG*/
1219DLLTYPE_SEGMENTATION eErrorType SR_SetSegTestMinimumPixelSizeThreshold(SegTestHandle handle, int* minimumPixelSizeThreshold);
1220#endif
Header file for Commonly used variables.
eAlgorithmType
Enumerator indicating a type of model.
Definition: CommonHeaderDLL.h:56
eErrorType
Enumerator indicating error codes.
Definition: CommonHeaderDLL.h:30
eModeOfPixelSizeFilter
Enumerator indicating a mode of filtering by object's area in segmentation.
Definition: CommonHeaderDLL.h:95
eFilterObjByRegionType
Enumerator indicating a filtering object by region type in detection and segmentation.
Definition: CommonHeaderDLL.h:115
eModeOfCropLargeObjects
Enumerator indicating a mode of cropping large objects in segmentation.
Definition: CommonHeaderDLL.h:106
@ SR_CROP_BY_OBJECTSIZE_N_RESIZE_TO_CROPSIZE
Definition: CommonHeaderDLL.h:107
eErrorType SR_SetSegTestOptionsAsDefault(SegTestHandle handle)
Reset inspection options(Forward time limit, Segmentation's score threshold etc) as default values.
eErrorType SR_GetSegTestAlgorithmType(SegTestHandle handle, eAlgorithmType *algoType)
Get a algorithm type(ex, standard, deep) of a segmentation model.
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_SetSegTestMaxGPUMemorySizeInByte(SegTestHandle handle, unsigned long long maxGPUMemorySizeInByte)
검사에 사용할 최대 gpu 메모리 사이즈를 byte단위로 설정합니다.
eErrorType SR_WriteSegTestOptionsOnModelFile(SegTestHandle handle)
Write inspection options(Forward time limit, Segmentation's score threshold etc) on the model file.
eErrorType SR_PrintSegTestParametersWithoutBG(SegTestHandle handle)
Print a model parameters (Segmentation's class information, inspection options...)
eSegTestOutputType
Segmentation output type.
Definition: SegmentationTestDLL.h:60
@ SR_ONE_CLASS_CV_CONTOUR_OUTPUT
Definition: SegmentationTestDLL.h:63
@ SR_MULTI_CLASS_CV_CONTOUR_OUTPUT
Definition: SegmentationTestDLL.h:64
@ SR_ONE_CLASS_MATRIX_OUTPUT
Definition: SegmentationTestDLL.h:61
@ SR_MULTI_CLASS_MATRIX_OUTPUT
Definition: SegmentationTestDLL.h:62
eErrorType SR_LoadSegTestNetworkInGPU(SegTestHandle handle, int GPUNumber, int batchSize=1)
Allocate required cpu & gpu memory.
eErrorType SR_SetSegTestMinPixelSizeThresholdWithoutBG(SegTestHandle handle, int numOfClasses, int *areaThreshold, bool writeOnModelFile=true)
Set Segmentation's area threshold for each class.
eErrorType SR_GetSegTestModeOfFilteringByPixelSize(SegTestHandle handle, eModeOfPixelSizeFilter *modeOfFiltering)
Get the mode of filtering by Segmentation's area threshold.
eErrorType SR_GetSegTestMinPixelSizeThresholdWithoutBG(SegTestHandle handle, int *areaThreshold)
Get Segmentation's area threshold for each class.
eErrorType SR_SetSegTestModeOfFilteringByPixelSize(SegTestHandle handle, eModeOfPixelSizeFilter modeOfFiltering, bool writeOnModelFile=true)
Set the mode of filtering by Segmentation's area threshold.
eErrorType SR_SetSegTestIsToCalcAverageColor(SegTestHandle handle, bool isToCalcAverageColors, bool writeOnModelFile=true)
Set the boolean indicating whether calculate SR_SegmentedObject::averageColor or not.
eErrorType SR_GetSegTestIsToCalcAverageColor(SegTestHandle handle, bool *isToCalcAverageColors)
Get the boolean indicating whether calculate SR_SegmentedObject::averageColor or not.
eErrorType SR_GetSegTrainedVersion(SegTestHandle handle, int *trainedVersionMajor, int *trainedVersionMinor, int *trainedVersionPatch)
Get a trained version of model file, -1 means before v1.4.8.
eErrorType SR_GetSegTestOneClassNameWithWideCharByIdxWithoutBG(SegTestHandle handle, const int classIdx, wchar_t *className)
Get a wide char name of certain class by given index.
eErrorType SR_GetSegTestMaxStrLenOfClassName(SegTestHandle handle, int *len)
Get a maximum length of class name.
eErrorType SR_GetSegTestNumberOfClassesWithoutBG(SegTestHandle handle, int *numberOfClasses)
Get the number of classes.
eErrorType SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithoutBG(SegTestHandle handle, const int classIdx, char *className)
Get a multi byte char name of certain class by given index.
eErrorType SR_GetSegTestOneClassColorByIdxWithoutBG(SegTestHandle handle, const int classIdx, int *classColor)
Get a color of certain class by given index.
eErrorType SR_GetSegTestIsToStoreCroppedImage(SegTestHandle handle, bool *isToStoreCroppedImage, int *defaultCropSize, eModeOfCropLargeObjects *modeOfCropLargeObjects, float *margin)
Get the parameters of Segmentation's crop object.
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_SetSegFilterObjSimpleParameters(SegTestHandle handle, float *simpleParams, bool writeOnModelFile=true)
Set the simple parameters of filtering object by Segmentation's filter object by region.
eErrorType SR_GetSegFilterObjByRegion(SegTestHandle handle, eFilterObjByRegionType *filterObjType)
Get the filtering object type by Segmentation's filter object by region.
eErrorType SR_SetSegFilterObjByRegion(SegTestHandle handle, eFilterObjByRegionType filterObjType, bool writeOnModelFile=true)
Set the filtering object type by Segmentation's filter object by region.
eErrorType SR_GetSegFilterObjSimpleParameters(SegTestHandle handle, float *simpleParams)
Get the simple parameters of filtering object by Segmentation's filter object by region.
eErrorType SR_SetSegTestForwardTimeLimitVariables(SegTestHandle handle, float forwardTimeLimit, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit variables.
eErrorType SR_GetSegTestForwardTimeLimitVariables(SegTestHandle handle, float *forwardTimeLimit, bool *bIsToUseForwardTimeLimit)
Get the Forward time limit variables.
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_SetSegTestForwardTimeLimit(SegTestHandle handle, float forwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit.
eErrorType SR_GetSegTestForwardTimeLimit(SegTestHandle handle, float *forwardTimeLimit)
Get the Forward time limit.
eErrorType SR_GetSegTestIsToUseForwardTimeLimit(SegTestHandle handle, bool *bIsToUseForwardTimeLimit)
Get the boolean whether the current model is using time limit or not.
void * SegTestHandle
Segmentation file handler.
Definition: SegmentationTestDLL.h:90
eErrorType SR_CreateSegTestHandleByWideCharPath_ErrorType(SegTestHandle *segTestHandle, const wchar_t *filePath)
Create a SegTestHandle via wide char path.
SegTestHandle SR_CreateSegTestHandle(const char *filePath)
Create a SegTestHandle via multi byte char path.
SegTestResult SR_MakeSegTestResult()
Construct a SegTestResult.
eErrorType SR_CreateSegTestHandle_ErrorType(SegTestHandle *segTestHandle, const char *filePath)
Create a SegTestHandle via multi byte char path.
void * SegTestResult
Segmentation inspection results handler.
Definition: SegmentationTestDLL.h:105
SegTestHandle SR_CreateSegTestHandleByWideCharPath(const wchar_t *filePath)
Create a SegTestHandle via wide char path.
eErrorType SR_MakeSegTestResult_ErrorType(SegTestResult *segTestResult)
Construct a SegTestResult.
eErrorType SR_DestroySegTestHandle(SegTestHandle handle)
Destruct a SegTestHandle.
eErrorType SR_DeleteSegTestResult(SegTestResult segTestResult)
Destruct a SegTestResult.
eErrorType SR_GetSegTestIsMatrixOutputIncluded(SegTestHandle handle, bool *isMatrixOutputIncluded)
Get the boolean indicating whether include matrix output or not.
eErrorType SR_SetSegTestIsMatrixOutputIncluded(SegTestHandle handle, bool isMatrixOutputIncluded, bool writeOnModelFile=true)
Set the boolean indicating whether include matrix output or not.
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).
eErrorType SR_ApplySegTestFromDetectedBoxes(SegTestHandle handle, int numberOfBoxes, SR_DetectedBox *detectedBoxes, SegTestResult *segTestResults, int flag)
Apply segmentation algorithm to SR_DetectedBox::croppedImage.
eErrorType SR_ApplySegTestForCompressedBinaryOutput(SegTestHandle handle, const void *imageData, const int height, const int width, const int channels, const unsigned int binarySizeInBytes, void *binaryOut)
Apply segmentation algorithm to image and get compressed binary cv8u output.
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_ApplySegTestFromImageFileByWideCharPath(SegTestHandle handle, const wchar_t *imagePath, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to image by file path.
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.
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).
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_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_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_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_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_ApplySegTestFromImageFile(SegTestHandle handle, const char *imagePath, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to image by file path.
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).
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_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_GetSegTestLoadImageTimeInDouble(SegTestResult segTestResult, double *imageLoadingTimeInDouble)
Get the image loading time.
eErrorType SR_GetSegTestIsImageCropped(SegTestResult segTestResult, bool *isImageCropped)
Get whether the image is cropped due to lack of GPU memory.
eErrorType SR_GetSegTestDeletedObjects(SegTestResult segTestResult, SR_SegmentedObject *deletedObjects)
Get deleted SR_SegmentedObject s by filter process Segmentation's area threshold.
eErrorType SR_GetSegTestROI(SegTestResult segTestResult, int *xROI, int *yROI, int *wROI, int *hROI)
Get ROI.
eErrorType SR_GetSegTestLoadImageTime(SegTestResult segTestResult, long *imageLoadingTimeInLong)
Get the image loading time.
eErrorType SR_GetSegTestNumberOfDeletedObjects(SegTestResult segTestResult, int *numberOfDeletedObjects)
Get the number of deleted SR_SegmentedObject s by filter process Segmentation's area threshold.
eErrorType SR_GetSegTestInspectionTime(SegTestResult segTestResult, long *inspectionTimeInLong)
Get the inspection time.
eErrorType SR_GetSegTestOutputMatrix(SegTestResult segTestResult, int scoreMatrixSize, unsigned char *scoreMatrixData)
Get Score matrix.
eErrorType SR_GetSegTestNumberOfSegmentedObjects(SegTestResult segTestResult, int *numberOfSegmentedObjects)
Get the number of SR_SegmentedObject.
eErrorType SR_GetSegTestResultOriginalImageSize(SegTestResult segTestResult, int *width, int *height)
Get the size of inspected image.
eErrorType SR_GetSegTestIsExceededMaxInspectionSize(SegTestResult segTestResult, bool *isExceededMaxInspectionSize)
Get whether the size of inspected image exceeds max inspection size.
eErrorType SR_GetSegTestSegmentedObjects(SegTestResult segTestResult, SR_SegmentedObject *segmentedObjects)
Get SR_SegmentedObject s.
eErrorType SR_GetSegTestOutputMatrixSizeInfo(SegTestResult segTestResult, int *scoreMatrixChannel, int *scoreMatrixSize)
Get the size of Score matrix.
eErrorType SR_GetSegTestInspectionTimeInDouble(SegTestResult segTestResult, double *inspectionTimeInDouble)
Get the inspection time.
eErrorType SR_SetSegTestMaxInspectionSize(SegTestHandle handle, int maxInspectionHeight, int maxInspectionWidth, bool writeOnModelFile=true)
Set Segmentation's max inspection size.
eErrorType SR_GetSegTestMaxInspectionSize(SegTestHandle handle, int *maxInspectionHeight, int *maxInspectionWidth)
Get Segmentation's max inspection size.
eErrorType SR_GetSegTestOnePageNameWithWideChar(SegTestHandle handle, const int pageIdx, wchar_t *pageName)
Get a wide char name of certain page by given index.
eErrorType SR_GetSegTestNumberOfPages(SegTestHandle handle, int *numberOfPages)
Get the number of pages.
eErrorType SR_GetSegTestMaxStrLenOfPageName(SegTestHandle handle, int *len)
Get a maximum length of page name.
eErrorType SR_GetSegTestOnePageNameWithMultiByteChar(SegTestHandle handle, const int pageIdx, char *pageName)
Get a multi byte char name of certain page by given index.
eErrorType SR_SetSegTestIsToCalcObjectScores(SegTestHandle handle, bool isToCalcObjectScores, bool writeOnModelFile=true)
Set the boolean indicating whether calculate SR_SegmentedObject::scores or not.
eErrorType SR_GetSegTestIsToCalcObjectScores(SegTestHandle handle, bool *isToCalcObjectScores)
Get the boolean indicating whether calculate SR_SegmentedObject::scores or not.
eErrorType SR_GetSegTestMinScoreThresholdWithoutBG(SegTestHandle handle, int *scoreThreshold)
Get Segmentation's score threshold for each class.
eErrorType SR_SetSegTestMinScoreThresholdWithoutBG(SegTestHandle handle, int numOfClasses, int *scoreThreshold, bool writeOnModelFile=true)
Set Segmentation's score threshold for each class.
Struct describing features of a detected box.
Definition: CommonHeaderDLL.h:250
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:122