![]() |
OpenCV 4.13.0
開源計算機視覺庫 (Open Source Computer Vision)
|
本節介紹的函式和類用於對二維影像執行各種線性或非線性濾波操作。
類 | |
| 類 | cv::cuda::Filter |
| 所有 CUDA 濾波器的通用介面 : 更多... | |
函式 | |
| Ptr< Filter > | cv::cuda::createBoxFilter (int srcType, int dstType, Size ksize, Point anchor=Point(-1, -1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0)) |
| 建立一個歸一化的 2D 盒式濾波器。 | |
| Ptr< Filter > | cv::cuda::createBoxMaxFilter (int srcType, Size ksize, Point anchor=Point(-1, -1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0)) |
| 建立最大值濾波器。 | |
| Ptr< Filter > | cv::cuda::createBoxMinFilter (int srcType, Size ksize, Point anchor=Point(-1, -1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0)) |
| 建立最小值濾波器。 | |
| Ptr< Filter > | cv::cuda::createColumnSumFilter (int srcType, int dstType, int ksize, int anchor=-1, int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0)) |
| 建立一個垂直 1D 盒式濾波器。 | |
| Ptr< Filter > | cv::cuda::createDerivFilter (int srcType, int dstType, int dx, int dy, int ksize, bool normalize=false, double scale=1, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1) |
| 建立一個通用的導數 (Deriv) 運算元。 | |
| Ptr< Filter > | cv::cuda::createGaussianFilter (int srcType, int dstType, Size ksize, double sigma1, double sigma2=0, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1) |
| 建立一個高斯濾波器。 | |
| Ptr< Filter > | cv::cuda::createLaplacianFilter (int srcType, int dstType, int ksize=1, double scale=1, int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0)) |
| 建立一個拉普拉斯 (Laplacian) 運算元。 | |
| Ptr< Filter > | cv::cuda::createLinearFilter (int srcType, int dstType, InputArray kernel, Point anchor=Point(-1, -1), int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0)) |
| 建立一個不可分線性 2D 濾波器。 | |
| Ptr< Filter > | cv::cuda::createMorphologyFilter (int op, int srcType, InputArray kernel, Point anchor=Point(-1, -1), int iterations=1) |
| 建立一個 2D 形態學濾波器。 | |
| Ptr< Filter > | cv::cuda::createRowSumFilter (int srcType, int dstType, int ksize, int anchor=-1, int borderMode=BORDER_DEFAULT, Scalar borderVal=Scalar::all(0)) |
| 建立一個水平 1D 盒式濾波器。 | |
| Ptr< Filter > | cv::cuda::createScharrFilter (int srcType, int dstType, int dx, int dy, double scale=1, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1) |
| 建立一個垂直或水平的 Scharr 運算元。 | |
| Ptr< Filter > | cv::cuda::createSeparableLinearFilter (int srcType, int dstType, InputArray rowKernel, InputArray columnKernel, Point anchor=Point(-1,-1), int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1) |
| 建立一個可分線性濾波器。支援就地處理。 | |
| Ptr< Filter > | cv::cuda::createSobelFilter (int srcType, int dstType, int dx, int dy, int ksize=3, double scale=1, int rowBorderMode=BORDER_DEFAULT, int columnBorderMode=-1) |
| 建立一個 Sobel 運算元。 | |
| Ptr< Filter > cv::cuda::createBoxFilter | ( | int | srcType, |
| int | dstType, | ||
| Size | ksize, | ||
| 點 (Point) | anchor=Point(-1, -1), | ||
| int | borderMode = BORDER_DEFAULT, | ||
| Scalar | borderVal=Scalar::all(0) ) |
#include <opencv2/cudafilters.hpp>
建立一個歸一化的 2D 盒式濾波器。
| srcType | 輸入影像型別。目前僅支援 CV_8UC1、CV_8UC4 和 CV_32FC1。 |
| dstType | 輸出影像型別。目前僅支援與 src 相同的型別。 |
| ksize | 核心大小。 |
| 錨點 (anchor) | 錨點。預設值 Point(-1, -1) 表示錨點位於核心中心。 |
| borderMode | 畫素外插法。有關詳細資訊,請參閱 borderInterpolate 。 |
| borderVal | 預設邊界值。 |
| Ptr< Filter > cv::cuda::createBoxMaxFilter | ( | int | srcType, |
| Size | ksize, | ||
| 點 (Point) | anchor=Point(-1, -1), | ||
| int | borderMode = BORDER_DEFAULT, | ||
| Scalar | borderVal=Scalar::all(0) ) |
#include <opencv2/cudafilters.hpp>
建立最大值濾波器。
| srcType | 輸入/輸出影像型別。僅支援 CV_8UC1 和 CV_8UC4。 |
| ksize | 核心大小。 |
| 錨點 (anchor) | 錨點。預設值 (-1) 表示錨點位於核心中心。 |
| borderMode | 畫素外插法。有關詳細資訊,請參閱 borderInterpolate 。 |
| borderVal | 預設邊界值。 |
| Ptr< Filter > cv::cuda::createBoxMinFilter | ( | int | srcType, |
| Size | ksize, | ||
| 點 (Point) | anchor=Point(-1, -1), | ||
| int | borderMode = BORDER_DEFAULT, | ||
| Scalar | borderVal=Scalar::all(0) ) |
#include <opencv2/cudafilters.hpp>
建立最小值濾波器。
| srcType | 輸入/輸出影像型別。僅支援 CV_8UC1 和 CV_8UC4。 |
| ksize | 核心大小。 |
| 錨點 (anchor) | 錨點。預設值 (-1) 表示錨點位於核心中心。 |
| borderMode | 畫素外插法。有關詳細資訊,請參閱 borderInterpolate 。 |
| borderVal | 預設邊界值。 |
| Ptr< Filter > cv::cuda::createColumnSumFilter | ( | int | srcType, |
| int | dstType, | ||
| int | ksize, | ||
| int | anchor=-1, | ||
| int | borderMode = BORDER_DEFAULT, | ||
| Scalar | borderVal=Scalar::all(0) ) |
#include <opencv2/cudafilters.hpp>
建立一個垂直 1D 盒式濾波器。
| srcType | 輸入影像型別。目前僅支援 CV_8UC1 型別。 |
| dstType | 輸出影像型別。目前僅支援 CV_32FC1 型別。 |
| ksize | 核心大小。 |
| 錨點 (anchor) | 錨點。預設值 (-1) 表示錨點位於核心中心。 |
| borderMode | 畫素外插法。有關詳細資訊,請參閱 borderInterpolate 。 |
| borderVal | 預設邊界值。 |
| Ptr< Filter > cv::cuda::createDerivFilter | ( | int | srcType, |
| int | dstType, | ||
| int | dx, | ||
| int | dy, | ||
| int | ksize, | ||
| bool | normalize=false, | ||
| double | scale = 1, | ||
| int | rowBorderMode=BORDER_DEFAULT, | ||
| int | columnBorderMode=-1 ) |
#include <opencv2/cudafilters.hpp>
建立一個通用的導數 (Deriv) 運算元。
| srcType | 源影像型別。 |
| dstType | 目標陣列型別。 |
| dx | x 方向的導數階數。 |
| dy | y 方向的導數階數。 |
| ksize | 孔徑大小。有關詳細資訊,請參閱 getDerivKernels 。 |
| normalize | 指示是否對濾波器係數進行歸一化(縮放)的標誌。有關詳細資訊,請參閱 getDerivKernels 。 |
| scale | 計算出的導數值的可選縮放因子。預設情況下,不應用縮放。有關詳細資訊,請參閱 getDerivKernels 。 |
| rowBorderMode | 垂直方向的畫素外插法。有關詳細資訊,請參閱 borderInterpolate。 |
| columnBorderMode | 水平方向的畫素外插法。 |
| Ptr< Filter > cv::cuda::createGaussianFilter | ( | int | srcType, |
| int | dstType, | ||
| Size | ksize, | ||
| double | sigma1, | ||
| double | sigma2=0, | ||
| int | rowBorderMode=BORDER_DEFAULT, | ||
| int | columnBorderMode=-1 ) |
#include <opencv2/cudafilters.hpp>
建立一個高斯濾波器。
| srcType | 源影像型別。 |
| dstType | 目標陣列型別。 |
| ksize | 孔徑大小。有關詳細資訊,請參閱 getGaussianKernel 。 |
| sigma1 | 水平方向的 Gaussian sigma。有關詳細資訊,請參閱 getGaussianKernel 。 |
| sigma2 | 垂直方向的 Gaussian sigma。如果為 0,則 \(\texttt{sigma2}\leftarrow\texttt{sigma1}\)。 |
| rowBorderMode | 垂直方向的畫素外插法。有關詳細資訊,請參閱 borderInterpolate。 |
| columnBorderMode | 水平方向的畫素外插法。 |
| Ptr< Filter > cv::cuda::createLaplacianFilter | ( | int | srcType, |
| int | dstType, | ||
| int | ksize = 1, | ||
| double | scale = 1, | ||
| int | borderMode = BORDER_DEFAULT, | ||
| Scalar | borderVal=Scalar::all(0) ) |
#include <opencv2/cudafilters.hpp>
建立一個拉普拉斯 (Laplacian) 運算元。
| srcType | 輸入影像型別。支援 CV_8U 、 CV_16U 和 CV_32F 的單通道和四通道影像。 |
| dstType | 輸出影像型別。目前僅支援與 src 相同的型別。 |
| ksize | 用於計算二階導數濾波器的孔徑大小(參見 getDerivKernels)。它必須是正數且為奇數。僅支援 ksize = 1 和 ksize = 3。 |
| scale | 計算出的拉普拉斯運算元值的可選縮放因子。預設情況下,不應用縮放(參見 getDerivKernels)。 |
| borderMode | 畫素外插法。有關詳細資訊,請參閱 borderInterpolate 。 |
| borderVal | 預設邊界值。 |
| Ptr< Filter > cv::cuda::createLinearFilter | ( | int | srcType, |
| int | dstType, | ||
| InputArray | kernel, | ||
| 點 (Point) | anchor=Point(-1, -1), | ||
| int | borderMode = BORDER_DEFAULT, | ||
| Scalar | borderVal=Scalar::all(0) ) |
#include <opencv2/cudafilters.hpp>
建立一個不可分線性 2D 濾波器。
| srcType | 輸入影像型別。支援 CV_8U 、 CV_16U 和 CV_32F 的單通道和四通道影像。 |
| dstType | 輸出影像型別。目前僅支援與 src 相同的型別。 |
| kernel | 濾波器係數的二維陣列。 |
| 錨點 (anchor) | 錨點。預設值 Point(-1, -1) 表示錨點位於核心中心。 |
| borderMode | 畫素外插法。有關詳細資訊,請參閱 borderInterpolate 。 |
| borderVal | 預設邊界值。 |
| Ptr< Filter > cv::cuda::createMorphologyFilter | ( | int | op, |
| int | srcType, | ||
| InputArray | kernel, | ||
| 點 (Point) | anchor=Point(-1, -1), | ||
| int | iterations=1 ) |
#include <opencv2/cudafilters.hpp>
建立一個 2D 形態學濾波器。
| op | 形態學操作的型別。可能的型別如下:
|
| srcType | 輸入/輸出影像型別。僅支援 CV_8UC1、CV_8UC4、CV_32FC1 和 CV_32FC4。 |
| kernel | 形態學操作的 8 位結構元素(二維)。 |
| 錨點 (anchor) | 結構元素內的錨點位置。負值表示錨點位於中心。 |
| iterations | 應用腐蝕和膨脹的次數。 |
| Ptr< Filter > cv::cuda::createRowSumFilter | ( | int | srcType, |
| int | dstType, | ||
| int | ksize, | ||
| int | anchor=-1, | ||
| int | borderMode = BORDER_DEFAULT, | ||
| Scalar | borderVal=Scalar::all(0) ) |
#include <opencv2/cudafilters.hpp>
建立一個水平 1D 盒式濾波器。
| srcType | 輸入影像型別。目前僅支援 CV_8UC1 型別。 |
| dstType | 輸出影像型別。目前僅支援 CV_32FC1 型別。 |
| ksize | 核心大小。 |
| 錨點 (anchor) | 錨點。預設值 (-1) 表示錨點位於核心中心。 |
| borderMode | 畫素外插法。有關詳細資訊,請參閱 borderInterpolate 。 |
| borderVal | 預設邊界值。 |
| Ptr< Filter > cv::cuda::createScharrFilter | ( | int | srcType, |
| int | dstType, | ||
| int | dx, | ||
| int | dy, | ||
| double | scale = 1, | ||
| int | rowBorderMode=BORDER_DEFAULT, | ||
| int | columnBorderMode=-1 ) |
#include <opencv2/cudafilters.hpp>
建立一個垂直或水平的 Scharr 運算元。
| srcType | 源影像型別。 |
| dstType | 目標陣列型別。 |
| dx | x 方向的導數階數。 |
| dy | y 方向的導數階數。 |
| scale | 計算出的導數值的可選縮放因子。預設情況下,不應用縮放。有關詳細資訊,請參閱 getDerivKernels 。 |
| rowBorderMode | 垂直方向的畫素外插法。有關詳細資訊,請參閱 borderInterpolate。 |
| columnBorderMode | 水平方向的畫素外插法。 |
| Ptr< Filter > cv::cuda::createSeparableLinearFilter | ( | int | srcType, |
| int | dstType, | ||
| InputArray | rowKernel, | ||
| InputArray | columnKernel, | ||
| 點 (Point) | anchor = Point(-1,-1), | ||
| int | rowBorderMode=BORDER_DEFAULT, | ||
| int | columnBorderMode=-1 ) |
#include <opencv2/cudafilters.hpp>
建立一個可分線性濾波器。支援就地處理。
| Ptr< Filter > cv::cuda::createSobelFilter | ( | int | srcType, |
| int | dstType, | ||
| int | dx, | ||
| int | dy, | ||
| int | ksize = 3, | ||
| double | scale = 1, | ||
| int | rowBorderMode=BORDER_DEFAULT, | ||
| int | columnBorderMode=-1 ) |
#include <opencv2/cudafilters.hpp>
建立一個 Sobel 運算元。
| srcType | 源影像型別。 |
| dstType | 目標陣列型別。 |
| dx | x 方向的導數階數。 |
| dy | y 方向的導數階數。 |
| ksize | 擴充套件 Sobel 核心的大小。可能的值為 1、3、5 或 7。 |
| scale | 計算出的導數值的可選縮放因子。預設情況下,不應用縮放。有關詳細資訊,請參閱 getDerivKernels 。 |
| rowBorderMode | 垂直方向的畫素外插法。有關詳細資訊,請參閱 borderInterpolate。 |
| columnBorderMode | 水平方向的畫素外插法。 |