Closed Tam-Pham closed 3 years ago
doesnt work lor. + it'd be better give the center in a -1,1; -1,1 space so that we can than rescale it to whatever
array = _gaussian_kernel(width=480, sd=64)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
d:\Dropbox\RECHERCHE\N\Pyllusion\pyllusion\image\image_blobs.py in
----> 56 array = _gaussian_kernel(width=480, sd=64)
d:\Dropbox\RECHERCHE\N\Pyllusion\pyllusion\image\image_blobs.py in _gaussian_kernel(x, y, width, sd)
9 blob = np.outer(gkern1d, gkern1d)
10 M = np.zeros((width, width))
---> 11 M[x - (sd): x + (sd), y - (sd): y + (sd)] = blob
12 return M
ValueError: could not broadcast input array from shape (480,480) into shape (128,128)
**
@Tam-Pham best would be the to have the same API as image_circle for image_blob
x and y coordinates provided will be the coordinate of the top left corner of the blob.