Ask Your Question

Revision history [back]

Laplacian filter and parameters

I'm kind of new with opencv. I'm using Java and I'd like to know how to apply a Laplacian filter with alpha = 0.2, I mean, using this matrix to convolve:

0.1667    0.6667    0.1667
0.6667   -3.3333    0.6667
0.1667    0.6667    0.1667

I'm using this code, but I don't know what to use as "ddepth" and "ksize":

Imgproc.Laplacian(b, b_lapl, ddepth, ksize, 1, 0);

Is there any quick form of getting the abs of the result?

click to hide/show revision 2
retagged

updated 2014-03-22 15:47:02 -0600

berak gravatar image

Laplacian filter and parameters

I'm kind of new with opencv. I'm using Java and I'd like to know how to apply a Laplacian filter with alpha = 0.2, I mean, using this matrix to convolve:

0.1667    0.6667    0.1667
0.6667   -3.3333    0.6667
0.1667    0.6667    0.1667

I'm using this code, but I don't know what to use as "ddepth" and "ksize":

Imgproc.Laplacian(b, b_lapl, ddepth, ksize, 1, 0);

Is there any quick form of getting the abs of the result?