ZXing convert Bitmap to BinaryBitmap

后端 未结 3 1092
难免孤独
难免孤独 2020-12-04 20:19

I am using OpenCV and Zxing, and I\'d like to add 2d code scanning. I have a few types of images that I could send. Probably the best is Bitmat (the other option is OpenCV

3条回答
  •  甜味超标
    2020-12-04 21:11

    Bitmap is an Android class. Android's default image format from the camera is a planar YUV format. That is why only PlanarYUVLuminanceSource is needed and exists for Android. RGBLuminanceSource would have to be ported.

    You are putting completely the wrong kind of data into the class. It is expecting pixels in YUV planar format. You are passing compressed bytes of a JPEG file.

提交回复
热议问题