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,
207 int* numberOfClasses);
250 int* trainedVersionMajor,
251 int* trainedVersionMinor,
252 int* trainedVersionPatch);
278 int* scoreThreshold);
290 bool writeOnModelFile =
true);
322 bool writeOnModelFile =
true);
340 bool writeOnModelFile =
true);
396 unsigned long long maxGPUMemorySizeInByte);
415 int maxInspectionHeight,
416 int maxInspectionWidth,
417 bool writeOnModelFile =
true);
427 int* maxInspectionHeight,
428 int* maxInspectionWidth);
444 float* forwardTimeLimit);
452 bool* bIsToUseForwardTimeLimit);
463 float* forwardTimeLimit,
464 bool* bIsToUseForwardTimeLimit);
473 float forwardTimeLimit,
474 bool writeOnModelFile =
true);
483 bool bIsToUseForwardTimeLimit,
484 bool writeOnModelFile =
true);
496 float forwardTimeLimit,
497 bool bIsToUseForwardTimeLimit,
498 bool writeOnModelFile =
true);
553 bool isToStoreCroppedImage,
557 bool writeOnModelFile =
true);
567 bool* isToStoreCroppedImage,
568 int* defaultCropSize,
591 bool isToCalcObjectScores,
592 bool writeOnModelFile =
true);
599 bool* isToCalcObjectScores);
620 bool isToCalcAverageColors,
621 bool writeOnModelFile =
true);
628 bool* isToCalcAverageColors);
647 bool isMatrixOutputIncluded,
648 bool writeOnModelFile =
true);
655 bool* isMatrixOutputIncluded);
747 const char* imagePath,
757 const wchar_t* imagePath,
769 const unsigned char* imageData,
783 const unsigned char* imageData,
797 const unsigned int* imageData,
811 const unsigned char* imageData,
825 const unsigned char* imageData,
839 const unsigned int* imageData,
855 unsigned char** imageData,
871 unsigned char** imageData,
888 unsigned int** imageData,
906 unsigned char** imageData,
922 const wchar_t** imagePaths,
935 const char** imagePaths,
961 const void* imageData,
965 const unsigned int binarySizeInBytes,
1031 int* scoreMatrixChannel,
1032 int* scoreMatrixSize);
1039 int scoreMatrixSize,
1040 unsigned char* scoreMatrixData);
1050 int* xROI,
int* yROI,
int* wROI,
int* hROI);
1057 int* numberOfSegmentedObjects);
1072 int* numberOfDeletedObjects);
1096 long* inspectionTimeInLong);
1102 double* inspectionTimeInDouble);
1109 long* imageLoadingTimeInLong);
1115 double* imageLoadingTimeInDouble);
1122 bool* isExceededMaxInspectionSize);
1129 bool* isImageCropped);
1163#ifdef SR_USE_DEPRECATED_FUNCTIONS
1177DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestNumberOfClassesWithBG(
SegTestHandle handle,
int* numberOfClasses);
1180DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassNameWithWideCharByIdxWithBG(
SegTestHandle handle,
const int index,
wchar_t* className);
1183DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassNameWithMultiByteCharByIdxWithBG(
SegTestHandle handle,
const int index,
char* className);
1186DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassColorByIdxWithBG(
SegTestHandle handle,
const int index,
int* classColor);
1189DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestMinScoreThresholdWithBG(
SegTestHandle handle,
int* scoreThreshold);
1192DLLTYPE_SEGMENTATION
eErrorType SR_SetSegTestMinScoreThresholdWithBG(
SegTestHandle handle,
int numberOfClasses,
int* scoreThreshold);
1201DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassName(
SegTestHandle handle,
const int index,
wchar_t* className);
1204DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassNameWith1byteCharacter(
SegTestHandle handle,
const int index,
char* className);
1207DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestOneClassColor(
SegTestHandle handle,
const int index,
int* classColor);
1216DLLTYPE_SEGMENTATION
eErrorType SR_GetSegTestMinimumPixelSizeThreshold(
SegTestHandle handle,
int* minimumPixelSizeThreshold);
1219DLLTYPE_SEGMENTATION
eErrorType SR_SetSegTestMinimumPixelSizeThreshold(
SegTestHandle handle,
int* minimumPixelSizeThreshold);
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