image.hpp 372 B

123456789101112131415161718192021
  1. #ifndef __IMAGE_HPP__
  2. #define __IMAGE_HPP__
  3. #include "opencv2/opencv.hpp"
  4. namespace tensor
  5. {
  6. struct Image
  7. {
  8. const void *bgrptr = nullptr;
  9. int width = 0, height = 0;
  10. Image() = default;
  11. Image(const void *bgrptr, int width, int height) : bgrptr(bgrptr), width(width), height(height) {}
  12. };
  13. Image cvimg(const cv::Mat &image);
  14. } // namespace tensor
  15. #endif