Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get image from EUDL_COUNTRY_UK #108

Closed
BilalMH opened this issue Jun 19, 2018 · 9 comments
Closed

Get image from EUDL_COUNTRY_UK #108

BilalMH opened this issue Jun 19, 2018 · 9 comments
Assignees

Comments

@BilalMH
Copy link

BilalMH commented Jun 19, 2018

Before opening an issue, check that you are using the latest version of the BlinkID SDK.

Also, make sure your issue isn't on the list of common problems.


Description

Hi there, trying to get the image from the UK drivers licence. I've added the ImageListener and the ImageMetaDataSettings, but how can I apply this to the EUDLRecognizerSettings or how can I get it from those settings?

Thanks

Environment Details

BlinkID version: 3.14.0@aar

Device model:

Device Android version:

Device ABI (processor architecture, e.g. ARMv7):

@culoi
Copy link
Contributor

culoi commented Jun 20, 2018

Hello @BilalMH

You have to set receiving of the full document image for the EUDLRecognizer:

EUDLRecognizerSettings eudlSett = new EUDLRecognizerSettings();
eudlSett.setShowFullDocument(true); 

then in ImageMetadataSettings set return of the dewarped image.

MetadataSettings.ImageMetadataSettings ims = new MetadataSettings.ImageMetadataSettings();
        // enable obtaining of dewarped(cropped) images
        ims.setDewarpedImageEnabled(true);

Here is the sample for the MRTDRecognizer, you just have to switch MRTDRecognizer with EUDL.

https://github.com/BlinkID/blinkid-android/blob/master/BlinkIDSample/BlinkIDImageListenerSample/src/main/java/com/microblink/blinkid/MainActivity.java#L61-L93

Please let me know if you require any additional assistance.

Regards

@BilalMH
Copy link
Author

BilalMH commented Jun 20, 2018

Hi @culoi

Do I need to do anything with ims OnActivityResult?

Thanks

@culoi
Copy link
Contributor

culoi commented Jun 20, 2018

@BilalMH

I'm not quite sure what do you want to do with that, but the answer is no, you don't have to anything with ims in the OnActivityResult callback.

What are you trying to achieve?

Regards

@BilalMH
Copy link
Author

BilalMH commented Jun 20, 2018

@culoi

I'm trying to get the image as well as the licence details. I'm a bit confused as to how I get the image OnActivityResult callback. Could you point me to the right direction? I was confused with the sample apps.

Thanks

@BilalMH
Copy link
Author

BilalMH commented Jun 20, 2018

@culoi I'm getting a

java.lang.ClassCastException: com.microblink.recognizers.blinkid.eudl.EUDLRecognizerSettings cannot be cast to com.microblink.recognizers.settings.RecognitionSettings

But not sure what's going on as I'm following the documentation but with EUDL instead of MRTD

Any suggestions as to what's going on? Here is what I'm doing

`public void startMicroblink() {
Intent intent = new Intent(getActivity(), ScanCard.class);
intent.putExtra(ScanCard.EXTRAS_LICENSE_KEY, AppController.BLINKID_KEY);
EUDLRecognizerSettings settings = new EUDLRecognizerSettings(EUDLCountry.EUDL_COUNTRY_UK);

    settings.setShowFullDocument(true);
    
    MetadataSettings.ImageMetadataSettings ims = new MetadataSettings.ImageMetadataSettings();
    ims.setDewarpedImageEnabled(true);

    intent.putExtra(ScanCard.EXTRAS_RECOGNITION_SETTINGS, settings);
    intent.putExtra(ScanCard.EXTRAS_IMAGE_LISTENER, new BlinkIdImageListener());
    intent.putExtra(ScanCard.EXTRAS_IMAGE_METADATA_SETTINGS, ims);
    startActivityForResult(intent, 1);
}`

It won't let me do setRecognizerArrays with this so not sure what to do?

Thanks

@KavyaHarisha
Copy link

Anybody help me, my requirement was I want to scan the UK driving license with helpful neat code fully. I tried with EUDLRecognizerSettings eudlSett = new EUDLRecognizerSettings(); I cannot import the EDULRecognizerSetting class. Could you please help me here.
Advance thanks. I imported the SDK like below in the app gradle.
implementation('com.microblink:blinkid:4.0.0@aar') {
transitive = true
}

@DoDoENT
Copy link
Member

DoDoENT commented Jun 25, 2018

Hi @KavyaHarisha,

BlinkID v4.0.0 no longer has EUDLRecognizerSettings class. The 4.0.0 version now has completely new API, as described in release notes and in documentation.

For scanning UK driving license, you will now need EudlRecognizer. See a sample how it is used. Also, check a minimal sample app to get acquainted with the new API.

@KavyaHarisha
Copy link

KavyaHarisha commented Jun 25, 2018 via email

@culoi
Copy link
Contributor

culoi commented Sep 11, 2018

Closing the issue, please reopen if you have additional questions or contact us directly at support@microblink.com

@culoi culoi closed this as completed Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants