How to apply convolution non-uniformly?

31 Views Asked by At

Suppose I wish to apply Gaussian blur everywhere, except some predefined region

enter image description here

How calculate this with formula like below

$\int\int I(x,y) g(x-u, y-v) dx dy$

What is $g()$ will be here?

1

There are 1 best solutions below

1
On

Your convolution formula is translation invariant with respect to $g$, i.e. you will get the same value of $g$ when you subtract the right parameter values regardless of what parameter values you started with. So there is no way to ignore just a single region in the convolution, you can only insist that in the integral, $g$ ignores EVERY region outside a certain range of the parameters of $f$ in the integral.