Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

/** ImageQA */
public class ImageQA {
public static final String SERIALIZED_NAME_BRIGHTNESS_THRESHOLD = "brightnessThreshold";

@SerializedName(SERIALIZED_NAME_BRIGHTNESS_THRESHOLD)
private Double brightnessThreshold;

public static final String SERIALIZED_NAME_DPI_THRESHOLD = "dpiThreshold";

@SerializedName(SERIALIZED_NAME_DPI_THRESHOLD)
Expand Down Expand Up @@ -52,6 +57,25 @@ public class ImageQA {
@SerializedName(SERIALIZED_NAME_DOCUMENT_POSITION_INDENT)
private Integer documentPositionIndent;

public ImageQA withBrightnessThreshold(Double brightnessThreshold) {
this.brightnessThreshold = brightnessThreshold;
return this;
}

/**
* Set the threshold for an actual document brightness below which the check fails
*
* @return brightnessThreshold
*/
@javax.annotation.Nullable
public Double getBrightnessThreshold() {
return brightnessThreshold;
}

public void setBrightnessThreshold(Double brightnessThreshold) {
this.brightnessThreshold = brightnessThreshold;
}

public ImageQA withDpiThreshold(Integer dpiThreshold) {
this.dpiThreshold = dpiThreshold;
return this;
Expand Down Expand Up @@ -197,7 +221,8 @@ public boolean equals(java.lang.Object o) {
return false;
}
ImageQA imageQA = (ImageQA) o;
return Objects.equals(this.dpiThreshold, imageQA.dpiThreshold)
return Objects.equals(this.brightnessThreshold, imageQA.brightnessThreshold)
&& Objects.equals(this.dpiThreshold, imageQA.dpiThreshold)
&& Objects.equals(this.angleThreshold, imageQA.angleThreshold)
&& Objects.equals(this.focusCheck, imageQA.focusCheck)
&& Objects.equals(this.glaresCheck, imageQA.glaresCheck)
Expand All @@ -209,6 +234,7 @@ public boolean equals(java.lang.Object o) {
@Override
public int hashCode() {
return Objects.hash(
brightnessThreshold,
dpiThreshold,
angleThreshold,
focusCheck,
Expand All @@ -222,6 +248,9 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ImageQA {\n");
sb.append(" brightnessThreshold: ")
.append(toIndentedString(brightnessThreshold))
.append("\n");
sb.append(" dpiThreshold: ").append(toIndentedString(dpiThreshold)).append("\n");
sb.append(" angleThreshold: ").append(toIndentedString(angleThreshold)).append("\n");
sb.append(" focusCheck: ").append(toIndentedString(focusCheck)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ public class ImageQualityCheckType {

/** Signals if the portrait is present */
public static final int Portrait = 7;

public static final int Brightness = 8;
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public class LCID {
/** Bulgarian */
public static final int BULGARIAN = 1026;

/** Burmese */
public static final int BURMESE = 1109;

/** Catalan */
public static final int CATALAN = 1027;

Expand Down Expand Up @@ -254,6 +257,9 @@ public class LCID {
/** Kazakh */
public static final int KAZAKH = 1087;

/** Khmer */
public static final int KHMER = 1107;

/** Konkani */
public static final int KONKANI = 1111;

Expand All @@ -275,6 +281,9 @@ public class LCID {
/** Malay (Brunei Darussalam) */
public static final int MALAY_BRUNEI_DARUSSALAM = 2110;

/** Maltese */
public static final int MALTESE = 1082;

/** Marathi */
public static final int MARATHI = 1102;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

/** ProcessParams */
public class ProcessParams {
public static final String SERIALIZED_NAME_CHECK_LIVENESS = "checkLiveness";

@SerializedName(SERIALIZED_NAME_CHECK_LIVENESS)
private Boolean checkLiveness = false;

public static final String SERIALIZED_NAME_LCID_IGNORE_FILTER = "lcidIgnoreFilter";

@SerializedName(SERIALIZED_NAME_LCID_IGNORE_FILTER)
private List<Integer> lcidIgnoreFilter = null;

public static final String SERIALIZED_NAME_ONE_SHOT_IDENTIFICATION = "oneShotIdentification";

@SerializedName(SERIALIZED_NAME_ONE_SHOT_IDENTIFICATION)
Expand Down Expand Up @@ -270,6 +280,53 @@ public class ProcessParams {
@SerializedName(SERIALIZED_NAME_RFID)
private ProcessParamsRfid rfid;

public ProcessParams withCheckLiveness(Boolean checkLiveness) {
this.checkLiveness = checkLiveness;
return this;
}

/**
* This parameter is used to enable document liveness check.
*
* @return checkLiveness
*/
@javax.annotation.Nullable
public Boolean getCheckLiveness() {
return checkLiveness;
}

public void setCheckLiveness(Boolean checkLiveness) {
this.checkLiveness = checkLiveness;
}

public ProcessParams withLcidIgnoreFilter(List<Integer> lcidIgnoreFilter) {
this.lcidIgnoreFilter = lcidIgnoreFilter;
return this;
}

public ProcessParams addLcidIgnoreFilterItem(Integer lcidIgnoreFilterItem) {
if (this.lcidIgnoreFilter == null) {
this.lcidIgnoreFilter = new ArrayList<Integer>();
}
this.lcidIgnoreFilter.add(lcidIgnoreFilterItem);
return this;
}

/**
* The list of LCID types to ignore during the recognition. If empty, values with all LCID types
* will be extracted. Narrowing down the list can reduce processing time. Empty by default.
*
* @return lcidIgnoreFilter
*/
@javax.annotation.Nullable
public List<Integer> getLcidIgnoreFilter() {
return lcidIgnoreFilter;
}

public void setLcidIgnoreFilter(List<Integer> lcidIgnoreFilter) {
this.lcidIgnoreFilter = lcidIgnoreFilter;
}

public ProcessParams withOneShotIdentification(Boolean oneShotIdentification) {
this.oneShotIdentification = oneShotIdentification;
return this;
Expand Down Expand Up @@ -1313,7 +1370,9 @@ public boolean equals(java.lang.Object o) {
return false;
}
ProcessParams processParams = (ProcessParams) o;
return Objects.equals(this.oneShotIdentification, processParams.oneShotIdentification)
return Objects.equals(this.checkLiveness, processParams.checkLiveness)
&& Objects.equals(this.lcidIgnoreFilter, processParams.lcidIgnoreFilter)
&& Objects.equals(this.oneShotIdentification, processParams.oneShotIdentification)
&& Objects.equals(this.useFaceApi, processParams.useFaceApi)
&& Objects.equals(this.faceApi, processParams.faceApi)
&& Objects.equals(this.doDetectCan, processParams.doDetectCan)
Expand Down Expand Up @@ -1368,6 +1427,8 @@ public boolean equals(java.lang.Object o) {
@Override
public int hashCode() {
return Objects.hash(
checkLiveness,
lcidIgnoreFilter,
oneShotIdentification,
useFaceApi,
faceApi,
Expand Down Expand Up @@ -1423,6 +1484,8 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ProcessParams {\n");
sb.append(" checkLiveness: ").append(toIndentedString(checkLiveness)).append("\n");
sb.append(" lcidIgnoreFilter: ").append(toIndentedString(lcidIgnoreFilter)).append("\n");
sb.append(" oneShotIdentification: ")
.append(toIndentedString(oneShotIdentification))
.append("\n");
Expand Down