MCPcopy Create free account
hub / github.com/Image-Py/imagepy / build_grididx

Function build_grididx

imagepy/core/myvi/util.py:28–33  ·  view source on GitHub ↗
(r, c)

Source from the content-addressed store, hash-verified

26 return ridx
27
28def 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
35def build_surf2d(img, ds=1, sigma=0, k=0.2):
36 from skimage.filters import sobel_h, sobel_v

Callers 3

build_surf2dFunction · 0.85
build_ballFunction · 0.85
build_meshFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected