sepFilter2D函数
来源:互联网 发布:手机qq变声软件 编辑:程序博客网 时间:2024/05/29 13:24
sepFilter2D函数
函数功能:
sepFilter2D() 用分解的核函数对图像做卷积。首先,图像的每一行与一维的核kernelX做卷积;然后,运算结果的每一列与一维的核kernelY做卷积
调用格式:
void sepFilter2D(InputArray src, OutputArray dst, int ddepth, InputArray kernelX, InputArray kernelY, Pointanchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT )
参数详解:
InputArray src:输入图像
OutputArray dst:输出图像
int ddepth:输出图像的深度
- src.depth() = CV_8U, ddepth = -1/CV_16S/CV_32F/CV_64F
- src.depth() = CV_16U/CV_16S, ddepth = -1/CV_32F/CV_64F
- src.depth() = CV_32F, ddepth = -1/CV_32F/CV_64F
- src.depth() = CV_64F, ddepth = -1/CV_64F
InputArray kernelX:x方向的卷积核
InputArray kernelY:y方向的卷积核
Pointanchor=Point(-1,-1):处理的像素是核中心的像素
double delta=0:表示像素是不是加增量
int borderType=BORDER_DEFAULT:图像边界的处理方式
opencv代码:
#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <iostream>#include<stdlib.h>using namespace cv;using namespace std;int main(){Mat src, dst;src = imread("D:6.jpg");Mat kx = (Mat_<float>(1, 3) << 0,-1,0);Mat ky = (Mat_<float>(1, 3) << -1,0, -1);sepFilter2D(src, dst, src.depth(),kx,ky,Point(-1,-1),0,BORDER_DEFAULT );imshow("shiyan", dst);waitKey(0);return 0;}
0 0
- sepFilter2D函数
- sepFilter2D()OpenCv中的可分离滤波器简介
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- BZOJ1050
- python 之 utf-8编码的秘密
- 离线语音听写
- codeforces 66D D. Petya and His Friends( 数论+构造)
- Hadoop DistributedCache的使用解释
- sepFilter2D函数
- AsyncTask介绍
- Centos下pure-ftpd安装配置详解
- strcpy手写代码
- ZOJ 3347 Picture Handling
- js获得子页面元素
- MFC COMBOBOX的使用
- Android Camera数据流完整分析
- Spring ListFactoryBean example