JeVoisBase  1.0
JeVois Smart Embedded Machine Vision Toolkit Base Modules
QRcode Class Reference

QRcode and Barcode detection using ZBar. More...

#include </lab/itti/jevois/software/jevoisbase/src/Components/QRcode/QRcode.H>

Inheritance diagram for QRcode:
Collaboration diagram for QRcode:

Public Member Functions

 QRcode (std::string const &instance)
 Constructor. More...
 
 ~QRcode ()
 Destructor. More...
 
void process (zbar::Image &image)
 Process a greayscale image. More...
 
void process (zbar::Image &image, std::vector< std::string > &results)
 Process a greayscale image. More...
 
- Public Member Functions inherited from jevois::Component
 Component (std::string const &instance)
 
virtual ~Component ()
 
std::shared_ptr< ComponentgetSubComponent (std::string const &instance) const
 
std::shared_ptr< Comp > addSubComponent (std::string const &instance, Args &&...args)
 
void removeSubComponent (std::shared_ptr< Comp > &component)
 
void removeSubComponent (std::string const &instance, bool warnIfNotFound=true)
 
std::shared_ptr< Comp > getSubComponent (std::string const &instance) const
 
bool isTopLevel () const
 
bool initialized () const
 
std::string const & className () const
 
std::string const & instanceName () const
 
std::vector< std::string > setParamVal (std::string const &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor)
 
void unFreezeParam (std::string const &paramdescriptor)
 
void freezeAllParams ()
 
void unFreezeAllParams ()
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
void setPath (std::string const &path)
 
std::string absolutePath (std::string const &path="")
 
std::shared_ptr< Comp > addSubComponent (std::string const &instance, Args &&...args)
 
void removeSubComponent (std::shared_ptr< Comp > &component)
 
void removeSubComponent (std::string const &instance, bool warnIfNotFound=true)
 
std::shared_ptr< Comp > getSubComponent (std::string const &instance) const
 
bool isTopLevel () const
 
bool initialized () const
 
std::string const & className () const
 
std::string const & instanceName () const
 
std::vector< std::string > setParamVal (std::string const &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor)
 
void unFreezeParam (std::string const &paramdescriptor)
 
void freezeAllParams ()
 
void unFreezeAllParams ()
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
void setPath (std::string const &path)
 
std::string absolutePath (std::string const &path="")
 
- Public Member Functions inherited from jevois::ParameterRegistry
virtual ~ParameterRegistry ()
 

Protected Member Functions

void onParamChange (qrcode::symbol const &param, std::string const &newval)
 Parse symbol config strings when they change. More...
 
- Protected Member Functions inherited from jevois::Component
virtual void preInit ()
 
virtual void postInit ()
 
virtual void preUninit ()
 
virtual void postUninit ()
 
virtual void preInit ()
 
virtual void postInit ()
 
virtual void preUninit ()
 
virtual void postUninit ()
 
- Protected Member Functions inherited from jevois::ParameterRegistry
void addParameter (ParameterBase *const param)
 
void removeParameter (ParameterBase *const param)
 
void callbackInitCall ()
 

Protected Attributes

std::shared_ptr< zbar::ImageScanner > itsScanner
 

Related Functions

(Note that these are not member functions.)

 JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK (symbol, std::string,"Type(s) of QR code / barcode symbols searched for, ""multiple entries are possible and should be separated by / characters. ""Selecting many symbol types or ALL will slow down processing. Supported ""symbols are: QRCODE, EAN2, EAN5, EAN8, EAN13, UPCE, UPCA, ISBN10, ISBN13, ""COMPOSITE, I25, DATABAR, DATABAREXP, CODABAR, CODE39, PDF417, CODE93, ""and CODE128","ALL", ParamCateg)
 Parameter. More...
 
 JEVOIS_DECLARE_PARAMETER (xdensity, int,"Scanner vertical scan density (pixel stride), or 0 to disable", 1, ParamCateg)
 Parameter. More...
 
 JEVOIS_DECLARE_PARAMETER (ydensity, int,"Scanner horizontal scan density (pixel stride), or 0 to disable", 1, ParamCateg)
 Parameter. More...
 

Detailed Description

QRcode and Barcode detection using ZBar.

This is drectly modeled after the scan_image.cpp ZBar example code.

Definition at line 47 of file QRcode.H.

Constructor & Destructor Documentation

QRcode::QRcode ( std::string const &  instance)

Constructor.

Definition at line 23 of file QRcode.C.

References itsScanner.

QRcode::~QRcode ( )

Destructor.

Definition at line 30 of file QRcode.C.

Member Function Documentation

void QRcode::onParamChange ( qrcode::symbol const &  param,
std::string const &  newval 
)
protected

Parse symbol config strings when they change.

Definition at line 34 of file QRcode.C.

References itsScanner, LFATAL, and jevois::split().

void QRcode::process ( zbar::Image &  image)

Process a greayscale image.

Results will be stored in the image

Definition at line 93 of file QRcode.C.

References itsScanner, and LERROR.

void QRcode::process ( zbar::Image &  image,
std::vector< std::string > &  results 
)

Process a greayscale image.

Results will be stored in the provided vector

Definition at line 105 of file QRcode.C.

References itsScanner, and LERROR.

Friends And Related Function Documentation

JEVOIS_DECLARE_PARAMETER ( xdensity  ,
int  ,
"Scanner vertical scan density   pixel stride,
or 0 to disable"  ,
,
ParamCateg   
)
related

Parameter.

JEVOIS_DECLARE_PARAMETER ( ydensity  ,
int  ,
"Scanner horizontal scan density   pixel stride,
or 0 to disable"  ,
,
ParamCateg   
)
related

Parameter.

JEVOIS_DECLARE_PARAMETER_WITH_CALLBACK ( symbol  ,
std::string  ,
"Type(s) of QR code / barcode symbols searched  for,
""multiple entries are possible and should be separated by/characters.""Selecting many symbol types or ALL will slow down processing.Supported""symbols are:QRCODE  ,
EAN2  ,
EAN5  ,
EAN8  ,
EAN13  ,
UPCE  ,
UPCA  ,
ISBN10  ,
ISBN13  ,
""  COMPOSITE,
I25  ,
DATABAR  ,
DATABAREXP  ,
CODABAR  ,
CODE39  ,
PDF417  ,
CODE93  ,
""and CODE128"  ,
"ALL"  ,
ParamCateg   
)
related

Parameter.

Member Data Documentation

std::shared_ptr<zbar::ImageScanner> QRcode::itsScanner
protected

Definition at line 69 of file QRcode.H.

Referenced by onParamChange(), process(), and QRcode().


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