简体   繁体   English

如何使用opencv创建cvSobel函数

[英]How to create cvSobel function using opencv

I am studying about opencv and I am using ver 2.4.10 and VS2010 And I have used cvSobel function.我正在研究opencv ,我使用的是ver 2.4.10VS2010并且我使用了cvSobel函数。

I want to make that function.我想做那个功能。 Because I will input another element in that function, called isotropic sobel operator.因为我将在该函数中输入另一个元素,称为各向同性sobel算子。

Please help me how to make that cvSobel function.请帮助我如何制作cvSobel函数。 I tried to make and find but, I couldn't make and find.我试图制作并找到,但是,我无法制作和找到。 Or tell me to apply kernel on image.或者告诉我在图像上应用内核。

cvSobel(src,dst,xorder,yorder,int aparture_size=3);

What I really want is to apply following matrix我真正想要的是应用以下矩阵

{{-1,0,1},{-sqrt(2.0),0,sqrt(2.0)},{-1,0,1}}

您可以使用SepFilter2D创建和应用所需的过滤器内核 - 您的内核是可分离的,或者filter2D用于常见情况

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM