filter2D
来源:互联网 发布:vue.js 动态添加dom 编辑:程序博客网 时间:2024/05/19 20:21
void cv::filter2D ( InputArray src,
OutputArray dst,
int ddepth,
InputArray kernel,
Point anchor = Point(-1,-1),
double delta = 0,
int borderType = BORDER_DEFAULT
)
Convolves an image with the kernel.
The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.
The function does actually compute correlation, not the convolution:
dst(x,y)=∑0≤y′<kernel.rows0≤x′<kernel.cols,kernel(x′,y′)∗src(x+x′−anchor.x,y+y′−anchor.y)
That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using cv::flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - anchor.y - 1).
The function uses the DFT-based algorithm in case of sufficiently large kernels (~11 x 11 or larger) and the direct algorithm for small kernels.
Parameters
src: input image.
dst :output image of the same size and the same number of channels as src.
OutputArray dst,
int ddepth,
InputArray kernel,
Point anchor = Point(-1,-1),
double delta = 0,
int borderType = BORDER_DEFAULT
)
Convolves an image with the kernel.
The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.
The function does actually compute correlation, not the convolution:
dst(x,y)=∑0≤y′<kernel.rows0≤x′<kernel.cols,kernel(x′,y′)∗src(x+x′−anchor.x,y+y′−anchor.y)
That is, the kernel is not mirrored around the anchor point. If you need a real convolution, flip the kernel using cv::flip and set the new anchor to (kernel.cols - anchor.x - 1, kernel.rows - anchor.y - 1).
The function uses the DFT-based algorithm in case of sufficiently large kernels (~11 x 11 or larger) and the direct algorithm for small kernels.
Parameters
src: input image.
dst :output image of the same size and the same number of channels as src.
ddepth: desired depth of the destination image, see combinations
kernel: convolution kernel (or rather a correlation kernel), a single-channel floating point matrix; if you want to apply different kernels to different channels, split the image into separate color planes using split and process them individually.
anchor: anchor of the kernel that indicates the relative position of a filtered point within the kernel; the anchor should lie within the kernel; default value (-1,-1) means that the anchor is at the kernel center.
delta: optional value added to the filtered pixels before storing them in dst.
borderType: pixel extrapolation method, see cv::BorderTypes
阅读全文
0 0
- filter2D
- opencv filter2D
- filter2D函数
- filter2D function
- filter2D 图像滤波
- filter2D图像卷积
- 未定义标识符filter2D
- OpenCV的Filter2D代码解析
- OpenCV中的模板匹配/Filter2d
- 卷积,使用filter2D创建自定义线性滤波器
- OpenCV学习笔记(6):滤波filter2D()
- 使用filter2D创建自定义线性滤波器
- matlab imfilter 对于 opencv filter2D 参数
- imgproc模块--filter2D实现线性滤波器
- opencv filter2D函数实现图像卷积
- 学习OpenCV(三)用filter2D实现矩阵掩码操作
- Opencv学习笔记(六):Mask Operation filter2D函数
- 学习OpenCV(三)用filter2D实现矩阵掩码操作
- 如何在JSP页面中不使用任何插件实现分页查询
- Gradle基本使用(2):基本概念与Task
- 2017北京网赛hihocoder #1582 : Territorial Dispute 【凸包】
- 简单知识点实例之一:如何将各个单一获取的数据存储为数组对象并将其取出
- 逻辑斯蒂回归和SVM的区别有哪些?
- filter2D
- 第八届服创大赛有感
- 为什么说《让子弹飞》是古今中外的神片
- Java垃圾回收详解
- html5/css3响应式布局
- Hadoop日记1:初探linux、JDK、Hadoop2、Hello World
- B1011.A+B和C(值溢出问题)
- 微信扫码支付
- 拓扑排序