EtherCAT Control Framework v0.9
Implementation of EtherCAT protocol using IgH EtherCAT library for robot controller.
VideoCapture Class Reference

#include <video_capture.hpp>

Inheritance diagram for VideoCapture:
[legend]
Collaboration diagram for VideoCapture:
[legend]

Signals

void NewPixmapCapture ()
 

Public Member Functions

 VideoCapture (QObject *parent=nullptr)
 
QPixmap pixmap () const
 

Protected Member Functions

void run () override
 

Private Member Functions

QImage cvMatToQImage (const cv::Mat &inMat)
 
QPixmap cvMatToQPixmap (const cv::Mat &inMat)
 

Private Attributes

QPixmap pixmap_cap
 
cv::Mat frame_cap
 
cv::VideoCapture video_cap
 
unsigned long frame_rate = 30
 
uint8_t cam_id = ID_CAMERA
 

Detailed Description

Camera ID will be your camera's device ID. If you don't have any camera attached to usb default ID will be 0. If you're sure about camera ID, open terminal and type $ sudo apt-get install v4l-utils $ v4l2-ctl –list-devices You can take your camera by taking the last digit in /dev/videoX X will be your device ID.

Constructor & Destructor Documentation

◆ VideoCapture()

VideoCapture::VideoCapture ( QObject *  parent = nullptr)

Member Function Documentation

◆ cvMatToQImage()

QImage VideoCapture::cvMatToQImage ( const cv::Mat &  inMat)
private

◆ cvMatToQPixmap()

QPixmap VideoCapture::cvMatToQPixmap ( const cv::Mat &  inMat)
private

◆ NewPixmapCapture

void VideoCapture::NewPixmapCapture ( )
signal

◆ pixmap()

QPixmap VideoCapture::pixmap ( ) const
inline

◆ run()

void VideoCapture::run ( )
overrideprotected

Member Data Documentation

◆ cam_id

uint8_t VideoCapture::cam_id = ID_CAMERA
private

◆ frame_cap

cv::Mat VideoCapture::frame_cap
private

◆ frame_rate

unsigned long VideoCapture::frame_rate = 30
private

◆ pixmap_cap

QPixmap VideoCapture::pixmap_cap
private

◆ video_cap

cv::VideoCapture VideoCapture::video_cap
private

The documentation for this class was generated from the following files: