Skip to content

Instantly share code, notes, and snippets.

@litamin
litamin / ESP32-Cam Pixel Downsampling
Last active May 21, 2020 23:05
ESP32-Cam Pixel Downsampling - read out downsampled RGB pixels pretty pretty fast!
// Code based on BITLUNI's ESP32-cam work
// the size you want to downsample to
int newWidth = 40;
int newHeight = 30;
int DSF = 160 / newWidth; // Down Sampling Factor - ideally DSF should be 4, 8 or 16.. so that the bitshifting happening below is accurate
void downSample(unsigned char *frame)
{