(r, c)
| 26 | return ridx |
| 27 | |
| 28 | def build_grididx(r, c): |
| 29 | idx = np.arange(r*c, dtype=np.uint32) |
| 30 | rs, cs = idx//c, idx%c |
| 31 | idx1 = idx[(rs<r-1)*(cs<c-1)].reshape((-1,1)) |
| 32 | did = np.array([[0, 1, 1+c, 0, 1+c, c]], dtype=np.uint32) |
| 33 | return rs, cs, (idx1 + did).reshape((-1,3)) |
| 34 | |
| 35 | def build_surf2d(img, ds=1, sigma=0, k=0.2): |
| 36 | from skimage.filters import sobel_h, sobel_v |
no outgoing calls
no test coverage detected