The gradient magnitude measures the rate of intensity change in an image. It is calculated using finite difference operators (Gx and Gy) to estimate horizontal and vertical changes. The results are combined using the Euclidean norm to highlight edges. Binarization can then be applied to create a binary representation of detected edges.
Applying a Gaussian filter before using the finite difference operator creates a blurred version of the image, which reduces noise. This smoothing results in cleaner gradient images, allowing for sharper edge detection and a more accurate representation of the image's features.
By convolving the Gaussian filter with the derivative operators Dx and Dy, we create Derivative of Gaussian (DoG) filters. DoG simplifies the process by combining smoothing and differentiation into one step.
The resulting gradient images from the DoG filters closely resemble those from the two-step process.
Sharpening the blurred image brought back the detail but it is not as sharp as the original image.
I experimented with using color to enhance the effect. In my tests, applying color to both the high-frequency and low-frequency components produced the best results, providing a more detailed representation of the image.