Documenting the code

This commit is contained in:
Ankit Agrawal
2013-08-15 15:12:48 +05:30
parent 229910efe7
commit 6d1be9aee4
2 changed files with 12 additions and 2 deletions
+8 -2
View File
@@ -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.
+4
View File
@@ -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