Menu

SIMD-accelerated machine vision on an ESP32-S3
📰

SIMD-accelerated machine vision on an ESP32-S3

Adafruit Industries – Makers, hackers, artists, designers and engineers!·Anne Barela·18 days ago
#VUjqJ0x8
#adafruit#simd#shranav#wrote#fast
Reading 0:00
15s threshold

shranav wrote an accelerated FAST feature detector for the ESP32-S3 that uses the chip’s 128-bit SIMD instructions, and posted the writeup on shraiwi.com. It runs about twice as fast as the reference implementation and processes a QVGA 320×240 frame in roughly 6ms.

The ESP32-S3 supports a small set of SIMD instructions that are documented but not widely used. Only three code examples could be found online at the time of writing.

Getting the corner pre-test working meant dealing with two limitations. The instruction set has no misaligned reads, so the east and west pixel blocks had to be pulled out with an instruction that extracts a slice from two concatenated registers. Comparisons only work on signed 8-bit values, and all SIMD arithmetic saturates, so subtracting 128 to shift the range would clamp instead of wrap. The fix is XOR with 0x80, which flips the top bit and gives the same result.

Throughput went from 5.1MP/s to 11.2MP/s, enough for a 30fps VGA stream.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.