05Robot 3.0

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Signals | Public Member Functions | Public Attributes | Properties | List of all members
Camera Class Reference
Computer Vision Module

Base camera interface class. More...

`#include <Camera.h>`

Inheritance diagram for Camera:

## Signals
void | writeInfo (QString)

## Public Member Functions
| Camera ()
virtual int | connect (int camera_id)
| Connects to camera with given ID. More...
virtual int | start ()
| Starts acquisition. More...
virtual int | sync ()
| Sends software trigger to camera. More...
virtual int | grab (cv::Mat *output=NULL)
| Copies current internal buffer to resultBuffer or given output Mat. More...
virtual int | stop ()
| Stops acquisition. More...
virtual int | disconnect ()
| Disconnects from camera. More...
Public Member Functions inherited from cXmlIO
| cXmlIO (int _xmlID=0, QObject *parent=nullptr)
virtual QString | sXmlKey ()
| Generates key of XML entry (as name of the serialised class is) More...
virtual void | findInXML (QString &fileName, bool compareXmlID=true)
| serches th file for XML key corr to class name and fill class properties according to entries found More...
virtual void | writeXml (QXmlStreamWriter &xml)
| Writes XML entries to file. Can be overloaded to save additional data, apart from object properties. More...
virtual void | readXml (QXmlStreamReader &xml)
| Called by findInXML. Reads XML entries. Has to be overloaded if additional data was written to file in object entry. More...
virtual void | writeCsvData (QXmlStreamWriter &stream, QString key, const QVector< QVector< double > > &s)
virtual void | writeCsvVector (QXmlStreamWriter &stream, QString key, const QVector< double > &s)
virtual void | readCsvData (QXmlStreamReader &stream, QVector< QVector< double > > &s)
virtual void | readCsvVector (QXmlStreamReader &stream, QVector< double > &s)
virtual void | write64BaseData (QXmlStreamWriter &stream, QString key, const QVector< QVector< double > > &s)
virtual void | read64BaseData (QXmlStreamReader &stream, QVector< QVector< double > > &s)
template<typename T >
void | writeData (QXmlStreamWriter &stream, QString key, const T &data)
template<typename T >
void | readData (QXmlStreamReader &stream, T &data)
int | getXmlID () const
void | setXmlID (int value)

## Public Attributes
int | resultX
| Output picture width. More...
int | resultY
| Output picture height. More...
unsigned char * | resultBuffer
| Output image buffer. More...
vector< cv::Point2f > | points
| Output 2D point buffer. More...
bool | readData
| Data readout enable flag. More...
QString | cameraName
| Camera name. More...
int | pixelSize
| Pixel size in bytes. More...

## Properties
CameraColor | CameraColor
| Image color type. More...
Properties inherited from cXmlIO
int | xmlID
| Defines uniqe identifier for object in XML file. More...

## Additional Inherited Members
Static Public Member Functions inherited from cXmlIO
static void | metaCopy (QObject *dest, QObject *src)
Protected Member Functions inherited from cXmlIO
void | metaDataXmlReader (QXmlStreamReader &stream, QObject &obj, bool isUser=true)
void | metaDataXmlWriter (QXmlStreamWriter &stream, const QObject &obj, bool isUser=true)

## Detailed Description

Base camera interface class.

## Constructor & Destructor Documentation

Camera | ( |  | ) |

## Member Function Documentation

virtual int connect | ( | int | camera_id | ) |
| virtual

Connects to camera with given ID.

Parameters

  camera_id | ID of camera to connect to

Returns
  Returns 0 on success

Reimplemented in Camera_Basler_GigE.

virtual int disconnect | ( |  | ) |
| inline virtual

Disconnects from camera.

Returns
  Returns 0 on success

Reimplemented in Camera_Basler_GigE.

virtual int grab | ( | cv::Mat * | output = `NULL` | ) |
| virtual

Copies current internal buffer to resultBuffer or given output Mat.

Parameters

  output | optional Mat to copy image to

Returns
  Returns 0 on success

Reimplemented in Camera_Basler_GigE.

virtual int start | ( |  | ) |
| inline virtual

Starts acquisition.

Reimplemented in Camera_Basler_GigE.

virtual int stop | ( |  | ) |
| inline virtual

Stops acquisition.

Returns
  Returns 0 on success

Reimplemented in Camera_Basler_GigE.

virtual int sync | ( |  | ) |
| inline virtual

Sends software trigger to camera.

Returns
  Returns 0 on success

Reimplemented in Camera_Basler_GigE.

void writeInfo | ( | QString |  | ) |
| signal

## Member Data Documentation

QString cameraName

Camera name.

int pixelSize

Pixel size in bytes.

vector<cv::Point2f> points

Output 2D point buffer.

bool readData

Data readout enable flag.

unsigned char* resultBuffer

Output image buffer.

int resultX

Output picture width.

int resultY

Output picture height.

## Property Documentation

CameraColor CameraColor
| read write

Image color type.

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

- camera/Camera.h