SaigeVision C/C++  1.4.7
SaigeVision API document for C/C++
SRUtils.h File Reference

Header file of util functions for example projects. More...

#include <fstream>
#include <string>
#include "opencv2/opencv.hpp"

Go to the source code of this file.

Enumerations

enum  eSRInputImageType
 Data Type of input Image for example projects.
 

Functions

void ConvertImageToDepthOfCV8U (cv::Mat &image)
 Convert image to CV_8U depth type.
 
bool OpenImageFile (const std::wstring imagePath, cv::Mat &image, bool asCV8U=false)
 Open image file for example projects.
 
void * GetImageDataByInputImageType (const std::wstring imagePath, const eSRInputImageType inputType, int &height, int &width, int *channel=nullptr)
 Get image data from a file path and image size by an allocated pointer for example projects. More...
 
void DisplayFailedImageOnCVWindow (std::wstring &imagePath, std::string failPhrase, std::string windowName, int displayTime, const float resizeFactor)
 Display failed image on opencv window for example projects.
 
void convertSRSegmentedObjectToOpencvFormat (const SR_SegmentedObject &object, std::vector< std::vector< cv::Point >> &contours, std::vector< cv::Vec4i > &hierarchies)
 convert SR_SegmentedObject to opencv contours and hierarchies for example projects.
 

Detailed Description

Header file of util functions for example projects.

Function Documentation

◆ GetImageDataByInputImageType()

void* GetImageDataByInputImageType ( const std::wstring  imagePath,
const eSRInputImageType  inputType,
int &  height,
int &  width,
int *  channel = nullptr 
)