Class EuropeanHealthInsuranceCardRecognizerConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class EuropeanHealthInsuranceCardRecognizerConfiguration implements Parcelable
Configuration for the European health insurance card (EHIC) recognizer.
-
-
Field Summary
Fields Modifier and Type Field Description private List<EuropeanHealthInsuranceCardIssuingCountry>
allowedCountries
private Integer
minBirthYear
private Integer
maxBirthYear
private Integer
minExpirationYear
private Integer
maxExpirationYear
private Integer
maxCountryDetectionAttempts
private Integer
minEqualFrameCount
private Integer
maxAccumulatedFrameCount
-
Constructor Summary
Constructors Constructor Description EuropeanHealthInsuranceCardRecognizerConfiguration(Map<String, Object> source)
EuropeanHealthInsuranceCardRecognizerConfiguration(JSONObject json)
EuropeanHealthInsuranceCardRecognizerConfiguration(List<EuropeanHealthInsuranceCardIssuingCountry> allowedCountries, Integer minBirthYear, Integer maxBirthYear, Integer minExpirationYear, Integer maxExpirationYear, Integer maxCountryDetectionAttempts, Integer minEqualFrameCount, Integer maxAccumulatedFrameCount)
-
Method Summary
Modifier and Type Method Description final List<EuropeanHealthInsuranceCardIssuingCountry>
getAllowedCountries()
List of allowed countries for the EHIC. final Unit
setAllowedCountries(List<EuropeanHealthInsuranceCardIssuingCountry> allowedCountries)
List of allowed countries for the EHIC. final Integer
getMinBirthYear()
Minimum year of birth. final Unit
setMinBirthYear(Integer minBirthYear)
Minimum year of birth. final Integer
getMaxBirthYear()
Maximum year of birth. final Unit
setMaxBirthYear(Integer maxBirthYear)
Maximum year of birth. final Integer
getMinExpirationYear()
Minimum card expiration year. final Unit
setMinExpirationYear(Integer minExpirationYear)
Minimum card expiration year. final Integer
getMaxExpirationYear()
Maximum card expiration year. final Unit
setMaxExpirationYear(Integer maxExpirationYear)
Maximum card expiration year. final Integer
getMaxCountryDetectionAttempts()
Maximum number of attempts before giving up on country detection. final Unit
setMaxCountryDetectionAttempts(Integer maxCountryDetectionAttempts)
Maximum number of attempts before giving up on country detection. final Integer
getMinEqualFrameCount()
Minimum number of accumulated frames that should have equal result for a field. final Unit
setMinEqualFrameCount(Integer minEqualFrameCount)
Minimum number of accumulated frames that should have equal result for a field. final Integer
getMaxAccumulatedFrameCount()
Maximum number of partial frame results to keep in cache while waiting to gather minEqualFrameCount equal results. final Unit
setMaxAccumulatedFrameCount(Integer maxAccumulatedFrameCount)
Maximum number of partial frame results to keep in cache while waiting to gather minEqualFrameCount equal results. final JSONObject
toJson(ToJsonConfiguration config)
final EuropeanHealthInsuranceCardRecognizerConfiguration
clone()
final static EuropeanHealthInsuranceCardRecognizerConfiguration
default()
-
-
Constructor Detail
-
EuropeanHealthInsuranceCardRecognizerConfiguration
EuropeanHealthInsuranceCardRecognizerConfiguration(Map<String, Object> source)
-
EuropeanHealthInsuranceCardRecognizerConfiguration
EuropeanHealthInsuranceCardRecognizerConfiguration(JSONObject json)
-
EuropeanHealthInsuranceCardRecognizerConfiguration
EuropeanHealthInsuranceCardRecognizerConfiguration(List<EuropeanHealthInsuranceCardIssuingCountry> allowedCountries, Integer minBirthYear, Integer maxBirthYear, Integer minExpirationYear, Integer maxExpirationYear, Integer maxCountryDetectionAttempts, Integer minEqualFrameCount, Integer maxAccumulatedFrameCount)
-
-
Method Detail
-
getAllowedCountries
final List<EuropeanHealthInsuranceCardIssuingCountry> getAllowedCountries()
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.
-
setAllowedCountries
final Unit setAllowedCountries(List<EuropeanHealthInsuranceCardIssuingCountry> allowedCountries)
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 year of birth.
Default is 0
-
setMinBirthYear
final Unit setMinBirthYear(Integer minBirthYear)
Minimum year of birth.
Default is 0
-
getMaxBirthYear
final Integer getMaxBirthYear()
Maximum year of birth.
Default is 2999
-
setMaxBirthYear
final Unit setMaxBirthYear(Integer maxBirthYear)
Maximum year of birth.
Default is 2999
-
getMinExpirationYear
final Integer getMinExpirationYear()
Minimum card expiration year.
Default is 0
-
setMinExpirationYear
final Unit setMinExpirationYear(Integer minExpirationYear)
Minimum card expiration year.
Default is 0
-
getMaxExpirationYear
final Integer getMaxExpirationYear()
Maximum card expiration year.
Default is 2999
-
setMaxExpirationYear
final Unit setMaxExpirationYear(Integer maxExpirationYear)
Maximum card expiration year.
Default is 2999
-
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 ignored if allowedCountries is not empty.
Default is 5
-
setMaxCountryDetectionAttempts
final Unit setMaxCountryDetectionAttempts(Integer maxCountryDetectionAttempts)
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 ignored if allowedCountries is not empty.
Default is 5
-
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.
Default is 4
-
setMinEqualFrameCount
final Unit setMinEqualFrameCount(Integer minEqualFrameCount)
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.
Default is 4
-
getMaxAccumulatedFrameCount
final Integer getMaxAccumulatedFrameCount()
Maximum number of partial frame results to keep in cache while waiting to gather minEqualFrameCount equal results.
Default is 10
-
setMaxAccumulatedFrameCount
final Unit setMaxAccumulatedFrameCount(Integer maxAccumulatedFrameCount)
Maximum number of partial frame results to keep in cache while waiting to gather minEqualFrameCount equal results.
Default is 10
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final EuropeanHealthInsuranceCardRecognizerConfiguration clone()
-
default
final static EuropeanHealthInsuranceCardRecognizerConfiguration default()
-
-
-
-