Loading...
Searching...
No Matches
cv::v4d::Source Class Reference

#include <opencv2/v4d/source.hpp>

Public Member Functions

 Source ()
 
 Source (std::function< bool(cv::UMat &)> generator, float fps)
 
virtual ~Source ()
 
float fps ()
 
bool isAsync ()
 
bool isOpen ()
 
bool isReady ()
 
bool isThreadSafe ()
 
std::pair< uint64_t, cv::UMatoperator() ()
 
void setAsync (bool as)
 
void setThreadSafe (bool ts)
 

Detailed Description

A Source object represents a way to provide data to V4D by using a generator functor.

Constructor & Destructor Documentation

◆ Source() [1/2]

cv::v4d::Source::Source ( std::function< bool(cv::UMat &)>  generator,
float  fps 
)

Constructs the Source object from a generator functor.

Parameters
generatorA function object that accepts a reference to a UMat frame that it manipulates. This is ultimatively used to provide video data to #cv::viz::V4D
fpsThe fps the Source object provides data with.

◆ Source() [2/2]

cv::v4d::Source::Source ( )

Constructs a null Source that is never open or ready.

◆ ~Source()

virtual cv::v4d::Source::~Source ( )
virtual

Default destructor.

Member Function Documentation

◆ fps()

float cv::v4d::Source::fps ( )

Returns the fps the underlying generator provides data with.

Returns
The fps of the Source object.

◆ isAsync()

bool cv::v4d::Source::isAsync ( )

◆ isOpen()

bool cv::v4d::Source::isOpen ( )

Determines if the source is open.

Returns
true if the source is open.

◆ isReady()

bool cv::v4d::Source::isReady ( )

Signals if the source is ready to provide data.

Returns
true if the source is ready.

◆ isThreadSafe()

bool cv::v4d::Source::isThreadSafe ( )

◆ operator()()

std::pair< uint64_t, cv::UMat > cv::v4d::Source::operator() ( )

The source operator. It returns the frame count and the frame generated (e.g. by VideoCapture)in a pair.

Returns
A pair containing the frame count and the frame generated.

◆ setAsync()

void cv::v4d::Source::setAsync ( bool  as)

◆ setThreadSafe()

void cv::v4d::Source::setThreadSafe ( bool  ts)

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