JeVois
1.20
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
|
|
|
Go to the documentation of this file.
36 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
37 return itsInputFrame->get(casync);
42 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
43 return itsInputFrame->get();
48 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
49 return itsInputFrame->hasScaledImage();
54 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
55 return itsInputFrame->get2(casync);
60 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
61 return itsInputFrame->get2();
66 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
67 return itsInputFrame->getp(casync);
72 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
73 return itsInputFrame->getp();
78 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
79 itsInputFrame->done();
84 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
85 itsInputFrame->done2();
90 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
91 return itsInputFrame->getCvGRAY(casync);
96 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
97 return itsInputFrame->getCvGRAY();
102 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
103 return itsInputFrame->getCvBGR(casync);
108 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
109 return itsInputFrame->getCvBGR();
114 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
115 return itsInputFrame->getCvRGB(casync);
120 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
121 return itsInputFrame->getCvRGB();
126 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
127 return itsInputFrame->getCvRGBA(casync);
132 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
133 return itsInputFrame->getCvRGBA();
138 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
139 return itsInputFrame->getCvGRAYp();
144 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
145 return itsInputFrame->getCvBGRp();
150 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
151 return itsInputFrame->getCvRGBp();
156 if (itsInputFrame ==
nullptr)
LFATAL(
"Internal error");
157 return itsInputFrame->getCvRGBAp();
168 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
169 return itsOutputFrame->get();
174 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
175 itsOutputFrame->send();
180 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
181 itsOutputFrame->sendCv(img, quality);
186 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
187 itsOutputFrame->sendCv(img);
192 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
193 itsOutputFrame->sendCvGRAY(img, quality);
198 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
199 itsOutputFrame->sendCvGRAY(img);
204 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
205 itsOutputFrame->sendCvBGR(img, quality);
210 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
211 itsOutputFrame->sendCvBGR(img);
216 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
217 itsOutputFrame->sendCvRGB(img, quality);
222 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
223 itsOutputFrame->sendCvRGB(img);
228 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
229 itsOutputFrame->sendCvRGBA(img, quality);
234 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
235 itsOutputFrame->sendCvRGBA(img);
240 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
241 itsOutputFrame->sendScaledCvGRAY(img, quality);
246 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
247 itsOutputFrame->sendScaledCvGRAY(img);
252 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
253 itsOutputFrame->sendScaledCvBGR(img, quality);
258 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
259 itsOutputFrame->sendScaledCvBGR(img);
264 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
265 itsOutputFrame->sendScaledCvRGB(img, quality);
270 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
271 itsOutputFrame->sendScaledCvRGB(img);
276 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
277 itsOutputFrame->sendScaledCvRGBA(img, quality);
282 if (itsOutputFrame ==
nullptr)
LFATAL(
"Internal error");
283 itsOutputFrame->sendScaledCvRGBA(img);
296 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
298 bool idle = itsGUIhelper->startFrame(w,
h);
299 return boost::python::make_tuple(idle, w,
h);
305 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
306 return itsGUIhelper->frameStarted();
311 bool noalias,
bool isoverlay)
313 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
314 int x = 0, y = 0;
unsigned short w = 0,
h = 0;
315 itsGUIhelper->drawImage(name, img, x, y, w,
h, noalias, isoverlay);
316 return boost::python::make_tuple(x, y, w,
h);
321 bool noalias,
bool isoverlay)
323 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
324 int x = 0, y = 0;
unsigned short w = 0,
h = 0;
325 itsGUIhelper->drawImage(name, img, rgb, x, y, w,
h, noalias, isoverlay);
326 return boost::python::make_tuple(x, y, w,
h);
331 int x,
int y,
int w,
int h,
bool noalias,
bool isoverlay)
333 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
334 if (w < 0)
LFATAL(
"w must be positive");
335 if (
h < 0)
LFATAL(
"h must be positive");
336 unsigned short ww = (
unsigned short)(w);
unsigned short hh = (
unsigned short)(
h);
337 itsGUIhelper->drawImage(name, img, x, y, ww, hh, noalias, isoverlay);
338 return boost::python::make_tuple(x, y, w,
h);
343 int x,
int y,
int w,
int h,
bool noalias,
bool isoverlay)
345 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
346 if (w < 0)
LFATAL(
"w must be positive");
347 if (
h < 0)
LFATAL(
"h must be positive");
348 unsigned short ww = (
unsigned short)(w);
unsigned short hh = (
unsigned short)(
h);
349 itsGUIhelper->drawImage(name, img, rgb, x, y, ww, hh, noalias, isoverlay);
350 return boost::python::make_tuple(x, y, w,
h);
355 bool noalias,
bool casync)
357 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
358 int x = 0, y = 0;
unsigned short w = 0,
h = 0;
359 itsGUIhelper->drawInputFrame(name, *frame.itsInputFrame, x, y, w,
h, noalias, casync);
360 return boost::python::make_tuple(x, y, w,
h);
365 bool noalias,
bool casync)
367 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
368 int x = 0, y = 0;
unsigned short w = 0,
h = 0;
369 itsGUIhelper->drawInputFrame(name, *frame.itsInputFrame, x, y, w,
h, noalias, casync);
370 return boost::python::make_tuple(x, y, w,
h);
376 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
377 return itsGUIhelper->i2d(p, name);
383 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
384 return itsGUIhelper->i2d(x, y, name);
390 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
391 return itsGUIhelper->i2ds(p, name);
397 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
398 return itsGUIhelper->i2ds(x, y, name);
404 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
405 return itsGUIhelper->d2i(p, name);
411 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
412 return itsGUIhelper->d2i(x, y, name);
418 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
419 return itsGUIhelper->d2is(p, name);
425 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
426 return itsGUIhelper->d2is(x, y, name);
432 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
433 itsGUIhelper->drawLine(x1, y1, x2, y2, col);
439 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
440 itsGUIhelper->drawRect(x1, y1, x2, y2, col, filled);
446 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
447 itsGUIhelper->drawPoly(pts, col, filled);
453 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
454 itsGUIhelper->drawPoly(pts, col, filled);
460 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
461 if (pts.total() == 0)
return;
465 if (pts.type() == CV_32FC2) imax = pts.cols * 2;
466 else if (pts.type() == CV_32F) imax = pts.cols;
469 if (imax < 4)
return;
471 float const * ptr = pts.ptr<
float>(0);
473 for (
int j = 0; j < pts.rows; ++j)
475 std::vector<cv::Point2f> p;
476 for (
int i = 0; i < imax; i += 2) { p.emplace_back(cv::Point2f(ptr[0], ptr[1])); ptr += 2; }
477 itsGUIhelper->drawPoly(p, col, filled);
484 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
485 itsGUIhelper->drawCircle(x, y, r, col, filled);
491 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
492 itsGUIhelper->drawText(x, y, txt, col);
498 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
499 return itsGUIhelper->iline(line, name);
505 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
506 itsGUIhelper->itext(txt, col, line);
511 unsigned short winw,
unsigned short winh)
513 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
514 itsGUIhelper->iinfo(*inframe.itsInputFrame, fpscpu, winw, winh);
520 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
521 itsGUIhelper->releaseImage(name);
527 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
528 itsGUIhelper->releaseImage2(name);
534 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
535 itsGUIhelper->endFrame();
541 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
542 itsGUIhelper->reportError(err);
548 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
549 itsGUIhelper->reportAndIgnoreException(prefix);
555 if (itsGUIhelper ==
nullptr)
LFATAL(
"Internal error");
556 itsGUIhelper->reportAndRethrowException(prefix);
561 {
return ImGui::GetMousePos(); }
565 {
return ImGui::IsMouseClicked(button_num); }
569 {
return ImGui::IsMouseDoubleClicked(button_num); }
573 {
return ImGui::IsMouseDragging(button_num); }
577 {
return ImGui::IsMouseDown(button_num); }
581 {
return ImGui::IsMouseReleased(button_num); }
590 if (m.ispython ==
false)
LFATAL(
"Passed video mapping is not for a python module");
647 std::string retstr = boost::python::extract<std::string>(ret);
648 if (retstr.empty() ==
false) s->
writeString(retstr);
659 std::string retstr = boost::python::extract<std::string>(ret);
660 if (retstr.empty() ==
false) os << retstr;
672 cv::Size
const s = itsPP->imagesize();
673 return boost::python::make_tuple(s.width, s.height);
683 cv::Size s = itsPP->blobsize(num);
684 return boost::python::make_tuple(s.width, s.height);
689 float px = x, py = y;
690 itsPP->b2i(px, py, blobnum);
691 return boost::python::make_tuple(px, py);
696 cv::Rect
const r = itsPP->getUnscaledCropRect(blobnum);
697 return boost::python::make_tuple(r.x, r.y, r.width, r.height);
702 float px = x, py = y;
703 itsPP->i2b(px, py, blobnum);
704 return boost::python::make_tuple(px, py);
715 std::shared_ptr<Module> m = jevois::python::engine()->module();
716 if (!m)
LFATAL(
"Cannot instantiate without a current running module");
717 std::shared_ptr<Component> pi = m->getSubComponent(
"pipeline");
718 if (!pi)
LFATAL(
"Cannot instantiate without a current DNN pipeline");
719 std::shared_ptr<Component> pp = pi->getSubComponent(
"postproc");
720 if (!pp)
LFATAL(
"Cannot instantiate without a current python-type post-processor");
721 std::shared_ptr<Component> ppp = pp->getSubComponent(
"pypost");
722 if (!ppp)
LFATAL(
"Cannot instantiate without a current pypost post-processor");
730 { itsYOLO->freeze(doit); }
734 float boxThreshold,
float confThreshold,
735 int bw,
int bh,
int fudge,
int maxbox)
737 std::vector<cv::Mat>
const outvec = jevois::python::pyListToVec<cv::Mat>(outs);
739 std::vector<int> classIds;
740 std::vector<float> confidences;
741 std::vector<cv::Rect> boxes;
743 itsYOLO->yolo(outvec, classIds, confidences, boxes, nclass, boxThreshold, confThreshold,
744 cv::Size(bw, bh), fudge, maxbox);
748 boost::python::list b;
749 for (cv::Rect
const & r : boxes) b.append(boost::python::make_tuple(r.x, r.y, r.width, r.height));
751 return boost::python::make_tuple(ids, conf, b);
void sendScaledCvGRAY(cv::Mat const &img) const
Shorthand to send a GRAY cv::Mat after scaling/converting it to the current output format.
Exception-safe wrapper around a raw image to be sent over USB.
void iinfo(jevois::InputFramePython const &inframe, std::string const &fpscpu, unsigned short winw=0, unsigned short winh=0)
Display processing and video info at bottom of screen.
void sendCv1(cv::Mat const &img, int quality) const
Shorthand to send a cv::Mat after scaling/converting it to the current output format.
boost::python::tuple drawImage1(char const *name, cv::Mat const &img, bool rgb, bool noalias=false, bool isoverlay=false)
Draw an OpenCV image, copying pixel data to an OpenGL texture.
Post-Processor sub-component for raw YOLO decoding.
bool isMouseReleased(int button_num)
ImGui helper: check if mouse button released.
const RawImage & get() const
Get the next captured camera image.
void drawPoly(std::vector< cv::Point > const &pts, ImU32 col=IM_COL32(128, 255, 128, 255), bool filled=true)
Draw polygon over an image.
boost::python::list pyVecToList(std::vector< T > const &v)
Helper to convert std::vector<T> to python list.
boost::python::object & pyinst()
Get the python class pyinst, or throw if construction error occurred (e.g., file not found)
void itext(char const *txt, ImU32 const &col=IM_COL32_BLACK_TRANS, int line=-1)
Draw some overlay text on top of an image.
virtual void process(InputFrame &&inframe, OutputFrame &&outframe) override
Processing function, version that receives a frame from camera and sends a frame out over USB.
boost::python::tuple drawImage3(char const *name, cv::Mat const &img, bool rgb, int x, int y, int w, int h, bool noalias=false, bool isoverlay=false)
Draw an OpenCV image, copying pixel data to an OpenGL texture.
virtual void writeString(std::string const &str)=0
Write a string.
void send() const
Indicate that user processing is done with the image previously obtained via get()
ImVec2 iline(int line=-1, char const *name=nullptr)
Get coordinates of the start of a given line of text to be drawn as overlay on top of an image.
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
void sendScaledCvRGBA1(cv::Mat const &img, int quality) const
Shorthand to send a RGBA cv::Mat after scaling/converting it to the current output format.
virtual void parseSerial(std::string const &str, std::shared_ptr< UserInterface > s)
Receive a string from a serial port which contains a user command.
bool isMouseDown(int button_num)
ImGui helper: check if mouse button pressed.
void drawPoly1(std::vector< cv::Point2f > const &pts, ImU32 col=IM_COL32(128, 255, 128, 255), bool filled=true)
Draw polygon over an image.
bool frameStarted() const
Helper to indicate that startFrame() was called, and thus endFrame() should be called.
void endFrame()
Finish current frame and render it.
Wrapper around GUIhelper to be used by Python.
void sendScaledCvRGB1(cv::Mat const &img, int quality) const
Shorthand to send a RGB cv::Mat after scaling/converting it to the current output format.
boost::python::tuple imagesize() const
Access the last processed image size.
virtual ~PythonModule()
Virtual destructor for safe inheritance.
Helper class to assist modules in creating graphical and GUI elements.
void drawText(float x, float y, char const *txt, ImU32 col=IM_COL32(128, 255, 128, 255))
Draw text over an image.
bool isMouseDragging(int button_num)
ImGui helper: check if mouse button dragged.
ImVec2 d2i1(float x, float y, char const *name=nullptr)
Convert coordinates of a point from on-screen to within a rendered image.
void postUninit() override
Optionally call uninit() python module function, if implemented.
void freeze(bool doit)
Freeze/unfreeze parameters that users should not change while running.
std::string shapestr(cv::Mat const &m)
Get a string of the form: "nD AxBxC... TYPE" from an n-dimensional cv::Mat with data type TYPE.
void releaseImage2(char const *name)
Release an image, second video stream.
ImVec2 d2is1(float x, float y, char const *name=nullptr)
Convert a 2D size from on-screen to within a rendered image.
boost::python::tuple startFrame()
Start a new rendering frame.
void sendCvGRAY1(cv::Mat const &img, int quality) const
Shorthand to send a GRAY cv::Mat after converting it to the current output format.
Pre-Processor for neural network pipeline.
bool hasattr(boost::python::object &o, char const *name)
Check whether a boost::python::object has an attribute.
void sendCvRGBA(cv::Mat const &img) const
Shorthand to send a RGBA cv::Mat after converting it to the current output format.
void sendCvRGB1(cv::Mat const &img, int quality) const
Shorthand to send a RGB cv::Mat after converting it to the current output format.
void reportAndIgnoreException(std::string const &prefix="")
Report current exception in a modal dialog, then ignore it.
boost::python::tuple i2b(float x, float y, size_t blobnum)
Convert coordinates from image to blob.
boost::python::tuple drawImage(char const *name, RawImage const &img, bool noalias=false, bool isoverlay=false)
Draw a RawImage, copying pixel data to an OpenGL texture.
bool isMouseDoubleClicked(int button_num)
ImGui helper: check if mouse button double-clicked.
ImVec2 i2ds1(float x, float y, char const *name=nullptr)
Convert a 2D size from within a rendered image to on-screen.
void preInit() override
Load python code and optionally call init() python module function, if implemented.
void drawPoly2(cv::Mat const &pts, ImU32 col=IM_COL32(128, 255, 128, 255), bool filled=true)
Draw polygon over an image.
virtual void supportedCommands(std::ostream &os) override
Human-readable description of this Module's supported custom commands.
~PostProcessorDetectYOLOforPython()
Destructor removes itsYOLO from current module.
PreProcessorForPython(PreProcessor *pp)
Construct from an existing PreProcessor.
ImVec2 i2d1(float x, float y, char const *name=nullptr)
Convert coordinates of a point from within a rendered image to on-screen.
boost::python::list blobs() const
Access the last computed blobs (or empty if process() has not yet been called)
void sendScaledCvGRAY1(cv::Mat const &img, int quality) const
Shorthand to send a GRAY cv::Mat after scaling/converting it to the current output format.
PythonModule(VideoMapping const &m)
Constructor needs the full path to a Python source code file.
void sendScaledCvRGBA(cv::Mat const &img) const
Shorthand to send a RGBA cv::Mat after scaling/converting it to the current output format.
ImVec2 d2i(ImVec2 p, char const *name=nullptr)
Convert coordinates of a point from on-screen to within a rendered image.
#define LFATAL(msg)
Convenience macro for users to print out console or syslog messages, FATAL level.
ImVec2 getMousePos()
ImGui helper: get mouse position.
Wrapper around OutputFrame to be used by Python.
Virtual base class for a vision processing module.
bool isMouseClicked(int button_num)
ImGui helper: check if mouse button clicked.
ImVec2 i2ds(ImVec2 p, char const *name=nullptr)
Convert a 2D size from within a rendered image to on-screen.
void sendScaledCvRGB(cv::Mat const &img) const
Shorthand to send a RGB cv::Mat after scaling/converting it to the current output format.
void sendCvRGB(cv::Mat const &img) const
Shorthand to send a RGB cv::Mat after converting it to the current output format.
void drawRect(float x1, float y1, float x2, float y2, ImU32 col=IM_COL32(128, 255, 128, 255), bool filled=true)
Draw rectangular box over an image.
void sendScaledCvBGR1(cv::Mat const &img, int quality) const
Shorthand to send a BGR cv::Mat after scaling/converting it to the current output format.
boost::python::tuple getUnscaledCropRect(size_t blobnum)
Get unscaled crop rectangle in image coordinates.
void releaseImage(char const *name)
Release an image.
void sendCvRGBA1(cv::Mat const &img, int quality) const
Shorthand to send a RGBA cv::Mat after converting it to the current output format.
OutputFramePython()=default
Default constructor to keep boost::python happy, object is not operational.
void sendCvBGR(cv::Mat const &img) const
Shorthand to send a BGR cv::Mat after converting it to the current output format.
boost::python::tuple blobsize(size_t num) const
Access the width and height of a given blob, accounting for NCHW or NHWC.
boost::python::tuple drawImage2(char const *name, RawImage const &img, int x, int y, int w, int h, bool noalias=false, bool isoverlay=false)
Draw an OpenCV image, copying pixel data to an OpenGL texture.
void pythonload(std::string const &path)
Init from path if default constructor was used.
PostProcessorDetectYOLOforPython()
Constructor constructs itsYOLO and adds it to current module.
void drawLine(float x1, float y1, float x2, float y2, ImU32 col=IM_COL32(128, 255, 128, 255))
Draw line over an image.
GUIhelperPython(GUIhelper *src)
Construct from a regular GUIhelper that should be be coming from Engine.
boost::python::tuple drawInputFrame(char const *name, InputFramePython const &frame, bool noalias=false, bool casync=false)
Draw the input video frame from the camera using zero-copy.
ImVec2 i2d(ImVec2 p, char const *name=nullptr)
Convert coordinates of a point from within a rendered image to on-screen.
void drawCircle(float x, float y, float r, ImU32 col=IM_COL32(128, 255, 128, 255), bool filled=true)
Draw circle over an image.
boost::python::tuple drawInputFrame2(char const *name, InputFramePython const &frame, bool noalias=false, bool casync=false)
Draw the second (scaled) input video frame from the camera using zero-copy.
virtual void parseSerial(std::string const &str, std::shared_ptr< UserInterface > s) override
Receive a string from a serial port which contains a user command.
boost::python::tuple yolo(boost::python::list outs, int nclass, float boxThreshold, float confThreshold, int bw, int bh, int fudge, int maxbox)
Generic raw YOLO processing.
void sendCv(cv::Mat const &img) const
Shorthand to send a cv::Mat after scaling/converting it to the current output format.
void reportAndRethrowException(std::string const &prefix="")
Report current exception in a modal dialog, then re-throw it.
boost::python::tuple b2i(float x, float y, size_t blobnum)
Convert coordinates from blob back to original image.
virtual void supportedCommands(std::ostream &os)
Human-readable description of this Module's supported custom commands.
void reportError(std::string const &err)
Report an error in an overlay window.
void sendCvGRAY(cv::Mat const &img) const
Shorthand to send a GRAY cv::Mat after converting it to the current output format.
ImVec2 d2is(ImVec2 p, char const *name=nullptr)
Convert a 2D size from on-screen to within a rendered image.
void sendScaledCvBGR(cv::Mat const &img) const
Shorthand to send a BGR cv::Mat after scaling/converting it to the current output format.
void sendCvBGR1(cv::Mat const &img, int quality) const
Shorthand to send a BGR cv::Mat after converting it to the current output format.