Snake edge detection is coded, but further optimization is necessary.