In my android app, I'm using an USB camera as image capturing method. For that I'm using UVCCamera library. Idea behind this is to read barcodes with this cameta, hence from this input, Bitmap is created and it will be decoded with ZBar library
But the problem i'm having now is, ZBar can read only "GRAY" and "Y800" image formats. So my question is how to read the Bitmap with ZBar.
I've tried the following method but it failed:
int[] intArray = new int[bMap.getWidth() * bMap.getHeight()];
bMap.getPixels( intArray, 0, bMap.getWidth(), 0, 0, bMap.getWidth(), bMap.getHeight() );
Image barcode = new Image(bMap.getWidth(), bMap.getWidth(), "RGB4");
barcode.setData(intArray);
imageScanner.scanImage(barcode2.convert("Y800"));
But as I do this, program crashes with "Fatal signal 11 (SIGSEGV)" message.
What would be the best way to scan this type of image, concerning the processing power and memory of the android device.
Thanks.