將脊檢測濾波器應用於輸入影像。 實現類似於 Mathematica 中的脊檢測,使用來自輸入影像的 Hessian 矩陣的特徵值,並使用 Sobel 導數。 可以使用骨架化和二值化進行額外的細化。 改編自 [81] 和 [189]。 更多...
#include <opencv2/ximgproc/ridgefilter.hpp>
將脊檢測濾波器應用於輸入影像。 實現類似於 Mathematica 中的脊檢測,使用來自輸入影像的 Hessian 矩陣的特徵值,並使用 Sobel 導數。 可以使用骨架化和二值化進行額外的細化。 改編自 [81] 和 [189]。
◆ create()
| Python |
|---|
| cv.ximgproc.RidgeDetectionFilter.create( | [, ddepth[, dx[, dy[, ksize[, out_dtype[, scale[, delta[, borderType]]]]]]]] | ) -> | retval |
| cv.ximgproc.RidgeDetectionFilter_create( | [, ddepth[, dx[, dy[, ksize[, out_dtype[, scale[, delta[, borderType]]]]]]]] | ) -> | retval |
建立指向脊檢測濾波器的指標。
- 引數
-
| ddepth | 指定輸出影像深度。預設為 CV_32FC1 |
| dx | x 的導數階數,預設為 1 |
| dy | y 的導數階數,預設為 1 |
| ksize | Sobel 核大小,預設為 3 |
| out_dtype | 輸出的轉換格式,預設為 CV_8UC1 |
| scale | 導數值的可選比例值,預設為 1 |
| delta | 新增到輸出的可選偏差,預設為 0 |
| borderType | 畫素外推方法,預設為 BORDER_DEFAULT |
- 另請參見
- Sobel, threshold, getStructuringElement, morphologyEx.(用於額外細化)
◆ getRidgeFilteredImage()
| virtual void cv::ximgproc::RidgeDetectionFilter::getRidgeFilteredImage |
( |
InputArray | _img, |
|
|
OutputArray | out ) |
|
純虛擬函式 |
| Python |
|---|
| cv.ximgproc.RidgeDetectionFilter.getRidgeFilteredImage( | _img[, out] | ) -> | 輸出3D仿射變換矩陣,尺寸為\(3 \times 4\),形式如下 |
將脊檢測濾波器應用於輸入影像。
- 引數
-
| _img | Sobel 支援的 InputArray。 img 可以是 1 通道或 3 通道。 |
| 輸出3D仿射變換矩陣,尺寸為\(3 \times 4\),形式如下 | 作為 RidgeDetectionFilter::ddepth 的結構 OutputAray。帶有脊的輸出影像。 |
此類文件由以下檔案生成