A tiny, dependency-free computer vision library in C for embedded systems, drones, and robotics.
A tiny, dependency-free computer vision library in C for embedded systems, drones, and robotics.
Grayskull is a minimalist, dependency-free computer vision library designed for microcontrollers and other resource-constrained devices. It focuses on grayscale images and provides modern, practical algorithms that fit in a few kilobytes of code. Single-header design, integer-based operations, pure C99.
As usual, no dependencies, no dynamic memory allocation, no C++, no surprises. Just a single header file under 1KLOC.
Check out the examples folder for more!
Online demo: try Grayskull in your browser.
#include "grayskull.h"
struct gs_image img = gs_read_pgm("input.pgm");
struct gs_image blurred = gs_alloc(img.w, img.h);
struct gs_image binary = gs_alloc(img.w, img.h);
gs_blur(blurred, img, 2);
gs_threshold(binary, blurred, gs_otsu_theshold(blurred));
gs_write_pgm(binary, "output.pgm");
gs_free(img);
gs_free(blurred);
gs_free(binary);Note that gs_alloc/gs_free are optional helpers; you can allocate image pixel buffers any way you like.
…This project is licensed under the MIT License. Feel free to use in research, products, and your next embedded vision project!
No open issues yet, or sync has not completed.