An edge is a big local jump in intensity. Drag a scanline to plot gray value against pixel position and step through the full smooth, gradient, non-max suppression, and threshold pipeline.