JeVois
1.18
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/Core/PythonModule.H>
Pre-Processor interface expose to the python side.
This wrapper is passed down to the process() function of a python post-processor, it provides a python-friendly interface to b2i(), blobsizes(), etc
Definition at line 380 of file PythonModule.H.
Public Member Functions | |
PreProcessorForPython (PreProcessor *pp) | |
Construct from an existing PreProcessor. More... | |
cv::Size | imagesize () const |
Access the last processed image size. More... | |
boost::python::list | blobs () const |
Access the last computed blobs (or empty if process() has not yet been called) More... | |
cv::Size | blobsize (size_t num) const |
Access the width and height of a given blob, accounting for NCHW or NHWC. More... | |
cv::Point2f | b2i (float x, float y, size_t blobnum) |
Convert coordinates from blob back to original image. More... | |
cv::Rect | getUnscaledCropRect (size_t blobnum) |
Get unscaled crop rectangle in image coordinates. More... | |
jevois::dnn::PreProcessorForPython::PreProcessorForPython | ( | PreProcessor * | pp | ) |
Construct from an existing PreProcessor.
Caller must ensure that pp outlives us.
Definition at line 617 of file PythonModule.C.
cv::Point2f jevois::dnn::PreProcessorForPython::b2i | ( | float | x, |
float | y, | ||
size_t | blobnum | ||
) |
Convert coordinates from blob back to original image.
Given coords x,y should be in [0..w-1]x[0..h-1] where w,h are the blob's width and height. This is useful to convert detected boxes back into original input coordinates.
Definition at line 629 of file PythonModule.C.
boost::python::list jevois::dnn::PreProcessorForPython::blobs | ( | ) | const |
Access the last computed blobs (or empty if process() has not yet been called)
Definition at line 623 of file PythonModule.C.
References jevois::python::pyVecToList().
cv::Size jevois::dnn::PreProcessorForPython::blobsize | ( | size_t | num | ) | const |
Access the width and height of a given blob, accounting for NCHW or NHWC.
Definition at line 626 of file PythonModule.C.
cv::Rect jevois::dnn::PreProcessorForPython::getUnscaledCropRect | ( | size_t | blobnum | ) |
Get unscaled crop rectangle in image coordinates.
This is useful to display an image overlay on top of the input image.
Definition at line 632 of file PythonModule.C.
cv::Size jevois::dnn::PreProcessorForPython::imagesize | ( | ) | const |
Access the last processed image size.
Definition at line 620 of file PythonModule.C.