![]() |
OpenCV 4.12.0
开源计算机视觉
|
| Scalar cv::cuda::absSum | ( | InputArray | src, |
| InputArray | mask = noArray() ) |
#include <opencv2/cudaarithm.hpp>
返回矩阵元素的绝对值之和。
| src | 除 CV_64F 外,任何深度的源图像。 |
| mask | 可选操作掩码;它必须与 src1 具有相同的大小,且类型为 CV_8UC1。 |
| void cv::cuda::calcAbsSum | ( | InputArray | src, |
| OutputArray | dst, | ||
| InputArray | mask = noArray(), | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::calcNorm | ( | InputArray | src, |
| OutputArray | dst, | ||
| int | normType, | ||
| InputArray | mask = noArray(), | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::calcNormDiff | ( | InputArray | src1, |
| InputArray | src2, | ||
| OutputArray | dst, | ||
| int | normType = NORM_L2, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::calcSqrSum | ( | InputArray | src, |
| OutputArray | dst, | ||
| InputArray | mask = noArray(), | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::calcSum | ( | InputArray | src, |
| OutputArray | dst, | ||
| InputArray | mask = noArray(), | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| int cv::cuda::countNonZero | ( | InputArray | src | ) |
#include <opencv2/cudaarithm.hpp>
计数非零矩阵元素。
| src | 单通道源图像。 |
该函数在计算能力低于 1.3 的 GPU 上不适用于 CV_64F 图像。
| void cv::cuda::countNonZero | ( | InputArray | src, |
| OutputArray | dst, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::findMinMax | ( | InputArray | src, |
| OutputArray | dst, | ||
| InputArray | mask = noArray(), | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::findMinMaxLoc | ( | InputArray | src, |
| OutputArray | minMaxVals, | ||
| OutputArray | loc, | ||
| InputArray | mask = noArray(), | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::integral | ( | InputArray | src, |
| OutputArray | sum, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
计算积分图像。
| src | 源图像。目前仅支持 CV_8UC1 图像。 |
| sum | 积分图像,包含打包为 CV_32SC1 的 32 位无符号整数值。 |
| 流 | 用于异步版本的流。 |
| void cv::cuda::meanStdDev | ( | InputArray | ◆ makePtr(), |
| OutputArray | dst, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| void cv::cuda::meanStdDev | ( | InputArray | ◆ makePtr(), |
| Scalar & | mean, | ||
| Scalar & | stddev ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| ◆ makePtr() | 源矩阵。目前支持 CV_8UC1 和 CV_32FC1 矩阵。 |
| mean | 均值。 |
| stddev | 标准差值。 |
| void cv::cuda::meanStdDev | ( | InputArray | src, |
| OutputArray | dst, | ||
| InputArray | mask, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
计算矩阵元素的平均值和标准差。
| src | 源矩阵。目前支持 CV_8UC1 和 CV_32FC1 矩阵。 |
| dst | 目标 GpuMat,大小为 1x2,类型为 CV_64FC1。第一个值为平均值,第二个为标准差。 |
| mask | 操作掩码。 |
| 流 | 用于异步版本的流。 |
| void cv::cuda::meanStdDev | ( | InputArray | src, |
| Scalar & | mean, | ||
| Scalar & | stddev, | ||
| InputArray | mask ) |
#include <opencv2/cudaarithm.hpp>
这是一个重载成员函数,为方便起见而提供。它与上述函数仅在接受的参数方面有所不同。
| src | 源矩阵。目前支持 CV_8UC1 和 CV_32FC1 矩阵。 |
| mean | 均值。 |
| stddev | 标准差值。 |
| mask | 操作掩码。 |
| void cv::cuda::minMax | ( | InputArray | src, |
| 如果传入NULL,则假定尺度参数c为1.0。否则,指向的变量将被设置为最优尺度。 | minVal, | ||
| 如果传入NULL,则假定尺度参数c为1.0。否则,指向的变量将被设置为最优尺度。 | maxVal, | ||
| InputArray | mask = noArray() ) |
#include <opencv2/cudaarithm.hpp>
查找全局最小和最大矩阵元素并返回其值。
| src | 单通道源图像。 |
| minVal | 指向返回的最小值。如果不需要,请使用 NULL。 |
| maxVal | 指向返回的最大值。如果不需要,请使用 NULL。 |
| mask | 用于选择子矩阵的可选掩码。 |
该函数在计算能力低于 1.3 的 GPU 上不适用于 CV_64F 图像。
| void cv::cuda::minMaxLoc | ( | InputArray | src, |
| 如果传入NULL,则假定尺度参数c为1.0。否则,指向的变量将被设置为最优尺度。 | minVal, | ||
| 如果传入NULL,则假定尺度参数c为1.0。否则,指向的变量将被设置为最优尺度。 | maxVal, | ||
| Point * | minLoc (最小位置), | ||
| Point * | maxLoc (最大位置), | ||
| InputArray | mask = noArray() ) |
#include <opencv2/cudaarithm.hpp>
查找全局最小和最大矩阵元素,并返回其值及位置。
| src | 单通道源图像。 |
| minVal | 指向返回的最小值。如果不需要,请使用 NULL。 |
| maxVal | 指向返回的最大值。如果不需要,请使用 NULL。 |
| minLoc (最小位置) | 指向返回的最小位置。如果不需要,请使用 NULL。 |
| maxLoc (最大位置) | 指向返回的最大位置。如果不需要,请使用 NULL。 |
| mask | 用于选择子矩阵的可选掩码。 |
该函数在计算能力低于 1.3 的 GPU 上不适用于 CV_64F 图像。
| double cv::cuda::norm | ( | InputArray | src1, |
| InputArray | src2, | ||
| int | normType = NORM_L2 ) |
#include <opencv2/cudaarithm.hpp>
返回两个矩阵的差值。
| src1 | 源矩阵。支持除 64F 之外的任何矩阵。 |
| src2 | 第二个源矩阵(如果有),与 src1 具有相同的大小和类型。 |
| normType | 范数类型。目前支持 NORM_L1、NORM_L2 和 NORM_INF。 |
| double cv::cuda::norm | ( | InputArray | src1, |
| int | normType, | ||
| InputArray | mask = noArray() ) |
#include <opencv2/cudaarithm.hpp>
返回矩阵的范数(或两个矩阵的差值范数)。
| src1 | 源矩阵。支持除 64F 之外的任何矩阵。 |
| normType | 范数类型。目前支持 NORM_L1、NORM_L2 和 NORM_INF。 |
| mask | 可选操作掩码;它必须与 src1 具有相同的大小,且类型为 CV_8UC1。 |
| void cv::cuda::normalize | ( | InputArray | src, |
| OutputArray | dst, | ||
| double | alpha, | ||
| double | beta, | ||
| int | norm_type, | ||
| int | dtype, | ||
| InputArray | mask = noArray(), | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
对数组的范数或值范围进行归一化。
| src | 输入数组。 |
| dst | 与 src 大小相同的输出数组。 |
| alpha | 用于归一化的范数值,或在范围归一化情况下的下限。 |
| beta | 范围归一化情况下的上限;在范数归一化中不使用。 |
| norm_type | 归一化类型(NORM_MINMAX、NORM_L2、NORM_L1 或 NORM_INF)。 |
| dtype | 当为负时,输出数组与 src 类型相同;否则,它与 src 具有相同的通道数,深度为 =CV_MAT_DEPTH(dtype)。 |
| mask | 可选操作掩码。 |
| 流 | 用于异步版本的流。 |
| void cv::cuda::rectStdDev | ( | InputArray | src, |
| InputArray | sqr, | ||
| OutputArray | dst, | ||
| Rect | rect, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
计算积分图像的标准差。
| src | 源图像。仅支持 CV_32SC1 类型。 |
| sqr | 平方源图像。仅支持 CV_32FC1 类型。 |
| dst | 目标图像,与 src 类型和大小相同。 |
| rect | 矩形窗口。 |
| 流 | 用于异步版本的流。 |
| void cv::cuda::reduce | ( | InputArray | ◆ makePtr(), |
| OutputArray | vec, | ||
| int | dim, | ||
| int | reduceOp, | ||
| int | dtype = -1, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
将矩阵降维为向量。
| ◆ makePtr() | 源 2D 矩阵。 |
| vec | 目标向量。其大小和类型由 dim 和 dtype 参数定义。 |
| dim | 矩阵沿其缩减的维度索引。0 表示矩阵缩减为单行。1 表示矩阵缩减为单列。 |
| reduceOp | 缩减操作,可以是以下之一:
|
| dtype | 当它为负时,目标向量将与源矩阵具有相同的类型。否则,其类型将为 CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), mtx.channels())。 |
| 流 | 用于异步版本的流。 |
函数 reduce 将矩阵缩减为一个向量,它将矩阵的行/列视为一组 1D 向量,并在这些向量上执行指定的操作,直到获得单行/单列。例如,该函数可用于计算栅格图像的水平和垂直投影。在 REDUCE_SUM 和 REDUCE_AVG 的情况下,输出可能具有更大的元素位深度以保持精度。这两种缩减模式也支持多通道数组。
| void cv::cuda::sqrIntegral | ( | InputArray | src, |
| OutputArray | sqsum, | ||
| Stream & | stream = Stream::Null() ) |
#include <opencv2/cudaarithm.hpp>
计算平方积分图像。
| src | 源图像。目前仅支持 CV_8UC1 图像。 |
| sqsum | 平方积分图像,包含打包为 CV_64FC1 的 64 位无符号整数值。 |
| 流 | 用于异步版本的流。 |
| Scalar cv::cuda::sqrSum | ( | InputArray | src, |
| InputArray | mask = noArray() ) |
#include <opencv2/cudaarithm.hpp>
返回矩阵元素的平方和。
| src | 除 CV_64F 外,任何深度的源图像。 |
| mask | 可选操作掩码;它必须与 src1 具有相同的大小,且类型为 CV_8UC1。 |
| Scalar cv::cuda::sum | ( | InputArray | src, |
| InputArray | mask = noArray() ) |
#include <opencv2/cudaarithm.hpp>
返回矩阵元素的和。
| src | 除 CV_64F 外,任何深度的源图像。 |
| mask | 可选操作掩码;它必须与 src1 具有相同的大小,且类型为 CV_8UC1。 |