SaigeVision C/C++  1.4.7
SaigeVision API document for C/C++
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 
59 typedef enum
60 {
65  SR_MULTI_CLASS_HEATMAP_OUTPUT = 4,
66  SR_MULTI_CLASS_ARRAY_OUTPUT = 5,
68 
90 typedef void* SegTestHandle;
105 typedef void* SegTestResult;
106 
113 DLLTYPE_SEGMENTATION SegTestHandle SR_CreateSegTestHandle(const char* filePath);
114 
121 DLLTYPE_SEGMENTATION SegTestHandle SR_CreateSegTestHandleByWideCharPath(const wchar_t* filePath);
122 
126 DLLTYPE_SEGMENTATION SegTestResult SR_MakeSegTestResult();
139  int GPUNumber,
140  int batchSize = 1);
141 
144  eAlgorithmType* algoType);
145 
148 
149 
185  int* numberOfClasses);
186 
192  int* len);
193 
200  const int classIdx,
201  wchar_t* className);
202 
209  const int classIdx,
210  char* className);
211 
218  const int classIdx,
219  int* classColor);
244  int* scoreThreshold);
245 
254  int numOfClasses,
255  int* scoreThreshold,
256  bool writeOnModelFile = true);
276  int* areaThreshold);
277 
286  int numOfClasses,
287  int* areaThreshold,
288  bool writeOnModelFile = true);
289 
296  eModeOfPixelSizeFilter* modeOfFiltering);
297 
305  eModeOfPixelSizeFilter modeOfFiltering,
306  bool writeOnModelFile = true);
320  unsigned long long maxGPUMemorySizeInByte);
321 
322 
339  int maxInspectionHeight,
340  int maxInspectionWidth,
341  bool writeOnModelFile = true);
342 
351  int* maxInspectionHeight,
352  int* maxInspectionWidth);
368  float* forwardTimeLimit); /* milliseconds */
369 
376  bool* bIsToUseForwardTimeLimit);
377 
387  float* forwardTimeLimit, /* milliseconds */
388  bool* bIsToUseForwardTimeLimit);
389 
397  float forwardTimeLimit, /* milliseconds */
398  bool writeOnModelFile = true);
399 
407  bool bIsToUseForwardTimeLimit,
408  bool writeOnModelFile = true);
409 
420  float forwardTimeLimit, /* milliseconds */
421  bool bIsToUseForwardTimeLimit,
422  bool writeOnModelFile = true);
431  int* cropHeight,
432  int* cropWidth,
434  float* margin);
435 
477  bool isToStoreCroppedImage,
478  int defaultCropSize,
480  float margin = 0.05,
481  bool writeOnModelFile = true);
482 
491  bool* isToStoreCroppedImage,
492  int* defaultCropSize,
493  eModeOfCropLargeObjects* modeOfCropLargeObjects,
494  float* margin);
515  bool isToCalcObjectScores,
516  bool writeOnModelFile = true);
517 
523  bool* isToCalcObjectScores);
544  bool isToCalcAverageColors,
545  bool writeOnModelFile = true);
546 
552  bool* isToCalcAverageColors);
583  int* numberOfPages);
584 
590  int* len);
591 
598  const int pageIdx,
599  wchar_t* pageName);
600 
607  const int pageIdx,
608  char* pageName);
644  const char* imagePath,
645  SegTestResult segTestResult,
646  int flag);
654  const wchar_t* imagePath,
655  SegTestResult segTestResult,
656  int flag);
666  const unsigned char* imageData,
667  const int height,
668  const int width,
669  SegTestResult segTestResult,
670  int flag);
680  const unsigned char* imageData,
681  const int height,
682  const int width,
683  SegTestResult segTestResult,
684  int flag);
694  const unsigned int* imageData,
695  const int height,
696  const int width,
697  SegTestResult segTestResult,
698  int flag);
708  const unsigned char* imageData,
709  const int height,
710  const int width,
711  SegTestResult segTestResult,
712  int flag);
722  const unsigned char* imageData,
723  const int height,
724  const int width,
725  SegTestResult segTestResult,
726  int flag);
736  const unsigned int* imageData,
737  const int height,
738  const int width,
739  SegTestResult segTestResult,
740  int flag);
751  int numberOfImages,
752  unsigned char** imageData,
753  int* heights,
754  int* widths,
755  SegTestResult* segTestResults,
756  int flag);
767  int numberOfImages,
768  unsigned char** imageData,
769  int* heights,
770  int* widths,
771  SegTestResult* segTestResults,
772  int flag);
773 
784  int numberOfImages,
785  unsigned int** imageData,
786  int* heights,
787  int* widths,
788  SegTestResult* segTestResults,
789  int flag);
790 
802  int numOfPages,
803  unsigned char** imageData,
804  int height,
805  int width,
806  int* channels,
807  SegTestResult segTestResult,
808  int flag);
809 
818  int numOfPages,
819  const wchar_t** imagePaths,
820  SegTestResult segTestResult,
821  int flag);
822 
831  int numOfPages,
832  const char** imagePaths,
833  SegTestResult segTestResult,
834  int flag);
843  int numberOfBoxes,
844  SR_DetectedBox* detectedBoxes,
845  SegTestResult* segTestResults,
846  int flag);
909 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOutputMatrixSizeInfo(SegTestResult segTestResult,
910  int* scoreMatrixChannel,
911  int* scoreMatrixSize);
917 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOutputMatrix(SegTestResult segTestResult,
918  int scoreMatrixSize,
919  unsigned char* scoreMatrixData);
920 
928 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestROI(SegTestResult segTestResult,
929  int* xROI, int* yROI, int* wROI, int* hROI);
930 
936  int* numberOfSegmentedObjects);
937 
943 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestSegmentedObjects(SegTestResult segTestResult,
944  SR_SegmentedObject* segmentedObjects);
945 
951  int* numberOfDeletedObjects);
952 
958 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestDeletedObjects(SegTestResult segTestResult,
959  SR_SegmentedObject* deletedObjects);
960 
967  int* width,
968  int* height);
969 
974 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestInspectionTime(SegTestResult segTestResult,
975  long* inspectionTimeInLong); /* milliseconds */
981  double* inspectionTimeInDouble); /* milliseconds */
982 
987 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestLoadImageTime(SegTestResult segTestResult,
988  long* imageLoadingTimeInLong); /* milliseconds */
994  double* imageLoadingTimeInDouble); /* milliseconds */
1004 DLLTYPE_SEGMENTATION eErrorType SR_DestroySegTestHandle(SegTestHandle handle);
1005 
1007 DLLTYPE_SEGMENTATION eErrorType SR_DeleteSegTestResult(SegTestResult segTestResult);
1022 
1025 
1026 /***********************************************************
1027 * For SaigeVision software
1028 ***********************************************************/
1029 DLLTYPE_SEGMENTATION eErrorType SR_SetSegTestOutputMode(SegTestHandle handle, int outputMode, bool writeOnModel);
1030 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOutputMode(SegTestHandle handle, int* outputMode);
1031 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestResultArraySize(SegTestResult segTestResult, int* arraySize);
1032 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestResultPixelArray(SegTestResult segTestResult, int arraySize, int* indexArray, unsigned char* valueArray);
1033 
1034 
1035 #ifdef SR_USE_DEPRECATED_FUNCTIONS
1036 /***********************************************************************************************************************
1037 * These Functions are provided for users who started using Saige Vision API before v1.2.0
1038 * which cares the background class for some reasons.
1039 * We recommed to change these functions to above functions with "WithoutBG".
1040 *
1041 * 아래 함수들은 세이지 비젼 API를 v1.2.0 이전부터 사용해오던 유저를 위하여 제공됩니다.
1042 * v1.2.0이전에는 Saige Vision UI와 달리 API에서는 Background를 포함시켰었기 때문에 이와 같은 함수들을 제공합니다.
1043 * 하지만 background를 고려하지 않는 WithoutBG 함수들로 교체하는 것을 권장합니다.
1044 ***********************************************************************************************************************/
1045 /* Print a model parameters including background (class name, class colors, score threshold...)*/
1046 DLLTYPE_SEGMENTATION eErrorType SR_PrintSegTestParametersWithBG(SegTestHandle handle);
1047 
1048 /* Get the number of classes including background*/
1049 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestNumberOfClassesWithBG(SegTestHandle handle, int* numberOfClasses);
1050 
1051 /* Get a wide char name of certain class by given index including background*/
1052 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassNameWithWideCharByIdxWithBG(SegTestHandle handle, const int index, wchar_t* className);
1053 
1054 /* Get a multi byte char name of certain class by given index including background*/
1055 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithBG(SegTestHandle handle, const int index, char* className);
1056 
1057 /* Get a color of certain class by given index including background*/
1058 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassColorByIdxWithBG(SegTestHandle handle, const int index, int* classColor);
1059 
1060 /* Get minimum score thresholds for each class except for background*/
1061 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestMinScoreThresholdWithBG(SegTestHandle handle, int* scoreThreshold);
1062 
1063 /* Set minimum score thresholds for each class except for background*/
1064 DLLTYPE_SEGMENTATION eErrorType SR_SetSegTestMinScoreThresholdWithBG(SegTestHandle handle, int numberOfClasses, int* scoreThreshold);
1065 
1066 /* This function behaves identically with SR_PrintSegTestParametersWithBG*/
1067 DLLTYPE_SEGMENTATION eErrorType SR_PrintSegTestParameters(SegTestHandle handle);
1068 
1069 /* This function behaves identically with SR_GetSegTestNumberOfClassesWithBG*/
1070 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestNumberOfClasses(SegTestHandle handle, int* numberOfClasses);
1071 
1072 /* This function behaves identically with SR_GetSegTestOneClassNameWithWideCharByIdxWithBG*/
1073 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassName(SegTestHandle handle, const int index, wchar_t* className);
1074 
1075 /* This function behaves identically with SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithBG*/
1076 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassNameWith1byteCharacter(SegTestHandle handle, const int index, char* className);
1077 
1078 /* This function behaves identically with SR_GetSegTestOneClassColorByIdxWithBG*/
1079 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestOneClassColor(SegTestHandle handle, const int index, int* classColor);
1080 
1081 /* This function behaves identically with SR_GetSegTestMinScoreThresholdWithBG*/
1082 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestEachClassThreshold(SegTestHandle handle, int* threshold);
1083 
1084 /* This function behaves identically with SR_SetSegTestMinScoreThresholdWithBG*/
1085 DLLTYPE_SEGMENTATION eErrorType SR_SetSegTestEachClassThreshold(SegTestHandle handle, int* threshold);
1086 
1087 /* This function behaves identically with SR_GetSegTestMinPixelSizeThresholdWithoutBG*/
1088 DLLTYPE_SEGMENTATION eErrorType SR_GetSegTestMinimumPixelSizeThreshold(SegTestHandle handle, int* minimumPixelSizeThreshold);
1089 
1090 /* This function behaves identically with SR_SetSegTestMinPixelSizeThresholdWithoutBG*/
1091 DLLTYPE_SEGMENTATION eErrorType SR_SetSegTestMinimumPixelSizeThreshold(SegTestHandle handle, int* minimumPixelSizeThreshold);
1092 #endif
SR_ApplySegTestFromMultipleUnsignedIntColorArrays
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).
SR_SetSegTestForwardTimeLimit
eErrorType SR_SetSegTestForwardTimeLimit(SegTestHandle handle, float forwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit.
SR_GetSegTestOnePageNameWithWideChar
eErrorType SR_GetSegTestOnePageNameWithWideChar(SegTestHandle handle, const int pageIdx, wchar_t *pageName)
Get a wide char name of certain page by given index.
SR_SetSegTestModeOfFilteringByPixelSize
eErrorType SR_SetSegTestModeOfFilteringByPixelSize(SegTestHandle handle, eModeOfPixelSizeFilter modeOfFiltering, bool writeOnModelFile=true)
Set the mode of filtering by Segmentation's area threshold.
SR_GetSegTestLoadImageTimeInDouble
eErrorType SR_GetSegTestLoadImageTimeInDouble(SegTestResult segTestResult, double *imageLoadingTimeInDouble)
Get the image loading time.
SR_SetSegTestMinPixelSizeThresholdWithoutBG
eErrorType SR_SetSegTestMinPixelSizeThresholdWithoutBG(SegTestHandle handle, int numOfClasses, int *areaThreshold, bool writeOnModelFile=true)
Set Segmentation's area threshold for each class.
SR_MakeSegTestResult
SegTestResult SR_MakeSegTestResult()
Construct a SegTestResult.
SR_GetSegTestIsToCalcAverageColor
eErrorType SR_GetSegTestIsToCalcAverageColor(SegTestHandle handle, bool *isToCalcAverageColors)
Get the boolean indicating whether calculate SR_SegmentedObject::averageColor or not.
eAlgorithmType
eAlgorithmType
Enumerator indicating a type of model.
Definition: CommonHeaderDLL.h:49
SR_SetSegTestForwardTimeLimitVariables
eErrorType SR_SetSegTestForwardTimeLimitVariables(SegTestHandle handle, float forwardTimeLimit, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the Forward time limit variables.
eModeOfCropLargeObjects
eModeOfCropLargeObjects
Enumerator indicating a mode of cropping large objects in segmentation.
Definition: CommonHeaderDLL.h:99
SR_MULTI_CLASS_CV_CONTOUR_OUTPUT
@ SR_MULTI_CLASS_CV_CONTOUR_OUTPUT
Definition: SegmentationTestDLL.h:64
SR_MULTI_CLASS_MATRIX_OUTPUT
@ SR_MULTI_CLASS_MATRIX_OUTPUT
Definition: SegmentationTestDLL.h:62
SR_GetSegTestInspectionTime
eErrorType SR_GetSegTestInspectionTime(SegTestResult segTestResult, long *inspectionTimeInLong)
Get the inspection time.
SR_ApplySegTestFrom16bitCharGrayArray
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.
SR_ApplySegTestFromUnsignedIntColorArray
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.
SR_SegmentedObject
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:108
SR_ApplySegTestFromImageFileByWideCharPath
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
@ SR_ONE_CLASS_CV_CONTOUR_OUTPUT
Definition: SegmentationTestDLL.h:63
SR_GetSegTestMaxInspectionSize
eErrorType SR_GetSegTestMaxInspectionSize(SegTestHandle handle, int *maxInspectionHeight, int *maxInspectionWidth)
Get Segmentation's max inspection size.
SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithoutBG
eErrorType SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithoutBG(SegTestHandle handle, const int classIdx, char *className)
Get a multi byte char name of certain class by given index.
SR_ApplySegTestFromMultiPageImageFileByMultiByteCharPath
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).
SR_GetSegTestDeletedObjects
eErrorType SR_GetSegTestDeletedObjects(SegTestResult segTestResult, SR_SegmentedObject *deletedObjects)
Get deleted SR_SegmentedObject s by filter process Segmentation's area threshold.
SR_GetSegTestNumberOfSegmentedObjects
eErrorType SR_GetSegTestNumberOfSegmentedObjects(SegTestResult segTestResult, int *numberOfSegmentedObjects)
Get the number of SR_SegmentedObject.
eModeOfPixelSizeFilter
eModeOfPixelSizeFilter
Enumerator indicating a mode of filtering by object's area in segmentation.
Definition: CommonHeaderDLL.h:88
SR_GetSegTestIsToCalcObjectScores
eErrorType SR_GetSegTestIsToCalcObjectScores(SegTestHandle handle, bool *isToCalcObjectScores)
Get the boolean indicating whether calculate SR_SegmentedObject::scores or not.
SR_SetSegTestMaxGPUMemorySizeInByte
eErrorType SR_SetSegTestMaxGPUMemorySizeInByte(SegTestHandle handle, unsigned long long maxGPUMemorySizeInByte)
Set the maximum size of gpu memory to use for inspections in byte.
SR_GetSegTestROI
eErrorType SR_GetSegTestROI(SegTestResult segTestResult, int *xROI, int *yROI, int *wROI, int *hROI)
Get ROI.
SR_ONE_CLASS_MATRIX_OUTPUT
@ SR_ONE_CLASS_MATRIX_OUTPUT
Definition: SegmentationTestDLL.h:61
SR_ApplySegTestFromMultiple8bitCharGrayArrays
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).
SR_ApplySegTestFromMultiPage8bitCharArrays
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).
SR_LoadSegTestNetworkInGPU
eErrorType SR_LoadSegTestNetworkInGPU(SegTestHandle handle, int GPUNumber, int batchSize=1)
Allocate required cpu & gpu memory.
SR_SetSegTestIsToStoreCroppedImage
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.
SR_GetSegTestResultOriginalImageSize
eErrorType SR_GetSegTestResultOriginalImageSize(SegTestResult segTestResult, int *width, int *height)
Get the size of inspected image.
SR_GetSegTestMinScoreThresholdWithoutBG
eErrorType SR_GetSegTestMinScoreThresholdWithoutBG(SegTestHandle handle, int *scoreThreshold)
Get Segmentation's score threshold for each class.
SR_CreateSegTestHandleByWideCharPath
SegTestHandle SR_CreateSegTestHandleByWideCharPath(const wchar_t *filePath)
Create a SegTestHandle via wide char path.
SR_GetSegTestForwardTimeLimitVariables
eErrorType SR_GetSegTestForwardTimeLimitVariables(SegTestHandle handle, float *forwardTimeLimit, bool *bIsToUseForwardTimeLimit)
Get the Forward time limit variables.
SR_DeleteSegTestResult
eErrorType SR_DeleteSegTestResult(SegTestResult segTestResult)
Destruct a SegTestResult.
SR_ApplySegTestFromDetectedBoxes
eErrorType SR_ApplySegTestFromDetectedBoxes(SegTestHandle handle, int numberOfBoxes, SR_DetectedBox *detectedBoxes, SegTestResult *segTestResults, int flag)
Apply segmentation algorithm to SR_DetectedBox::croppedImage.
SR_ApplySegTestFrom8bitCharColorArray
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.
SR_SetSegTestIsToCalcAverageColor
eErrorType SR_SetSegTestIsToCalcAverageColor(SegTestHandle handle, bool isToCalcAverageColors, bool writeOnModelFile=true)
Set the boolean indicating whether calculate SR_SegmentedObject::averageColor or not.
SR_ApplySegTestFrom16bitUnsignedIntColorArray
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.
SR_GetSegTestOnePageNameWithMultiByteChar
eErrorType SR_GetSegTestOnePageNameWithMultiByteChar(SegTestHandle handle, const int pageIdx, char *pageName)
Get a multi byte char name of certain page by given index.
SR_GetSegTestLoadImageTime
eErrorType SR_GetSegTestLoadImageTime(SegTestResult segTestResult, long *imageLoadingTimeInLong)
Get the image loading time.
SR_GetSegTestOneClassColorByIdxWithoutBG
eErrorType SR_GetSegTestOneClassColorByIdxWithoutBG(SegTestHandle handle, const int classIdx, int *classColor)
Get a color of certain class by given index.
SR_GetSegTestForwardTimeLimit
eErrorType SR_GetSegTestForwardTimeLimit(SegTestHandle handle, float *forwardTimeLimit)
Get the Forward time limit.
SR_GetSegTestNumberOfDeletedObjects
eErrorType SR_GetSegTestNumberOfDeletedObjects(SegTestResult segTestResult, int *numberOfDeletedObjects)
Get the number of deleted SR_SegmentedObject s by filter process Segmentation's area threshold.
eSegTestOutputType
eSegTestOutputType
Segmentation output type.
Definition: SegmentationTestDLL.h:60
SR_GetSegTestAlgorithmType
eErrorType SR_GetSegTestAlgorithmType(SegTestHandle handle, eAlgorithmType *algoType)
Get a algorithm type(ex, standard, deep) of a segmentation model.
SR_DetectedBox
Struct describing features of a detected box.
Definition: CommonHeaderDLL.h:213
SR_SetSegTestMaxInspectionSize
eErrorType SR_SetSegTestMaxInspectionSize(SegTestHandle handle, int maxInspectionHeight, int maxInspectionWidth, bool writeOnModelFile=true)
Set Segmentation's max inspection size.
SR_DestroySegTestHandle
eErrorType SR_DestroySegTestHandle(SegTestHandle handle)
Destruct a SegTestHandle.
CommonHeaderDLL.h
Header file for Commonly used variables.
SR_SetSegTestMinScoreThresholdWithoutBG
eErrorType SR_SetSegTestMinScoreThresholdWithoutBG(SegTestHandle handle, int numOfClasses, int *scoreThreshold, bool writeOnModelFile=true)
Set Segmentation's score threshold for each class.
SR_SetSegTestIsToCalcObjectScores
eErrorType SR_SetSegTestIsToCalcObjectScores(SegTestHandle handle, bool isToCalcObjectScores, bool writeOnModelFile=true)
Set the boolean indicating whether calculate SR_SegmentedObject::scores or not.
eErrorType
eErrorType
Enumerator indicating error codes.
Definition: CommonHeaderDLL.h:25
SR_CreateSegTestHandle
SegTestHandle SR_CreateSegTestHandle(const char *filePath)
Create a SegTestHandle via multi byte char path.
SegTestHandle
void * SegTestHandle
Segmentation file handler.
Definition: SegmentationTestDLL.h:90
SR_ApplySegTestFrom16bitCharColorArray
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.
SR_ApplySegTestFromMultiple8bitCharColorArrays
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).
SR_ApplySegTestFromImageFile
eErrorType SR_ApplySegTestFromImageFile(SegTestHandle handle, const char *imagePath, SegTestResult segTestResult, int flag)
Apply segmentation algorithm to image by file path.
SegTestResult
void * SegTestResult
Segmentation inspection results handler.
Definition: SegmentationTestDLL.h:105
SR_PrintSegTestParametersWithoutBG
eErrorType SR_PrintSegTestParametersWithoutBG(SegTestHandle handle)
Print a model parameters (Segmentation's class information, inspection options...)
SR_GetSegTestOutputMatrixSizeInfo
eErrorType SR_GetSegTestOutputMatrixSizeInfo(SegTestResult segTestResult, int *scoreMatrixChannel, int *scoreMatrixSize)
Get the size of Score matrix.
SR_WriteSegTestOptionsOnModelFile
eErrorType SR_WriteSegTestOptionsOnModelFile(SegTestHandle handle)
Write inspection options(Forward time limit, Segmentation's score threshold etc) on the model file.
SR_ApplySegTestFromMultiPageImageFileByWideCharPath
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).
SR_ApplySegTestFrom8bitCharGrayArray
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.
SR_GetSegTestIsToUseForwardTimeLimit
eErrorType SR_GetSegTestIsToUseForwardTimeLimit(SegTestHandle handle, bool *bIsToUseForwardTimeLimit)
Get the boolean whether the current model is using time limit or not.
SR_GetSegTestOutputMatrix
eErrorType SR_GetSegTestOutputMatrix(SegTestResult segTestResult, int scoreMatrixSize, unsigned char *scoreMatrixData)
Get Score matrix.
SR_GetSegTestIsToStoreCroppedImage
eErrorType SR_GetSegTestIsToStoreCroppedImage(SegTestHandle handle, bool *isToStoreCroppedImage, int *defaultCropSize, eModeOfCropLargeObjects *modeOfCropLargeObjects, float *margin)
Get the parameters of Segmentation's crop object.
SR_GetSegTestMaxStrLenOfPageName
eErrorType SR_GetSegTestMaxStrLenOfPageName(SegTestHandle handle, int *len)
Get a maximum length of page name.
SR_CROP_BY_OBJECTSIZE_N_RESIZE_TO_CROPSIZE
@ SR_CROP_BY_OBJECTSIZE_N_RESIZE_TO_CROPSIZE
Definition: CommonHeaderDLL.h:100
SR_GetSegTestMaxStrLenOfClassName
eErrorType SR_GetSegTestMaxStrLenOfClassName(SegTestHandle handle, int *len)
Get a maximum length of class name.
SR_GetSegTestCropParamsUsedForExportingResults
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.
SR_GetSegTestInspectionTimeInDouble
eErrorType SR_GetSegTestInspectionTimeInDouble(SegTestResult segTestResult, double *inspectionTimeInDouble)
Get the inspection time.
SR_GetSegTestModeOfFilteringByPixelSize
eErrorType SR_GetSegTestModeOfFilteringByPixelSize(SegTestHandle handle, eModeOfPixelSizeFilter *modeOfFiltering)
Get the mode of filtering by Segmentation's area threshold.
SR_SetSegTestIsToUseForwardTimeLimit
eErrorType SR_SetSegTestIsToUseForwardTimeLimit(SegTestHandle handle, bool bIsToUseForwardTimeLimit, bool writeOnModelFile=true)
Set the boolean whether the current model is using time limit or not.
SR_GetSegTestMinPixelSizeThresholdWithoutBG
eErrorType SR_GetSegTestMinPixelSizeThresholdWithoutBG(SegTestHandle handle, int *areaThreshold)
Get Segmentation's area threshold for each class.
SR_GetSegTestNumberOfClassesWithoutBG
eErrorType SR_GetSegTestNumberOfClassesWithoutBG(SegTestHandle handle, int *numberOfClasses)
Get the number of classes.
SR_GetSegTestSegmentedObjects
eErrorType SR_GetSegTestSegmentedObjects(SegTestResult segTestResult, SR_SegmentedObject *segmentedObjects)
Get SR_SegmentedObject s.
SR_GetSegTestNumberOfPages
eErrorType SR_GetSegTestNumberOfPages(SegTestHandle handle, int *numberOfPages)
Get the number of pages.
SR_GetSegTestOneClassNameWithWideCharByIdxWithoutBG
eErrorType SR_GetSegTestOneClassNameWithWideCharByIdxWithoutBG(SegTestHandle handle, const int classIdx, wchar_t *className)
Get a wide char name of certain class by given index.
SR_SetSegTestOptionsAsDefault
eErrorType SR_SetSegTestOptionsAsDefault(SegTestHandle handle)
Reset inspection options(Forward time limit, Segmentation's score threshold etc) as default values.