Another part of Digital Image Processing is the Laplacian mask. Laplacian mask contains the coefficients of the Laplacian operator (second order derivatives). When dealing with Laplacian mask,you must be very careful with the difference in sign when combining either by adding or subtract a Laplacian filtered image with another image. Laplacian operator have some effect. It tends to produce image that have grayish edge lines and other discontinuities in brighter intensities, all superimposed on a dark, featureless background. To correct the problem of featureless background, you must add the original and Laplacian filtered image together.
To understand more about Laplacian mask, take a good look on the example of Matlab code below.
%w=[0 1 0;1 -1 1;0 1 0];
%This will generate image (b) with ALL pixels positive.
%g1 is of class uint8.
%need to convert to double first
%Effect of laplacian mask.
%grayish edge line, featureless background
%Laplacian filtered image using double formats
%Restore gray tone lost by using laplacian via subtracting laplacian from
%the original image (substract since center coefficient is negative)
% to correct featureless background – add the original and laplacian filtered image. center of laplacian mask -ve (use minus)
That’s all. Thank You