JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
PassThrough Class Reference

Simple module that just passes the captured camera frames through to USB host. More...

Inheritance diagram for PassThrough:
Collaboration diagram for PassThrough:

Public Member Functions

virtual ~PassThrough ()
 Virtual destructor for safe inheritance.
 
virtual void process (jevois::InputFrame &&inframe, jevois::OutputFrame &&outframe) override
 Processing function.
 
virtual void process (jevois::InputFrame &&inframe, jevois::GUIhelper &helper) override
 Processing function with zero-copy and GUI on JeVois-Pro.
 
- Public Member Functions inherited from jevois::Module
 Module (std::string const &instance)
 
virtual ~Module ()
 
virtual void process (InputFrame &&inframe)
 
virtual void sendSerial (std::string const &str)
 
virtual void parseSerial (std::string const &str, std::shared_ptr< UserInterface > s)
 
virtual void supportedCommands (std::ostream &os)
 
- Public Member Functions inherited from jevois::Component
 Component (std::string const &instance)
 
virtual ~Component ()
 
std::shared_ptr< Comp > addSubComponent (std::string const &instance, Args &&...args)
 
void removeSubComponent (std::shared_ptr< Comp > &component)
 
void removeSubComponent (std::string const &instance, bool warnIfNotFound=true)
 
std::shared_ptr< Comp > getSubComponent (std::string const &instance) const
 
bool isTopLevel () const
 
bool initialized () const
 
std::string const & className () const
 
std::string const & instanceName () const
 
std::vector< std::string > setParamVal (std::string const &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor, bool doit)
 
void freezeAllParams (bool doit)
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
virtual void paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="")
 
void foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="")
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category)
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category)
 
void setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true)
 
void removeDynamicParameter (std::string const &name, bool throw_if_not_found=true)
 
void setPath (std::string const &path)
 
std::filesystem::path absolutePath (std::filesystem::path const &path="")
 
std::shared_ptr< Comp > addSubComponent (std::string const &instance, Args &&...args)
 
void removeSubComponent (std::shared_ptr< Comp > &component)
 
void removeSubComponent (std::string const &instance, bool warnIfNotFound=true)
 
std::shared_ptr< Comp > getSubComponent (std::string const &instance) const
 
bool isTopLevel () const
 
bool initialized () const
 
std::string const & className () const
 
std::string const & instanceName () const
 
std::vector< std::string > setParamVal (std::string const &paramdescriptor, T const &val)
 
void setParamValUnique (std::string const &paramdescriptor, T const &val)
 
std::vector< std::pair< std::string, T > > getParamVal (std::string const &paramdescriptor) const
 
getParamValUnique (std::string const &paramdescriptor) const
 
std::vector< std::string > setParamString (std::string const &paramdescriptor, std::string const &val)
 
void setParamStringUnique (std::string const &paramdescriptor, std::string const &val)
 
std::vector< std::pair< std::string, std::string > > getParamString (std::string const &paramdescriptor) const
 
std::string getParamStringUnique (std::string const &paramdescriptor) const
 
void freezeParam (std::string const &paramdescriptor, bool doit)
 
void freezeAllParams (bool doit)
 
std::string descriptor () const
 
void setParamsFromFile (std::string const &filename)
 
std::istream & setParamsFromStream (std::istream &is, std::string const &absfile)
 
virtual void paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="")
 
void foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="")
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category)
 
std::shared_ptr< DynamicParameter< T > > addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category)
 
void setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true)
 
void removeDynamicParameter (std::string const &name, bool throw_if_not_found=true)
 
void setPath (std::string const &path)
 
std::filesystem::path absolutePath (std::filesystem::path const &path="")
 
- Public Member Functions inherited from jevois::ParameterRegistry
virtual ~ParameterRegistry ()
 

Additional Inherited Members

- Protected Member Functions inherited from jevois::Component
virtual void preInit ()
 
virtual void postInit ()
 
virtual void preUninit ()
 
virtual void postUninit ()
 
virtual void preInit ()
 
virtual void postInit ()
 
virtual void preUninit ()
 
virtual void postUninit ()
 
- Protected Member Functions inherited from jevois::ParameterRegistry
void addParameter (ParameterBase *const param)
 
void removeParameter (ParameterBase *const param)
 
void callbackInitCall ()
 

Detailed Description

Simple module that just passes the captured camera frames through to USB host.

This module makes your JeVois smart camera operate like a regular "dumb" camera. It is intended mainly for use in programming tutorials, and to allow you to debug new machine vision modules that you test on your host computer, using the JeVois camera in pass-through mode as input, to simulate what will happen when your code runs on the JeVois embedded processor.

Any video mapping is possible here, as long as camera and USB pixel types match, and camera and USB image resolutions also match.

See Advanced topic: Image pixel formats for information about pixel formats; with this module you can use the formats supported by the camera sensor: YUYV, BAYER, RGB565, and resolutions:

  • SXGA (1280 x 1024): up to 15 fps
  • VGA (640 x 480): up to 30 fps
  • CIF (352 x 288): up to 60 fps
  • QVGA (320 x 240): up to 60 fps
  • QCIF (176 x 144): up to 120 fps
  • QQVGA (160 x 120): up to 60 fps
  • QQCIF (88 x 72): up to 120 fps

Things to try

Edit JEVOIS:/config/videomappings.cfg on your MicroSD card (see Advanced topic: Video mappings and configuring machine vision modes) and try to add some new pass-through mappings. Not all of the possible pass-through mappings have been included in the card to avoid having too many of these simple "dumb camera" mappings in the base software distribution. For example, you can try

YUYV 176 144 115.0 YUYV 176 144 115.0 JeVois PassThrough

will grab YUYV frames on the sensor, with resolution 176x144 at 115 frames/s, and will directly send them to the host computer over the USB link. To test this mapping, select the corresponding resolution and framerate in your video viewing software (here, YUYV 176x144 @ 115fps). Although the sensor can capture at up to 120fps at this resolution, here we used 115fps to avoid a conflict with a mapping using YUYV 176x144 @ 120fps USB output and the SaveVideo module that is already in the default videomappings.cfg file.

Note that this module may suffer from DMA coherency artifacts if the camturbo parameter of the jevois::Engine is turned on, which it is by default. The camturbo parameter relaxes some of the cache coherency constraints on the video buffers captured by the camera sensor, which allows the JeVois processor to access video pixel data from memory faster. But with modules that do not do much processing, sometimes this yields video artifacts, we presume because some of the video data from previous frames still is in the CPU cache and hence is not again fetched from main memory by the CPU. If you see short stripes of what appears to be wrong pixel colors in the video, try to disable camturbo, by editing JEVOIS:/config/params.cfg on your MicroSD card and in there turning camturbo to false.

Author
Laurent Itti
Videomapping:
YUYV 1280 1024 7.5 YUYV 1280 1024 7.5 JeVois PassThrough
Videomapping:
YUYV 640 480 30.0 YUYV 640 480 30.0 JeVois PassThrough
Videomapping:
YUYV 640 480 19.6 YUYV 640 480 19.6 JeVois PassThrough
Videomapping:
YUYV 640 480 12.0 YUYV 640 480 12.0 JeVois PassThrough
Videomapping:
YUYV 640 480 8.3 YUYV 640 480 8.3 JeVois PassThrough
Videomapping:
YUYV 640 480 7.5 YUYV 640 480 7.5 JeVois PassThrough
Videomapping:
YUYV 640 480 5.5 YUYV 640 480 5.5 JeVois PassThrough
Email:
itti@usc.edu
Address:
University of Southern California, HNB-07A, 3641 Watt Way, Los Angeles, CA 90089-2520, USA
Main URL:
http://jevois.org
Support URL:
http://jevois.org/doc
Other URL:
http://iLab.usc.edu
License:
GPL v3
Distribution:
Unrestricted
Restrictions:
None

Definition at line 91 of file PassThrough.C.

Constructor & Destructor Documentation

◆ ~PassThrough()

virtual PassThrough::~PassThrough ( )
inlinevirtual

Virtual destructor for safe inheritance.

Definition at line 98 of file PassThrough.C.

Member Function Documentation

◆ process() [1/2]

virtual void PassThrough::process ( jevois::InputFrame &&  inframe,
jevois::GUIhelper helper 
)
inlineoverridevirtual

◆ process() [2/2]

virtual void PassThrough::process ( jevois::InputFrame &&  inframe,
jevois::OutputFrame &&  outframe 
)
inlineoverridevirtual

The documentation for this class was generated from the following file: