Skip to content

interpolating low-res 'blur' #1

@lionfish0

Description

@lionfish0

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions