0
$\begingroup$

I'm using laplacian filter in opencv.

I usually use laplacian filter with kernel size 3 which is default setting in opencv.

I'm just curious what happen(intuitively) when I choose bigger size kernel?

I think if I take small size such as 3x3, this gives me 3x3 matrix. So the result is "how much change in pixel intensity in 3x3 neighbors.

However if I take bigger size such as 7x7, this gives me 7x7 matrix. So the result is "how much change in pixel intensity in 7x7 neighbors.

So, intuitively I think small kernel size gives me small local change, on the other hand big kernel size gives me broader change.

Is is right?

$\endgroup$

1 Answer 1

1
$\begingroup$

Internally, the Laplacian() operator applies a Sobel filter and the kernel_size parameter specifies the dimensionality of that filter. Therefore, your intuition about applying the filter to a neighborhood proportional to the kernel_size is correct. Consider plotting the results of applying Laplacian() with various kernel_size values side by side if you want to solidify your intuition. I also recommend you look at OpenCV's documentation as it contains all the theory you need. I hope that helps!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.