stackercpp.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #include <opencv2/opencv.hpp>
  2. #include <opencv2/core.hpp>
  3. #include <opencv2/imgcodecs.hpp>
  4. #include <opencv2/video/tracking.hpp>
  5. #include <opencv2/videostab/motion_stabilizing.hpp>
  6. #include <lensfun.h>
  7. #include "postprocess.h"
  8. using namespace std;
  9. using namespace cv;
  10. #ifndef POSTPROCESSD__STACKERCPP_H
  11. #define POSTPROCESSD__STACKERCPP_H
  12. class Stacker {
  13. public:
  14. Stacker(bool verbose, struct Imagedata imagedata);
  15. void
  16. add_frame(unsigned char *data, int width, int height);
  17. char *
  18. get_result();
  19. char *
  20. postprocess(unsigned char *data, int width, int height);
  21. int
  22. get_width();
  23. int
  24. get_height();
  25. private:
  26. bool verbose;
  27. int layers;
  28. cv::Mat reference;
  29. cv::Mat stacked;
  30. clock_t stopwatch;
  31. int export_width;
  32. int export_height;
  33. float trimratio;
  34. // Lensfun
  35. struct Imagedata imagedata;
  36. struct lfDatabase *ldb;
  37. Mat
  38. postprocess_mat(Mat input);
  39. void
  40. stopwatch_start();
  41. void
  42. stopwatch_mark(const char *name);
  43. };
  44. #endif //POSTPROCESSD__STACKERCPP_H