Class EhicRecognizerParameters
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class EhicRecognizerParameters implements Parcelable
-
-
Field Summary
Fields Modifier and Type Field Description private final List<EhicCountryType>
acceptedCountries
private final Integer
minBirthYear
private final Integer
maxBirthYear
private final Integer
minExpirationYear
private final Integer
maxExpirationYear
private final Integer
maxCountryDetectionAttempts
private final Integer
maxAccumulatedFrameCount
private final Integer
minEqualFrameCount
-
Constructor Summary
Constructors Constructor Description EhicRecognizerParameters(List<EhicCountryType> acceptedCountries, Integer minBirthYear, Integer maxBirthYear, Integer minExpirationYear, Integer maxExpirationYear, Integer maxCountryDetectionAttempts, Integer maxAccumulatedFrameCount, Integer minEqualFrameCount)
-
Method Summary
Modifier and Type Method Description final List<EhicCountryType>
getAcceptedCountries()
List of allowed countries for the EHIC. final Integer
getMinBirthYear()
Minimum of birth-year final Integer
getMaxBirthYear()
Maximum of birth-year final Integer
getMinExpirationYear()
Minimum of card-expiration-year final Integer
getMaxExpirationYear()
Maximum ranges of card-expiration-year final Integer
getMaxCountryDetectionAttempts()
Maximum number of attempts before giving up on country detection. final Integer
getMaxAccumulatedFrameCount()
Maximum number of partial frame results to keep in cache while waiting to gather minEqualFrameCount equal results. final Integer
getMinEqualFrameCount()
Minimum number of accumulated frames that should have equal result for a field. -
-
Method Detail
-
getAcceptedCountries
final List<EhicCountryType> getAcceptedCountries()
List of allowed countries for the EHIC. If:
single country: validation rules for the given country are used starting from the first frame. If the country cannot be inferred or the inferred country doesn't match the given country, the result of recognize() will be IncompleteValidation.
multiple countries: the country is inferred from the card number first. Until the country is detected, the document fields are not OCR'd and accumulated. Once the country is inferred, the field accumulation starts and the inferred country validation rules are applied. If the country cannot be inferred or the inferred country doesn't match any of the countries in the list, the result status will be IncompleteValidation.
empty list: same as "multiple countries" with one additional detail. If the country cannot be inferred within
maxCountryDetectionAttempts
successive frames in which the part of the card number that stores the country code was successfully OCR'd, then the country is inferred to be Unknown and no validation rules are applied. Field accumulation then proceeds normally. In this case recognize() can eventually return Success and the document will have a CountryType of Unknown
-
getMinBirthYear
final Integer getMinBirthYear()
Minimum of birth-year
-
getMaxBirthYear
final Integer getMaxBirthYear()
Maximum of birth-year
-
getMinExpirationYear
final Integer getMinExpirationYear()
Minimum of card-expiration-year
-
getMaxExpirationYear
final Integer getMaxExpirationYear()
Maximum ranges of card-expiration-year
-
getMaxCountryDetectionAttempts
final Integer getMaxCountryDetectionAttempts()
Maximum number of attempts before giving up on country detection. After the specified number of attempts, the country field is considered to be unknown and validation is skipped. This option is neglected if allowedCountries contains only a single country,, which will be used for field validations.
-
getMaxAccumulatedFrameCount
final Integer getMaxAccumulatedFrameCount()
Maximum number of partial frame results to keep in cache while waiting to gather minEqualFrameCount equal results.
-
getMinEqualFrameCount
final Integer getMinEqualFrameCount()
Minimum number of accumulated frames that should have equal result for a field. Once satisfied, the corresponding field is considered to be successfully-recognized and won't be considered in the subsequent frames.
-
-
-
-