arduino-libraries / Arduino_OV767X

Official OV767X Library for Arduino , currently supports OV7670 and OV7675 cameras
https://www.arduino.cc/reference/en/libraries/arduino_ov767x/
GNU General Public License v2.0
68 stars 25 forks source link

Grayscale mode added #1

Closed 8bitkick closed 4 years ago

8bitkick commented 4 years ago

This patch adds an 8-bit grayscale mode that halves the image buffer needed by the MCU and presents the image data in the format the TensorFlowLite Micro person detection example expects.

Grayscale mode is selected in a similar way to the existing RGB565 or YUV422 color formats:

Camera.begin(QVGA, GRAYSCALE, 1)

Note - the grayscale option is in fact requesting YUV422 from the camera, but is disposing the U and V bytes and only storing Y to the data array in a Camera.readFrame(dataArray) call - so only 1 byte/pixel is required. HT @sandeepmistry