mvs_camera.h 799 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef REMOTEAR3_MVS_CAMERA_H
  2. #define REMOTEAR3_MVS_CAMERA_H
  3. #include <memory>
  4. #include <string_view>
  5. namespace mvs {
  6. enum pixel_type {
  7. RG_8
  8. };
  9. struct create_config {
  10. std::string_view name;
  11. pixel_type pixel;
  12. int image_out_index;
  13. };
  14. struct capture_config {
  15. int frame_rate; // frame per second
  16. float expo_time_ms;
  17. float gain_db;
  18. };
  19. class camera {
  20. public:
  21. ~camera();
  22. bool set_capture_config(const capture_config &conf);
  23. bool start_capture();
  24. bool stop_capture();
  25. bool is_capture() const;
  26. static camera *create(const create_config &conf);
  27. private:
  28. struct impl;
  29. std::unique_ptr<impl> pimpl;
  30. };
  31. }
  32. #endif //REMOTEAR3_MVS_CAMERA_H