How computers find the outline of an apple using a tiny math window
Look at a fruit picture. The EDGE is where red suddenly becomes green or yellow. Draw a 3x3 window around one edge pixel. Count how many inside pixels touch the center. Now count how many outside pixels touch the center. If inside = 5 and outside = 4, the center is probably an EDGE. Computers find edges the same way: they count neighbors in a tiny window.