forked from lionfish0/btretrodetect
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Just coding up a method for using low-res blurred background subtraction.
Could switch to interpolating, but this needs some work.
Here's partly working code for this:
def rescaleInterpolate(im,x,y,patchSize,blocksize):
from scipy.interpolate import RegularGridInterpolator
ystart = y-patchSize
yend = y+patchSize
ys = np.arange(ystart,yend+blocksize,blocksize)
xstart = x-patchSize
xend = x+patchSize
xs = np.arange(xstart,xend+blocksize,blocksize)
print(xs.shape,ys.shape,im.shape)
intp = RegularGridInterpolator((xs,ys),im[ystart//blocksize:yend//blocksize+1,xstart//blocksize:xend//blocksize+1])
X, Y = np.meshgrid(np.arange(xstart,xend),np.arange(ystart,yend), indexing='ij')
return intp((X,Y))
Metadata
Metadata
Assignees
Labels
No labels