public class RecognitionSettings
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Class and Description |
|---|---|
static class |
RecognitionSettings.FrameQualityEstimationMode |
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<RecognitionSettings> |
CREATOR |
static int |
DETECTION_TEST_MODE
will perform only detection and will profile the performance of slip
detection
|
static int |
RECOGNITION_MODE
indicates normal scanning operation
|
static int |
RECOGNITION_TEST_MODE
will perform indefinite scan and will profile the performance of scans
|
| Constructor and Description |
|---|
RecognitionSettings() |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
RecognitionSettings.FrameQualityEstimationMode |
getFrameQualityEstimationMode() |
int |
getNumMsBeforeTimeout()
Returns the duration in milliseconds that needs to pass since scanning has begun in order to define timeout.
|
int |
getRecognitionMode() |
RecognizerSettings[] |
getRecognizerSettingsArray()
Returns the currently active recognizer settings array
|
void |
setAllowMultipleScanResultsOnSingleImage(boolean multiScan)
Sets whether or not outputting of multiple scan results from same image
is allowed.
|
void |
setFrameQualityEstimationMode(RecognitionSettings.FrameQualityEstimationMode mode)
Sets the mode of the frame quality estimation.
|
void |
setNumMsBeforeTimeout(int numMsBeforeTimeout)
Set the duration in milliseconds that needs to pass since scanning has begun in order to define timeout.
|
void |
setRecognitionMode(int recognitionMode)
This method is for debugging and testing purposes only.
|
void |
setRecognizerSettingsArray(RecognizerSettings[] settingsArray)
Set recognizer settings array that will be passed to native code.
|
boolean |
shouldAllowMultipleScanResultsOnSingleImage()
Returns true if multiple scan results can be obtained from single image.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final int RECOGNITION_MODE
public static final int RECOGNITION_TEST_MODE
public static final int DETECTION_TEST_MODE
public static final android.os.Parcelable.Creator<RecognitionSettings> CREATOR
public int getRecognitionMode()
public void setRecognitionMode(int recognitionMode)
recognitionMode - Mode of recognition. Allowed values are RECOGNITION_MODE (default),
RECOGNITION_TEST_MODE (recognition in the loop) and
DETECTION_TEST_MODE (detection in the loop, recognition disabled).public boolean shouldAllowMultipleScanResultsOnSingleImage()
public void setAllowMultipleScanResultsOnSingleImage(boolean multiScan)
public void setNumMsBeforeTimeout(int numMsBeforeTimeout)
BaseRecognitionResult
becomes available which is neither empty (BaseRecognitionResult.isEmpty()) nor valid
(BaseRecognitionResult.isValid()).
The reason for this is the better user experience in cases when for example timeout is set to 10
seconds and user starts scanning and leaves device lying on table for 9 seconds and then
points the device towards the object it wants to scan: in such case it is better to let that
user scan the object it wants instead of completing scan with empty scan result as soon as
10 seconds timeout ticks out.numMsBeforeTimeout - duration in millisecondspublic int getNumMsBeforeTimeout()
setNumMsBeforeTimeout(int)public void setFrameQualityEstimationMode(RecognitionSettings.FrameQualityEstimationMode mode)
mode - Desired mode of frame quality estimation.public RecognitionSettings.FrameQualityEstimationMode getFrameQualityEstimationMode()
public void setRecognizerSettingsArray(RecognizerSettings[] settingsArray)
settingsArray - array of recognizer settingspublic RecognizerSettings[] getRecognizerSettingsArray()
public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Object