Robot、Sobel、Scharr算子(一)

Robot算子

1 0
0 -1
\(Gx\)
0 1
-1 0
\(Gy\)

\(\left | G \right |=\sqrt{Gx^{2}+Gy^{2}}\)
原图:

Robot_x处理后:

Robot_y处理后:

Robot_x 与Robot_y 合并

Sobel算子

\(Gx=\begin{bmatrix} -1 & 0 &1 \\ -2& 0 &2 \\ -1& 0 &1 \end{bmatrix}*I\)
\(Gy=\begin{bmatrix} -1 & -2 &-1 \\ 0& 0 &0 \\ 1& 2&1 \end{bmatrix}*I\)
处理结果

Scharr算子

\(Gx=\begin{bmatrix} -3 & 0 &3 \\ -10& 0 &10 \\ -3& 0 &3 \end{bmatrix}\)
\(Gy=\begin{bmatrix} -3 & -10 &-3 \\ 0& 0 &0 \\ 3& 10&3 \end{bmatrix}\)
处理结果

本段代码地址:https://github.com/cyssmile/openCV_learning_notes/blob/master/opencv_test/opencv_017/opencv_017.cpp
图片来自网络,如有侵权,请联系我删除。

posted @ 2020-03-14 20:56  cyssmile  阅读(703)  评论(0编辑  收藏  举报