Loading...
Searching...
No Matches

#include <opencv2/v4d/v4d.hpp>

Classes

struct  Node
 

Public Member Functions

virtual ~V4D ()
 
template<typename Tfn , typename ... Args>
void add_transaction (cv::Ptr< V4DContext > ctx, const string &invocation, Tfn fn, Args &&...args)
 
template<typename Tfn >
void branch (Tfn fn)
 
template<typename Tfn , typename ... Args>
void branch (Tfn fn, Args &&... args)
 
void capture ()
 
void capture (cv::UMat &frame)
 
template<typename Tfn , typename ... Args>
void capture (Tfn fn, Args &&... args)
 
void clearPlan ()
 
void close ()
 
void copyFrom (const cv::UMat &arr)
 
void copyTo (cv::UMat &arr)
 
bool display ()
 
template<typename Tenabled , typename T , typename ... Args>
std::enable_if< std::is_same< Tenabled, std::false_type >::value, void >::type emit_access (const string &context, bool read, const T *tp)
 
template<typename Tenabled , typename T , typename ... Args>
std::enable_if< std::is_same< Tenabled, std::true_type >::value, void >::type emit_access (const string &context, bool read, const T *tp)
 
template<typename Tfn >
void endbranch (Tfn fn)
 
template<typename Tfn , typename ... Args>
void endbranch (Tfn fn, Args &&... args)
 
template<typename Tfn , typename ... Args>
void fb (Tfn fn, Args &&... args)
 
cv::Ptr< FrameBufferContextfbCtx ()
 
const cv::SizefbSize ()
 
void feed (cv::UMat &in)
 
cv::UMat fetch ()
 
void findNode (const string &name, cv::Ptr< Node > &found)
 
uint64_t frameCount ()
 
GLFWwindow * getGLFWWindow ()
 
bool getPrintFPS ()
 
bool getShowFPS ()
 
bool getShowTracking ()
 
cv::Ptr< SinkgetSink ()
 
cv::Ptr< SourcegetSource ()
 
template<typename Tfn , typename ... Args>
void gl (int32_t idx, Tfn fn, Args &&... args)
 
template<typename Tfn , typename ... Args>
std::enable_if< std::is_invocable_v< Tfn, Args... >, void >::type gl (Tfn fn, Args &&... args)
 
cv::Ptr< GLContextglCtx (int32_t idx=0)
 
bool hasFbCtx ()
 
bool hasGlCtx (uint32_t idx=0)
 
bool hasImguiCtx ()
 
bool hasNvgCtx ()
 
bool hasParallelCtx ()
 
bool hasSingleCtx ()
 
bool hasSink ()
 
bool hasSinkCtx ()
 
bool hasSource ()
 
bool hasSourceCtx ()
 
template<typename Tfn , typename ... Args>
void imgui (Tfn fn, Args &&... args)
 
cv::Ptr< ImGuiContextImplimguiCtx ()
 
const cv::SizeinitialSize () const
 
bool isClosed ()
 
bool isFocused ()
 
bool isFullscreen ()
 
bool isResizable ()
 
bool isStretching ()
 
bool isVisible ()
 
void makePlan ()
 
size_t numGlCtx ()
 
template<typename Tfn , typename ... Args>
void nvg (Tfn fn, Args &&... args)
 
cv::Ptr< NanoVGContextnvgCtx ()
 
template<typename Tfn , typename ... Args>
void parallel (Tfn fn, Args &&... args)
 
cv::Ptr< ParallelContextparallelCtx ()
 
float pixelRatioX ()
 
float pixelRatioY ()
 
cv::Vec2f position ()
 
void printSystemInfo ()
 
template<typename Tplan >
void run (size_t workers)
 
void runPlan ()
 
void setFocused (bool f)
 
void setFullscreen (bool f)
 
void setPrintFPS (bool p)
 
void setResizable (bool r)
 
void setShowFPS (bool s)
 
void setShowTracking (bool st)
 
void setSink (cv::Ptr< Sink > sink)
 
void setSize (const cv::Size &sz)
 
void setSource (cv::Ptr< Source > src)
 
void setStretching (bool s)
 
void setVisible (bool v)
 
template<typename Tfn , typename ... Args>
void single (Tfn fn, Args &&... args)
 
cv::Ptr< SingleContextsingleCtx ()
 
cv::Ptr< SinkContextsinkCtx ()
 
cv::Size size ()
 
cv::Ptr< SourceContextsourceCtx ()
 
cv::ogl::Texture2Dtexture ()
 
std::string title ()
 
cv::Rectviewport ()
 
size_t workers ()
 
void write ()
 
void write (const cv::UMat &frame)
 
template<typename Tfn , typename ... Args>
void write (Tfn fn, Args &&... args)
 

Static Public Member Functions

static cv::Ptr< V4Dmake (const cv::Size &size, const cv::Size &fbsize, const string &title, AllocateFlags flags=ALL, bool offscreen=false, bool debug=false, int samples=0)
 
static cv::Ptr< V4Dmake (int w, int h, const string &title, AllocateFlags flags=ALL, bool offscreen=false, bool debug=false, int samples=0)
 

Public Attributes

std::vector< cv::Ptr< Node > > nodes_
 

Protected Member Functions

void fence ()
 
cv::Ptr< V4Dself ()
 
bool wait (uint64_t timeout=0)
 

Friends

class detail::FrameBufferContext
 
class HTML5Capture
 

Constructor & Destructor Documentation

◆ ~V4D()

virtual cv::v4d::V4D::~V4D ( )
virtual

Default destructor

Member Function Documentation

◆ add_transaction()

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::add_transaction ( cv::Ptr< V4DContext ctx,
const string &  invocation,
Tfn  fn,
Args &&...  args 
)
inline

◆ branch() [1/2]

template<typename Tfn >
void cv::v4d::V4D::branch ( Tfn  fn)
inline

◆ branch() [2/2]

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::branch ( Tfn  fn,
Args &&...  args 
)
inline

◆ capture() [1/3]

void cv::v4d::V4D::capture ( )
inline

◆ capture() [2/3]

void cv::v4d::V4D::capture ( cv::UMat frame)
inline

◆ capture() [3/3]

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::capture ( Tfn  fn,
Args &&...  args 
)
inline

◆ clearPlan()

void cv::v4d::V4D::clearPlan ( )
inline

◆ close()

void cv::v4d::V4D::close ( )

Close the window.

◆ copyFrom()

void cv::v4d::V4D::copyFrom ( const cv::UMat arr)

Copy the InputArray contents to the framebuffer.

Parameters
arrThe array to copy.

◆ copyTo()

void cv::v4d::V4D::copyTo ( cv::UMat arr)

Copy the framebuffer contents to an OutputArray.

Parameters
arrThe array to copy to.

◆ display()

bool cv::v4d::V4D::display ( )

Display the framebuffer in the native window by blitting.

Returns
false if the window is closed.

◆ emit_access() [1/2]

template<typename Tenabled , typename T , typename ... Args>
std::enable_if< std::is_same< Tenabled, std::false_type >::value, void >::type cv::v4d::V4D::emit_access ( const string &  context,
bool  read,
const T *  tp 
)
inline

◆ emit_access() [2/2]

template<typename Tenabled , typename T , typename ... Args>
std::enable_if< std::is_same< Tenabled, std::true_type >::value, void >::type cv::v4d::V4D::emit_access ( const string &  context,
bool  read,
const T *  tp 
)
inline

◆ endbranch() [1/2]

template<typename Tfn >
void cv::v4d::V4D::endbranch ( Tfn  fn)
inline

◆ endbranch() [2/2]

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::endbranch ( Tfn  fn,
Args &&...  args 
)
inline

◆ fb()

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::fb ( Tfn  fn,
Args &&...  args 
)
inline

◆ fbCtx()

cv::Ptr< FrameBufferContext > cv::v4d::V4D::fbCtx ( )

◆ fbSize()

const cv::Size & cv::v4d::V4D::fbSize ( )

◆ feed()

void cv::v4d::V4D::feed ( cv::UMat in)

Called to feed an image directly to the framebuffer

◆ fence()

void cv::v4d::V4D::fence ( )
protected

◆ fetch()

cv::UMat cv::v4d::V4D::fetch ( )

Fetches a copy of frambuffer

Returns
a copy of the framebuffer

◆ findNode()

void cv::v4d::V4D::findNode ( const string &  name,
cv::Ptr< Node > &  found 
)
inline

◆ frameCount()

uint64_t cv::v4d::V4D::frameCount ( )

Everytime a frame is displayed this count is incremented-

Returns
the current frame count-

◆ getGLFWWindow()

GLFWwindow * cv::v4d::V4D::getGLFWWindow ( )

◆ getPrintFPS()

bool cv::v4d::V4D::getPrintFPS ( )

◆ getShowFPS()

bool cv::v4d::V4D::getShowFPS ( )

Get the frambuffer size.

Returns
The framebuffer size.

◆ getShowTracking()

bool cv::v4d::V4D::getShowTracking ( )

◆ getSink()

cv::Ptr< Sink > cv::v4d::V4D::getSink ( )

◆ getSource()

cv::Ptr< Source > cv::v4d::V4D::getSource ( )

◆ gl() [1/2]

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::gl ( int32_t  idx,
Tfn  fn,
Args &&...  args 
)
inline

◆ gl() [2/2]

template<typename Tfn , typename ... Args>
std::enable_if< std::is_invocable_v< Tfn, Args... >, void >::type cv::v4d::V4D::gl ( Tfn  fn,
Args &&...  args 
)
inline

◆ glCtx()

cv::Ptr< GLContext > cv::v4d::V4D::glCtx ( int32_t  idx = 0)

◆ hasFbCtx()

bool cv::v4d::V4D::hasFbCtx ( )

◆ hasGlCtx()

bool cv::v4d::V4D::hasGlCtx ( uint32_t  idx = 0)

◆ hasImguiCtx()

bool cv::v4d::V4D::hasImguiCtx ( )

◆ hasNvgCtx()

bool cv::v4d::V4D::hasNvgCtx ( )

◆ hasParallelCtx()

bool cv::v4d::V4D::hasParallelCtx ( )

◆ hasSingleCtx()

bool cv::v4d::V4D::hasSingleCtx ( )

◆ hasSink()

bool cv::v4d::V4D::hasSink ( )

◆ hasSinkCtx()

bool cv::v4d::V4D::hasSinkCtx ( )

◆ hasSource()

bool cv::v4d::V4D::hasSource ( )

◆ hasSourceCtx()

bool cv::v4d::V4D::hasSourceCtx ( )

◆ imgui()

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::imgui ( Tfn  fn,
Args &&...  args 
)
inline

◆ imguiCtx()

cv::Ptr< ImGuiContextImpl > cv::v4d::V4D::imguiCtx ( )

◆ initialSize()

const cv::Size & cv::v4d::V4D::initialSize ( ) const

◆ isClosed()

bool cv::v4d::V4D::isClosed ( )

Determine if the window is closed.

Returns
true if the window is closed.

◆ isFocused()

bool cv::v4d::V4D::isFocused ( )

Determine if th V4D object is marked as focused.

Returns
true if the V4D object is marked as focused.

◆ isFullscreen()

bool cv::v4d::V4D::isFullscreen ( )

◆ isResizable()

bool cv::v4d::V4D::isResizable ( )

Determines if the window is resizeable.

Returns
true if the window is resizeable.

◆ isStretching()

bool cv::v4d::V4D::isStretching ( )

Determine if framebuffer is scaled during blitting.

Returns
true if framebuffer is scaled during blitting.

◆ isVisible()

bool cv::v4d::V4D::isVisible ( )

Determine if the window is visible.

Returns
true if the window is visible.

◆ make() [1/2]

static cv::Ptr< V4D > cv::v4d::V4D::make ( const cv::Size size,
const cv::Size fbsize,
const string &  title,
AllocateFlags  flags = ALL,
bool  offscreen = false,
bool  debug = false,
int  samples = 0 
)
static

◆ make() [2/2]

static cv::Ptr< V4D > cv::v4d::V4D::make ( int  w,
int  h,
const string &  title,
AllocateFlags  flags = ALL,
bool  offscreen = false,
bool  debug = false,
int  samples = 0 
)
static

Creates a V4D object which is the central object to perform visualizations with.

Parameters
initialSizeThe initial size of the heavy-weight window.
frameBufferSizeThe initial size of the framebuffer backing the window (needs to be equal or greate then initial size).
offscreenDon't create a window and rather render offscreen.
titleThe window title.
majorThe OpenGL major version to request.
minorThe OpenGL minor version to request.
compatRequest a compatibility context.
samplesMSAA samples.
debugCreate a debug OpenGL context.

◆ makePlan()

void cv::v4d::V4D::makePlan ( )
inline

◆ numGlCtx()

size_t cv::v4d::V4D::numGlCtx ( )

◆ nvg()

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::nvg ( Tfn  fn,
Args &&...  args 
)
inline

◆ nvgCtx()

cv::Ptr< NanoVGContext > cv::v4d::V4D::nvgCtx ( )

◆ parallel()

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::parallel ( Tfn  fn,
Args &&...  args 
)
inline

◆ parallelCtx()

cv::Ptr< ParallelContext > cv::v4d::V4D::parallelCtx ( )

◆ pixelRatioX()

float cv::v4d::V4D::pixelRatioX ( )

Get the pixel ratio of the display x-axis.

Returns
The pixel ratio of the display x-axis.

◆ pixelRatioY()

float cv::v4d::V4D::pixelRatioY ( )

Get the pixel ratio of the display y-axis.

Returns
The pixel ratio of the display y-axis.

◆ position()

cv::Vec2f cv::v4d::V4D::position ( )

Get the window position.

Returns
The window position.

◆ printSystemInfo()

void cv::v4d::V4D::printSystemInfo ( )

Print basic system information to stderr.

◆ run()

template<typename Tplan >
void cv::v4d::V4D::run ( size_t  workers)
inline

Execute function object fn in a loop. This function main purpose is to abstract the run loop for portability reasons.

Parameters
fnA functor that will be called repeatetly until the application terminates or the functor returns false

◆ runPlan()

void cv::v4d::V4D::runPlan ( )
inline

◆ self()

cv::Ptr< V4D > cv::v4d::V4D::self ( )
protected

◆ setFocused()

void cv::v4d::V4D::setFocused ( bool  f)

Mark the V4D object as focused.

Parameters
sif true mark as focused.

◆ setFullscreen()

void cv::v4d::V4D::setFullscreen ( bool  f)

Enable or disable fullscreen mode.

Parameters
fif true enable fullscreen mode else disable.

◆ setPrintFPS()

void cv::v4d::V4D::setPrintFPS ( bool  p)

◆ setResizable()

void cv::v4d::V4D::setResizable ( bool  r)

Set the window resizable.

Parameters
rif r is true set the window resizable.

◆ setShowFPS()

void cv::v4d::V4D::setShowFPS ( bool  s)

◆ setShowTracking()

void cv::v4d::V4D::setShowTracking ( bool  st)

◆ setSink()

void cv::v4d::V4D::setSink ( cv::Ptr< Sink sink)

Set the current #cv::viz::Sink object. Usually created using makeWriterSink().

Parameters
sinkA #cv::viz::Sink object.

◆ setSize()

void cv::v4d::V4D::setSize ( const cv::Size sz)

Set the window size

Parameters
szThe future size of the window.

◆ setSource()

void cv::v4d::V4D::setSource ( cv::Ptr< Source src)

Set the current #cv::viz::Source object. Usually created using makeCaptureSource().

Parameters
srcA #cv::viz::Source object.

◆ setStretching()

void cv::v4d::V4D::setStretching ( bool  s)

Enable/Disable scaling the framebuffer during blitting.

Parameters
sif true enable scaling.

◆ setVisible()

void cv::v4d::V4D::setVisible ( bool  v)

Set the window visible or invisible.

Parameters
vif v is true set the window visible.

◆ single()

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::single ( Tfn  fn,
Args &&...  args 
)
inline

◆ singleCtx()

cv::Ptr< SingleContext > cv::v4d::V4D::singleCtx ( )

◆ sinkCtx()

cv::Ptr< SinkContext > cv::v4d::V4D::sinkCtx ( )

◆ size()

cv::Size cv::v4d::V4D::size ( )

Get the window size.

Returns
The window size.

◆ sourceCtx()

cv::Ptr< SourceContext > cv::v4d::V4D::sourceCtx ( )

◆ texture()

cv::ogl::Texture2D & cv::v4d::V4D::texture ( )

The internal framebuffer exposed as OpenGL Texture2D.

Returns
The texture object.

◆ title()

std::string cv::v4d::V4D::title ( )

◆ viewport()

cv::Rect & cv::v4d::V4D::viewport ( )

Get the current viewport reference.

Returns
The current viewport reference.

◆ wait()

bool cv::v4d::V4D::wait ( uint64_t  timeout = 0)
protected

◆ workers()

size_t cv::v4d::V4D::workers ( )

◆ write() [1/3]

void cv::v4d::V4D::write ( )
inline

◆ write() [2/3]

void cv::v4d::V4D::write ( const cv::UMat frame)
inline

◆ write() [3/3]

template<typename Tfn , typename ... Args>
void cv::v4d::V4D::write ( Tfn  fn,
Args &&...  args 
)
inline

Friends And Related Function Documentation

◆ detail::FrameBufferContext

friend class detail::FrameBufferContext
friend

◆ HTML5Capture

friend class HTML5Capture
friend

Member Data Documentation

◆ nodes_

std::vector<cv::Ptr<Node> > cv::v4d::V4D::nodes_

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