Learn Before
Example of Calculating Two-Dimensional Cross-Correlation for Vertical Edge Detection
Consider a grayscale image, represented as a matrix because there are no separate RGB channels. To detect vertical edges, we construct a filter (or kernel). Cross-correlating the input matrix with the filter produces a output matrix. To compute the upper-left element of this output, we overlay the filter onto the top-left region of the input image and sum the element-wise products. For instance, this calculation might be: . To compute the second element, we shift the filter one step to the right on the image, perform the same element-wise products and additions, yielding , and so on. To compute the next rows, we shift the filter one step down and repeat the procedure.

0
1
Contributors are:
Who are from:
Tags
Data Science