검출된 박스 주변을 잘라서 저장하는 방법에 관한 변수들입니다.
- boolean: true 면 모든 박스 주변의 이미지를 잘라 SR_DetectedBox::croppedImage 에 저장합니다. 최적의 성능을 위해서는 해당 기능을 끄는 것을 추천합니다.
- default crop size: 검출된 박스의 width, height가 모두 default crop size보다 작다면 해당 결함을 (default crop size x default crop size)로 잘라 저장합니다.
- mode of crop large objects: 검출된 결함의 width, height 둘 중 하나라도 default crop size보다 클 경우 어떻게 크랍할지를 선택합니다.
- eModeOfCropLargeObjects::SR_CROP_BY_OBJECTSIZE_N_RESIZE_TO_CROPSIZE : 결함 자체 사이즈( = max (width, height)) * (1 + 2 * margin) 으로 자른 후 (default crop size x default crop size) 로 리사이즈 합니다.
- eModeOfCropLargeObjects::SR_CROP_BY_OBJECTSIZE : 결함 자체 사이즈( = max (width, height)) * (1 + 2 * margin) 으로 자릅니다.
- eModeOfCropLargeObjects::SR_CROP_CENTER_BY_CROPSIZE : 결함의 중심을 기준으로 (default crop size x default crop size) 로 자릅니다.
- eModeOfCropLargeObjects::SR_CROP_BY_OBJECTSIZE_NOT_SQUARE : 결함의 중심을 기준으로 (width x height) 로 자릅니다.
- margin: 결함을 자를 때 두는 여유를 결정합니다. eModeOfCropLargeObjects::SR_CROP_CENTER_BY_CROPSIZE 에서는 margin이 사용되지 않습니다.
- cropped size = object size * (1 + 2 * margin)
- margin 은 [0, 0.5] 범위 내에 있어야 합니다.
◆ SR_SetDetTestCropDetectedBoxesOptions()
Set the parameters of Detection's crop box.
- Parameters
-
| handle | detection file handler |
| isToStoreCroppedImage | |
| defaultCropSize | |
| modeOfCropLargeObjects | |
| margin | |
| writeOnModelFile | overwrite on model file or not |
◆ SR_SetDetTestOptionsAsDefault()