In addition to kernel size and construction, you can also get useful effects by making the kernel sum to numbers slightly larger than one. This means that the kernel is not strictly a highpass filter, but will preserve some low frequency information. You don’t want much; multiplying the center element of a fence kernel by 1.01 to 1.10 seems to be the sweet spot, but you can have a great deal of control over the look of your image this way.
If you’re into weirdness, you can make the center entry slightly smaller than one, which gives an effect reminiscent of a photographic negative.
I wrote a little Matlab code to tweak the kernel center value.
And here’s what it looks like applied in varying amounts to an image:
Leave a Reply