Sobel Edge Filter
~12 mincode completion
Implement sobel_edges(image) returning an array of shape (3,H−2,W−2) that stacks Gx, Gy and the magnitude, in that order.
Where this shows up
~12 min
••••••••••••••••
8 employers weight this skill
4 autonomy companies, 1 defense company, 1 health and bio company, 1 enterprise vendor, 1 AI product company. Top match scores 93.
Python
import numpy as np
def sobel_edges(image):
"""
Sobel gradients by cross-correlation over the valid region.
Args:
image: 2D array of shape (H, W), H and W at least 3
Returns:
array of shape (3, H-2, W-2): [Gx, Gy, magnitude]
"""
# YOUR CODE HERE
pass