JeVois
1.20
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
|
|
|
Go to the documentation of this file.
86 memcpy(outimg.
pixelsw<
void>(), inimg.
pixels<
void>(), std::min(inimg.
buf->length(), outimg.
buf->length()));
126 unsigned short winw, winh;
130 int x = 0, y = 0;
unsigned short iw = 0, ih = 0;
135 helper.
itext(
"JeVois-Pro Sample module");
144 std::string
const & fpscpu = timer.
stop();
145 helper.
iinfo(inframe, fpscpu, winw, winh);
const T * pixels() const
Shortcut access to pixels, read-only.
Exception-safe wrapper around a raw image to be sent over USB.
bool startFrame(unsigned short &w, unsigned short &h)
Start a new rendering frame.
void itext(char const *txt, ImU32 const &col=IM_COL32_BLACK_TRANS, int line=-1)
Draw some overlay text on top of an image.
void endFrame()
Finish current frame and render it.
virtual void process(jevois::InputFrame &&inframe) override
Processing function with no USB output (headless)
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
void start()
Start a time measurement period.
void require(char const *info, unsigned int w, unsigned int h, unsigned int f) const
Require a particular image size and format, issue a fatal error message and throw if no match.
Helper class to assist modules in creating graphical and GUI elements.
unsigned int width
Image width in pixels.
T * pixelsw()
Shortcut access to pixels, read-write.
void writeText(RawImage &img, std::string const &txt, int x, int y, unsigned int col, Font font=Font6x10)
Write some text in an image.
virtual void process(jevois::InputFrame &&inframe, jevois::GUIhelper &helper) override
Processing function with zero-copy and GUI on JeVois-Pro.
const std::string & stop(double *seconds)
End a time measurement period, report time spent if reporting interval is reached.
JEVOIS_REGISTER_MODULE(__MODULE__)
StdModule(std::string const &instance)
Constructor.
void drawInputFrame(char const *name, InputFrame const &frame, int &x, int &y, unsigned short &w, unsigned short &h, bool noalias=false, bool casync=false)
Draw the input video frame from the camera using zero-copy.
unsigned int height
Image height in pixels.
virtual void process(jevois::InputFrame &&inframe, jevois::OutputFrame &&outframe) override
Processing function.
void iinfo(jevois::InputFrame const &inframe, std::string const &fpscpu, unsigned short winw=0, unsigned short winh=0)
Display processing and video info at bottom of screen.
unsigned int fmt
Pixel format as a V4L2_PIX_FMT_XXX.
virtual ~__MODULE__()
Virtual destructor for safe inheritance.
std::shared_ptr< VideoBuf > buf
The pixel data buffer.
virtual void sendSerial(std::string const &str)
Send a string over the 'serout' serial port.
Base class for a module that supports standardized serial messages.