Loading...
Searching...
No Matches
util.hpp File Reference
#include "source.hpp"
#include "sink.hpp"
#include <filesystem>
#include <string>
#include <iostream>
#include <opencv2/core/ocl.hpp>
#include <opencv2/imgproc.hpp>
#include <unistd.h>
#include <mutex>
#include <functional>
#include <cmath>
#include <thread>

Classes

struct  cv::v4d::detail::fun_ptr_helper< _UniqueId, _Res, _ArgTypes >
 
struct  cv::v4d::detail::function_traits< T >
 
struct  cv::v4d::detail::function_traits< R(*)(Args...)>
 
struct  cv::v4d::detail::function_traits< R(Args...)>
 
struct  cv::v4d::detail::function_traits< std::function< R(Args...)> >
 
class  cv::v4d::detail::Global
 
struct  cv::v4d::detail::Lambda
 
class  cv::v4d::detail::ThreadLocal
 

Namespaces

namespace  cv
 "black box" representation of the file storage associated with a file on disk.
 
namespace  cv::v4d
 
namespace  cv::v4d::detail
 

Macros

#define GL_CHECK(expr)
 

Functions

size_t cv::v4d::detail::cnz (const cv::UMat &m)
 
cv::Scalar cv::v4d::colorConvert (const cv::Scalar &src, cv::ColorConversionCodes code)
 
std::string cv::v4d::detail::demangle (const char *name)
 
uint64_t cv::v4d::detail::get_epoch_nanos ()
 
template<const size_t _UniqueId, typename _Res , typename... _ArgTypes>
fun_ptr_helper< _UniqueId, _Res, _ArgTypes... >::pointer_type cv::v4d::detail::get_fn_ptr (const std::function< _Res(_ArgTypes...)> &f)
 
std::string cv::v4d::getClInfo ()
 
std::string cv::v4d::getGlInfo ()
 
std::string cv::v4d::getGlVendor ()
 
void cv::v4d::gl_check_error (const std::filesystem::path &file, unsigned int line, const char *expression)
 
unsigned int cv::v4d::initShader (const char *vShader, const char *fShader, const char *outputAttributeName)
 
bool cv::v4d::isClGlSharingSupported ()
 
bool cv::v4d::isIntelVaSupported ()
 
bool cv::v4d::keepRunning ()
 
template<typename T >
std::function< typename std::enable_if< std::is_function< T >::value, T >::type > cv::v4d::detail::make_function (T *t)
 
cv::Ptr< Source > cv::v4d::makeCaptureSource (cv::Ptr< V4D > window, const string &inputFilename)
 
cv::Ptr< Sink > cv::v4d::makeVaSink (cv::Ptr< V4D > window, const string &outputFilename, const int fourcc, const float fps, const cv::Size &frameSize, const int vaDeviceIndex)
 
cv::Ptr< Source > cv::v4d::makeVaSource (cv::Ptr< V4D > window, const string &inputFilename, const int vaDeviceIndex)
 
cv::Ptr< Sink > cv::v4d::makeWriterSink (cv::Ptr< V4D > window, const string &outputFilename, const float fps, const cv::Size &frameSize)
 
cv::Ptr< Sink > cv::v4d::makeWriterSink (cv::Ptr< V4D > window, const string &outputFilename, const float fps, const cv::Size &frameSize, const int fourcc)
 
void cv::v4d::resizePreserveAspectRatio (const cv::UMat &src, cv::UMat &output, const cv::Size &dstSize, const cv::Scalar &bgcolor={0, 0, 0, 255})
 
template<std::size_t Tid>
void cv::v4d::detail::run_sync_on_main (std::function< void()> fn)
 

Variables

static thread_local std::mutex cv::v4d::detail::mtx_
 
static thread_local bool cv::v4d::detail::sync_run_ = false
 

Macro Definition Documentation

◆ GL_CHECK

#define GL_CHECK (   expr)
Value:
expr; \
cv::v4d::gl_check_error(__FILE__, __LINE__, #expr);

Convenience macro to check for OpenGL errors.