filmout_display/include/image.hpp

42 lines
869 B
C++
Raw Normal View History

/**
* This class exists for the purpose of loading and manipulating
* iamges before displaying them. All OpenCV operations are
* handled by this class.
*
* Licence: MIT
* 2024 Matthew McWilliams
**/
#ifndef IMAGE_h
#define IMAGE_h
#include <opencv2/core.hpp>
#include <opencv2/core/opengl.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
2024-11-24 15:38:36 +00:00
#include "dpx/include/dpx.h"
using namespace std;
using namespace cv;
class Image {
private:
uint16_t width;
uint16_t height;
Mat blank;
Mat loaded;
Mat resized;
Mat image;
string getExtLower(const string& path);
public:
Image();
void setDimensions(uint16_t w, uint16_t h) { width = w; height = h; };
Mat getBlank();
Mat loadImage(string& image_path, uint64_t& x, uint64_t& y, uint64_t& w, uint64_t& h);
};
#endif