用法:
skimage.feature.hessian_matrix(image, sigma=1, mode='constant', cval=0, order='rc')
計算 Hessian 矩陣。
在 2D 中,Hessian 矩陣定義為:
H = [Hrr Hrc] [Hrc Hcc]
這是通過在各自的 r- 和 c-directions 中將圖像與高斯核的二階導數進行卷積來計算的。
這裏的實現也支持n維數據。
- image:ndarray
輸入圖像。
- sigma:浮點數
用於高斯核的標準偏差,用作自相關矩陣的加權函數。
- mode:{‘constant’, ‘reflect’, ‘wrap’, ‘nearest’, ‘mirror’},可選
如何處理圖像邊界之外的值。
- cval:浮點數,可選
與模式‘constant’(圖像邊界外的值)結合使用。
- order:{‘rc’, ‘xy’},可選
此參數允許在梯度計算中使用圖像軸的反向或正向順序。 ‘rc’ 表示最初使用第一個軸(Hrr、Hrc、Hcc),而‘xy’ 表示最初使用最後一個軸(Hxx、Hxy、Hyy)
- H_elems:ndarray 列表
Upper-diagonal 輸入圖像中每個像素的 hessian 矩陣元素。在 2D 中,這將是一個包含 [Hrr, Hrc, Hcc] 的三元素列表。在 nD 中,列表將包含
(n**2 + n) / 2
數組。
參數:
返回:
例子:
>>> from skimage.feature import hessian_matrix >>> square = np.zeros((5, 5)) >>> square[2, 2] = 4 >>> Hrr, Hrc, Hcc = hessian_matrix(square, sigma=0.1, order='rc') >>> Hrc array([[ 0., 0., 0., 0., 0.], [ 0., 1., 0., -1., 0.], [ 0., 0., 0., 0., 0.], [ 0., -1., 0., 1., 0.], [ 0., 0., 0., 0., 0.]])
相關用法
- Python skimage.feature.hessian_matrix_eigvals用法及代碼示例
- Python skimage.feature.haar_like_feature_coord用法及代碼示例
- Python skimage.feature.haar_like_feature用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_dog用法及代碼示例
- Python skimage.feature.graycoprops用法及代碼示例
- Python skimage.feature.corner_orientations用法及代碼示例
- Python skimage.feature.structure_tensor用法及代碼示例
- Python skimage.feature.ORB用法及代碼示例
- Python skimage.feature.corner_subpix用法及代碼示例
- Python skimage.feature.canny用法及代碼示例
- Python skimage.feature.peak_local_max用法及代碼示例
- Python skimage.feature.CENSURE用法及代碼示例
- Python skimage.feature.corner_foerstner用法及代碼示例
- Python skimage.feature.corner_harris用法及代碼示例
- Python skimage.feature.corner_fast用法及代碼示例
- Python skimage.feature.BRIEF用法及代碼示例
- Python skimage.feature.SIFT用法及代碼示例
- Python skimage.feature.structure_tensor_eigvals用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.feature.hessian_matrix。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。