diff --git a/skimage/feature/censure.py b/skimage/feature/censure.py index 3d11177b..18313eaf 100644 --- a/skimage/feature/censure.py +++ b/skimage/feature/censure.py @@ -149,8 +149,14 @@ def keypoints_censure(image, max_scale=7, mode='DoB', non_max_threshold=0.15, Number of scales to extract keypoints from. The keypoints will be extracted from all the scales except the first and the last. mode : ('DoB', 'Octagon', 'STAR') - Type of bilevel filter used to get the scales of input image. Possible - values are 'DoB', 'Octagon' and 'STAR'. + Type of bilevel filter used to get the scales of the input image. + Possible values are 'DoB', 'Octagon' and 'STAR'. The three modes + represent the shape of the bilevel filters i.e. box(square), octagon + and star respectively. For instance, a bilevel octagon filter consists + of a smaller inner octagon and a larger outer octagon with the filter + weights being uniformly negative in both the inner octagon while + uniformly positive in the difference region. Use STAR and Octagon for + better features and DoB for better performance. non_max_threshold : float Threshold value used to suppress maximas and minimas with a weak magnitude response obtained after Non-Maximal Suppression. diff --git a/skimage/feature/censure_cy.pyx b/skimage/feature/censure_cy.pyx index cfd1260f..a9980071 100644 --- a/skimage/feature/censure_cy.pyx +++ b/skimage/feature/censure_cy.pyx @@ -8,6 +8,10 @@ def _censure_dob_loop(Py_ssize_t n, double[:, ::1] integral_img, double[:, ::1] filtered_image, double inner_weight, double outer_weight): + # This function calculates the value in the DoB filtered image using + # integral images. If r = right. l = left, u = up, d = down, the sum of + # pixel values in the rectangle formed by (u, l), (u, r), (d, r), (d, l) + # is calculated as I(d, r) + I(u - 1, l - 1) - I(u - 1, r) - I(d, l - 1). cdef Py_ssize_t i, j cdef double inner, outer