Giter Club home page Giter Club logo

Comments (9)

i1E avatar i1E commented on June 30, 2024 1

Hi longph92,
to get the image, you first have to enable this option in recognizer that you use, for example if you use MRTD recognizer, you should use method setShowFullDocument:

 ...
 MRTDRecognizerSettings mrtd = new MRTDRecognizerSettings();
 // set to true to obtain images containing full document
 mrtd.setShowFullDocument(true);
 ...

When you are creating the intent for one of the provided scan activities, you have to send the ImageListener and desired ImageMetadataSettings:

 Intent intent = new Intent(this, ScanCard.class);
 ...
 MetadataSettings.ImageMetadataSettings ims = new MetadataSettings.ImageMetadataSettings();
 // sets whether image that was used to obtain valid scanning result will be available
 ims.setSuccessfulScanFrameEnabled(true);
 intent.putExtra(ScanActivity.EXTRAS_IMAGE_METADATA_SETTINGS, ims);
 intent.putExtra(ScanActivity.EXTRAS_IMAGE_LISTENER, new MyImageListener());
 ...

You can find more information and an example how to implement ImageListener in our documentation.

When you obtain the image, you can use convertToBitmap() method to get the bitmap.

from blinkid-android.

longphandev avatar longphandev commented on June 30, 2024

Hi @i1E ,
It's returned the result but I don't know why the bitmap cannot save to sdcard, it's always throws FileNotFoundException. I had tried many method to save the bitmap but still not work :(. So thank for your answers, it's helpful 👍

from blinkid-android.

longphandev avatar longphandev commented on June 30, 2024

Hi @i1E ,
I had found the issue from my device on 6.0, it's denied the permission to write to sdcard. So now I want to crop the card only instead of full image. So is it possible?

from blinkid-android.

i1E avatar i1E commented on June 30, 2024

Hi,
to save bitmap to sdcard, you have to obtain permissions for external storage. If you use API level >= 23, working with permissions is described here.

To get dewarped(cropped) images, you have to enable that option in ImageMetadataSettings by using setDewarpedImageEnabled method.

...
MetadataSettings.ImageMetadataSettings ims = new MetadataSettings.ImageMetadataSettings();
// sets whether image that was used to obtain valid scanning result will be available
// don't enable this, if you want only dewarped(cropped) images
// ims.setSuccessfulScanFrameEnabled(true);

// sets whether dewarped(cropped) image should be available in MetadataListener
ims.setDewarpedImageEnabled(true);
...

from blinkid-android.

longphandev avatar longphandev commented on June 30, 2024

Hi @i1E ,
It's worked perfect, thank you so much. The BlinkID just only support scan German and UK driver's licenses right? Because my project need to scan a French driver's license.

from blinkid-android.

i1E avatar i1E commented on June 30, 2024

Hi @longph92 ,
for now, it is possible to scan German, UK and US driver's licenses with BlinkID SDK. In the future, we plan to support scanning of driver's licenses from other countries, but at this moment we don't know exactly when we will support the French driver's licenses.

Thanks for your interest.

from blinkid-android.

DoDoENT avatar DoDoENT commented on June 30, 2024

Hi @longph92,

currently BlinkID supports only scanning of US Driver's License 2D barcodes, MRZ documents (passports and IDs containing machine readable zone), german and UK driver's licences.

If you could provide us with examples of French driver's licences, we would be happy to add support for them (we do not have any samples, so we cannot add support blindly).

We will not share any private data found on these licenses - the images of licences will only be used to develop data extraction methods needed to add 1st class support for French driver's licences. You can send images of French driver's licences samples to [email protected].

from blinkid-android.

DoDoENT avatar DoDoENT commented on June 30, 2024

Hi @longph92,

can we close this issue?

from blinkid-android.

DoDoENT avatar DoDoENT commented on June 30, 2024

Hi @i1E ,
I'm very interesting with blinkID and now I'm implementing the demo project with scan France and Mexican. So how can I setting for each country? it's means the user can be scan 1 type of card only at the moment.

Hi @longph92! French and Mexican IDs and driver's licences are currently not supported out of the box. However, since v2.6.0 we added support for Templating API which gives you possibility to add support for custom documents. Here you can find two examples of how Templating API could be used to add support for Croatian ID cards. You can use the same approach for Mexican and French documents.

from blinkid-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.