Fawkes API  Fawkes Development Version
firevision::Qualifier Class Referenceabstract

Abstract Qualifier for a single pixel. More...

#include <apps/nao_loc/qualifiers.h>

Inheritance diagram for firevision::Qualifier:

Public Member Functions

 Qualifier ()
 Default constructor. More...
 
virtual ~Qualifier ()
 Destructor. More...
 
virtual int get (fawkes::upoint_t pixel)=0
 Getter. More...
 
virtual unsigned char * get_buffer ()
 Get buffer. More...
 
virtual void set_buffer (unsigned char *buffer, unsigned int width=0, unsigned int height=0)
 buffer setter More...
 
virtual colorspace_t get_colorspace ()
 Get colorspace. More...
 
virtual void set_colorspace (colorspace_t colorspace)
 colorspace setter More...
 

Protected Member Functions

 Qualifier (unsigned char *buffer, unsigned int width, unsigned int height, colorspace_t colorspace)
 Constructor. More...
 

Protected Attributes

unsigned char * buffer_
 Image buffer. More...
 
unsigned int width_
 Width of the buffer. More...
 
unsigned int height_
 Height of the buffer. More...
 
unsigned int size_
 Size of the buffer. More...
 
colorspace_t colorspace_
 Colorspace of the buffer. More...
 

Detailed Description

Abstract Qualifier for a single pixel.

Author
Christof Rath

Definition at line 34 of file qualifiers.h.

Constructor & Destructor Documentation

◆ Qualifier() [1/2]

firevision::Qualifier::Qualifier ( )

Default constructor.

Definition at line 44 of file qualifiers.cpp.

References buffer_, colorspace_, height_, size_, and width_.

◆ ~Qualifier()

firevision::Qualifier::~Qualifier ( )
virtual

Destructor.

Definition at line 74 of file qualifiers.cpp.

◆ Qualifier() [2/2]

firevision::Qualifier::Qualifier ( unsigned char *  buffer,
unsigned int  width,
unsigned int  height,
colorspace_t  colorspace 
)
protected

Constructor.

Parameters
buffercontaining the image
widthof the image
heightof the image
colorspacethe colorspace in action

Definition at line 59 of file qualifiers.cpp.

References colorspace_, and set_buffer().

Member Function Documentation

◆ get()

virtual int firevision::Qualifier::get ( fawkes::upoint_t  pixel)
pure virtual

Getter.

Parameters
pixelthe pixel of interest
Returns
a corresponding int value

Implemented in firevision::YellowQualifier, firevision::SkyblueQualifier, and firevision::LumaQualifier.

Referenced by firevision::GradientClassifier::classify().

◆ get_buffer()

unsigned char * firevision::Qualifier::get_buffer ( )
virtual

Get buffer.

Returns
pointer to buffer

Definition at line 82 of file qualifiers.cpp.

References buffer_.

Referenced by firevision::GradientClassifier::classify().

◆ get_colorspace()

colorspace_t firevision::Qualifier::get_colorspace ( )
virtual

Get colorspace.

Returns
colorspace

Definition at line 115 of file qualifiers.cpp.

References colorspace_.

◆ set_buffer()

void firevision::Qualifier::set_buffer ( unsigned char *  buffer,
unsigned int  width = 0,
unsigned int  height = 0 
)
virtual

buffer setter

Parameters
buffercontaining the image
widthof the image (if 0 the param will be ignored)
heightof the image (if 0 the param will be ignored)

Definition at line 93 of file qualifiers.cpp.

References buffer_, height_, size_, and width_.

Referenced by Qualifier(), and firevision::GradientClassifier::set_src_buffer().

◆ set_colorspace()

void firevision::Qualifier::set_colorspace ( colorspace_t  colorspace)
virtual

colorspace setter

Parameters
colorspacethe colorspace in action

Definition at line 125 of file qualifiers.cpp.

References colorspace_.

Member Data Documentation

◆ buffer_

unsigned char* firevision::Qualifier::buffer_
protected

◆ colorspace_

colorspace_t firevision::Qualifier::colorspace_
protected

Colorspace of the buffer.

Definition at line 70 of file qualifiers.h.

Referenced by get_colorspace(), Qualifier(), and set_colorspace().

◆ height_

unsigned int firevision::Qualifier::height_
protected

◆ size_

unsigned int firevision::Qualifier::size_
protected

Size of the buffer.

Definition at line 67 of file qualifiers.h.

Referenced by firevision::SkyblueQualifier::get(), firevision::YellowQualifier::get(), Qualifier(), and set_buffer().

◆ width_

unsigned int firevision::Qualifier::width_
protected

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