SaigeVision C/C++  1.4.7
SaigeVision API document for C/C++
SegPostProcessFunctionsDLL.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "SegmentationTestDLL.h"
7 #include "DetectorTestDLL.h"
8 
20 typedef enum
21 {
22  StackCell = 0,
24 
49 typedef struct
50 {
51  unsigned int nProducts;
52 
53  unsigned int nTargetTopsPerProduct;
54  unsigned int nTargetBottomsPerProduct;
55 
56  unsigned int topClassIdx;
57  unsigned int bottomClassIdx;
58 
59  unsigned int convexityDefectThreshold;
60 
61  bool useImageDataAtTop;
62  bool isTopBrighterThanBackGround;
63  bool useImageDataAtBottom;
64  bool isBottomBrighterThanBackGround;
65 
66  float maxLengthOfSkeletonToRemoveAtTop;
67  float maxRatioThresholdOfMedianLengthToRemoveAtTop;
68  float minLengthOfSkeletonToKeepAtTop;
69 
70  float maxLengthOfSkeletonToRemoveAtBottom;
71  float maxRatioThresholdOfMedianLengthToRemoveAtBottom;
72  float minLengthOfSkeletonToKeepAtBottom;
73 
74  bool useImageDataForDividingProducts;
75  bool isBorderBrighterThanPoles;
76 }SR_SegPostProcessOptions;
77 
94 typedef struct
95 {
96  unsigned int nPoints;
97  unsigned int* xPts;
98  unsigned int* yPts;
99 
100  unsigned int xStartPoint;
101  unsigned int yStartPoint;
102  unsigned int xEndPoint;
103  unsigned int yEndPoint;
104 
105  unsigned int idxProduct;
106  unsigned int idxPoleInProduct;
107  unsigned int idxClass;
108 }SR_SegPostProcessSkeleton;
109 
120 typedef void* SegPostProcessHandle;
121 
125 DLLTYPE_SEGMENTATION SegPostProcessHandle SR_CreateSegPostProcessHandle(eSegPostProcessType segPostProcessType, SR_SegPostProcessOptions segPostProcessOptions);
126 
129 
132  SegPostProcessHandle handle,
133  const char* imagePath);
134 
137  SegPostProcessHandle handle,
138  const wchar_t* imagePath);
139 
142  SegPostProcessHandle handle,
143  const unsigned char* imageData,
144  const int height,
145  const int width);
146 
149  SegPostProcessHandle handle,
150  const unsigned char* imageData,
151  const int height,
152  const int width);
153 
156  SegPostProcessHandle handle,
157  const unsigned int* imageData,
158  const int height,
159  const int width);
160 
163  SegPostProcessHandle handle,
164  const unsigned char* imageData,
165  const int height,
166  const int width);
167 
170  SegPostProcessHandle handle,
171  const unsigned char* imageData,
172  const int height,
173  const int width);
174 
177  SegPostProcessHandle handle,
178  const unsigned int* imageData,
179  const int height,
180  const int width);
181 
184  SegPostProcessHandle handle,
185  int nSegObjects,
186  SR_SegmentedObject* segObjects);
187 
190  SegPostProcessHandle handle,
191  SegTestResult segResult);
192 
194 DLLTYPE_SEGMENTATION eErrorType SR_SegPostProcessGetNumberOfSkeletons(SegPostProcessHandle handle, int * numberOfSkeletonsOut);
195 
197 DLLTYPE_SEGMENTATION eErrorType SR_SegPostProcessGetSkeletons(SegPostProcessHandle handle, SR_SegPostProcessSkeleton * skeletonsOut);
198 
200 typedef struct
201 {
203  float angle;
204 
206  unsigned int x_center;
208  unsigned int y_center;
209 
211  unsigned int classIdx;
212 
214  int x_vertex[4];
216  int y_vertex[4];
218 
220 DLLTYPE_SEGMENTATION eErrorType SR_SegPostProcessFindAngleAndCenter(DetTestHandle handle, SR_DetectedBox* box, int numSegmentedObject, SR_SegmentedObject* segObjects, SR_SegPostProcessAngleDetection* angleObject);
SR_SegPostProcessAngleDetection::angle
float angle
angle from upright position in clockwise range from 0 to 360
Definition: SegPostProcessFunctionsDLL.h:203
SegmentationTestDLL.h
Header file for segmentation module.
SR_UseImageDataFrom8bitCharGrayArray
eErrorType SR_UseImageDataFrom8bitCharGrayArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 1-channel 8-bit 배열로 설정합니다.
SR_SegPostProcessGetNumberOfSkeletons
eErrorType SR_SegPostProcessGetNumberOfSkeletons(SegPostProcessHandle handle, int *numberOfSkeletonsOut)
후처리 결과로 검출된 스켈레톤의 개수를 받아옵니다.
SR_SegPostProcessAngleDetection::x_center
unsigned int x_center
x coordinate of the center of the detected object
Definition: SegPostProcessFunctionsDLL.h:206
SR_SegPostProcessAngleDetection::y_center
unsigned int y_center
y coordinate of the center of the detected object
Definition: SegPostProcessFunctionsDLL.h:208
SR_DestroySegPostProcessHandle
eErrorType SR_DestroySegPostProcessHandle(SegPostProcessHandle handle)
SegPostProcessHandle 을 소멸합니다.
SR_UseImageDataFrom16bitCharGrayArray
eErrorType SR_UseImageDataFrom16bitCharGrayArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 1-channel 16-bit 배열로 설정합니다.
SR_SegmentedObject
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:108
SR_SegPostProcessGetSkeletons
eErrorType SR_SegPostProcessGetSkeletons(SegPostProcessHandle handle, SR_SegPostProcessSkeleton *skeletonsOut)
후처리 결과로 검출된 스켈레톤 정보를 받아옵니다.
SR_UseImageDataFrom8bitCharColorArray
eErrorType SR_UseImageDataFrom8bitCharColorArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 3-channel 8-bit 배열로 설정합니다.
SR_SegRunPostProcessBySegmentedObjects
eErrorType SR_SegRunPostProcessBySegmentedObjects(SegPostProcessHandle handle, int nSegObjects, SR_SegmentedObject *segObjects)
SR_SegmentedObject 를 이용하여 후처리를 수행합니다.
DetectorTestDLL.h
Header file for Detection Module.
SR_UseImageDataFromImageFile
eErrorType SR_UseImageDataFromImageFile(SegPostProcessHandle handle, const char *imagePath)
후처리 알고리즘에 사용되는 이미지 데이터를 이미지 경로로 설정합니다.
SR_SegPostProcessAngleDetection::classIdx
unsigned int classIdx
class index of detected object
Definition: SegPostProcessFunctionsDLL.h:211
SR_UseImageDataFromImageFileByWideCharPath
eErrorType SR_UseImageDataFromImageFileByWideCharPath(SegPostProcessHandle handle, const wchar_t *imagePath)
후처리 알고리즘에 사용되는 이미지 데이터를 이미지 경로로 설정합니다.
SR_SegPostProcessAngleDetection
Struct describing features of outputs of angle detector.
Definition: SegPostProcessFunctionsDLL.h:201
SR_DetectedBox
Struct describing features of a detected box.
Definition: CommonHeaderDLL.h:213
DetTestHandle
void * DetTestHandle
Detection file handler.
Definition: DetectorTestDLL.h:52
SR_UseImageDataFrom16bitCharColorArray
eErrorType SR_UseImageDataFrom16bitCharColorArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 3-channel 16-bit 배열로 설정합니다.
eErrorType
eErrorType
Enumerator indicating error codes.
Definition: CommonHeaderDLL.h:25
SR_SegRunPostProcessByTestResultHandle
eErrorType SR_SegRunPostProcessByTestResultHandle(SegPostProcessHandle handle, SegTestResult segResult)
SegTestResult 를 이용하여 후처리를 수행합니다.
SR_CreateSegPostProcessHandle
SegPostProcessHandle SR_CreateSegPostProcessHandle(eSegPostProcessType segPostProcessType, SR_SegPostProcessOptions segPostProcessOptions)
SegPostProcessHandle 을 생성합니다.
SR_SegPostProcessFindAngleAndCenter
eErrorType SR_SegPostProcessFindAngleAndCenter(DetTestHandle handle, SR_DetectedBox *box, int numSegmentedObject, SR_SegmentedObject *segObjects, SR_SegPostProcessAngleDetection *angleObject)
Convert SR_DetectedBox to SR_SegPostProcessAngleDetection.
SegTestResult
void * SegTestResult
Segmentation inspection results handler.
Definition: SegmentationTestDLL.h:105
SegPostProcessHandle
void * SegPostProcessHandle
Definition: SegPostProcessFunctionsDLL.h:120
SR_UseImageDataFrom16bitUnsignedIntColorArray
eErrorType SR_UseImageDataFrom16bitUnsignedIntColorArray(SegPostProcessHandle handle, const unsigned int *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 4-channel 16-bit 배열로 설정합니다.
SR_UseImageDataFromUnsignedIntColorArray
eErrorType SR_UseImageDataFromUnsignedIntColorArray(SegPostProcessHandle handle, const unsigned int *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 4-channel 8-bit 배열로 설정합니다.
eSegPostProcessType
eSegPostProcessType
Segmentation post process target cell type.
Definition: SegPostProcessFunctionsDLL.h:21