22 inputImage = cv::imread(imagePath, loadType);
23 if (inputImage.empty()) {
24 std::cout <<
"IMAGE NOT FOUND: " << imagePath <<
"\n";
29void ImageManager::saveImages (
const std::initializer_list <cv::Mat> & images,
const std::initializer_list <std::string> & imagePaths) {
30 auto imagesIterator = images.begin();
31 auto imagePathsIterator = imagePaths.begin();
32 for (
unsigned char i = 0; i < images.size(); i++) {
33 saveImage(* imagePathsIterator, * imagesIterator);
39void ImageManager::showImages (
const std::initializer_list <cv::Mat> & images,
const std::initializer_list <std::string> & windowNames) {
40 auto imagesIterator = images.begin();
41 auto windowNamesIterator = windowNames.begin();
42 for (
unsigned char i = 0; i < images.size(); i++) {
43 cv::imshow(* windowNamesIterator, * imagesIterator);
44 windowNamesIterator++;
51 for (
auto singleImage : images) singleImage.release();
void showImages(const std::initializer_list< cv::Mat > &images, const std::initializer_list< std::string > &windowNames)
Shows multiple images.
void releaseImages(const std::initializer_list< cv::Mat > &images)
Releases multiple images.
void saveImage(std::string imageSavePath, const cv::Mat &imageToSave)
Saves a single image.
void saveImages(const std::initializer_list< cv::Mat > &images, const std::initializer_list< std::string > &imagePaths)
Saves multiple images.
void loadImage(std::string imagePath, int loadType, cv::Mat &inputImage)
Loads a single image.
static const char * LOAD_IMAGE_SCOPE
static const short int SAVE_IMAGE_ERROR
static const short int LOAD_IMAGE_ERROR
static const char * SAVE_IMAGE_SCOPE