Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Let imagine Laplacian filter 3x3 kernel: image description

Let consider pixel with the following neighborhood:

1   1    1 
1   255 1
1   1    1

After applying Laplacian filter pixel value should be equal -4*255 + 4 = -1016

If we continue use CV_8U type (unsigned char 0-255) we can't save this value. So we should change type to CV_16S (signed short int, –32,768 to 32,767)