But I guess it's going to be significantly faster... :-)

Johannes Schönberger

Am 26.08.2013 um 13:03 schrieb "AnkitAgrawal" <notifications@github.com>:

> In skimage/feature/corner_cy.pyx:
> 
> > +    cdef Py_ssize_t n_fast_corners = fast_corners.shape[0]
> > +    cdef Py_ssize_t i, p, q, r, c, x, y
> > +    cdef double[:, ::1] kp_circular_patch, mu
> > +    cdef double[:] kp_orientation = np.zeros(fast_corners.shape[0], dtype=np.double)
> > +
> > +    for i in range(n_fast_corners):
> > +        x = cfast_corners[i, 0]
> > +        y = cfast_corners[i, 1]
> > +
> > +        kp_circular_patch = image[x - 3:x + 4, y - 3:y + 4] * circular_mask
> > +        mu = np.zeros((2, 2), dtype=np.double)
> > +        for p in range(2):
> > +            for q in range(2):
> > +                for r in range(7):
> > +                    for c in range(7):
> > +                        mu[p, q] += kp_circular_patch[r, c] * (r - 3) ** q * (c - 3) ** p
> @ahojnnes : I would then prefer the kp_circular_patch version because it is more readable than the above extra for if.
> 
> —
> Reply to this email directly or view it on GitHub.