OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项
cv::gapi::wip 命名空间参考

此命名空间包含实验性的 G-API 功能,此命名空间中的函数或结构在未来版本中可能会更改或删除。此命名空间还包含 API 尚未稳定的函数。 更多...

命名空间

命名空间  draw
 
命名空间  gst
 
命名空间  onevpl
 
命名空间  ov
 

结构体  Data
 此聚合类型表示 G-API 可以处理的所有类型(通过变体)。 更多...
 
类  GAsyncCanceled
 
类  GAsyncContext
 一个类,用于将异步请求分组以便一次性取消它们。 更多...
 
类  GCaptureSource
 基于 OpenCV VideoCapture 的流媒体源。 更多...
 
类  IStreamSource
 抽象流媒体管道源。 更多...
 
类  QueueInput
 
类  QueueSource
 排队流媒体管道源。 更多...
 
类  QueueSourceBase
 

类型定义

using GStreamerPipeline = gst::GStreamerPipeline
 
using GStreamerSource = gst::GStreamerSource
 
using GVPLSource = onevpl::GSource
 

函数

std::future< void > async (GCompiled &gcmpld, GRunArgs &&ins, GRunArgsP &&outs)
 
std::future< void > async (GCompiled &gcmpld, GRunArgs &&ins, GRunArgsP &&outs, GAsyncContext &ctx)
 
void async (GCompiled &gcmpld, std::function< void(std::exception_ptr)> &&callback, GRunArgs &&ins, GRunArgsP &&outs)
 
void async (GCompiled &gcmpld, std::function< void(std::exception_ptr)> &&callback, GRunArgs &&ins, GRunArgsP &&outs, GAsyncContext &ctx)
 
std::future< void > async_apply (GComputation &gcomp, GRunArgs &&ins, GRunArgsP &&outs, GCompileArgs &&args, GAsyncContext &ctx)
 
std::future< void > async_apply (GComputation &gcomp, GRunArgs &&ins, GRunArgsP &&outs, GCompileArgs &&args={})
 
void async_apply (GComputation &gcomp, std::function< void(std::exception_ptr)> &&callback, GRunArgs &&ins, GRunArgsP &&outs, GCompileArgs &&args, GAsyncContext &ctx)
 
void async_apply (GComputation &gcomp, std::function< void(std::exception_ptr)> &&callback, GRunArgs &&ins, GRunArgsP &&outs, GCompileArgs &&args={})
 
cv::Ptr< IStreamSourceget_streaming_source (cv::Ptr< GStreamerPipeline > &pipeline, const std::string &appsinkName, const GStreamerSource::OutputType outputType=GStreamerSource::OutputType::MAT)
 
cv::Ptr< IStreamSourcemake_capture_src (const int id, const std::map< int, double > &properties={})
 
cv::Ptr< IStreamSourcemake_capture_src (const std::string &path, const std::map< int, double > &properties={})
 
cv::Ptr< IStreamSourcemake_gst_src (const std::string &pipeline, const GStreamerSource::OutputType outputType=GStreamerSource::OutputType::MAT)
 
template<class... Args>
cv::Ptr< IStreamSourcemake_onevpl_src (Args &&... args)
 
template<class T , class... Args>
IStreamSource::Ptr make_src (Args &&... args)
 

详细描述

此命名空间包含实验性的 G-API 功能,此命名空间中的函数或结构在未来版本中可能会更改或删除。此命名空间还包含 API 尚未稳定的函数。

类型定义文档

◆ GStreamerPipeline

◆ GStreamerSource

◆ GVPLSource

函数文档

◆ async() (重载)[1/4]

std::future< void > cv::gapi::wip::async ( GCompiled & gcmpld,
GRunArgs && ins,
GRunArgsP && outs )

这是一个重载成员函数,为方便起见而提供。它与上述函数的区别仅在于接受的参数。

参数
gcmpld异步运行的已编译计算(图)
insgcmpld 的输入参数
outsgcmpld 的输出参数
返回
用于等待异步操作完成的 std::future<void> 对象
另请参见
async

◆ async() (重载)[2/4]

std::future< void > cv::gapi::wip::async ( GCompiled & gcmpld,
GRunArgs && ins,
GRunArgsP && outs,
GAsyncContext & ctx )
参数
gcmpld异步运行的已编译计算(图)
insgcmpld 的输入参数
outsgcmpld 的输出参数
ctx此请求所属的上下文
返回
用于等待异步操作完成的 std::future<void> 对象
另请参见
async GAsyncContext

◆ async() (重载)[3/4]

void cv::gapi::wip::async ( GCompiled & gcmpld,
std::function< void(std::exception_ptr)> && callback,
GRunArgs && ins,
GRunArgsP && outs )

这些函数异步(即可能在单独的执行线程上)调用其第一个参数的 GCompiled::operator() 成员函数,并传入其余参数(回调除外)的副本。这些函数之间的区别在于获取完成通知的方式(通过回调或等待 std::future 对象)。如果在执行 apply 期间发生异常,它将通过回调(通过函数参数)传递给回调函数,或传递给 future(并在调用 std::future::get 时抛出)。

注:输入参数在调用 async 函数时(实际上在调用 cv::gin 时)被复制,因此无需在异步活动实际完成之后仍然存在。而输出参数通过引用(指针)“捕获”,因此必须在异步活动之后仍然存在(即至少在调用回调或 future 解除阻塞之前仍然存在)。

参数
gcmpld要异步启动的已编译计算(图)
callbackgcmpld 执行完成后要调用的回调函数
insgcmpld 的输入参数
outsgcmpld 的输出参数

◆ async() (重载)[4/4]

void cv::gapi::wip::async ( GCompiled & gcmpld,
std::function< void(std::exception_ptr)> && callback,
GRunArgs && ins,
GRunArgsP && outs,
GAsyncContext & ctx )

这是一个重载成员函数,为方便起见而提供。它与上述函数的区别仅在于接受的参数。

参数
gcmpld异步运行的已编译计算(图)
callbackgcmpld 执行完成后要调用的回调函数
insgcmpld 的输入参数
outsgcmpld 的输出参数
ctx此请求所属的上下文
另请参见
async GAsyncContext

◆ async_apply() (重载)[1/4]

std::future< void > cv::gapi::wip::async_apply ( GComputation & gcomp,
GRunArgs && ins,
GRunArgsP && outs,
GCompileArgs && args,
GAsyncContext & ctx )

这是一个重载成员函数,为方便起见而提供。它与上述函数的区别仅在于接受的参数。

参数
gcomp异步运行的计算(图)
insgcomp 的输入参数
outsgcomp 的输出参数
args要传递给 GComputation::apply() 的编译参数
ctx此请求所属的上下文
返回
用于等待异步操作完成的 std::future<void> 对象
另请参见
async_apply async GAsyncContext

◆ async_apply() (重载)[2/4]

std::future< void > cv::gapi::wip::async_apply ( GComputation & gcomp,
GRunArgs && ins,
GRunArgsP && outs,
GCompileArgs && args = {} )

这是一个重载成员函数,为方便起见而提供。它与上述函数的区别仅在于接受的参数。

参数
gcomp异步运行的计算(图)
insgcomp 的输入参数
outsgcomp 的输出参数
args要传递给 GComputation::apply() 的编译参数
返回
用于等待异步操作完成的 std::future<void> 对象
另请参见
async_apply async

◆ async_apply() (重载)[3/4]

void cv::gapi::wip::async_apply ( GComputation & gcomp,
std::function< void(std::exception_ptr)> && callback,
GRunArgs && ins,
GRunArgsP && outs,
GCompileArgs && args,
GAsyncContext & ctx )

这是一个重载成员函数,为方便起见而提供。它与上述函数的区别仅在于接受的参数。

参数
gcomp异步运行的计算(图)
callbackgcomp 执行完成后要调用的回调函数
insgcomp 的输入参数
outsgcomp 的输出参数
args要传递给 GComputation::apply() 的编译参数
ctx此请求所属的上下文
另请参见
async_apply async GAsyncContext

◆ async_apply() (重载)[4/4]

void cv::gapi::wip::async_apply ( GComputation & gcomp,
std::function< void(std::exception_ptr)> && callback,
GRunArgs && ins,
GRunArgsP && outs,
GCompileArgs && args = {} )

async() 函数不同,这些函数会调用传入的 GComputationGComputation::apply() 成员函数。

参数
gcomp异步运行的计算(图)
callbackgcomp 执行完成后要调用的回调函数
insgcomp 的输入参数
outsgcomp 的输出参数
args要传递给 GComputation::apply() 的编译参数
另请参见
async

◆ get_streaming_source()

cv::Ptr< IStreamSource > cv::gapi::wip::get_streaming_source ( cv::Ptr< GStreamerPipeline > & pipeline,
const std::string & appsinkName,
const GStreamerSource::OutputType outputType = GStreamerSource::OutputType::MAT )
inline
Python
cv.gapi.wip.get_streaming_source(pipeline, appsinkName[, outputType]) -> retval

◆ make_capture_src() (重载)[1/2]

cv::Ptr< IStreamSource > cv::gapi::wip::make_capture_src ( const int id,
const std::map< int, double > & properties = {} )
inline
Python
cv.gapi.wip.make_capture_src(path[, properties]) -> retval
cv.gapi.wip.make_capture_src(id[, properties]) -> retval

◆ make_capture_src() (重载)[2/2]

cv::Ptr< IStreamSource > cv::gapi::wip::make_capture_src ( const std::string & 路径,
const std::map< int, double > & properties = {} )
inline
Python
cv.gapi.wip.make_capture_src(path[, properties]) -> retval
cv.gapi.wip.make_capture_src(id[, properties]) -> retval

◆ make_gst_src()

cv::Ptr< IStreamSource > cv::gapi::wip::make_gst_src ( const std::string & pipeline,
const GStreamerSource::OutputType outputType = GStreamerSource::OutputType::MAT )
inline
Python
cv.gapi.wip.make_gst_src(pipeline[, outputType]) -> retval
此函数的调用图如下

◆ make_onevpl_src()

template<class... Args>
cv::Ptr< IStreamSource > cv::gapi::wip::make_onevpl_src ( Args &&... args)
inline
此函数的调用图如下

◆ make_src()

template<class T , class... Args>
IStreamSource::Ptr cv::gapi::wip::make_src ( Args &&... args)
inline