I need to capture at least XGA (1024x768) images using RGB888 in order to successfully decode the barcodes, but this seems just not possible with the ESP-WHO board.
This is the C++ porting of ZXing library: https://github.com/nu-book/zxing-cpp
And this is actually the code that I am calling in order to decode the image:
Code: Select all
int w = 320; //width of the captured frame
int h = 240; //height of the captured frame
int channelsNo = 3; //R,G and B (3 channels from RGB888)
int rowBytes=w * channelsNo; //bytes per row
bool tryHarder = true; //tries to find the barcode with more than one scan
bool tryRotate = true; //tries to rotate the image
//From ZXing library, in order to decode the barcode inside the image (from fb->buf)
Result result = ReadBarcode(w, h, fb->buf, rowBytes, pixelBytes, 0, 1, 2, {}, tryRotate, tryHarder);