How is discrete laplacian filter kernel computed with arbitrary size?

79 views Asked by At

I'm implementing the laplacian filter for a depth from focus project, but the laplacian kernel filter with kernel size 3 doesn't work well for my problem. I would like to implement a function that would generate an arbitray sized laplacian kernel.

I did some reseach, and I found how is Laplacian filter calculated?, that only explained how laplacian kernel of size 3 is computed.

bigger mask size for laplacian filter? gives answers for size 5, but doesn't explain why.

Ideally, I'm looking for something like Sobel filter kernel of large size, which explains the sobel kernel with arbitray size very well.

I know OpenCV has an implementation that does it, but I'm curious about the theory behind it. The source code isn't easy to understand.

0

There are 0 answers