From 61a8a78657bd6fd996747fea9664bc7e9a80c8ea Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Sat, 15 Mar 2014 20:02:09 +0530 Subject: [PATCH] made hessian_det_appx public --- skimage/feature/__init__.py | 2 ++ skimage/feature/_hessian_det_appx.pyx | 2 +- skimage/feature/blob.py | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/skimage/feature/__init__.py b/skimage/feature/__init__.py index 49167a36..7d1d9add 100644 --- a/skimage/feature/__init__.py +++ b/skimage/feature/__init__.py @@ -15,6 +15,7 @@ from .orb import ORB from .match import match_descriptors from .util import plot_matches from .blob import blob_dog, blob_log, blob_doh +from ._hessian_det_appx import hessian_det_appx __all__ = ['daisy', @@ -44,4 +45,5 @@ __all__ = ['daisy', 'plot_matches', 'blob_dog', 'blob_doh', + 'hessian_det_appx', 'blob_log'] diff --git a/skimage/feature/_hessian_det_appx.pyx b/skimage/feature/_hessian_det_appx.pyx index a8ca2734..5d3f7511 100644 --- a/skimage/feature/_hessian_det_appx.pyx +++ b/skimage/feature/_hessian_det_appx.pyx @@ -78,7 +78,7 @@ cdef inline cnp.double_t _integ( return ans -def _hessian_det_appx(cnp.double_t[:, ::1] img, float sigma): +def hessian_det_appx(cnp.double_t[:, ::1] img, float sigma): """Computes the approximate Hessian Determinant over an image. This method uses box filters over integral images to compute the diff --git a/skimage/feature/blob.py b/skimage/feature/blob.py index 96de1d65..57818a98 100644 --- a/skimage/feature/blob.py +++ b/skimage/feature/blob.py @@ -6,7 +6,7 @@ from math import sqrt, hypot, log from numpy import arccos from skimage.util import img_as_float from .peak import peak_local_max -from ._hessian_det_appx import _hessian_det_appx +from ._hessian_det_appx import hessian_det_appx from skimage.transform import integral_image @@ -398,7 +398,7 @@ def blob_doh(image, min_sigma=1, max_sigma=30, num_sigma=10, threshold=0.01, else: sigma_list = np.linspace(min_sigma, max_sigma, num_sigma) - hessian_images = [_hessian_det_appx(image, s) for s in sigma_list] + hessian_images = [hessian_det_appx(image, s) for s in sigma_list] image_cube = np.dstack(hessian_images) local_maxima = peak_local_max(image_cube, threshold_abs=threshold,