SaigeVision C/C++ 1.5.0
SaigeVision API document for C/C++
 
Loading...
Searching...
No Matches
Segmentation's inspection results

Functions

eErrorType SR_GetSegTestOutputMatrixSizeInfo (SegTestResult segTestResult, int *scoreMatrixChannel, int *scoreMatrixSize)
 Get the size of Score matrix. More...
 
eErrorType SR_GetSegTestOutputMatrix (SegTestResult segTestResult, int scoreMatrixSize, unsigned char *scoreMatrixData)
 Get Score matrix. More...
 
eErrorType SR_GetSegTestROI (SegTestResult segTestResult, int *xROI, int *yROI, int *wROI, int *hROI)
 Get ROI. More...
 
eErrorType SR_GetSegTestNumberOfSegmentedObjects (SegTestResult segTestResult, int *numberOfSegmentedObjects)
 Get the number of SR_SegmentedObject. More...
 
eErrorType SR_GetSegTestSegmentedObjects (SegTestResult segTestResult, SR_SegmentedObject *segmentedObjects)
 Get SR_SegmentedObject s. More...
 
eErrorType SR_GetSegTestNumberOfDeletedObjects (SegTestResult segTestResult, int *numberOfDeletedObjects)
 Get the number of deleted SR_SegmentedObject s by filter process Segmentation's area threshold. More...
 
eErrorType SR_GetSegTestDeletedObjects (SegTestResult segTestResult, SR_SegmentedObject *deletedObjects)
 Get deleted SR_SegmentedObject s by filter process Segmentation's area threshold. More...
 
eErrorType SR_GetSegTestResultOriginalImageSize (SegTestResult segTestResult, int *width, int *height)
 Get the size of inspected image. More...
 
eErrorType SR_GetSegTestInspectionTime (SegTestResult segTestResult, long *inspectionTimeInLong)
 Get the inspection time. More...
 
eErrorType SR_GetSegTestInspectionTimeInDouble (SegTestResult segTestResult, double *inspectionTimeInDouble)
 Get the inspection time. More...
 
eErrorType SR_GetSegTestLoadImageTime (SegTestResult segTestResult, long *imageLoadingTimeInLong)
 Get the image loading time. More...
 
eErrorType SR_GetSegTestLoadImageTimeInDouble (SegTestResult segTestResult, double *imageLoadingTimeInDouble)
 Get the image loading time. More...
 
eErrorType SR_GetSegTestIsExceededMaxInspectionSize (SegTestResult segTestResult, bool *isExceededMaxInspectionSize)
 Get whether the size of inspected image exceeds max inspection size. More...
 
eErrorType SR_GetSegTestIsImageCropped (SegTestResult segTestResult, bool *isImageCropped)
 Get whether the image is cropped due to lack of GPU memory. More...
 

Detailed Description

Segmentation 의 검사 결과는 두가지로 구성되어 있습니다.

  1. Score matrix
    • 크기: # of classes x height x width
    • Score matrix[i_c * width * height + i_h * width + i_w] 는 i_w 번째 열, i_h 번째 행에 있는 픽셀이 i_c 클래스에 속할 확률을 0-255 사이의 값으로 표현한 값입니다.
    • SR_GetSegTestOutputMatrixSizeInfo, SR_GetSegTestOutputMatrix
  2. SR_SegmentedObject
// 1. Get Score Matrix
int width, height;
int nChannel = 0;
int scoreMatrixSize = 0;
// Get matrix size
eErrorType error = SR_GetSegTestOutputMatrixSizeInfo(testResult, &nChannel, &scoreMatrixSize);
unsigned char* scoreMatrix = new unsigned char[scoreMatrixSize];
// Get matrix data
error = SR_GetSegTestOutputMatrix(testResult, scoreMatrixSize, scoreMatrix);
// check i_c th class score of pixel on i_w th column, i_h th row.
unsigned char score = scoreMatrix[i_c * width * height + i_h * width + i_w];
delete[] scoreMatrix;
eErrorType
Enumerator indicating error codes.
Definition: CommonHeaderDLL.h:30
eErrorType SR_GetSegTestOutputMatrix(SegTestResult segTestResult, int scoreMatrixSize, unsigned char *scoreMatrixData)
Get Score matrix.
eErrorType SR_GetSegTestOutputMatrixSizeInfo(SegTestResult segTestResult, int *scoreMatrixChannel, int *scoreMatrixSize)
Get the size of Score matrix.
// 2. Get Segmented Object
int numSegmentedObject = 0;
// Get number of objects
eErrorType error = SR_GetSegTestNumberOfSegmentedObjects(testResult, &numSegmentedObject);
SR_SegmentedObject* objects = new SR_SegmentedObject[numSegmentedObject];
// Get object data
error = SR_GetSegTestSegmentedObjects(testResult, objects);
eErrorType SR_GetSegTestNumberOfSegmentedObjects(SegTestResult segTestResult, int *numberOfSegmentedObjects)
Get the number of SR_SegmentedObject.
eErrorType SR_GetSegTestSegmentedObjects(SegTestResult segTestResult, SR_SegmentedObject *segmentedObjects)
Get SR_SegmentedObject s.
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:122

Function Documentation

◆ SR_GetSegTestDeletedObjects()

eErrorType SR_GetSegTestDeletedObjects ( SegTestResult  segTestResult,
SR_SegmentedObject *  deletedObjects 
)

Get deleted SR_SegmentedObject s by filter process Segmentation's area threshold.

Parameters
segTestResult
[out]deletedObjects
Warning
deletedObjects should be allocated by length of number of objects gathered by SR_GetSegTestNumberOfDeletedObjects.
Examples
ExampleSegPostProcess.cpp, ExampleSegRuntime.cpp, ExampleSegRuntimeBatchInspection.cpp, ExampleSegRuntimeMultiPage.cpp, and ExampleSuperResolution+SegRuntime.cpp.

◆ SR_GetSegTestInspectionTime()

eErrorType SR_GetSegTestInspectionTime ( SegTestResult  segTestResult,
long *  inspectionTimeInLong 
)

◆ SR_GetSegTestInspectionTimeInDouble()

eErrorType SR_GetSegTestInspectionTimeInDouble ( SegTestResult  segTestResult,
double *  inspectionTimeInDouble 
)

Get the inspection time.

Parameters
segTestResult
[out]inspectionTimeInDouble

◆ SR_GetSegTestIsExceededMaxInspectionSize()

eErrorType SR_GetSegTestIsExceededMaxInspectionSize ( SegTestResult  segTestResult,
bool *  isExceededMaxInspectionSize 
)

Get whether the size of inspected image exceeds max inspection size.

Parameters
segTestResult
[out]isExceededMaxInspectionSize
Examples
ExampleSegRuntime.cpp, ExampleSegRuntimeBatchInspection.cpp, ExampleSegRuntimeMultiPage.cpp, and ExampleSegRuntimeSimple.cpp.

◆ SR_GetSegTestIsImageCropped()

eErrorType SR_GetSegTestIsImageCropped ( SegTestResult  segTestResult,
bool *  isImageCropped 
)

Get whether the image is cropped due to lack of GPU memory.

Parameters
segTestResult
[out]isImageCropped
Examples
ExampleSegRuntime.cpp, ExampleSegRuntimeMultiPage.cpp, and ExampleSegRuntimeSimple.cpp.

◆ SR_GetSegTestLoadImageTime()

eErrorType SR_GetSegTestLoadImageTime ( SegTestResult  segTestResult,
long *  imageLoadingTimeInLong 
)

◆ SR_GetSegTestLoadImageTimeInDouble()

eErrorType SR_GetSegTestLoadImageTimeInDouble ( SegTestResult  segTestResult,
double *  imageLoadingTimeInDouble 
)

Get the image loading time.

Parameters
segTestResult
[out]imageLoadingTimeInDouble

◆ SR_GetSegTestNumberOfDeletedObjects()

eErrorType SR_GetSegTestNumberOfDeletedObjects ( SegTestResult  segTestResult,
int *  numberOfDeletedObjects 
)

◆ SR_GetSegTestNumberOfSegmentedObjects()

eErrorType SR_GetSegTestNumberOfSegmentedObjects ( SegTestResult  segTestResult,
int *  numberOfSegmentedObjects 
)

◆ SR_GetSegTestOutputMatrix()

eErrorType SR_GetSegTestOutputMatrix ( SegTestResult  segTestResult,
int  scoreMatrixSize,
unsigned char *  scoreMatrixData 
)

Get Score matrix.

Parameters
segTestResult
scoreMatrixSize
[out]scoreMatrixDatamemory address receiving score matrix. The length of memory must be equal to scoreMatrixSize
Examples
ExampleSegPostProcess.cpp, ExampleSegRuntime.cpp, ExampleSegRuntimeBatchInspection.cpp, ExampleSegRuntimeMultiPage.cpp, and ExampleSuperResolution+SegRuntime.cpp.

◆ SR_GetSegTestOutputMatrixSizeInfo()

eErrorType SR_GetSegTestOutputMatrixSizeInfo ( SegTestResult  segTestResult,
int *  scoreMatrixChannel,
int *  scoreMatrixSize 
)

Get the size of Score matrix.

matrixSize = matrixChannel x height x width.
matrixChannel = 1, for eSegTestOutputType::SR_ONE_CLASS_MATRIX_OUTPUT, eSegTestOutputType::SR_ONE_CLASS_CV_CONTOUR_OUTPUT.
matrixChannel = number of classes, for eSegTestOutputType::SR_MULTI_CLASS_MATRIX_OUTPUT, eSegTestOutputType::SR_MULTI_CLASS_CV_CONTOUR_OUTPUT.

Parameters
segTestResult
[out]scoreMatrixChannel
[out]scoreMatrixSize
Examples
ExampleSegPostProcess.cpp, ExampleSegRuntime.cpp, ExampleSegRuntimeBatchInspection.cpp, ExampleSegRuntimeMultiPage.cpp, and ExampleSuperResolution+SegRuntime.cpp.

◆ SR_GetSegTestResultOriginalImageSize()

eErrorType SR_GetSegTestResultOriginalImageSize ( SegTestResult  segTestResult,
int *  width,
int *  height 
)

Get the size of inspected image.

Parameters
segTestResult
[out]width
[out]height
Examples
ExampleSeg+ClsRuntime.cpp, ExampleSegPostProcess.cpp, ExampleSegRuntime.cpp, ExampleSegRuntimeSimple.cpp, and ExampleSuperResolution+SegRuntime.cpp.

◆ SR_GetSegTestROI()

eErrorType SR_GetSegTestROI ( SegTestResult  segTestResult,
int *  xROI,
int *  yROI,
int *  wROI,
int *  hROI 
)

Get ROI.

Parameters
segTestResult
[out]xROI
[out]yROI
[out]wROI
[out]hROI

◆ SR_GetSegTestSegmentedObjects()

eErrorType SR_GetSegTestSegmentedObjects ( SegTestResult  segTestResult,
SR_SegmentedObject *  segmentedObjects 
)

Get SR_SegmentedObject s.

Parameters
segTestResult
[out]segmentedObjects
Warning
segmentedObjects should be allocated by length of number of objects gathered by SR_GetSegTestNumberOfSegmentedObjects.
Examples
ExampleSeg+ClsRuntime.cpp, ExampleSegPostProcess.cpp, ExampleSegRuntime.cpp, ExampleSegRuntimeBatchInspection.cpp, ExampleSegRuntimeMultiPage.cpp, ExampleSegRuntimeSimple.cpp, and ExampleSuperResolution+SegRuntime.cpp.