JeVois  1.18
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
jevois::python Namespace Reference

Classes

class  PyParHelper
 Typed class to allow creation of Parameter in Python. More...
 
class  PyParHelperBase
 Base helper class to allow creation of Parameter in python. More...
 

Enumerations

enum  YUYV {
  Black = 0x8000, DarkGrey = 0x8050, MedGrey = 0x8080, LightGrey = 0x80a0,
  White = 0x80ff, DarkGreen = 0x0000, MedGreen = 0x0040, LightGreen = 0x00ff,
  DarkTeal = 0x7070, MedTeal = 0x7090, LightTeal = 0x70b0, DarkPurple = 0xa030,
  MedPurple = 0xa050, LightPurple = 0xa080, DarkPink = 0xff00, MedPink = 0xff80,
  LightPink = 0xffff
}
 

Functions

void setEngine (jevois::Engine *e)
 Initialize Python, numpy, and allow python modules to send serial outputs through the JeVois Engine. More...
 
bool hasattr (boost::python::object &o, char const *name)
 Check whether a boost::python::object has an attribute. More...
 
template<class T >
boost::python::list pyVecToList (std::vector< T > const &v)
 Helper to convert std::vector<T> to python list. More...
 
template<class T >
std::vector< T > pyListToVec (boost::python::object const &lst)
 Helper to convert python list (or any iterable) to std::vector<T> More...
 
template<typename T , size_t N>
std::array< T, N > tupleToArray (boost::python::object const &o)
 Helper to extract a tuple with elements of uniform type T into an std::array. More...
 
template<typename T , size_t N>
void tupleToArray (boost::python::object const &o, std::array< T, N > &arr, size_t minN=N)
 Helper to extract a tuple with elements of uniform type T into an std::array. More...
 
template<typename T >
pyextract (boost::python::object const &o)
 Generic value extraction, pass-through to boost::python::extract() for types that python knows how to extract. More...
 
template<>
cv::Scalar_< float > pyextract< cv::Scalar_< float > > (boost::python::object const &o)
 Specialization for cv::Scalar_<float>, extract from tuple of 1..4 float values. More...
 
template<>
cv::Scalar_< int > pyextract< cv::Scalar_< int > > (boost::python::object const &o)
 Specialization for cv::Scalar_<int>, extract from tuple of 1..4 int values. More...
 
template<>
cv::Point_< float > pyextract< cv::Point_< float > > (boost::python::object const &o)
 Specialization for cv::Point_<float>, extract from tuple of 2 float values. More...
 
template<>
cv::Point_< int > pyextract< cv::Point_< int > > (boost::python::object const &o)
 Specialization for cv::Point_<int>, extract from tuple of 2 int values. More...
 
template<>
cv::Size_< float > pyextract< cv::Size_< float > > (boost::python::object const &o)
 Specialization for cv::Size_<float>, extract from tuple of 2 float values. More...
 
template<>
cv::Size_< int > pyextract< cv::Size_< int > > (boost::python::object const &o)
 Specialization for cv::Size_<int>, extract from tuple of 2 int values. More...
 
template<>
ImColor pyextract< ImColor > (boost::python::object const &o)
 Specialization for ImColor, extract from tuple of 3..4 int values (if 3 then, alpha=255) More...
 
template<typename T >
boost::python::object topyobj (T const &val)
 Convert value to python, pass-through to python::object(val) More...
 
template<>
boost::python::object topyobj (cv::Scalar_< float > const &val)
 Specialization for cv::Scalar<float>, returns a tuple with 4 float elements. More...
 
template<>
boost::python::object topyobj (cv::Scalar_< int > const &val)
 Specialization for cv::Scalar<int>, returns a tuple with 4 int elements. More...
 
template<>
boost::python::object topyobj (cv::Point_< float > const &val)
 Specialization for cv::Point<float>, returns a tuple with 2 float elements. More...
 
template<>
boost::python::object topyobj (cv::Point_< int > const &val)
 Specialization for cv::Point<int>, returns a tuple with 2 int elements. More...
 
template<>
boost::python::object topyobj (cv::Size_< float > const &val)
 Specialization for cv::Size<float>, returns a tuple with 2 float elements. More...
 
template<>
boost::python::object topyobj (cv::Size_< int > const &val)
 Specialization for cv::Size<int>, returns a tuple with 2 int elements. More...
 
template<>
boost::python::object topyobj (ImColor const &val)
 Specialization for ImColor, returns a tuple with 4 int elements. More...
 

Variables

EngineengineForPythonModule = nullptr
 

Enumeration Type Documentation

◆ YUYV

Enumerator
Black 
DarkGrey 
MedGrey 
LightGrey 
White 
DarkGreen 
MedGreen 
LightGreen 
DarkTeal 
MedTeal 
LightTeal 
DarkPurple 
MedPurple 
LightPurple 
DarkPink 
MedPink 
LightPink 

Definition at line 198 of file PythonSupport.C.

Variable Documentation

◆ engineForPythonModule

Engine* jevois::python::engineForPythonModule = nullptr

Definition at line 71 of file PythonSupport.C.

Referenced by setEngine().