I am using the `Filter2D` function in `opencv-python` on a satellite image that have several black-fill values (zeros) around the edges. Here you can find an example of what I am talking about: <https://landsat.gsfc.nasa.gov/wp-content/uploads/2013/06/truecolor.jpg>

When I use `Filter2D` on that image, the pixels from the black-filled area are considered valid values, creating edge artifacts. How can I not include the zeros in the calculation? For example, in IDL I can use the "missing" and "invalid" fields like this:

```
output = CONVOL(input, kernel, /EDGE_TRUNCATE, MISSING=0.0, INVALID=0.0, /NAN, /NORMALIZE)

```

and avoid issues at the edges,but I cannot find a similar functionality in opencv. How can get around this issue?