SaigeVision C/C++ 1.5.0
SaigeVision API document for C/C++
 
Loading...
Searching...
No Matches
SegPostProcessFunctionsDLL.h
Go to the documentation of this file.
1
4#pragma once
5
7#include "DetectorTestDLL.h"
8
20typedef enum
21{
22 StackCell = 0,
24
61typedef struct
62{
63 unsigned int nProducts;
64
65 unsigned int nTargetTopsPerProduct;
66 unsigned int nTargetBottomsPerProduct;
67
68 unsigned int topClassIdx;
69 unsigned int bottomClassIdx;
70
71 unsigned int convexityDefectThreshold;
72
73 bool useImageDataAtTop;
74 bool isTopBrighterThanBackGround;
75 bool useImageDataAtBottom;
76 bool isBottomBrighterThanBackGround;
77
78 float maxLengthOfSkeletonToRemoveAtTop;
79 float maxRatioThresholdOfMedianLengthToRemoveAtTop;
80 float minLengthOfSkeletonToKeepAtTop;
81
82 float maxLengthOfSkeletonToRemoveAtBottom;
83 float maxRatioThresholdOfMedianLengthToRemoveAtBottom;
84 float minLengthOfSkeletonToKeepAtBottom;
85
86 bool useImageDataForDividingProducts;
87 bool isBorderBrighterThanPoles;
88 bool adjustProductIndexUsingAlternateness;
89
90 int lengthThresholdToRemoveTopsAtUpperSide;
91 int lengthThresholdToRemoveBottomsAtUpperSide;
92 int lengthThresholdToRemoveTopsAtLowerSide;
93 int lengthThresholdToRemoveBottomsAtLowerSide;
94
95 int appendPointToUpperDirAtTop;
96 int appendPointToLowerDirAtTop;
97 int appendPointToUpperDirAtBottom;
98 int appendPointToLowerDirAtBottom;
99
100 bool isUpsideDown;
101 bool isBottomFirst;
102
103 float angleThresholdToMerge;
105
122typedef struct
123{
124 unsigned int nPoints;
125 unsigned int* xPts;
126 unsigned int* yPts;
127
128 unsigned int xStartPoint;
129 unsigned int yStartPoint;
130 unsigned int xEndPoint;
131 unsigned int yEndPoint;
132
133 unsigned int idxProduct;
134 unsigned int idxPoleInProduct;
135 unsigned int idxClass;
137
149
152
155
157DLLTYPE_SEGMENTATION eErrorType SR_SetSegPostProcessOptions(SegPostProcessHandle handle, SR_SegPostProcessOptions& segPostProcessOptions);
158
161
165DLLTYPE_SEGMENTATION SegPostProcessHandle SR_CreateSegPostProcessHandle(eSegPostProcessType segPostProcessType, SR_SegPostProcessOptions segPostProcessOptions);
166
169
173 const char* imagePath);
174
178 const wchar_t* imagePath);
179
183 const unsigned char* imageData,
184 const int height,
185 const int width);
186
190 const unsigned char* imageData,
191 const int height,
192 const int width);
193
197 const unsigned int* imageData,
198 const int height,
199 const int width);
200
204 const unsigned char* imageData,
205 const int height,
206 const int width);
207
211 const unsigned char* imageData,
212 const int height,
213 const int width);
214
218 const unsigned int* imageData,
219 const int height,
220 const int width);
221
225 int nSegObjects,
226 SR_SegmentedObject* segObjects,
227 int originalImageWidth,
228 int originalImageHeight);
229
233 SegTestResult segResult);
234
236DLLTYPE_SEGMENTATION eErrorType SR_SegPostProcessGetNumberOfSkeletons(SegPostProcessHandle handle, int * numberOfSkeletonsOut);
237
240
242typedef struct
243{
245 float angle;
246
248 unsigned int x_center;
250 unsigned int y_center;
251
253 unsigned int classIdx;
254
256 unsigned int area;
257
259 int x_vertex[4];
261 int y_vertex[4];
263
265DLLTYPE_SEGMENTATION eErrorType SR_SegPostProcessFindAngleAndCenter(DetTestHandle handle, SR_DetectedBox* box, int numSegmentedObject, SR_SegmentedObject* segObjects, SR_SegPostProcessAngleDetection* angleObject);
266
267DLLTYPE_SEGMENTATION eErrorType SR_SegPostProcessFindAngleAndCenter2(DetTestHandle handle, SR_DetectedBox* box, int numSegmentedObject, SR_SegmentedObject* segObjects, SR_SegPostProcessAngleDetection* angleObject);
eErrorType
Enumerator indicating error codes.
Definition: CommonHeaderDLL.h:30
Header file for Detection Module.
eErrorType SR_UseImageDataFrom16bitUnsignedIntColorArray(SegPostProcessHandle handle, const unsigned int *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 4-channel 16-bit 배열로 설정합니다.
eErrorType SR_UseImageDataFromImageFile(SegPostProcessHandle handle, const char *imagePath)
후처리 알고리즘에 사용되는 이미지 데이터를 이미지 경로로 설정합니다.
eErrorType SR_SegPostProcessGetNumberOfSkeletons(SegPostProcessHandle handle, int *numberOfSkeletonsOut)
후처리 결과로 검출된 스켈레톤의 개수를 받아옵니다.
eErrorType SR_PrintSegPostProcessOptions(SegPostProcessHandle handle)
SegPostProcessHandle의 SR_SegPostProcessOptions 값을 콘솔 창에 print 합니다.
eErrorType SR_SegPostProcessGetSkeletons(SegPostProcessHandle handle, SR_SegPostProcessSkeleton *skeletonsOut)
후처리 결과로 검출된 스켈레톤 정보를 받아옵니다.
eErrorType SR_UseImageDataFrom16bitCharGrayArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 1-channel 16-bit 배열로 설정합니다.
eErrorType SR_CheckValiditySegPostProcessOptions(SR_SegPostProcessOptions &options)
설정된 SR_SegPostProcessOptions 값에 대한 유효성 검사를 수행합니다.
eErrorType SR_UseImageDataFrom8bitCharGrayArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 1-channel 8-bit 배열로 설정합니다.
SR_SegPostProcessOptions SR_CreateSegPostProcessOptions()
SR_SegPostProcessOptions 를 기본값으로 생성합니다.
eErrorType SR_UseImageDataFrom16bitCharColorArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 3-channel 16-bit 배열로 설정합니다.
eErrorType SR_SegRunPostProcessByTestResultHandle(SegPostProcessHandle handle, SegTestResult segResult)
SegTestResult 를 이용하여 후처리를 수행합니다.
eErrorType SR_SetSegPostProcessOptions(SegPostProcessHandle handle, SR_SegPostProcessOptions &segPostProcessOptions)
SegPostProcessHandle의 SR_SegPostProcessOptions 값을 재설정합니다.
eErrorType SR_UseImageDataFromImageFileByWideCharPath(SegPostProcessHandle handle, const wchar_t *imagePath)
후처리 알고리즘에 사용되는 이미지 데이터를 이미지 경로로 설정합니다.
eErrorType SR_UseImageDataFromUnsignedIntColorArray(SegPostProcessHandle handle, const unsigned int *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 4-channel 8-bit 배열로 설정합니다.
eSegPostProcessType
Segmentation post process target cell type.
Definition: SegPostProcessFunctionsDLL.h:21
eErrorType SR_UseImageDataFrom8bitCharColorArray(SegPostProcessHandle handle, const unsigned char *imageData, const int height, const int width)
후처리 알고리즘에 사용되는 이미지 데이터를 3-channel 8-bit 배열로 설정합니다.
eErrorType SR_DestroySegPostProcessHandle(SegPostProcessHandle handle)
SegPostProcessHandle 을 소멸합니다.
SegPostProcessHandle SR_CreateSegPostProcessHandle(eSegPostProcessType segPostProcessType, SR_SegPostProcessOptions segPostProcessOptions)
SegPostProcessHandle 을 생성합니다.
eErrorType SR_SegPostProcessFindAngleAndCenter(DetTestHandle handle, SR_DetectedBox *box, int numSegmentedObject, SR_SegmentedObject *segObjects, SR_SegPostProcessAngleDetection *angleObject)
Convert SR_DetectedBox to SR_SegPostProcessAngleDetection.
eErrorType SR_SegRunPostProcessBySegmentedObjects(SegPostProcessHandle handle, int nSegObjects, SR_SegmentedObject *segObjects, int originalImageWidth, int originalImageHeight)
SR_SegmentedObject 를 이용하여 후처리를 수행합니다.
void * SegPostProcessHandle
Segmentation post process handler.
Definition: SegPostProcessFunctionsDLL.h:148
Header file for segmentation module.
void * DetTestHandle
Detection file handler.
Definition: DetectorTestDLL.h:52
void * SegTestResult
Segmentation inspection results handler.
Definition: SegmentationTestDLL.h:105
Struct describing features of a detected box.
Definition: CommonHeaderDLL.h:250
Struct describing features of outputs of angle detector.
Definition: SegPostProcessFunctionsDLL.h:243
unsigned int x_center
x coordinate of the center of the detected object
Definition: SegPostProcessFunctionsDLL.h:248
unsigned int classIdx
class index of detected object
Definition: SegPostProcessFunctionsDLL.h:253
float angle
angle from upright position in clockwise range from -180 to 180
Definition: SegPostProcessFunctionsDLL.h:245
unsigned int area
area of the object
Definition: SegPostProcessFunctionsDLL.h:256
unsigned int y_center
y coordinate of the center of the detected object
Definition: SegPostProcessFunctionsDLL.h:250
SR_SegPostProcessOptions 는 후처리할 때 설정할 수 있는 파라미터를 나타탭니다. nProducts: 이미지에 몇 개의 제품(셀)이 들어가는지를 나타냅니다....
Definition: SegPostProcessFunctionsDLL.h:62
SR_SegPostProcessSkeleton 은 후처리된 결과를 나타냅니다. nPoints: 스켈레톤 모델에 저장된 점의 수를 나타냅니다.. xPts: 스켈레톤 모델에 저장된 ...
Definition: SegPostProcessFunctionsDLL.h:123
Struct describing features of a segmentation object.
Definition: CommonHeaderDLL.h:122