Sobel Edge Filter

~12 mincode completion

Implement sobel_edges(image) returning an array of shape that stacks , 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
Loading docs…

The AI Mentor needs an account

It reads your code and the failing tests and nudges you toward the fix without handing you the answer. Free accounts get it on every problem you're working on today.