JeVois
1.20
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
 |
 |
|
Go to the documentation of this file.
29 #include <opencv2/core/core.hpp>
35 #include <glm/gtc/matrix_transform.hpp>
110 Module(std::string
const & instance);
164 virtual void sendSerial(std::string
const & str);
181 virtual void parseSerial(std::string
const & str, std::shared_ptr<UserInterface> s);
204 0U,
jevois::
Range<
unsigned int>(0U, 10U), ParamCateg);
220 "processing of a video frame from the camera sensor, the
end (MARK STOP), or both. "
221 "
Useful, among
others, if one needs to know when no results were sent over serial "
222 "on a given frame. Combine with parameter serstamp if you need to know the frame
number.",
233 public Parameter<module::serprec, module::serstyle, module::serstamp, module::sermark>
247 void sendSerialImg1Dx(
unsigned int camw,
float x,
float size = 0.0
F, std::string
const &
id =
"",
248 std::string
const & extra =
"");
253 void sendSerialStd1Dx(
float x,
float size = 0.0
F, std::string
const &
id =
"", std::string
const & extra =
"");
258 void sendSerialImg1Dy(
unsigned int camh,
float y,
float size = 0.0
F, std::string
const &
id =
"",
259 std::string
const & extra =
"");
264 void sendSerialStd1Dy(
float y,
float size = 0.0
F, std::string
const &
id =
"", std::string
const & extra =
"");
271 void sendSerialImg2D(
unsigned int camw,
unsigned int camh,
float x,
float y,
float w = 0.0
F,
float h = 0.0
F,
272 std::string
const &
id =
"", std::string
const & extra =
"");
279 void sendSerialStd2D(
float x,
float y,
float w = 0.0
F,
float h = 0.0
F,
280 std::string
const &
id =
"", std::string
const & extra =
"");
291 template <
typename T =
int>
292 void sendSerialContour2D(
unsigned int camw,
unsigned int camh, std::vector<cv::Point_<T> > points,
293 std::string
const &
id =
"", std::string
const & extra =
"");
299 void sendSerialStd3D(
float x,
float y,
float z,
float w = 0.0
F,
float h = 0.0
F,
float d = 0.0
F,
300 float q1 = 0.0
F,
float q2 = 0.0
F,
float q3 = 0.0f,
float q4 = 0.0
F,
301 std::string
const &
id =
"", std::string
const & extra =
"");
307 void sendSerialStd3D(std::vector<cv::Point3f> points, std::string
const &
id =
"",
308 std::string
const & extra =
"");
313 void sendSerialObjReco(std::vector<ObjReco>
const & res);
318 void sendSerialObjDetImg2D(
unsigned int camw,
unsigned int camh,
float x,
float y,
float w,
float h,
319 std::vector<ObjReco>
const & res);
324 void sendSerialObjDetImg2D(
unsigned int camw,
unsigned int camh,
ObjDetect const & det);
333 void sendSerialMarkStart();
339 void sendSerialMarkStop();
342 std::string getStamp()
const;
353 #define JEVOIS_REGISTER_MODULE(MODULENAME) \
354 extern "C" std::shared_ptr<jevois::Module> MODULENAME##_create(std::string const & instanceid) \
355 { return std::shared_ptr<jevois::Module>(new MODULENAME(instanceid)); } \
356 extern "C" int MODULENAME##_version_major() { return JEVOIS_VERSION_MAJOR; } \
357 extern "C" int MODULENAME##_version_minor() { return JEVOIS_VERSION_MINOR; } \
377 #define JEVOIS_DISABLED_MODULE(MODULENAME) \
378 class MODULENAME : public jevois::Module { \
380 MODULENAME(std::string const & instancename) : jevois::Module(instancename) \
381 { throw std::runtime_error("This module is disabled on your hardware configuration"); } \
383 extern "C" std::shared_ptr<jevois::Module> MODULENAME##_create(std::string const & instanceid) \
384 { return std::shared_ptr<jevois::Module>(new MODULENAME(instanceid)); } \
385 extern "C" int MODULENAME##_version_major() { return JEVOIS_VERSION_MAJOR; } \
386 extern "C" int MODULENAME##_version_minor() { return JEVOIS_VERSION_MINOR; } \
Exception-safe wrapper around a raw image to be sent over USB.
JEVOIS_DECLARE_PARAMETER(thresh1, double, "First threshold for hysteresis", 50.0, ParamCateg)
Send serial message to mark the the end(MARK STOP)
A component of a model hierarchy.
virtual void parseSerial(std::string const &str, std::shared_ptr< UserInterface > s)
Receive a string from a serial port which contains a user command.
Send serial message to mark the the or both among others
A category to which multiple ParameterDef definitions can belong.
virtual ~Module()
Virtual destructor for safe inheritance.
Prepend standardized serial messages with a frame time
Helper class to assist modules in creating graphical and GUI elements.
Style for standardized serial messages as defined in http
Send serial message to mark the the or both among if one needs to know when no results were sent over serial on a given frame Combine with parameter serstamp if you need to know the frame SerMark_Values
Prepend standardized serial messages with a frame frame or frame date time See details in SerStamp_Values
A trivial struct to store object detection results.
Send serial message to mark the the or both Useful
JeVois processing engine - gets images from camera sensor, processes them, and sends results over USB...
Virtual base class for a vision processing module.
Style for standardized serial messages as defined in SerStyle_Values
Send serial message to mark the beginning(MARK START) of the " "processing of a video frame from the camera sensor
JEVOIS_DEFINE_ENUM_CLASS(CameraSensor,(any)(imx290)(os08a10)(ar0234))
Enum for different sensor models.
virtual void sendSerial(std::string const &str)
Send a string over the 'serout' serial port.
Prepend standardized serial messages with a frame number
Base class for a module that supports standardized serial messages.
virtual void supportedCommands(std::ostream &os)
Human-readable description of this Module's supported custom commands.
virtual void process(InputFrame &&inframe, OutputFrame &&outframe)
Processing function, version that receives a frame from camera and sends a frame out over USB.