I am making an OCR project where i send images captured with my esp32-cam to my raspberry pi where i do OCR also store the image and a small database about the images and cameras itself. I want to send images with MQTT because i am also using MQTT to send configuration files config.json to my ESP32-Cam's i have more than one and i configure them from my raspberry.
Now here's the thing, while i am doing ocr i convert images to grayscale, ESP32-Cam has an ability to take pictures in grayscale format with config.pixel_format = PIXFORMAT_GRAYSCALE;
Now would it be better to send images captured with config.pixel_format =PIXFORMAT_GRAYSCALE; or config.pixel_format =PIXFORMAT_JPEG; ?
While sending the images with MQTT connection i have to change images to the Base64 format, JPEG images i capture are generally 250kb, while grayscale might be 800kb but would it give me better image quality if i do this so my ocr result would be better?
Thanks for any help.