SIMD-accelerated FAST corner detection on the $2 ESP32-S3
A developer used the ESP32-S3's 128-bit SIMD[1] instructions to implement the FAST[2] feature detector, reaching roughly twice the performance of the reference implementation. Throughput in the author's own tests rose from 5.1MP/s to 11.2MP/s, about 2.2x, and processing a QVGA (320×240) frame takes about 6ms, enough to handle a VGA 30fps stream.
The ESP32-S3 is a roughly $2 microcontroller with a dual-core CPU running at up to 240MHz, Wi-Fi and Bluetooth Low Energy, and its limited SIMD instruction set is documented in the technical reference manual. To experiment with code more complex than the examples available online, the author learned the basics of ESP32-S3 assembly and wrote a simple register allocator called basm.
The FAST pre-screening samples the pixels north, east, south and west of a center pixel and checks whether at least 3 of them differ from the center by more than a threshold. One vector register holds 16 8-bit values, so the implementation checks 16 center pixels at a time. The chip does not allow unaligned reads[3], so the code reads the adjacent aligned blocks and extracts the needed segment from two concatenated registers. Only signed 8-bit comparisons are supported and the SIMD instructions perform saturating arithmetic[4], so simple subtraction cannot produce the required range shift. Instead, pixel values are XORed with 0x80 to flip the most significant bit, whose place value in signed 8-bit representation is -128, moving the range [0, 255] to [-128, 127]. A SIMD score calculation function was also written using similar operations.
Read the original shraiwi.comDiscussion on GeekNews
Discussion
Commenters are struck by the price and ease of use: a complete ESP32-S3-Zero board with the chip, ceramic antenna, USB connector and LED costs $5.33 on AliExpress and an ESP32-C3-Zero is $2.80, and one reader notes the chip outperforms old computers like the Amstrad PC1512. Others mention alternatives such as the $0.81 BK7238 and the CH32V407 with the RISC-V vector extension, and complain that ESP32-S3 SIMD is very difficult to use. One reader questions how useful real-time corner detection at this level actually is in practice.
Sources
-
KRGeekNews KO
2달러 마이크로컨트롤러에서 SIMD로 컴퓨터 비전 가속하기
-
shraiwi.com
SIMD-accelerated computer vision on a $2 microcontroller


