Filter: Factor out the function for calc gaussian kernel size