![]() |
OpenCV 4.12.0
开源计算机视觉
|
使用NVIDIA Optical Flow SDK的光流算法的基本接口。更多...
#include <opencv2/cudaoptflow.hpp>
公有成员函数 | |
| virtual void | calc (InputArray inputImage, InputArray referenceImage, InputOutputArray flow, Stream &stream=Stream::Null(), InputArray hint=cv::noArray(), OutputArray cost=cv::noArray())=0 |
| 使用NVIDIA光流SDK计算光流。 | |
| virtual void | collectGarbage ()=0 |
| 释放所有缓冲区、上下文和设备指针。 | |
| virtual int | getGridSize () const =0 |
| 返回根据硬件能力确定的输出缓冲区网格大小。 | |
继承自 cv::Algorithm 的公有成员函数 | |
| Algorithm () | |
| virtual | ~Algorithm () |
| virtual void | clear () |
| 清除算法状态。 | |
| virtual bool | empty () const |
| 如果算法为空(例如在最初或读取失败后),则返回true。 | |
| virtual String | getDefaultName () const |
| virtual void | read (const FileNode &fn) |
| 从文件存储中读取算法参数。 | |
| virtual void | save (const String &filename) const |
| void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
| virtual void | write (FileStorage &fs) const |
| 将算法参数存储到文件存储中。 | |
| void | write (FileStorage &fs, const String &name) const |
其他继承成员 | |
继承自 cv::Algorithm 的静态公有成员函数 | |
| template<typename _Tp > | |
| static Ptr< _Tp > | load (const String &filename, const String &objname=String()) |
| 从文件中加载算法。 | |
| template<typename _Tp > | |
| static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) |
| 从字符串加载算法。 | |
| template<typename _Tp > | |
| static Ptr< _Tp > | read (const FileNode &fn) |
| 从文件节点读取算法。 | |
继承自 cv::Algorithm 的保护成员函数 | |
| void | writeFormat (FileStorage &fs) const |
使用NVIDIA Optical Flow SDK的光流算法的基本接口。
|
纯虚函数 |
使用NVIDIA光流SDK计算光流。
从图灵架构开始的NVIDIA GPU包含一个专用硬件加速器,用于计算图像对之间的光流向量。光流硬件加速器生成基于块的光流向量。块的大小取决于所使用的硬件,并且可以使用getGridSize()函数查询。如果需要,硬件生成的基于块的光流向量可以使用upSampler()辅助函数转换为密集表示(即每像素光流向量)。光流向量以CV_16SC2格式存储,其中每个光流向量的x和y分量采用16位有符号定点表示S10.5。
| inputImage | 输入图像。 |
| referenceImage | 与输入图像大小和类型相同的参考图像。 |
| flow | 一个缓冲区,包含inputImage.Size() / getGridSize() 个CV_16SC2格式的光流向量。 |
| 流 | 强烈建议在create()函数中作为光流会话创建的一部分,每会话设置一次用于光流向量预处理和后处理的CUDA流。此参数保留在此处是为了向后兼容,将来可能会被移除。默认值为NULL流; |
| hint | 如果客户端提供外部提示,则为提示缓冲区。必须与流缓冲区大小相同。调用者可以提供光流向量作为光流计算的提示。 |
| cost | 成本缓冲区包含表示与每个生成的光流向量相关的置信度的数字。成本越高,置信度越低。成本缓冲区类型为CV_32SC1。 |
|
纯虚函数 |
释放所有缓冲区、上下文和设备指针。
|
纯虚函数 |
返回根据硬件能力确定的输出缓冲区网格大小。