A collection of standalone computer-vision projects running OpenCV directly on ESP32 microcontrollers — no host PC, no cloud, no Linux SBC. Each subdirectory is an independent ESP-IDF project with its own hardware setup and README.
dice_dice/ — Real-Time Dice Pip Counter (ESP32-S3)
Detects and counts dice pips from a live camera feed using a classical OpenCV pipeline (Otsu threshold, morphology, connected components) and shows the result as an animated overlay on an LCD.
legacy_project/color_code/ — RGB Pixel Detector & Histogram (2022)
No longer maintained, kept for reference. Reads the center pixel's RGB value and draws a real-time color histogram on an ESP32 TTGO T-Camera.
Running OpenCV on a microcontroller has historically required a manual cross-compilation of the library for the target toolchain. The projects in this repo reflect that evolution:
legacy_project/is based on joachimBurket/esp32-opencv, a hand cross-compiled OpenCV port for the ESP32 (Xtensa LX6). It is preserved for reference but is no longer used or maintained.dice_dice/and current/future projects instead use100312dog/opencv-mobile-prebuilt-newlib, a prebuilt OpenCV component distributed through the ESP-IDF Component Manager. Since it ships already built for the newlib toolchain, it can simply be added as a one-line dependency inidf_component.yml— no manual cross-compilation needed.
See each project's own README for hardware requirements, build instructions, and implementation details.
OpenCV on ESP32 is not the full desktop library — it only exposes a stripped-down subset that fits within the chip's limited flash and RAM:
- Only the
coreandimgprocmodules are available (basic matrix ops, filtering, thresholding, morphology, contours/connected components, histograms). Bothlegacy_projectanddice_diceare built against this same reduced module set. - No
dnn,ml,video,videoio,calib3d,features2d, orobjdetectmodules — no built-in face/object detection, optical flow, camera calibration, or neural-network inference. - No hardware-accelerated backends (CUDA/OpenCL) — everything runs single-threaded on the Xtensa/RISC-V CPU core, so complex algorithms are either too slow or too large to run at usable frame rates.
- As a result, every project here relies on classical, lightweight CV pipelines (grayscale conversion, Otsu thresholding, morphological filtering, connected-component analysis) rather than heavier techniques like deep-learning-based detection.




