Closed samirpramanik closed 1 year ago
Hi @samirpramanik
You can filter which document you want to scan with the classInfo
feature with the BlinkID recognizer.
With this feature, you can get the document type, country, and region.
More information here: https://blinkid.github.io/blinkid-android/com/microblink/entities/recognizers/blinkid/generic/BlinkIdCombinedRecognizer.html#setClassFilter-com.microblink.entities.recognizers.blinkid.generic.ClassFilter-
For instance, if you want to limit the scanning to only be for the Belgium ID, the sample code would be:
recognizer = new BlinkIdCombinedRecognizer();
recognizer.setClassFilter(new ClassFilter() {
@Override
public boolean classFilter(@NonNull ClassInfo classInfo) {
return classInfo.getCountry().equals(Country.BELGIUM) && classInfo.getType().equals(Type.ID);
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
});
Let me know if you have any additional questions.
Regards, Milan
Hello @samirpramanik,
Just wanted to make a follow-up here, is there anything else we could assist with?
Best regards, Anja
I have tried using the class filter, but it still scans a document with class type NONE and country NONE.
however im looking for class type ID only and country egypt
private val classFilter = object : ClassFilter {
override fun describeContents(): Int {
return 0
}
override fun writeToParcel(dest: Parcel?, flags: Int) {
// no-op
}
override fun classFilter(classInfo: ClassInfo): Boolean {
return classInfo.country == Country.EGYPT && classInfo.type == Type.ID
}
}
Hi @mohamadbadr,
Could you please contact us at support@microblink.com so we could inspect your license key and see where's the issue here?
Best regards, Anja
This issue was closed because it has been inactive for such a long time. If the issue persists, please open a new one.
Description
We are using your sample - BlinkID-CustomCombinedSample and the recognizer - BlinkIdCombinedRecognizer. We understand that this is a common recognizer for all documents, but we wish to restrict the recognizer to scan a specific type of document. Can this be achieved using any filters? For example while scanning passport, it should not recognize id card mrz.