Microcontroller-optimized image processing code for SNAPS project.