#ifndef SAIGE_VISION_WRAPPER_SAIGE_VISION_UTIL_H_
#define SAIGE_VISION_WRAPPER_SAIGE_VISION_UTIL_H_
#include "SaigeVisionAPI.h"
#ifdef __linux__
#define SAIGE_VISION_API extern "C"
#elif defined(SAIGEVISIONWRAPPER_EXPORTS)
#define SAIGE_VISION_API extern "C" __declspec(dllexport)
#else
#define SAIGE_VISION_API extern "C" __declspec(dllimport)
#endif
typedef enum _SaigeImageType {
SV_U8 = 0,
SV_U16 = 1,
SV_F32 = 2,
SV_F64 = 3,
SV_FILEPATH = 4
} SaigeImageType;
SAIGE_VISION_API void* SaigeGetImageData(const char* imagePath, int* width, int* height,
int* channels, int* type);
SAIGE_VISION_API int SaigeFreeImageData(void* image);
SAIGE_VISION_API int SaigeColorCodeToRGB(const char* color, unsigned char* r, unsigned char* g,
unsigned char* b);
SAIGE_VISION_API int SaigeDrawDetectedObjects(const void* image, const SaigeDetectedObject* objects,
SaigeModelInfo* modelInfo,
const int numOfDetectedObjects, const int width,
const int height, const int channels, const int type,
const int waitMS);
SAIGE_VISION_API int SaigeDrawSegmentedObjects(const void* image,
const SaigeSegmentedObject* objects,
SaigeModelInfo* modelInfo,
const int numOfSegmentedObjects, const int width,
const int height, const int channels, const int type,
const double overlayAlpha, const int waitMS);
SAIGE_VISION_API int SaigeDrawTextObjects(const void* image, const SaigeTextObject* objects,
const int numBoxes, const int width, const int height,
const int channels, const int type, const int waitMS);
SAIGE_VISION_API int SaigeDrawHeatmap(const float* image, const int width, const int height,
const int waitMS);
SAIGE_VISION_API int SaigeDrawImage(const void* image, const int width, const int height,
const int channels, const double alpha, const int type,
const bool invert, const int waitMS);
SAIGE_VISION_API int SaigeDrawImageOverBase(const void* base_img, const void* img, const int width,
const int height, const int channels_base,
const int channels_img, const int type_base,
const int type_img, const double alpha,
const bool invert, const int waitMS);
SAIGE_VISION_API void SaigeInitTextFormatting(SaigeTextFormatting* formatting);
SAIGE_VISION_API unsigned int SaigeConvertImageType(const int channel, const int type);
SAIGE_VISION_API int SaigeOverlaySegmentedObjects(
const void* baseImage, const SaigeSegmentedObject* objects, SaigeModelInfo* modelInfo,
const int numOfSegmentedObjects, const int width, const int height, const int channels,
const int type, const bool isRGB, const double overlayAlpha, void* resultImage);
SAIGE_VISION_API int SaigeOverlayDetectedObjects(
const void* baseImage, const SaigeDetectedObject* objects, SaigeModelInfo* modelInfo,
const int numOfDetectedObjects, const int width, const int height, const int channels,
const int type, const bool withClassName, const bool isRGB, const double overlayAlpha,
void* resultImage);
SAIGE_VISION_API int SaigeOverlayTextObjects(const void* baseImage, const SaigeTextObject* objects,
const int numOfTextObjects, const int width,
const int height, const int channels, const int type,
const bool isRGB, const double overlayAlpha,
const double textScale, void* resultImage);
SAIGE_VISION_API int SaigeOverlayHeatmap(const void* baseImage, const float* heatmap,
const int width, const int height, const int channels,
const int type, const bool isRGB,
const double overlayAlpha, void* resultImage);
SAIGE_VISION_API int SaigeShowImage(const void* image, const int width, const int height,
const int channels, const int type, const bool isRGB,
const bool invert, const double alpha, const int waitMS);
SAIGE_VISION_API void* SaigeCropWithRotatedBox(const void* originalImage, const int width,
const int height, const int channel,
SaigeRotatedBox* rotatedBox, int* croppedWidth,
int* croppedHeight);
SAIGE_VISION_API int SaigeFreeCroppedImage(void* croppedImage);
#endif // SAIGE_VISION_WRAPPER_SAIGE_VISION_UTIL_H_