roviz  0.7
Code Documentation of roviz
cv_camera_item.h
1 #ifndef CVCAMERA_ITEM_H
2 #define CVCAMERA_ITEM_H
3 
4 #include "core/export_handling.h"
5 #include "core/roviz_item.h"
6 #include "config/config.h"
7 #include "streams/image_m.h"
8 #include <opencv2/opencv.hpp>
9 #include <opencv2/videoio.hpp>
10 
11 class CvCameraItem : public RovizItem
12 {
13 #if ROVIZ_BACKEND == ROVIZ_BACKEND_Dev
14  Q_OBJECT
15 #endif
16 
17 public:
18  ROVIZ_INVOKABLE CvCameraItem();
19  ~CvCameraItem();
20 
21 protected:
22  void thread(void) override;
23  void stopped(void) override;
24 
25 private:
26  Output<Image> output;
28  Config<int> conf_cam_id;
29  cv::VideoCapture cap;
30  std::vector<int> width_list, height_list;
31  int res_index;
32 };
33 
34 #endif // CVCAMERA_ITEM_H
Storage for the configuration of an item.
Definition: config.h:20
void thread(void) override
Main thread of the item.
Definition: cv_camera_item.cpp:44
Base class for all items that use the roviz framework.
Definition: roviz_item.h:43
void stopped(void) override
Called after the thread stopped.
Definition: cv_camera_item.cpp:61
Definition: cv_camera_item.h:11