4

I successfully implemented vision library by Google sample and it successfully scanned bar codes and returns a string. I also want bar-code image so my question is how to get image of bar-code or a preview image?

Note: Code is based on git hub sample of google vision library.

abielita
  • 13,147
  • 2
  • 17
  • 59
Mayank Sharma
  • 2,735
  • 21
  • 26
  • It would be nice if you could provide some code and show us what you have tried so far – ekstroem Feb 26 '16 at 12:43
  • You can get the image using [BitmapFactory.decodeResource](http://developer.android.com/reference/android/graphics/BitmapFactory.html) which returns the bitmap. Example: `Bitmap myBitmap= BitmapFactory.decodeResource(getApplicationContext().getResources(),R.drawable.qrcode);`. You can find it in this [tutorial](http://arjunu.com/2015/08/android-barcode-detection-tracking-using-mobile-vision-api/). – abielita Feb 27 '16 at 10:18
  • R.drawable.q‌​rcode is applicable when there is a image in drawable . we scan qrcode from camera and it returns only string . so this method is not use in my code . and here is the code which im used to scan qr https://github.com/googlesamples/android-vision/tree/master/visionSamples/barcode-reader – Mayank Sharma Feb 29 '16 at 04:05
  • @Mayank Sharma Have You got anything? I am looking for the same! – Akash Dubey Aug 09 '16 at 07:16
  • 1
    yes i had got the solution but there is full view of image means only barcode is not possible you can extract full image from camera class – Mayank Sharma Aug 09 '16 at 07:32

0 Answers0