JeVois  1.5
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Utils.H File Reference
#include <string>
#include <vector>
#include <type_traits>
#include <jevois/Util/details/UtilsImpl.H>
Include dependency graph for Utils.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 jevois
 

Functions

std::string jevois::fccstr (unsigned int fcc)
 Convert a V4L2 four-cc code (V4L2_PIX_FMT_...) to a 4-char string. More...
 
unsigned int jevois::strfcc (std::string const &str)
 Convert a JeVois video format string to V4L2 four-cc code (V4L2_PIX_FMT_...) More...
 
unsigned int jevois::v4l2BytesPerPix (unsigned int fcc)
 Return the number of bytes per pixel for a given V4L2_PIX_FMT_... More...
 
unsigned int jevois::v4l2ImageSize (unsigned int fcc, unsigned int width, unsigned int height)
 Return the image size in bytes for a given V4L2_PIX_FMT_..., width, height. More...
 
unsigned int jevois::blackColor (unsigned int fcc)
 Return a value that corresponds to black for the given video format. More...
 
unsigned int jevois::whiteColor (unsigned int fcc)
 Return a value that corresponds to white for the given video format. More...
 
std::vector< std::string > jevois::split (std::string const &input, std::string const &regex="\+")
 Split string into vector of tokens using a regex to specify what to split on; default regex splits by whitespace. More...
 
std::string jevois::join (std::vector< std::string > const &strings, std::string const &delimiter)
 Concatenate a vector of tokens into a string. More...
 
bool jevois::stringStartsWith (std::string const &str, std::string const &prefix)
 Return true if str starts with prefix (including if both strings are equal) More...
 
std::string jevois::replaceWhitespace (std::string const &str, char rep='_')
 Replace white space characters in a string with underscore (default) or another characters. More...
 
std::string jevois::sformat (char const *fmt,...) __attribute__((format(__printf__
 Create a string using printf style arguments. More...
 
template<typename T >
std::string T jevois::from_string (std::string const &str)
 Convert from string to a type. More...
 
template<typename T >
std::string jevois::to_string (T const &val)
 Convert from type to string. More...
 
template<typename dest_type , typename source_type >
dest_type jevois::clamped_convert (source_type source)
 Clamped numerical conversion. More...
 
void jevois::flushcache ()
 Flush the caches, may sometimes be useful when running the camera in turbo mode. More...
 
std::string jevois::system (std::string const &cmd)
 Execute a command and grab stdout output to a string. More...