mvs_camera.h 687 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef REMOTEAR2_MVS_CAMERA_H
  2. #define REMOTEAR2_MVS_CAMERA_H
  3. #include <opencv2/core/cuda.hpp>
  4. #include <memory>
  5. #include <string_view>
  6. class mvs_camera {
  7. public:
  8. mvs_camera();
  9. ~mvs_camera();
  10. bool open(std::string_view camera_name);
  11. void close();
  12. struct capture_config {
  13. float exposure_time;
  14. float analog_gain;
  15. };
  16. bool start_capture(const capture_config *config);
  17. void stop_capture();
  18. bool software_trigger();
  19. void retrieve_image(cv::cuda::GpuMat **image_ptr);
  20. bool is_opened() const;
  21. bool is_capturing() const;
  22. private:
  23. struct impl;
  24. std::unique_ptr<impl> pimpl;
  25. };
  26. #endif //REMOTEAR2_MVS_CAMERA_H