bitluni/LEDWallCamera

refactoring downsample?

Opened this issue · 2 comments

So, what I was playing with is instead using something like

    sensor->set_quality(sensor, 35);

And then don't bother with averaging every block of 4*4 pixels, but instead just skip across the pixels like

    unsigned char p[3];
    getPixel(x * 4, y * 4, frame, p);
    newImage[y][x][0] = p[0];
    newImage[y][x][1] = p[1];
    newImage[y][x][2] = p[2];

Thanks for the suggestion, nice trick!
I didn't see the need for optimization yet but that would be a way.
I'd kick the down sampling first, too. Since the resolution is so low there was no need though

Yup. I've been using your code with https://github.com/JanKlopper/pixelvloed which basically sends the pixels over UDP and I quickly ran in to memory problems with the ESP, so I figured I'd try to cut costs where I could :)