Parent Topic: Filter
The two Laplacian filters have different weight arrangements as shown below:
Example of 3x3 Laplacian filters.
Type 1 Type 2
0 1 0 -1 -1 -1
1 -4 1 -1 8 -1
0 1 0 -1 -1 -1
where sum of all the weights = 0
NOTE: In order to filter pixels located near the edges of the image,
edge pixel values are replicated to give sufficient data.