Flair
Framework Libre Air
flair::sensor::Camera Class Reference

Base class for Camera. More...

#include <Camera.h>

+ Inheritance diagram for flair::sensor::Camera:

Public Member Functions

 Camera (const core::FrameworkManager *parent, std::string name, uint16_t width, uint16_t height, core::cvimage::Type::Format format)
 Constructor. More...
 
 Camera (const core::IODevice *parent, std::string name)
 Constructor. More...
 
 ~Camera ()
 Destructor. More...
 
void UseDefaultPlot (const core::cvimage *image)
 Use default plot. More...
 
gui::GridLayoutGetLayout (void) const
 get Layout More...
 
gui::TabGetPlotTab (void) const
 plot tab More...
 
void SaveToFile (std::string filename) const
 Save picture to file. More...
 
uint16_t Width (void) const
 Width. More...
 
uint16_t Height (void) const
 Height. More...
 
core::cvimageOutput (void)
 Output matrix. More...
 
core::DataType const & GetOutputDataType () const
 
- Public Member Functions inherited from flair::core::IODevice
 IODevice (const Object *parent, std::string name)
 Constructor. More...
 
virtual ~IODevice ()
 Destructor. More...
 
void AddDeviceToLog (const IODevice *device)
 Add an IODevice to the logs. More...
 
void AddDataToLog (const io_data *data)
 Add an io_data to the log. More...
 
void OutputToShMem (bool enabled)
 Send the output to a shared memory. More...
 
virtual DataType const & GetInputDataType () const
 
- Public Member Functions inherited from flair::core::Object
 Object (const Object *parent=NULL, std::string name="", std::string type="")
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
std::string ObjectName (void) const
 Name. More...
 
std::string ObjectType (void) const
 Type. More...
 
const ObjectParent (void) const
 Parent. More...
 
std::vector< const Object * > * TypeChilds (void) const
 Childs of the same type. More...
 
std::vector< const Object * > * Childs (void) const
 Childs. More...
 
void Information (const char *function, int line, const char *format,...) const
 Formatted information. More...
 
void Warning (const char *function, const char *format,...) const
 Formatted warning. More...
 
void Error (const char *function, const char *format,...) const
 Formatted error. More...
 
bool ErrorOccured (bool recursive=true) const
 Has an errror occured? More...
 

Protected Member Functions

gui::GroupBoxGetGroupBox (void) const
 get GroupBox More...
 
- Protected Member Functions inherited from flair::core::IODevice
void ProcessUpdate (io_data *data)
 Process the childs of type IODevice, and log if needed. More...
 

Protected Attributes

core::cvimageoutput
 

Additional Inherited Members

- Public Types inherited from flair::core::Object
enum  color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 }
 
- Public Attributes inherited from flair::core::IODevice
Time lastUpdate
 

Detailed Description

Base class for Camera.

Use this class to define a custom Camera.

Constructor & Destructor Documentation

flair::sensor::Camera::Camera ( const core::FrameworkManager parent,
std::string  name,
uint16_t  width,
uint16_t  height,
core::cvimage::Type::Format  format 
)

Constructor.

Construct a Camera.

Parameters
parentparent
namename
widthwidth
heightheight
formatimage format
flair::sensor::Camera::Camera ( const core::IODevice parent,
std::string  name 
)

Constructor.

Construct a Camera.
This contructor must only be called for a simulated device.

Parameters
parentparent
namename
flair::sensor::Camera::~Camera ( )

Destructor.

Member Function Documentation

void flair::sensor::Camera::UseDefaultPlot ( const core::cvimage image)

Use default plot.

Parameters
imageimage to display
gui::GridLayout* flair::sensor::Camera::GetLayout ( void  ) const

get Layout

Returns
a Layout available
gui::Tab* flair::sensor::Camera::GetPlotTab ( void  ) const

plot tab

Returns
plot tab
void flair::sensor::Camera::SaveToFile ( std::string  filename) const

Save picture to file.

Parameters
filenamefilename
uint16_t flair::sensor::Camera::Width ( void  ) const

Width.

Returns
width
uint16_t flair::sensor::Camera::Height ( void  ) const

Height.

Returns
height
core::cvimage* flair::sensor::Camera::Output ( void  )

Output matrix.

Output matrix is of the same size as declared in constructor.

Returns
the output matrix
gui::GroupBox* flair::sensor::Camera::GetGroupBox ( void  ) const
protected

get GroupBox

Returns
a GroupBox available