Consider a 64 x 64 pixel image (2d matrix), where each pixel represents 100nm in size. Say most of these pixels have a value of 0, and some have a positive value (1,2,...). I want to convolve these pixels with a 2d gaussian that will transform the non-zero pixels into a smooth 2d gaussian-like blob, with a radius of 250nm. So the width of the gaussian for every non-zero pixel, I am expecting to be about 5 pixel in width.
I see there exists the convolve2d function in scipy (scipy.signal.convolve2d
), which is probably what I am looking for. But I am confused about the second input to the function, thefilter_kernel
matrix that it takes as input. How do I construct this matrix given the criteria above? Am I missing criteria in the first place? I want to transform discrete pixel intensity into gaussian of some width.