stackercpp.h 777 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include <opencv2/opencv.hpp>
  2. #include <opencv2/core.hpp>
  3. #include <opencv2/imgcodecs.hpp>
  4. #include <opencv2/video/tracking.hpp>
  5. using namespace std;
  6. using namespace cv;
  7. #ifndef POSTPROCESSD__STACKERCPP_H
  8. #define POSTPROCESSD__STACKERCPP_H
  9. class Stacker {
  10. public:
  11. Stacker();
  12. void
  13. add_frame(unsigned char *data, int width, int height);
  14. char *
  15. get_result();
  16. char *
  17. postprocess(unsigned char *data, int width, int height);
  18. private:
  19. int layers;
  20. cv::Mat reference;
  21. cv::Mat stacked;
  22. clock_t stopwatch;
  23. Mat
  24. postprocess_mat(Mat input);
  25. void
  26. stopwatch_start();
  27. void
  28. stopwatch_mark(const char *name);
  29. };
  30. #endif //POSTPROCESSD__STACKERCPP_H