OpenCV自带例子(九)Sobel运用
2011-12-05 21:57
274 查看
void Sobel(InputArray src, OutputArray dst, int ddepth, int xorder, int yorder, int ksize=3, double
scale=1, double delta=0, int borderType=BORDER_DEFAULT )
ddepth 通常采用 src.depth();
xorder 和 yorder 通常用 1, 0, 或者 0, 1
scale=1, double delta=0, int borderType=BORDER_DEFAULT )
ddepth 通常采用 src.depth();
xorder 和 yorder 通常用 1, 0, 或者 0, 1
int main( int argc, char** argv ) { // Load an image Mat src = imread("D:\\image\\aa.jpg", 0); Mat dst_x, dst_y, dst; Sobel(src, dst_x, src.depth(), 1, 0); Sobel(src, dst_y, src.depth(), 0, 1); convertScaleAbs(dst_x, dst_x); convertScaleAbs(dst_y, dst_y); addWeighted( dst_x, 0.5, dst_y, 0.5, 0, dst); imshow("dst", dst); imwrite("D:\\image\\aa_sobel.jpg", dst); waitKey(); return 0; }
相关文章推荐
- OpenCV自带例子 (十) 图像几何变换
- 编译opencv自带例子
- OPENCV SVM介绍和自带例子
- OpenCV3.2.0 双目标定+立体匹配(官方自带例子的使用方法)
- opencv 单目相机标定 自带例子程序的使用
- OpenCV自带例子(二)Load, Modify, and Save an Image
- OpenCV自带例子(七)图像平滑处理
- 图像分割学习笔记_1(opencv自带meanshift分割例子)
- OpenCV自带例子(一)Load and Display an Image
- OpenCV自带例子(三)两幅图像相加
- opencv 2.4.4自带例子总结
- OpenCV自带例子(四)改变一张图片的对比度与亮度
- opencv 双目相机标定 自带例子程序的使用
- opencv下自带例子总结
- OpenCV自带例子(五)基本画图功能
- OpenCV3.2.0 双目标定+立体匹配(官方自带例子的使用方法)
- OpenCV自带例子(八)图像腐蚀与膨胀
- windows下opencv单目标定 自带例子使用
- 【SVM理论到实践3】OpenCv中自带的两个例子:线性可分和线性不可分代码解读
- 人脸与人眼识别 opencv自带例子