Sobel

使用擴展 Sobel 運算元計算一階、二階、三階或混合圖像差分

void cvSobel( const CvArr* src, CvArr* dst, int xorder, int yorder, int aperture_size=3 );
src
輸入圖像.
dst
輸出圖像.
xorder
x 方向上的差分階數
yorder
y 方向上的差分階數
aperture_size
擴展 Sobel 核的大小,必須是 1, 3, 5 或 7。 除了尺寸為 1, 其它情況下, aperture_size ×aperture_size 可分離內核將用來計算差分。對 aperture_size=1的情況, 使用 3x1 或 1x3 內核 (不進行高斯平滑操作)。這裡有一個特殊變數 CV_SCHARR (=-1),對應 3x3 Scharr 濾波器,可以給出比 3x3 Sobel 濾波更精確的結果。

 

Laplace

計算圖像的 Laplacian 變換

void cvLaplace( const CvArr* src, CvArr* dst, int aperture_size=3 );
src
輸入圖像.
dst
輸出圖像.
aperture_size
核大小 (與 cvSobel 中定義一樣).

 

 

Canny

採用 Canny 演算法做邊緣檢測

void cvCanny( const CvArr* image, CvArr* edges, double threshold1,
              double threshold2, int aperture_size=3 );
image
單通道輸入圖像.
edges
單通道存儲邊緣的輸出圖像
threshold1
第一個閾值
threshold2
第二個閾值
aperture_size
Sobel 運算元內核大小 (見 cvSobel).

函數 cvCanny 採用 CANNY 演算法發現輸入圖像的邊緣而且在輸出圖像中標識這些邊緣。threshold1和threshold2 當中的小閾值用來控制邊緣連接,大的閾值用來控制強邊緣的初始分割。

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 bkboy 的頭像
    bkboy

    Bret. Blogger

    bkboy 發表在 痞客邦 留言(0) 人氣()