An edge is a place where image intensity changes quickly, i.e. where the gradient magnitude |∇f| is large. Gradient operators estimate ∂f/∂x and ∂f/∂y with small convolution kernels:
Sobel Gx = [-1 0 1; -2 0 2; -1 0 1] * f
|∇f| = sqrt(Gx² + Gy²)
Prewitt same with weights 1 1 1 (no centre emphasis)
Roberts 2×2 diagonal differences
Laplacian ∇²f ≈ f(x±1) + f(y±1) − 4 f (zero crossings)
On a ramp f = a·x the Sobel response is exactly 8a (the kernel's smoothing weights sum to 4, the derivative spans 2 pixels), which the self-check verifies. Noise of standard deviation σ gives a Sobel response of about 3.5σ even on a flat region, which is why a threshold and a blur are needed.
Canny (1986) adds three steps: 1) Gaussian smoothing Gσ, 2) non-maximum suppression (keep a pixel only if its gradient magnitude is the maximum along the gradient direction, quantised to 0°, 45°, 90°, 135°), 3) hysteresis: pixels above the high threshold are edges; pixels between low and high are kept only when connected to a strong pixel. The result is thin, connected edges.
The test image is synthetic (smooth background, three kinds of shape, Gaussian noise), so the true outlines are known exactly. Precision is the fraction of detected edge pixels that lie within 2 pixels of a true outline; recall is the fraction of true outline pixels that have a detection within 2 pixels; F1 is their harmonic mean.
Simplifications: integer-pixel grid, gradient direction quantised to four sectors, an automatic low = 0.4 × high threshold ratio, no sub-pixel localisation, and the outlines of a blurred, noisy image are only approximately the shapes' edges. An uploaded photograph is processed locally in your browser and not sent anywhere; it has no ground truth so the accuracy readouts then show "n/a".