JeVois
1.20
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
 |
 |
|
Go to the documentation of this file.
20 #include <boost/python.hpp>
21 #include <opencv2/core/core.hpp>
50 bool hasattr(boost::python::object &
o,
char const * name);
54 boost::python::list
pyVecToList(std::vector<T>
const & v);
58 std::vector<T>
pyListToVec(boost::python::object
const & lst);
61 template <
typename T,
size_t N>
62 std::array<T, N>
tupleToArray(boost::python::object
const &
o);
69 template <
typename T,
size_t N>
70 void tupleToArray(boost::python::object
const &
o, std::array<T, N> & arr,
size_t minN = N);
78 cv::Scalar_<float> pyextract<cv::Scalar_<float>>(boost::python::object
const &
o);
82 cv::Scalar_<int> pyextract<cv::Scalar_<int>>(boost::python::object
const &
o);
86 cv::Point_<float> pyextract<cv::Point_<float>>(boost::python::object
const &
o);
90 cv::Point_<int> pyextract<cv::Point_<int>>(boost::python::object
const &
o);
94 cv::Size_<float> pyextract<cv::Size_<float>>(boost::python::object
const &
o);
98 cv::Size_<int> pyextract<cv::Size_<int>>(boost::python::object
const &
o);
107 template <
typename T>
108 boost::python::object
topyobj(T
const & val);
112 boost::python::object
topyobj(cv::Scalar_<float>
const & val);
116 boost::python::object
topyobj(cv::Scalar_<int>
const & val);
120 boost::python::object
topyobj(cv::Point_<float>
const & val);
124 boost::python::object
topyobj(cv::Point_<int>
const & val);
128 boost::python::object
topyobj(cv::Size_<float>
const & val);
132 boost::python::object
topyobj(cv::Size_<int>
const & val);
137 boost::python::object
topyobj(ImColor
const & val);
145 #include <jevois/Core/details/PythonSupportImpl.H>
std::vector< T > pyListToVec(boost::python::object const &lst)
Helper to convert python list (or any iterable) to std::vector<T>
boost::python::object topyobj(T const &val)
Convert value to python, pass-through to python::object(val)
boost::python::list pyVecToList(std::vector< T > const &v)
Helper to convert std::vector<T> to python list.
bool hasattr(boost::python::object &o, char const *name)
Check whether a boost::python::object has an attribute.
JeVois processing engine - gets images from camera sensor, processes them, and sends results over USB...
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.
void setEngine(jevois::Engine *e)
Initialize Python, numpy, and allow python modules to send serial outputs through the JeVois Engine.
T pyextract(boost::python::object const &o)
Generic value extraction, pass-through to boost::python::extract() for types that python knows how to...
ImColor pyextract< ImColor >(boost::python::object const &o)
Specialization for ImColor, extract from tuple of 3..4 int values (if 3 then, alpha=255)