VPI - 视觉编程接口

3.2 版本

OpticalFlowDense.h
转到此文件的文档。
1 /*
2  * 版权所有 2021 NVIDIA Corporation。保留所有权利。
3  *
4  * 致许可证持有者:
5  *
6  * 此源代码和/或文档(“许可交付物”)受美国和国际版权法保护的 NVIDIA 知识产权约束。
7  * subject to NVIDIA intellectual property rights under U.S. and
8  * international Copyright laws.
9  *
10  * 本文包含的许可交付物是 NVIDIA 的专有和机密信息,并根据 NVIDIA 与被许可方之间(“许可协议”)或被许可方以电子方式接受的 NVIDIA 软件许可协议条款和条件提供。
11  * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12  * conditions of a form of NVIDIA software license agreement by and
13  * between NVIDIA and Licensee ("License Agreement") or electronically
14  * accepted by Licensee. Notwithstanding any terms or conditions to
15  * the contrary in the License Agreement, reproduction or disclosure
16  * of the Licensed Deliverables to any third party without the express
17  * written consent of NVIDIA is prohibited.
18  *
19  * 尽管许可协议中有任何相反的条款或条件,
20  * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21  * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22  * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23  * NVIDIA 否认与这些许可交付物相关的所有保证,包括所有关于适销性、非侵权性以及针对特定用途的适用性的默示保证。
24  * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25  * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26  * 尽管许可协议中有任何相反的条款或条件,
27  * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28  * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32  * OF THESE LICENSED DELIVERABLES.
33  *
34  * 美国政府最终用户。 这些许可交付物是“商业项目”,该术语在 48 C.F.R. 2.101 (1995 年 10 月) 中定义,包括“商业计算机软件”和“商业计算机软件文档”,这些术语在 48 C.F.R. 12.212 (1995 年 9 月) 中使用,并且仅作为商业最终项目提供给美国政府。
35  * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36  * 1995), consisting of "commercial computer software" and "commercial
37  * computer software documentation" as such terms are used in 48
38  * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39  * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40  * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41  * U.S. Government End Users acquire the Licensed Deliverables with
42  * only those rights set forth herein.
43  *
44  * 在个人和商业软件中使用许可交付物时,必须在用户文档和代码的内部注释中包含上述免责声明和美国政府最终用户声明。
45  * software must include, in the user documentation and internal
46  * comments to the code, the above Disclaimer and U.S. Government End
47  * Users Notice.
48  */
49 
56 #ifndef NV_VPI_ALGORITHMS_OPTICALFLOWDENSE_H
57 #define NV_VPI_ALGORITHMS_OPTICALFLOWDENSE_H
58 
68 #include "../Export.h"
69 #include "../ImageFormat.h"
70 #include "../Pyramid.h"
71 #include "../Status.h"
72 #include "../Types.h"
73 
74 #include <stdbool.h>
75 #include <stdint.h>
76 
77 #ifdef __cplusplus
78 extern "C" {
79 #endif
80 
158 VPI_PUBLIC VPIStatus vpiCreateOpticalFlowDense(uint64_t backends, int32_t width, int32_t height,
159  VPIImageFormat inputFmt, const int32_t *gridSize, int32_t numLevels,
160  VPIOpticalFlowQuality quality, VPIPayload *payload);
204 VPI_PUBLIC VPIStatus vpiSubmitOpticalFlowDense(VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage prevImg,
205  VPIImage curImg, VPIImage mvImg);
206 
252 VPI_PUBLIC VPIStatus vpiSubmitOpticalFlowDensePyramid(VPIStream stream, uint64_t backend, VPIPayload payload,
253  VPIPyramid prevPyr, VPIPyramid curPyr, VPIImage mvImg);
254 
259 typedef struct
260 {
264 
268 
272  int32_t p2Alpha[VPI_MAX_PYRAMID_LEVEL_COUNT];
273 
277  int32_t numPasses[VPI_MAX_PYRAMID_LEVEL_COUNT];
278 
282  int8_t includeDiagonals[VPI_MAX_PYRAMID_LEVEL_COUNT];
284 
299 
317 
318 #ifdef __cplusplus
319 }
320 #endif
321  // VPI_OpticalFlowDense 结束
323 
324 #endif // NV_VPI_ALGORITHMS_OPTICALFLOWDENSE_H
uint64_t VPIImageFormat
预定义的图像格式。
Definition: ImageFormat.h:94
struct VPIImageImpl * VPIImage
图像的句柄。
Definition: Types.h:256
VPIStatus vpiCreateOpticalFlowDense(uint64_t backends, int32_t width, int32_t height, VPIImageFormat inputFmt, const int32_t *gridSize, int32_t numLevels, VPIOpticalFlowQuality quality, VPIPayload *payload)
为 vpiSubmitOpticalFlowDense 创建负载。
VPIStatus vpiOpticalFlowDenseGetSGMParams(VPIPayload payload, VPIOpticalFlowDenseSGMParams *sgmParams)
检索在密集光流负载中设置的半全局匹配参数。
VPIStatus vpiOpticalFlowDenseSetSGMParams(VPIPayload payload, const VPIOpticalFlowDenseSGMParams *sgmParams)
设置密集光流操作要使用的半全局匹配参数,...
VPIStatus vpiSubmitOpticalFlowDense(VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage prevImg, VPIImage curImg, VPIImage mvImg)
在两个帧上运行密集光流,输出运动矢量。
VPIStatus vpiSubmitOpticalFlowDensePyramid(VPIStream stream, uint64_t backend, VPIPayload payload, VPIPyramid prevPyr, VPIPyramid curPyr, VPIImage mvImg)
在两个帧上运行密集光流,输出运动矢量。
用于半全局匹配过程的密集光流参数。
struct VPIPayloadImpl * VPIPayload
算法负载的句柄。
Definition: Types.h:268
struct VPIPyramidImpl * VPIPyramid
图像金字塔的句柄。
Definition: Types.h:262
#define VPI_MAX_PYRAMID_LEVEL_COUNT
金字塔级别的最大数量。
Definition: Pyramid.h:105
VPIStatus
状态代码。
Definition: Status.h:81
struct VPIStreamImpl * VPIStream
流的句柄。
Definition: Types.h:250
VPIOpticalFlowQuality
定义光流算法的质量。
Definition: Types.h:598