Using the MATLAB function xcorr2.
The edge convolution script loads an image and subtracts adjacent pixels from each other. This results in an output image that is bright at pixels where the original image hat a strongly changing brightness (edges).
Input image
Output image