diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html new file mode 100644 index 0000000..9445f63 --- /dev/null +++ b/docs/allclasses-frame.html @@ -0,0 +1,141 @@ + + + +
+ +public class BlinkOCRActivity +extends android.app.Activity +implements CameraEventsListener, ScanResultListener, MetadataListener, OnActivityFlipListener+
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+EXTRAS_CAMERA_VIDEO_PRESET
+Request usage of maximum possible camera resolution for performing a scan.
+ |
+
static java.lang.String |
+EXTRAS_HELP_INTENT
+Help activity called when help should be shown
+ |
+
static java.lang.String |
+EXTRAS_IMAGE_LISTENER
+Define an
+ImageListener that will obtain images that are being processed. |
+
static java.lang.String |
+EXTRAS_IMAGE_METADATA_SETTINGS
+Define a
+MetadataSettings.ImageMetadataSettings that will define
+ which images will be sent to ImageListener set via EXTRAS_IMAGE_LISTENER extra. |
+
static java.lang.String |
+EXTRAS_INFINITE_LOOP_SCAN
+If set to true, scan activity will never return
+ |
+
static java.lang.String |
+EXTRAS_LICENSE_KEY
+Key for setting the license key
+ |
+
static java.lang.String |
+EXTRAS_LICENSEE
+Key for setting the license owner
+ |
+
static java.lang.String |
+EXTRAS_RECOGNITION_RESULTS
+Recognition results after recognition
+ |
+
static java.lang.String |
+EXTRAS_SCAN_CONFIGURATION
+Key for setting scan configuration
+ |
+
static java.lang.String |
+EXTRAS_SCAN_RESULTS
+Key for obtaining scan results (if not scanning in infinite loop)
+ |
+
static java.lang.String |
+EXTRAS_SHOW_OCR_RESULT
+Defines whether OCR results will be displayed in UI
+ |
+
static java.lang.String |
+EXTRAS_SHOW_OCR_RESULT_MODE
+Defines how OCR results will be displayed in UI
+ |
+
static java.lang.String |
+EXTRAS_USE_LEGACY_CAMERA_API
+Force using legacy Camera API even on Lollipop devices that support new Camera2 API.
+ |
+
protected boolean |
+mShowOcrResult |
+
protected ShowOcrResultMode |
+mShowOcrResultMode |
+
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
Constructor and Description | +
---|
BlinkOCRActivity() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onActivityFlip()
+Called when activity is flipped.
+ |
+
void |
+onAutofocusFailed()
+This method will be called when camera focusing has failed.
+ |
+
void |
+onAutofocusStarted(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has started.
+ |
+
void |
+onAutofocusStopped(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has stopped.
+ |
+
void |
+onBtnAcceptClicked(android.view.View v) |
+
void |
+onBtnExitClicked(android.view.View v) |
+
void |
+onBtnFlashClicked(android.view.View v) |
+
void |
+onBtnHelpClicked(android.view.View v) |
+
void |
+onBtnSkipClicked(android.view.View view)
+Handler for skip button.
+ |
+
void |
+onCameraPermissionDenied()
+Called on Android 6.0 and newer when runtime camera permission was not given to the app.
+ |
+
void |
+onCameraPreviewStarted()
+Called just after camera preview has successfully
+ started and no exceptions occurred.
+ |
+
void |
+onCameraPreviewStopped()
+Called inside pause method of CameraView just haver camera preview has been stopped.
+ |
+
void |
+onConfigurationChanged(android.content.res.Configuration newConfig) |
+
protected void |
+onCreate(android.os.Bundle savedInstanceState) |
+
protected void |
+onDestroy() |
+
void |
+onError(java.lang.Throwable exc)
+Called when recognition results with exception.
+ |
+
void |
+onMetadataAvailable(Metadata metadata) |
+
protected void |
+onPause() |
+
void |
+onRequestPermissionsResult(int requestCode,
+ java.lang.String[] permissions,
+ int[] grantResults) |
+
protected void |
+onResume() |
+
void |
+onScanningDone(RecognitionResults results)
+This method is called when recognition is done.
+ |
+
protected void |
+onStart() |
+
protected void |
+onStop() |
+
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStateNotSaved, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestPermissions, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getResources, getTheme, setTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String EXTRAS_LICENSE_KEY+
public static final java.lang.String EXTRAS_LICENSEE+
public static final java.lang.String EXTRAS_SCAN_CONFIGURATION+
public static final java.lang.String EXTRAS_SCAN_RESULTS+
public static final java.lang.String EXTRAS_HELP_INTENT+
public static final java.lang.String EXTRAS_INFINITE_LOOP_SCAN+
public static final java.lang.String EXTRAS_SHOW_OCR_RESULT+
public static final java.lang.String EXTRAS_SHOW_OCR_RESULT_MODE+
public static final java.lang.String EXTRAS_RECOGNITION_RESULTS+
public static final java.lang.String EXTRAS_IMAGE_LISTENER+
ImageListener
that will obtain images that are being processed.
+ Make sure that your ImageListener implementation correctly implements Parcelable
+ interface with static CREATOR field. Without this, you might encounter a runtime error.public static final java.lang.String EXTRAS_IMAGE_METADATA_SETTINGS+
MetadataSettings.ImageMetadataSettings
that will define
+ which images will be sent to ImageListener
set via EXTRAS_IMAGE_LISTENER
extra.
+ If not set, ImageListener
set via EXTRAS_IMAGE_LISTENER
will receive all possible
+ images.public static final java.lang.String EXTRAS_CAMERA_VIDEO_PRESET+
public static final java.lang.String EXTRAS_USE_LEGACY_CAMERA_API+
protected boolean mShowOcrResult+
protected ShowOcrResultMode mShowOcrResultMode+
protected void onCreate(android.os.Bundle savedInstanceState)+
onCreate
in class android.app.Activity
public void onMetadataAvailable(Metadata metadata)+
onMetadataAvailable
in interface MetadataListener
protected void onStart()+
onStart
in class android.app.Activity
protected void onResume()+
onResume
in class android.app.Activity
public void onRequestPermissionsResult(int requestCode, + @NonNull + java.lang.String[] permissions, + @NonNull + int[] grantResults)+
onRequestPermissionsResult
in class android.app.Activity
protected void onPause()+
onPause
in class android.app.Activity
protected void onStop()+
onStop
in class android.app.Activity
protected void onDestroy()+
onDestroy
in class android.app.Activity
public void onConfigurationChanged(android.content.res.Configuration newConfig)+
onConfigurationChanged
in interface android.content.ComponentCallbacks
onConfigurationChanged
in class android.app.Activity
public void onActivityFlip()+
OnActivityFlipListener
onActivityFlip
in interface OnActivityFlipListener
public void onCameraPreviewStarted()+
CameraEventsListener
onCameraPreviewStarted
in interface CameraEventsListener
public void onCameraPreviewStopped()+
CameraEventsListener
onCameraPreviewStopped
in interface CameraEventsListener
public void onError(java.lang.Throwable exc)+
CameraEventsListener
onError
in interface CameraEventsListener
exc
- Exception that occurred during recognition.public void onCameraPermissionDenied()+
CameraEventsListener
onCameraPermissionDenied
in interface CameraEventsListener
public void onAutofocusFailed()+
AutofocusListener
onAutofocusFailed
in interface AutofocusListener
public void onAutofocusStarted(android.graphics.Rect[] focusAreas)+
AutofocusListener
onAutofocusStarted
in interface AutofocusListener
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlpublic void onAutofocusStopped(android.graphics.Rect[] focusAreas)+
AutofocusListener
onAutofocusStopped
in interface AutofocusListener
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlpublic void onScanningDone(RecognitionResults results)+
ScanResultListener
onScanningDone
in interface ScanResultListener
results
- Recognition results.public void onBtnExitClicked(android.view.View v)+
public void onBtnHelpClicked(android.view.View v)+
public void onBtnFlashClicked(android.view.View v)+
public void onBtnAcceptClicked(android.view.View v)+
public void onBtnSkipClicked(android.view.View view)+
public class RandomScanActivity +extends android.app.Activity +implements CameraEventsListener, ScanResultListener, MetadataListener, OnActivityFlipListener+
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+EXTRAS_BEEP_RESOURCE
+Resource ID of the sound which is to be played after the scanned field is recognized.
+ |
+
static java.lang.String |
+EXTRAS_CAMERA_VIDEO_PRESET
+Request usage of maximum possible camera resolution for performing a scan.
+ |
+
static java.lang.String |
+EXTRAS_HELP_INTENT
+Help activity called when help should be shown.
+ |
+
static java.lang.String |
+EXTRAS_IMAGE_LISTENER
+Define an
+ImageListener that will obtain images that are being processed. |
+
static java.lang.String |
+EXTRAS_IMAGE_METADATA_SETTINGS
+Define a
+MetadataSettings.ImageMetadataSettings that will define
+ which images will be sent to ImageListener set via EXTRAS_IMAGE_LISTENER extra. |
+
static java.lang.String |
+EXTRAS_LICENSE_KEY
+Key for setting the license key
+ |
+
static java.lang.String |
+EXTRAS_LICENSEE
+Key for setting the license owner
+ |
+
static java.lang.String |
+EXTRAS_RECOGNITION_RESULTS
+Recognition results after recognition.
+ |
+
static java.lang.String |
+EXTRAS_SCAN_CONFIGURATION
+Key for setting scan configuration, extra value is array of
+RandomScanElement s which
+ is used to set the parsers that will recognize text fields. |
+
static java.lang.String |
+EXTRAS_SCAN_MESSAGE
+String message that will be displayed above scanning window.
+ |
+
static java.lang.String |
+EXTRAS_SCAN_RESULTS
+Key for obtaining scan results.
+ |
+
static java.lang.String |
+EXTRAS_SHOW_OCR_RESULT
+Defines whether OCR results will be displayed inside the scanning window.
+ |
+
static java.lang.String |
+EXTRAS_SHOW_OCR_RESULT_MODE
+Defines how OCR results will be displayed in the scanning window.
+ |
+
static java.lang.String |
+EXTRAS_USE_LEGACY_CAMERA_API
+Force using legacy Camera API even on Lollipop devices that support new Camera2 API.
+ |
+
protected boolean |
+mShowOcrResult |
+
protected ShowOcrResultMode |
+mShowOcrResultMode |
+
static java.lang.String |
+STATE_SCANNED
+Key for obtaining scan results from saved state on activity restart.
+ |
+
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
Constructor and Description | +
---|
RandomScanActivity() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+hideBottomBar() |
+
void |
+hideFinishBottomBar() |
+
void |
+hideOverwriteConfirmBottomBar() |
+
void |
+initBottomBars() |
+
void |
+onActivityFlip()
+Called when activity is flipped.
+ |
+
void |
+onAutofocusFailed()
+This method will be called when camera focusing has failed.
+ |
+
void |
+onAutofocusStarted(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has started.
+ |
+
void |
+onAutofocusStopped(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has stopped.
+ |
+
void |
+onBtnExitClicked(android.view.View v) |
+
void |
+onBtnFlashClicked(android.view.View v) |
+
void |
+onBtnHelpClicked(android.view.View v) |
+
void |
+onCameraPermissionDenied()
+Called on Android 6.0 and newer when runtime camera permission was not given to the app.
+ |
+
void |
+onCameraPreviewStarted()
+Called just after camera preview has successfully
+ started and no exceptions occurred.
+ |
+
void |
+onCameraPreviewStopped()
+Called inside pause method of CameraView just haver camera preview has been stopped.
+ |
+
void |
+onConfigurationChanged(android.content.res.Configuration newConfig) |
+
protected void |
+onCreate(android.os.Bundle savedInstanceState) |
+
protected void |
+onDestroy() |
+
void |
+onError(java.lang.Throwable exc)
+Called when recognition results with exception.
+ |
+
void |
+onMetadataAvailable(Metadata metadata) |
+
protected void |
+onPause() |
+
void |
+onRequestPermissionsResult(int requestCode,
+ java.lang.String[] permissions,
+ int[] grantResults) |
+
protected void |
+onResume() |
+
protected void |
+onSaveInstanceState(android.os.Bundle outState) |
+
void |
+onScanningDone(RecognitionResults recognitionResults)
+This method is called when recognition is done.
+ |
+
protected void |
+onStart() |
+
protected void |
+onStop() |
+
void |
+setScanningActive(boolean active) |
+
void |
+showFinishBottomBar() |
+
void |
+showOverwriteConfirmBottomBar(java.lang.String fieldName,
+ android.view.View.OnClickListener confirmListener) |
+
protected void |
+soundNotification()
+Plays beep.
+ |
+
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPictureInPictureModeChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onSearchRequested, onStateNotSaved, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getAssets, getResources, getTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String EXTRAS_LICENSE_KEY+
public static final java.lang.String EXTRAS_LICENSEE+
public static final java.lang.String EXTRAS_SCAN_CONFIGURATION+
RandomScanElement
s which
+ is used to set the parsers that will recognize text fields.public static final java.lang.String EXTRAS_SCAN_MESSAGE+
public static final java.lang.String EXTRAS_SCAN_RESULTS+
public static final java.lang.String EXTRAS_HELP_INTENT+
public static final java.lang.String EXTRAS_SHOW_OCR_RESULT+
public static final java.lang.String EXTRAS_SHOW_OCR_RESULT_MODE+
public static final java.lang.String EXTRAS_BEEP_RESOURCE+
public static final java.lang.String EXTRAS_RECOGNITION_RESULTS+
public static final java.lang.String EXTRAS_IMAGE_LISTENER+
ImageListener
that will obtain images that are being processed.
+ Make sure that your ImageListener implementation correctly implements Parcelable
+ interface with static CREATOR field. Without this, you might encounter a runtime error.public static final java.lang.String EXTRAS_IMAGE_METADATA_SETTINGS+
MetadataSettings.ImageMetadataSettings
that will define
+ which images will be sent to ImageListener
set via EXTRAS_IMAGE_LISTENER
extra.
+ If not set, ImageListener
set via EXTRAS_IMAGE_LISTENER
will receive all possible
+ images.public static final java.lang.String EXTRAS_CAMERA_VIDEO_PRESET+
public static final java.lang.String EXTRAS_USE_LEGACY_CAMERA_API+
public static final java.lang.String STATE_SCANNED+
protected boolean mShowOcrResult+
protected ShowOcrResultMode mShowOcrResultMode+
protected void onCreate(android.os.Bundle savedInstanceState)+
onCreate
in class android.app.Activity
protected void onStart()+
onStart
in class android.app.Activity
protected void onResume()+
onResume
in class android.app.Activity
protected void onPause()+
onPause
in class android.app.Activity
protected void onStop()+
onStop
in class android.app.Activity
protected void onDestroy()+
onDestroy
in class android.app.Activity
protected void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class android.app.Activity
public void onScanningDone(@Nullable + RecognitionResults recognitionResults)+
ScanResultListener
onScanningDone
in interface ScanResultListener
recognitionResults
- Recognition results.public void onBtnExitClicked(android.view.View v)+
public void onBtnHelpClicked(android.view.View v)+
public void onBtnFlashClicked(android.view.View v)+
public void onConfigurationChanged(android.content.res.Configuration newConfig)+
onConfigurationChanged
in interface android.content.ComponentCallbacks
onConfigurationChanged
in class android.app.Activity
public void onRequestPermissionsResult(int requestCode, + @NonNull + java.lang.String[] permissions, + @NonNull + int[] grantResults)+
onRequestPermissionsResult
in class android.app.Activity
public void onCameraPreviewStarted()+
CameraEventsListener
onCameraPreviewStarted
in interface CameraEventsListener
public void onCameraPreviewStopped()+
CameraEventsListener
onCameraPreviewStopped
in interface CameraEventsListener
public void onError(java.lang.Throwable exc)+
CameraEventsListener
onError
in interface CameraEventsListener
exc
- Exception that occurred during recognition.public void onCameraPermissionDenied()+
CameraEventsListener
onCameraPermissionDenied
in interface CameraEventsListener
public void onAutofocusFailed()+
AutofocusListener
onAutofocusFailed
in interface AutofocusListener
public void onAutofocusStarted(android.graphics.Rect[] focusAreas)+
AutofocusListener
onAutofocusStarted
in interface AutofocusListener
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlpublic void onAutofocusStopped(android.graphics.Rect[] focusAreas)+
AutofocusListener
onAutofocusStopped
in interface AutofocusListener
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlpublic void onMetadataAvailable(Metadata metadata)+
onMetadataAvailable
in interface MetadataListener
public void onActivityFlip()+
OnActivityFlipListener
onActivityFlip
in interface OnActivityFlipListener
protected void soundNotification()+
public void initBottomBars()+
public void showOverwriteConfirmBottomBar(java.lang.String fieldName, + android.view.View.OnClickListener confirmListener)+
public void setScanningActive(boolean active)+
public void hideOverwriteConfirmBottomBar()+
public void showFinishBottomBar()+
public void hideFinishBottomBar()+
public void hideBottomBar()+
public class SegmentScanActivity +extends android.app.Activity +implements CameraEventsListener, ScanResultListener, MetadataListener, OnActivityFlipListener+
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+EXTRAS_CAMERA_VIDEO_PRESET
+Request usage of maximum possible camera resolution for performing a scan.
+ |
+
static java.lang.String |
+EXTRAS_HELP_INTENT
+Help activity called when help should be shown
+ |
+
static java.lang.String |
+EXTRAS_IMAGE_LISTENER
+Define an
+ImageListener that will obtain images that are being processed. |
+
static java.lang.String |
+EXTRAS_IMAGE_METADATA_SETTINGS
+Define a
+MetadataSettings.ImageMetadataSettings that will define
+ which images will be sent to ImageListener set via EXTRAS_IMAGE_LISTENER extra. |
+
static java.lang.String |
+EXTRAS_INFINITE_LOOP_SCAN
+If set to true, scan activity will never return
+ |
+
static java.lang.String |
+EXTRAS_LICENSE_KEY
+Key for setting the license key
+ |
+
static java.lang.String |
+EXTRAS_LICENSEE
+Key for setting the license owner
+ |
+
static java.lang.String |
+EXTRAS_RECOGNITION_RESULTS
+Recognition results after recognition
+ |
+
static java.lang.String |
+EXTRAS_SCAN_CONFIGURATION
+Key for setting scan configuration
+ |
+
static java.lang.String |
+EXTRAS_SCAN_RESULTS
+Key for obtaining scan results (if not scanning in infinite loop)
+ |
+
static java.lang.String |
+EXTRAS_SHOW_OCR_RESULT
+Defines whether OCR results will be displayed in UI
+ |
+
static java.lang.String |
+EXTRAS_SHOW_OCR_RESULT_MODE
+Defines how OCR results will be displayed in UI
+ |
+
static java.lang.String |
+EXTRAS_USE_LEGACY_CAMERA_API
+Force using legacy Camera API even on Lollipop devices that support new Camera2 API.
+ |
+
protected boolean |
+mShowOcrResult |
+
protected ShowOcrResultMode |
+mShowOcrResultMode |
+
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
Constructor and Description | +
---|
SegmentScanActivity() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onActivityFlip()
+Called when activity is flipped.
+ |
+
void |
+onAutofocusFailed()
+This method will be called when camera focusing has failed.
+ |
+
void |
+onAutofocusStarted(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has started.
+ |
+
void |
+onAutofocusStopped(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has stopped.
+ |
+
void |
+onBtnAcceptClicked(android.view.View v) |
+
void |
+onBtnExitClicked(android.view.View v) |
+
void |
+onBtnFlashClicked(android.view.View v) |
+
void |
+onBtnHelpClicked(android.view.View v) |
+
void |
+onBtnSkipClicked(android.view.View view)
+Handler for skip button.
+ |
+
void |
+onCameraPermissionDenied()
+Called on Android 6.0 and newer when runtime camera permission was not given to the app.
+ |
+
void |
+onCameraPreviewStarted()
+Called just after camera preview has successfully
+ started and no exceptions occurred.
+ |
+
void |
+onCameraPreviewStopped()
+Called inside pause method of CameraView just haver camera preview has been stopped.
+ |
+
void |
+onConfigurationChanged(android.content.res.Configuration newConfig) |
+
protected void |
+onCreate(android.os.Bundle savedInstanceState) |
+
protected void |
+onDestroy() |
+
void |
+onError(java.lang.Throwable exc)
+Called when recognition results with exception.
+ |
+
void |
+onMetadataAvailable(Metadata metadata) |
+
protected void |
+onPause() |
+
void |
+onRequestPermissionsResult(int requestCode,
+ java.lang.String[] permissions,
+ int[] grantResults) |
+
protected void |
+onResume() |
+
void |
+onScanningDone(RecognitionResults results)
+This method is called when recognition is done.
+ |
+
protected void |
+onStart() |
+
protected void |
+onStop() |
+
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPictureInPictureModeChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStateNotSaved, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getAssets, getResources, getTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String EXTRAS_LICENSE_KEY+
public static final java.lang.String EXTRAS_LICENSEE+
public static final java.lang.String EXTRAS_SCAN_CONFIGURATION+
public static final java.lang.String EXTRAS_SCAN_RESULTS+
public static final java.lang.String EXTRAS_HELP_INTENT+
public static final java.lang.String EXTRAS_INFINITE_LOOP_SCAN+
public static final java.lang.String EXTRAS_SHOW_OCR_RESULT+
public static final java.lang.String EXTRAS_SHOW_OCR_RESULT_MODE+
public static final java.lang.String EXTRAS_RECOGNITION_RESULTS+
public static final java.lang.String EXTRAS_IMAGE_LISTENER+
ImageListener
that will obtain images that are being processed.
+ Make sure that your ImageListener implementation correctly implements Parcelable
+ interface with static CREATOR field. Without this, you might encounter a runtime error.public static final java.lang.String EXTRAS_IMAGE_METADATA_SETTINGS+
MetadataSettings.ImageMetadataSettings
that will define
+ which images will be sent to ImageListener
set via EXTRAS_IMAGE_LISTENER
extra.
+ If not set, ImageListener
set via EXTRAS_IMAGE_LISTENER
will receive all possible
+ images.public static final java.lang.String EXTRAS_CAMERA_VIDEO_PRESET+
public static final java.lang.String EXTRAS_USE_LEGACY_CAMERA_API+
protected boolean mShowOcrResult+
protected ShowOcrResultMode mShowOcrResultMode+
protected void onCreate(android.os.Bundle savedInstanceState)+
onCreate
in class android.app.Activity
public void onMetadataAvailable(Metadata metadata)+
onMetadataAvailable
in interface MetadataListener
protected void onStart()+
onStart
in class android.app.Activity
protected void onResume()+
onResume
in class android.app.Activity
public void onRequestPermissionsResult(int requestCode, + @NonNull + java.lang.String[] permissions, + @NonNull + int[] grantResults)+
onRequestPermissionsResult
in class android.app.Activity
protected void onPause()+
onPause
in class android.app.Activity
protected void onStop()+
onStop
in class android.app.Activity
protected void onDestroy()+
onDestroy
in class android.app.Activity
public void onConfigurationChanged(android.content.res.Configuration newConfig)+
onConfigurationChanged
in interface android.content.ComponentCallbacks
onConfigurationChanged
in class android.app.Activity
public void onActivityFlip()+
OnActivityFlipListener
onActivityFlip
in interface OnActivityFlipListener
public void onCameraPreviewStarted()+
CameraEventsListener
onCameraPreviewStarted
in interface CameraEventsListener
public void onCameraPreviewStopped()+
CameraEventsListener
onCameraPreviewStopped
in interface CameraEventsListener
public void onError(java.lang.Throwable exc)+
CameraEventsListener
onError
in interface CameraEventsListener
exc
- Exception that occurred during recognition.public void onCameraPermissionDenied()+
CameraEventsListener
onCameraPermissionDenied
in interface CameraEventsListener
public void onAutofocusFailed()+
AutofocusListener
onAutofocusFailed
in interface AutofocusListener
public void onAutofocusStarted(android.graphics.Rect[] focusAreas)+
AutofocusListener
onAutofocusStarted
in interface AutofocusListener
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlpublic void onAutofocusStopped(android.graphics.Rect[] focusAreas)+
AutofocusListener
onAutofocusStopped
in interface AutofocusListener
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlpublic void onScanningDone(RecognitionResults results)+
ScanResultListener
onScanningDone
in interface ScanResultListener
results
- Recognition results.public void onBtnExitClicked(android.view.View v)+
public void onBtnHelpClicked(android.view.View v)+
public void onBtnFlashClicked(android.view.View v)+
public void onBtnAcceptClicked(android.view.View v)+
public void onBtnSkipClicked(android.view.View view)+
public enum ShowOcrResultMode +extends java.lang.Enum<ShowOcrResultMode> +implements android.os.Parcelable+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Enum Constant and Description | +
---|
ANIMATED_DOTS
+In place of character recognition, animated dot will be drawn
+ |
+
STATIC_CHARS
+In place of character recognition, recognized value will be drawn.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<ShowOcrResultMode> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
static ShowOcrResultMode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ShowOcrResultMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ShowOcrResultMode ANIMATED_DOTS+
public static final ShowOcrResultMode STATIC_CHARS+
public static final android.os.Parcelable.Creator<ShowOcrResultMode> CREATOR+
public static ShowOcrResultMode[] values()+
+for (ShowOcrResultMode c : ShowOcrResultMode.values()) + System.out.println(c); +
public static ShowOcrResultMode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
Class | +Description | +
---|---|
RandomScanActivity | +
+ Activity that is used for random scan which does not force the user to scan text fields in the
+ predefined order.
+ |
+
SegmentScanActivity | +
+ Created by dodo on 21/05/15.
+ |
+
Enum | +Description | +
---|---|
ShowOcrResultMode | +
+ Mode in which OCR result will be drawn on camera preview.
+ |
+
public class DecodingInfo
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DecodingInfo> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+DecodingInfo(long nativePtr)
+Constructor from native.
+ |
+
protected |
+DecodingInfo(android.os.Parcel in) |
+
|
+DecodingInfo(Rectangle position,
+ int dewarpHeight,
+ java.lang.String name)
+Decoding info constructor.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
protected void |
+finalize() |
+
long |
+getNativeContext() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<DecodingInfo> CREATOR+
public DecodingInfo(@NonNull + Rectangle position, + int dewarpHeight, + @NonNull + java.lang.String name)+
position
- Position in detected location that is interesting. Expressed as relative rectangle with respect to detected rectangle.dewarpHeight
- Height to which interesting location will be dewarped.name
- Name of this decoding info / location.public DecodingInfo(long nativePtr)+
nativePtr
- native contextprotected DecodingInfo(android.os.Parcel in)+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public long getNativeContext()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public static enum DetectorResult.DetectionCode +extends java.lang.Enum<DetectorResult.DetectionCode>+
Enum Constant and Description | +
---|
FAIL
+Indicates detection has failed, i.e.
+ |
+
FALLBACK
+Indicates object detection has succeeded, but in fallback mode.
+ |
+
SUCCESS
+Indicates object was detected successfully
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static DetectorResult.DetectionCode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static DetectorResult.DetectionCode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final DetectorResult.DetectionCode FAIL+
public static final DetectorResult.DetectionCode FALLBACK+
public static final DetectorResult.DetectionCode SUCCESS+
public static DetectorResult.DetectionCode[] values()+
+for (DetectorResult.DetectionCode c : DetectorResult.DetectionCode.values()) + System.out.println(c); +
public static DetectorResult.DetectionCode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract class DetectorResult
+extends java.lang.Object
+implements android.os.Parcelable
+Modifier and Type | +Class and Description | +
---|---|
static class |
+DetectorResult.DetectionCode |
+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
protected DetectorResult.DetectionCode |
+mDetectionCode
+Detection code which indicates the type of detection
+ |
+
protected DetectionStatus |
+mDetectionStatus
+Detection status which indicates the status of the detection
+ |
+
protected android.graphics.Matrix |
+mTransformMatrix |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+DetectorResult(int detectionCode,
+ int detectionStatus,
+ float[] transformMatrix)
+Constructor of base
+DetectorResult class. |
+
protected |
+DetectorResult(android.os.Parcel source)
+Initializes the object from the given
+Parcel . |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
DetectorResult.DetectionCode |
+getDetectionCode()
+Getter for detection code which indicates the type of detection.
+ |
+
protected java.lang.String |
+getDetectionCodeName()
+Returns the detection code name.
+ |
+
protected int |
+getDetectionCodeOrdinal()
+Returns the detection code as it is in the native library.
+ |
+
DetectionStatus |
+getDetectionStatus()
+Returns the detection status of the detector result.
+ |
+
protected void |
+setDetectionCode(int detectionCode)
+Sets the detection code member variable(s) based on detection code from native library.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected DetectorResult.DetectionCode mDetectionCode+
protected DetectionStatus mDetectionStatus+
protected android.graphics.Matrix mTransformMatrix+
protected DetectorResult(int detectionCode, + int detectionStatus, + float[] transformMatrix)+
DetectorResult
class.detectionCode
- Detection code from native library.detectionStatus
- Detection status from native library.transformMatrix
- Transformation matrix which can be used to transform this result's coordinate system into
+ coordinate system of visible camera frame normalized to unit rectangle.protected DetectorResult(android.os.Parcel source)+
Parcel
.source
- The parcel.public DetectorResult.DetectionCode getDetectionCode()+
protected void setDetectionCode(int detectionCode)+
detectionCode
- Detection code from native library.protected int getDetectionCodeOrdinal()+
protected java.lang.String getDetectionCodeName()+
public DetectionStatus getDetectionStatus()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public java.lang.String toString()+
toString
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public abstract class DetectorSettings
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
protected long |
+mNativeContext
+used for storing native DetectorSettings class
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+DetectorSettings()
+Default constructor.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
protected void |
+finalize()
+Invoked when the garbage collector has detected that this instance is no longer reachable.
+ |
+
long |
+getNativeContext()
+Returns the pointer containing native part of the implementation.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected long mNativeContext+
protected DetectorSettings()+
public long getNativeContext()+
protected void finalize() + throws java.lang.Throwable+
Note that objects that override finalize
are significantly more expensive than
+ objects that don't. Finalizers may be run a long time after the object is no longer
+ reachable, depending on memory pressure, so it's a bad idea to rely on them for cleanup.
+ Note also that finalizers are run on a single VM-wide finalizer thread,
+ so doing blocking work in a finalizer is a bad idea. A finalizer is usually only necessary
+ for a class that has a native peer and needs to call a native method to destroy that peer.
+ Even then, it's better to provide an explicit close
method (and implement
+ Closeable
), and insist that callers manually dispose of instances. This
+ works well for something like files, but less well for something like a BigInteger
+ where typical calling code would have to deal with lots of temporaries. Unfortunately,
+ code that creates lots of temporaries is the worst kind of code from the point of view of
+ the single finalizer thread.
+
If you must use finalizers, consider at least providing your own
+ ReferenceQueue
and having your own thread process that queue.
+
Unlike constructors, finalizers are not automatically chained. You are responsible for
+ calling super.finalize()
yourself.
+
Uncaught exceptions thrown by finalizers are ignored and do not terminate the finalizer + thread. +
+ See Effective Java Item 7, "Avoid finalizers" for more.finalize
in class java.lang.Object
java.lang.Throwable
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public static enum DocumentDetectorResult.ScreenOrientation +extends java.lang.Enum<DocumentDetectorResult.ScreenOrientation>+
Enum Constant and Description | +
---|
SCREEN_ORIENTATION_LANDSCAPE_LEFT
+Screen orientation is in left landscape mode (home button is left of screen)
+ |
+
SCREEN_ORIENTATION_LANDSCAPE_RIGHT
+Screen orientation is in right landscape mode (home button is right of screen)
+ |
+
SCREEN_ORIENTATION_PORTRAIT
+Screen orientation is in portrait mode (home button is below screen)
+ |
+
SCREEN_ORIENTATION_PORTRAIT_UPSIDE
+Screen orientation is in reverse portrait mode (home button is above screen)
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static DocumentDetectorResult.ScreenOrientation |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static DocumentDetectorResult.ScreenOrientation[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final DocumentDetectorResult.ScreenOrientation SCREEN_ORIENTATION_PORTRAIT+
public static final DocumentDetectorResult.ScreenOrientation SCREEN_ORIENTATION_LANDSCAPE_RIGHT+
public static final DocumentDetectorResult.ScreenOrientation SCREEN_ORIENTATION_PORTRAIT_UPSIDE+
public static final DocumentDetectorResult.ScreenOrientation SCREEN_ORIENTATION_LANDSCAPE_LEFT+
public static DocumentDetectorResult.ScreenOrientation[] values()+
+for (DocumentDetectorResult.ScreenOrientation c : DocumentDetectorResult.ScreenOrientation.values()) + System.out.println(c); +
public static DocumentDetectorResult.ScreenOrientation valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class DocumentDetectorResult +extends QuadDetectorResult+
DocumentDetectorSettings
.Modifier and Type | +Class and Description | +
---|---|
static class |
+DocumentDetectorResult.ScreenOrientation |
+
DetectorResult.DetectionCode
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DocumentDetectorResult> |
+CREATOR
+The parcelable CREATOR
+ |
+
mDetectionLocation, mDisplayLocation
mDetectionCode, mDetectionStatus, mTransformMatrix
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
DocumentDetectorResult(int detectionCode,
+ int detectionStatus,
+ float[] transformMatrix,
+ float[] detectionLocation,
+ float[] displayLocation,
+ int screenOrientation,
+ double aspectRatio)
+Constructor which uses the given parameters to initialize the object.
+ |
+
DocumentDetectorResult(android.os.Parcel source)
+Initializes the object from the given
+Parcel . |
+
Modifier and Type | +Method and Description | +
---|---|
double |
+getAspectRatio()
+Returns the aspect ratio of detected document.
+ |
+
DocumentDetectorResult.ScreenOrientation |
+getScreenOrientation()
+Returns the screen orientation in which document detection was performed.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
getDetectionLocation, getDisplayLocation, getTransformedDetectionLocation, getTransformedDisplayLocation
describeContents, getDetectionCode, getDetectionCodeName, getDetectionCodeOrdinal, getDetectionStatus, setDetectionCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<DocumentDetectorResult> CREATOR+
public DocumentDetectorResult(int detectionCode, + int detectionStatus, + float[] transformMatrix, + float[] detectionLocation, + float[] displayLocation, + int screenOrientation, + double aspectRatio)+
detectionCode
- Detection code from native library.detectionStatus
- Detection status from native library.transformMatrix
- Transformation matrix from native library.detectionLocation
- Location of the detection.displayLocation
- Display location.screenOrientation
- Screen orientation in moment when detection has been performed.aspectRatio
- Detection aspect ratio.public DocumentDetectorResult(android.os.Parcel source)+
Parcel
.source
- The parcel.public double getAspectRatio()+
public DocumentDetectorResult.ScreenOrientation getScreenOrientation()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class QuadDetectorResult
public java.lang.String toString()+
toString
in class QuadDetectorResult
public class DocumentDetectorSettings +extends DetectorSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DocumentDetectorSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+DocumentDetectorSettings(DocumentSpecification[] documentSpecifications)
+Constructor - requires array of document specifications that can be detected.
+ |
+
protected |
+DocumentDetectorSettings(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
int |
+getNumStableDetectionsThreshold()
+Retrieves the minimum number of stable detections
+ |
+
void |
+setDocumentSpecifications(DocumentSpecification[] documentSpecifications)
+Sets array of document specifications that can be detected.
+ |
+
void |
+setNumStableDetectionsThreshold(int numStableDetectionsThreshold)
+Sets minimum number of stable detections to return detector result
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
finalize, getNativeContext
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<DocumentDetectorSettings> CREATOR+
public DocumentDetectorSettings(@NonNull + DocumentSpecification[] documentSpecifications)+
documentSpecifications
- array of document specifications that can be detected. Array must contain at least one element.protected DocumentDetectorSettings(android.os.Parcel in)+
public void setNumStableDetectionsThreshold(int numStableDetectionsThreshold)+
numStableDetectionsThreshold
- minimum number of stable detections to return detector resultpublic int getNumStableDetectionsThreshold()+
public void setDocumentSpecifications(@NonNull + DocumentSpecification[] documentSpecifications)+
documentSpecifications
- array of document specifications that can be detected. Array must contain at least one element.public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class DetectorSettings
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorSettings
public class DocumentSpecification
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DocumentSpecification> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+DocumentSpecification(double aspectRatio,
+ DecodingInfo[] decodingInfos)
+Constructor, defines aspect ratio of document that needs to be detected and array of decoding infos
+ that control how detection will be dewarped.
+ |
+
|
+DocumentSpecification(double aspectRatio,
+ int dewarpHeight)
+Constructor, defines aspect ratio of document that needs to be detected and requested height of
+ image containing full dewarped document (same as creating
+DecodingInfo array with single
+ element containing Rectangle initialized with (0.f, 0.f, 1.f, 1.f) and given dewarp height). |
+
protected |
+DocumentSpecification(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
static DocumentSpecification |
+createFromPreset(DocumentSpecificationPreset preset)
+Creates a new document that will be detected from preset.
+ |
+
int |
+describeContents() |
+
protected void |
+finalize() |
+
double |
+getAspectRatio()
+Returns the aspect ratio of document that will be detected.
+ |
+
double[] |
+getLandscapeScale()
+Returns the scale and tolerance that will be used when detecting document in landscape orientation.
+ |
+
double |
+getMaxAngle()
+Retrieves maximum angle for document detection
+ |
+
double[] |
+getPortraitScale()
+Returns the scale and tolerance that will be used when detecting document in portrait orientation.
+ |
+
ScanningMode |
+getScanningMode()
+Returns the scanning mode that defines in which orientations can this document be detected.
+ |
+
double[] |
+getXRange()
+Gets the percentage of possible document offset on x axis.
+ |
+
double[] |
+getYRange()
+Gets the percentage of possible document offset on y axis.
+ |
+
void |
+setAspectRatio(double aspectRatio)
+Sets the aspect ratio of document that will be detected.
+ |
+
void |
+setDecodingInfos(DecodingInfo[] decodingInfos)
+Sets the array of decoding infos that control how detection will be dewarped.
+ |
+
void |
+setLandscapeScale(double scale,
+ double tolerance)
+Sets the scale and scale tolerance that will be used when detecting document in landscape orientation.
+ |
+
void |
+setMaxAngle(double maxAngle)
+Sets maximum angle for document detection.
+ |
+
void |
+setPortraitScale(double scale,
+ double tolerance)
+Sets the scale and scale tolerance that will be used when detecting document in portrait orientation.
+ |
+
void |
+setScale(double scale,
+ double tolerance)
+Sets the scale and scale tolerance that will be used when detecting document in both orientations.
+ |
+
void |
+setScanningMode(ScanningMode mode)
+Sets the scanning mode that defines in which orientations can this document be detected.
+ |
+
void |
+setXRange(double leftRange,
+ double rightRange)
+Sets percentage of possible document offset on x axis.
+ |
+
void |
+setYRange(double aboveRange,
+ double belowRange)
+Sets percentage of possible document offset on y axis.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<DocumentSpecification> CREATOR+
public DocumentSpecification(double aspectRatio, + @NonNull + DecodingInfo[] decodingInfos)+
aspectRatio
- Aspect ratio of the document, must be positivedecodingInfos
- Array of decoding infos containing information about detection dewarps. Must contain at least one element.public DocumentSpecification(double aspectRatio, + int dewarpHeight)+
DecodingInfo
array with single
+ element containing Rectangle
initialized with (0.f, 0.f, 1.f, 1.f) and given dewarp height).aspectRatio
- Aspect ratio of the document, must be positivedewarpHeight
- Height to which document will be dewarped.protected DocumentSpecification(android.os.Parcel in)+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public double getAspectRatio()+
public void setAspectRatio(double aspectRatio)+
aspectRatio
- aspect ratio of document, must be positivepublic ScanningMode getScanningMode()+
public void setScanningMode(ScanningMode mode)+
mode
- scanning mode that defines in which orientations can this document be detected.public void setLandscapeScale(double scale, + double tolerance)+
scale
- Ideal scale defined as percentage of frame height at which document should be detected.tolerance
- Scale tolerance is number that together with scale defines scale interval at which
+ document can be detected. Scale interval is [scale-tolerance, scale+tolerance]public double[] getLandscapeScale()+
public void setPortraitScale(double scale, + double tolerance)+
scale
- Ideal scale defined as percentage of frame height at which document should be detected.tolerance
- Scale tolerance is number that together with scale defines scale interval at which
+ document can be detected. Scale interval is [scale-tolerance, scale+tolerance]public double[] getPortraitScale()+
public void setScale(double scale, + double tolerance)+
setPortraitScale(double, double)
and setLandscapeScale(double, double)
with same parameters.scale
- Ideal scale defined as percentage of frame height at which document should be detected.tolerance
- Scale tolerance is number that together with scale defines scale interval at which
+ document can be detected. Scale interval is [scale-tolerance, scale+tolerance]public void setMaxAngle(double maxAngle)+
maxAngle
- maximum angle for document detection. Allowed values are in interval [0, 35].public double getMaxAngle()+
public void setXRange(double leftRange, + double rightRange)+
leftRange
- possible left offset of centre. Value must be in range [-1, 0].rightRange
- possible right offset of centre. Value must be in range [0, 1]public double[] getXRange()+
public void setYRange(double aboveRange, + double belowRange)+
aboveRange
- possible offset above centre. Value must be in range [-1, 0].belowRange
- possible offset below centre. Value must be in range [0, 1]public double[] getYRange()+
public void setDecodingInfos(@NonNull + DecodingInfo[] decodingInfos)+
decodingInfos
- Array of decoding infos containing information about detection dewarps. Must contain at least one element.public static DocumentSpecification createFromPreset(@NonNull + DocumentSpecificationPreset preset)+
preset
- Preset defining which document detection settings should be created.public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public enum DocumentSpecificationPreset +extends java.lang.Enum<DocumentSpecificationPreset>+
Enum Constant and Description | +
---|
DOCUMENT_SPECIFICATION_PRESET_A4_LANDSCAPE
+Uses detection settings for detection of A4 documents in landscape orientation (for example printed presentation slides)
+ |
+
DOCUMENT_SPECIFICATION_PRESET_A4_PORTRAIT
+Uses detection settings for detection of A4 documents in portrait orientation (for example invoices)
+ |
+
DOCUMENT_SPECIFICATION_PRESET_CHEQUE
+Uses detections settings for detecting cheques
+ |
+
DOCUMENT_SPECIFICATION_PRESET_ID1_CARD
+Uses detection settings for detecting ID1 card format as explained here.
+ |
+
DOCUMENT_SPECIFICATION_PRESET_ID2_CARD
+Uses detection settings for detecting ID1 card format as explained here.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static DocumentSpecificationPreset |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static DocumentSpecificationPreset[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final DocumentSpecificationPreset DOCUMENT_SPECIFICATION_PRESET_ID1_CARD+
public static final DocumentSpecificationPreset DOCUMENT_SPECIFICATION_PRESET_ID2_CARD+
public static final DocumentSpecificationPreset DOCUMENT_SPECIFICATION_PRESET_CHEQUE+
public static final DocumentSpecificationPreset DOCUMENT_SPECIFICATION_PRESET_A4_PORTRAIT+
public static final DocumentSpecificationPreset DOCUMENT_SPECIFICATION_PRESET_A4_LANDSCAPE+
public static DocumentSpecificationPreset[] values()+
+for (DocumentSpecificationPreset c : DocumentSpecificationPreset.values()) + System.out.println(c); +
public static DocumentSpecificationPreset valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic enum ScanningMode +extends java.lang.Enum<ScanningMode>+
Enum Constant and Description | +
---|
SCANNING_MODE_AUTO |
+
SCANNING_MODE_LANDSCAPE |
+
SCANNING_MODE_PORTRAIT |
+
Modifier and Type | +Method and Description | +
---|---|
static ScanningMode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ScanningMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ScanningMode SCANNING_MODE_LANDSCAPE+
public static final ScanningMode SCANNING_MODE_PORTRAIT+
public static final ScanningMode SCANNING_MODE_AUTO+
public static ScanningMode[] values()+
+for (ScanningMode c : ScanningMode.values()) + System.out.println(c); +
public static ScanningMode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullClass | +Description | +
---|---|
DocumentDetectorResult | +
+ Represents a detector result created by Document detector initialised with
+DocumentDetectorSettings . |
+
DocumentDetectorSettings | +
+ Settings for document detector.
+ |
+
DocumentSpecification | +
+ Class representing specificatio of document that can be detected with DocumentDetector.
+ |
+
Enum | +Description | +
---|---|
DocumentDetectorResult.ScreenOrientation | ++ |
DocumentSpecificationPreset | +
+ Created by dodo on 20/10/15.
+ |
+
ScanningMode | +
+ Represents a mode in which detector scanning will be performed.
+ |
+
public class FaceDetectorResult +extends DetectorResult+
DetectorResult.DetectionCode
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<FaceDetectorResult> |
+CREATOR
+The parcelable CREATOR
+ |
+
mDetectionCode, mDetectionStatus, mTransformMatrix
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
FaceDetectorResult(int detectionCode,
+ int detectionStatus,
+ float[] transformMatrix,
+ float[] faceLocations)
+Constructor which uses the given parameters to initialize the object.
+ |
+
FaceDetectorResult(android.os.Parcel source)
+Initializes the object from the given
+Parcel . |
+
Modifier and Type | +Method and Description | +
---|---|
Quadrilateral[] |
+getDetectionLocations()
+Returns the location of detections in coordinate system of image on which detection was performed.
+ |
+
Quadrilateral[] |
+getTransformedDetectionLocations()
+Returns the location of detections in normalized coordinate system of visible camera frame.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, getDetectionCode, getDetectionCodeName, getDetectionCodeOrdinal, getDetectionStatus, setDetectionCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<FaceDetectorResult> CREATOR+
public FaceDetectorResult(int detectionCode, + int detectionStatus, + float[] transformMatrix, + float[] faceLocations)+
detectionCode
- Detection code from native library.detectionStatus
- Detection status from native library.transformMatrix
- Transformation matrix which can be used to transform this result's coordinate system into
+ coordinate system of visible camera frame normalized to unit rectangle.faceLocations
- Location of the detectionspublic FaceDetectorResult(android.os.Parcel source)+
Parcel
.source
- The parcel.public Quadrilateral[] getDetectionLocations()+
public Quadrilateral[] getTransformedDetectionLocations()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorResult
public java.lang.String toString()+
toString
in class DetectorResult
public class FaceDetectorSettings +extends DetectorSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<FaceDetectorSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+FaceDetectorSettings(DecodingInfo decodingInfo)
+Constructor, defines decoding info that controls how detection will be dewarped.
+ |
+
|
+FaceDetectorSettings(int dewarpHeight)
+Constructor, defines requested height of image that contains dewarped detection (same as creating
+DecodingInfo
+ which contains Rectangle initialized with (0.f, 0.f, 1.f, 1.f) and given dewarp height). |
+
protected |
+FaceDetectorSettings(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
DecodingInfo |
+getDecodingInfo()
+Returns the decoding info that controls how detection will be dewarped.
+ |
+
void |
+setDecodingInfo(DecodingInfo decodingInfo)
+Sets the decoding info that controls how detection will be dewarped.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
finalize, getNativeContext
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<FaceDetectorSettings> CREATOR+
public FaceDetectorSettings(@NonNull + DecodingInfo decodingInfo)+
decodingInfo
- Info containing information about detection dewarppublic FaceDetectorSettings(int dewarpHeight)+
DecodingInfo
+ which contains Rectangle
initialized with (0.f, 0.f, 1.f, 1.f) and given dewarp height).dewarpHeight
- Height to which detection will be dewarpedprotected FaceDetectorSettings(android.os.Parcel in)+
public void setDecodingInfo(@NonNull + DecodingInfo decodingInfo)+
decodingInfo
- Decoding info containing information about detection dewarpspublic DecodingInfo getDecodingInfo()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class DetectorSettings
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorSettings
Class | +Description | +
---|---|
FaceDetectorResult | +
+ Created by igor on 07/03/16.
+ |
+
FaceDetectorSettings | +
+ Settings for face detector.
+ |
+
public class MultiDetectorResult +extends DetectorResult+
DetectorResult.DetectionCode
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<MultiDetectorResult> |
+CREATOR
+The parcelable CREATOR
+ |
+
mDetectionCode, mDetectionStatus, mTransformMatrix
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
MultiDetectorResult(int detectionCode,
+ int detectionStatus,
+ float[] transformMatrix,
+ long nativePtr)
+Constructor which uses the given parameters to initialize the object.
+ |
+
MultiDetectorResult(android.os.Parcel source)
+Initializes the object from the given
+Parcel . |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+finalize() |
+
DetectorResult[] |
+getDetectionResults()
+Getter for detection results.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, getDetectionCode, getDetectionCodeName, getDetectionCodeOrdinal, getDetectionStatus, setDetectionCode
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<MultiDetectorResult> CREATOR+
public MultiDetectorResult(int detectionCode, + int detectionStatus, + float[] transformMatrix, + long nativePtr)+
detectionCode
- Detection code from native library.detectionStatus
- Detection status from native library.transformMatrix
- Transformation matrix from native library.nativePtr
- Pointer to native object that holds the detection data.public MultiDetectorResult(android.os.Parcel source)+
Parcel
.source
- The parcel.public DetectorResult[] getDetectionResults()+
0
if there are no
+ results.protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorResult
public java.lang.String toString()+
toString
in class DetectorResult
public class MultiDetectorSettings +extends DetectorSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<MultiDetectorSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+MultiDetectorSettings(DetectorSettings[] settingsArray) |
+
protected |
+MultiDetectorSettings(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
void |
+setSettingsArray(DetectorSettings[] settingsArray)
+Sets the array of detectors settings that will be used in this
+ composite detector.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
finalize, getNativeContext
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<MultiDetectorSettings> CREATOR+
public MultiDetectorSettings(@NonNull + DetectorSettings[] settingsArray)+
protected MultiDetectorSettings(android.os.Parcel in)+
public void setSettingsArray(@NonNull + DetectorSettings[] settingsArray)+
settingsArray
- array of detector settingspublic int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class DetectorSettings
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorSettings
Class | +Description | +
---|---|
MultiDetectorResult | +
+ Represents a detector result which contains multiple different detector results.
+ |
+
MultiDetectorSettings | +
+ Created by dodo on 28/10/15.
+ |
+
Class | +Description | +
---|---|
DecodingInfo | +
+ Represents a part of detection that will be used later.
+ |
+
DetectorResult | +
+ Abstract detector result.
+ |
+
DetectorSettings | +
+ Created by dodo on 16/10/15.
+ |
+
Enum | +Description | +
---|---|
DetectorResult.DetectionCode | ++ |
public class PointsDetectorResult +extends DetectorResult+
DetectorResult.DetectionCode
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<PointsDetectorResult> |
+CREATOR |
+
mDetectionCode, mDetectionStatus, mTransformMatrix
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+PointsDetectorResult(int detectionCode,
+ int detectionStatus,
+ float[] transformMatrix,
+ float[] points)
+Constructor which uses given parameter to initialise the object.
+ |
+
protected |
+PointsDetectorResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
PointSet |
+getPointSet()
+Returns set of points of interest that represent the detection.
+ |
+
PointSet |
+getTransformedPointSet()
+Returns set of points of interest that represent the detection in normalized coordinate system of visible camera frame.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
getDetectionCode, getDetectionCodeName, getDetectionCodeOrdinal, getDetectionStatus, setDetectionCode, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<PointsDetectorResult> CREATOR+
public PointsDetectorResult(int detectionCode, + int detectionStatus, + float[] transformMatrix, + float[] points)+
detectionCode
- Detection code from native library.detectionStatus
- Detection status from native library.transformMatrix
- Transformation matrix from native library.points
- Points representing the detection resultprotected PointsDetectorResult(android.os.Parcel in)+
public PointSet getPointSet()+
public PointSet getTransformedPointSet()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class DetectorResult
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorResult
Class | +Description | +
---|---|
PointsDetectorResult | +
+ Represents a detector result consisting of multiple points of interest.
+ |
+
public class QuadDetectorResult +extends DetectorResult+
DetectorResult.DetectionCode
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<QuadDetectorResult> |
+CREATOR
+The parcelable CREATOR
+ |
+
protected Quadrilateral |
+mDetectionLocation
+The detection location.
+ |
+
protected Quadrilateral |
+mDisplayLocation
+The detection location modified for display in UI
+ |
+
mDetectionCode, mDetectionStatus, mTransformMatrix
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
QuadDetectorResult(int detectionCode,
+ int detectionStatus,
+ float[] transformMatrix,
+ float[] detectionLocation,
+ float[] displayLocation)
+Constructor which uses the given parameters to initialize the object.
+ |
+
QuadDetectorResult(android.os.Parcel source)
+Initializes the object from the given
+Parcel . |
+
Modifier and Type | +Method and Description | +
---|---|
Quadrilateral |
+getDetectionLocation()
+Returns the location of detection in coordinate system of image on which detection was performed.
+ |
+
Quadrilateral |
+getDisplayLocation()
+Returns the display location in coordinate system of image on which detection was performed.
+ |
+
Quadrilateral |
+getTransformedDetectionLocation()
+Returns the location of detection in normalized coordinate system of visible camera frame.
+ |
+
Quadrilateral |
+getTransformedDisplayLocation()
+Returns the display location in normalized coordinate system of visible camera frame.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, getDetectionCode, getDetectionCodeName, getDetectionCodeOrdinal, getDetectionStatus, setDetectionCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected Quadrilateral mDetectionLocation+
protected Quadrilateral mDisplayLocation+
public static final android.os.Parcelable.Creator<QuadDetectorResult> CREATOR+
public QuadDetectorResult(int detectionCode, + int detectionStatus, + float[] transformMatrix, + float[] detectionLocation, + float[] displayLocation)+
detectionCode
- Detection code from native library.detectionStatus
- Detection status from native library.transformMatrix
- Transformation matrix from native library.detectionLocation
- Location of the detection.public QuadDetectorResult(android.os.Parcel source)+
Parcel
.source
- The parcel.public Quadrilateral getDetectionLocation()+
public Quadrilateral getTransformedDetectionLocation()+
public Quadrilateral getDisplayLocation()+
getDetectionLocation()
,
+ however sometimes it can be different. While detection location is actually used to perform searching
+ of fields that need to be recognised, the display location is usually used for displaying the detection
+ feedback in UI.public Quadrilateral getTransformedDisplayLocation()+
getDisplayLocation()
.public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorResult
public java.lang.String toString()+
toString
in class DetectorResult
public abstract class QuadDetectorSettings +extends DetectorSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+QuadDetectorSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+initNativeFromParcel(android.os.Parcel in)
+Call this method from derived class after initializing native context.
+ |
+
void |
+setDecodingInfos(DecodingInfo[] decodingInfos) |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void setDecodingInfos(@NonNull + DecodingInfo[] decodingInfos)+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class DetectorSettings
@CallSuper +protected void initNativeFromParcel(android.os.Parcel in)+
in
- Parcel from which data is read.public static enum MRTDDetectorResult.MRTDDetectionCode +extends java.lang.Enum<MRTDDetectorResult.MRTDDetectionCode>+
Enum Constant and Description | +
---|
MRTD_TD1
+Represents a detection of full Machine Readable Travel Documents of type TD1
+ |
+
MRTD_TD2
+Represents a detection of full Machine Readable Travel Documents of type TD2
+ |
+
MRTD_TD3
+Represents a detection of full Machine Readable Travel Documents of type TD3
+ |
+
MRZ_TD1
+Represents a detection of machine readable zone of TD1 type of Machine Readable Travel Documents
+ |
+
MRZ_TD2
+Represents a detection of machine readable zone of TD2 type of Machine Readable Travel Documents
+ |
+
MRZ_TD3
+Represents a detection of machine readable zone of TD3 type of Machine Readable Travel Documents
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static MRTDDetectorResult.MRTDDetectionCode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static MRTDDetectorResult.MRTDDetectionCode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final MRTDDetectorResult.MRTDDetectionCode MRZ_TD1+
public static final MRTDDetectorResult.MRTDDetectionCode MRZ_TD2+
public static final MRTDDetectorResult.MRTDDetectionCode MRZ_TD3+
public static final MRTDDetectorResult.MRTDDetectionCode MRTD_TD1+
public static final MRTDDetectorResult.MRTDDetectionCode MRTD_TD2+
public static final MRTDDetectorResult.MRTDDetectionCode MRTD_TD3+
public static MRTDDetectorResult.MRTDDetectionCode[] values()+
+for (MRTDDetectorResult.MRTDDetectionCode c : MRTDDetectorResult.MRTDDetectionCode.values()) + System.out.println(c); +
public static MRTDDetectorResult.MRTDDetectionCode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class MRTDDetectorResult +extends QuadDetectorResult+
MRTDDetectorSettings
.Modifier and Type | +Class and Description | +
---|---|
static class |
+MRTDDetectorResult.MRTDDetectionCode
+MRZ - Machine Readable Zone
++ MRTD - Machine Readable Travel Document (Full Card) + + TD1 - Three Machine Readable Lines with 30 characters each + TD2 - Two Machine Readable Lines with 36 characters each + TD3 - Two Machine Readable Lines with 44 characters each |
+
DetectorResult.DetectionCode
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<MRTDDetectorResult> |
+CREATOR
+The parcelable CREATOR
+ |
+
mDetectionLocation, mDisplayLocation
mDetectionCode, mDetectionStatus, mTransformMatrix
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
MRTDDetectorResult(int detectionCode,
+ int detectionStatus,
+ float[] transformMatrix,
+ float[] detectionLocation,
+ float[] displayLocation,
+ float confidence,
+ long nativePtr)
+Constructor which uses the given parameters to initialize the object.
+ |
+
MRTDDetectorResult(android.os.Parcel source)
+Initializes the object from the given
+Parcel . |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+finalize() |
+
protected java.lang.String |
+getDetectionCodeName()
+Returns the detection code name.
+ |
+
protected int |
+getDetectionCodeOrdinal()
+Returns the detection code as it is in the native library.
+ |
+
int[] |
+getElementsCountPerLine()
+Returns the number of elements detected per OCR line.
+ |
+
MRTDDetectorResult.MRTDDetectionCode |
+getMRTDDetectionCode()
+Getter for detection code that is specific for results from MRTD detector and holds
+ information about detection type.
+ |
+
protected void |
+setDetectionCode(int detectionCode)
+Sets the detection code member variable(s) based on detection code from native library.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
getDetectionLocation, getDisplayLocation, getTransformedDetectionLocation, getTransformedDisplayLocation
describeContents, getDetectionCode, getDetectionStatus
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<MRTDDetectorResult> CREATOR+
public MRTDDetectorResult(int detectionCode, + int detectionStatus, + float[] transformMatrix, + float[] detectionLocation, + float[] displayLocation, + float confidence, + long nativePtr)+
detectionCode
- Detection code from native library.detectionStatus
- Detection status from native library.transformMatrix
- Transformation matrix from native library.detectionLocation
- Location of the detection.displayLocation
- Display locationconfidence
- Detection confidence.nativePtr
- Pointer to native object that holds the detection data.public MRTDDetectorResult(android.os.Parcel source)+
Parcel
.source
- The parcel.public int[] getElementsCountPerLine()+
@Nullable +public MRTDDetectorResult.MRTDDetectionCode getMRTDDetectionCode()+
null
.protected void setDetectionCode(int detectionCode)+
DetectorResult
setDetectionCode
in class DetectorResult
detectionCode
- Detection code from native library.protected int getDetectionCodeOrdinal()+
DetectorResult
getDetectionCodeOrdinal
in class DetectorResult
protected java.lang.String getDetectionCodeName()+
DetectorResult
getDetectionCodeName
in class DetectorResult
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class QuadDetectorResult
public java.lang.String toString()+
toString
in class QuadDetectorResult
public class MRTDDetectorSettings +extends QuadDetectorSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<MRTDDetectorSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+MRTDDetectorSettings(DecodingInfo[] decodingInfos)
+Constructor for MRTD detector settings.
+ |
+
|
+MRTDDetectorSettings(int dewarpHeight)
+Constructor for MRTD detector settings.
+ |
+
protected |
+MRTDDetectorSettings(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
void |
+setDetectFullDocument(boolean detectFullDocument)
+Defines whether full document should be detected.
+ |
+
boolean |
+shouldDetectFullDocument()
+Returns true if full document will be detected (detection is based on MRZ location).
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
initNativeFromParcel, setDecodingInfos
finalize, getNativeContext
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<MRTDDetectorSettings> CREATOR+
public MRTDDetectorSettings(@NonNull + DecodingInfo[] decodingInfos)+
decodingInfos
- Array of decoding informations that define which location relative to detection will be dewarped for further processing.public MRTDDetectorSettings(int dewarpHeight)+
dewarpHeight
- Defines the height of image to which location will be dewarped.protected MRTDDetectorSettings(android.os.Parcel in)+
public void setDetectFullDocument(boolean detectFullDocument)+
detectFullDocument
- whether or not full document should be detectedpublic boolean shouldDetectFullDocument()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class DetectorSettings
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class QuadDetectorSettings
Class | +Description | +
---|---|
MRTDDetectorResult | +
+ Represents a detector result created by MRTD detector initialised with
+MRTDDetectorSettings . |
+
MRTDDetectorSettings | +
+ Created by dodo on 16/10/15.
+ |
+
Enum | +Description | +
---|---|
MRTDDetectorResult.MRTDDetectionCode | +
+ MRZ - Machine Readable Zone
++ MRTD - Machine Readable Travel Document (Full Card) + + TD1 - Three Machine Readable Lines with 30 characters each + TD2 - Two Machine Readable Lines with 36 characters each + TD3 - Two Machine Readable Lines with 44 characters each |
+
Class | +Description | +
---|---|
QuadDetectorResult | +
+ A detector result represented by quadrilateral.
+ |
+
QuadDetectorSettings | +
+ Represents base detector settings for all detectors that can detect quad-like objects.
+ |
+
public interface DirectApiErrorListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onRecognizerError(java.lang.Throwable t)
+Called when error occurs in recognizer initialization.
+ |
+
public static enum Recognizer.State +extends java.lang.Enum<Recognizer.State>+
Enum Constant and Description | +
---|
OFFLINE |
+
READY |
+
UNLOCKED |
+
WORKING |
+
Modifier and Type | +Method and Description | +
---|---|
static Recognizer.State |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Recognizer.State[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Recognizer.State OFFLINE+
public static final Recognizer.State UNLOCKED+
public static final Recognizer.State READY+
public static final Recognizer.State WORKING+
public static Recognizer.State[] values()+
+for (Recognizer.State c : Recognizer.State.values()) + System.out.println(c); +
public static Recognizer.State valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class Recognizer
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+Recognizer.State |
+
Modifier and Type | +Method and Description | +
---|---|
Recognizer.State |
+getCurrentState()
+Returns the current state of the recognizer.
+ |
+
static Recognizer |
+getSingletonInstance()
+Returns the recognizer singleton.
+ |
+
void |
+initialize(android.content.Context context,
+ RecognitionSettings recognitionSettings,
+ DirectApiErrorListener errorListener)
+Initialize native library for recognition and returns true if initialization has been performed.
+ |
+
void |
+recognizeBitmap(android.graphics.Bitmap image,
+ Orientation imageOrientation,
+ Rectangle scanRegion,
+ ScanResultListener resultListener)
+Perform recognition of image represented as Android Bitmap.
+ |
+
void |
+recognizeBitmap(android.graphics.Bitmap image,
+ Orientation imageOrientation,
+ ScanResultListener resultListener)
+Perform recognition of image represented as Android Bitmap.
+ |
+
void |
+recognizeBitmapWithSettings(android.graphics.Bitmap image,
+ Orientation imageOrientation,
+ Rectangle scanRegion,
+ ScanResultListener resultListener,
+ RecognitionSettings recognitionSettings)
+Perform recognition of image represented as Android Bitmap.
+ |
+
void |
+recognizeBitmapWithSettings(android.graphics.Bitmap image,
+ Orientation imageOrientation,
+ ScanResultListener resultListener,
+ RecognitionSettings recognitionSettings)
+Perform recognition of image represented as Android Bitmap.
+ |
+
void |
+recognizeImage(Image image,
+ ScanResultListener resultListener)
+Use this method to directly recognize Image object obtained via MetadataListener while recognizer is active.
+ |
+
void |
+recognizeImageWithSettings(Image image,
+ ScanResultListener resultListener,
+ RecognitionSettings recognitionSettings)
+Use this method to directly recognize Image object obtained via MetadataListener while recognizer is active.
+ |
+
void |
+setLicenseKey(android.content.Context context,
+ java.lang.String licenseKey)
+Sets the license key required for unlocking the library.
+ |
+
void |
+setLicenseKey(java.lang.String licenseKey,
+ java.lang.String licensee)
+Sets the license key required for unlocking the library.
+ |
+
void |
+setMetadataListener(MetadataListener metadataListener,
+ MetadataSettings metadataSettings)
+Sets the listener that will obtain metadata that is being processed.
+ |
+
void |
+terminate()
+Terminates the native library.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static Recognizer getSingletonInstance() + throws FeatureNotSupportedException+
FeatureNotSupportedException
public final Recognizer.State getCurrentState()+
public final void setLicenseKey(@NonNull + android.content.Context context, + @NonNull + java.lang.String licenseKey) + throws InvalidLicenceKeyException+
context
- Application context used for license checking.licenseKey
- License key.java.lang.IllegalStateException
- if recognizer is not in offline state (use getCurrentState method to obtain the state)InvalidLicenceKeyException
- if licence key is invalidpublic final void setLicenseKey(@NonNull + java.lang.String licenseKey, + @NonNull + java.lang.String licensee) + throws InvalidLicenceKeyException+
licenseKey
- License key.licensee
- Licensee to which license key is bound.java.lang.IllegalStateException
- if recognizer is not in offline state (use getCurrentState method to obtain the state)InvalidLicenceKeyException
- if licence key is invalidpublic final void initialize(@NonNull + android.content.Context context, + @NonNull + RecognitionSettings recognitionSettings, + @NonNull + DirectApiErrorListener errorListener)+
context
- Application context used for loading required resources.recognitionSettings
- Recognition settings defining a recognition process.errorListener
- Listener that will be notified of any error in native library in background thread.java.lang.IllegalStateException
- if recognizer is already initializedjava.lang.NullPointerException
- if context, settings array or errorListener is nullpublic final void recognizeBitmap(@NonNull + android.graphics.Bitmap image, + @NonNull + Orientation imageOrientation, + @NonNull + ScanResultListener resultListener)+
image
- Image that needs to be recognized.imageOrientation
- Orientation of the bitmap image.resultListener
- Result listener that will handle recognition done event.java.lang.IllegalStateException
- if recognizer is not initialized or is currently workingjava.lang.NullPointerException
- if given null scan result listenerpublic final void recognizeBitmap(@NonNull + android.graphics.Bitmap image, + @NonNull + Orientation imageOrientation, + @NonNull + Rectangle scanRegion, + @NonNull + ScanResultListener resultListener)+
image
- Image that needs to be recognized.imageOrientation
- Orientation of the bitmap image.scanRegion
- Region of image that needs to be recognized. Rectangle is given as percentages
+ of image size - x coordinate and width are percentages of image width and y coordinate
+ and height are percentages of image height. Therefore, rectangle(0.f, 0.f, 1.f, 1.f)
+ represents the whole image, whilst rectangle(0.5f, 0.f, 0.5f, 1.f) represents the
+ right half of the image.resultListener
- Result listener that will handle recognition done event.java.lang.IllegalStateException
- if recognizer is not initialized or is currently workingjava.lang.NullPointerException
- if given null scan result listenerpublic final void recognizeBitmapWithSettings(@NonNull + android.graphics.Bitmap image, + @NonNull + Orientation imageOrientation, + @NonNull + ScanResultListener resultListener, + RecognitionSettings recognitionSettings)+
image
- Image that needs to be recognized.imageOrientation
- Orientation of the bitmap image.resultListener
- Result listener that will handle recognition done event.recognitionSettings
- Recognition settings that will be used to perform this recognition.java.lang.IllegalStateException
- if recognizer is not initialized or is currently workingjava.lang.NullPointerException
- if given null scan result listenerpublic final void recognizeBitmapWithSettings(@NonNull + android.graphics.Bitmap image, + @NonNull + Orientation imageOrientation, + @NonNull + Rectangle scanRegion, + @NonNull + ScanResultListener resultListener, + RecognitionSettings recognitionSettings)+
image
- Image that needs to be recognized.imageOrientation
- Orientation of the bitmap image.scanRegion
- Region of image that needs to be recognized. Rectangle is given as percentages
+ of image size - x coordinate and width are percentages of image width and y coordinate
+ and height are percentages of image height. Therefore, rectangle(0.f, 0.f, 1.f, 1.f)
+ represents the whole image, whilst rectangle(0.5f, 0.f, 0.5f, 1.f) represents the
+ right half of the image.resultListener
- Result listener that will handle recognition done event.recognitionSettings
- Recognition settings that will be used to perform this recognition.java.lang.IllegalStateException
- if recognizer is not initialized or is currently workingjava.lang.NullPointerException
- if given null scan result listener@UiThread +public final void recognizeImage(@NonNull + Image image, + @NonNull + ScanResultListener resultListener)+
image
- Image to be processed (usually obtained from ImageListener)resultListener
- Listener that will be invoked with recognition result.@UiThread +public final void recognizeImageWithSettings(@NonNull + Image image, + @NonNull + ScanResultListener resultListener, + RecognitionSettings recognitionSettings)+
image
- Image to be processed (usually obtained from MetadataListener).resultListener
- Listener that will be invoked with recognition result.recognitionSettings
- Recognition settings that will be used to perform this recognition.java.lang.IllegalStateException
- if recognizer is not initialized or is currently working or Image object is already disposedjava.lang.NullPointerException
- if given null scan result listenerpublic void terminate()+
public void setMetadataListener(MetadataListener metadataListener, + MetadataSettings metadataSettings)+
metadataListener
- metadata listener that will be notified about available metadatametadataSettings
- settings defining which metadata should be reported to metadata listenerpublic class BitmapCameraFrame
+extends java.lang.Object
+Constructor and Description | +
---|
BitmapCameraFrame(android.graphics.Bitmap bitmap,
+ long id) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+finalizePoolObject()
+Finalization method.
+ |
+
CameraDataFormat |
+getFormat()
+returns the format of the frame
+ |
+
long |
+getFrameID()
+Returns the unique frame identifier
+ |
+
double |
+getFrameQuality()
+Returns the quality of the current frame.
+ |
+
int |
+getHeight()
+returns the height of the frame
+ |
+
long |
+getNativeCameraFrame()
+Accessed from native code to obtain pointer to implementation of native camera frame
+ |
+
Orientation |
+getOrientation()
+Returns the orientation of the current frame.
+ |
+
Rectangle |
+getVisiblePart()
+returns the region that defines the visible part of frame
+ |
+
int |
+getWidth()
+returns the width of the frame
+ |
+
boolean |
+initializeNativePart(long frameAnalyzersPtr)
+Initializes native part of camera frame implementation.
+ |
+
void |
+initializePoolObject()
+Initialization method.
+ |
+
boolean |
+isDeviceMoving()
+returns true if device was moving while frame was created
+ |
+
boolean |
+isFocused()
+returns true if camera thinks this frame is focused
+ |
+
boolean |
+isPhoto()
+Returns true if frame is photograph
+ |
+
void |
+recycle()
+Used for recycling frame buffer back into camera so its buffer can be reused for new camera frame.
+ |
+
void |
+setFrameID(long id) |
+
void |
+setOrientation(Orientation orientation)
+Sets the orientation of the current frame.
+ |
+
void |
+setVisiblePart(Rectangle visiblePart)
+sets the region that defines the visible part of frame
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public BitmapCameraFrame(android.graphics.Bitmap bitmap, + long id)+
public int getWidth()+
public int getHeight()+
public void setVisiblePart(Rectangle visiblePart)+
visiblePart
- public CameraDataFormat getFormat()+
public boolean isFocused()+
public boolean isDeviceMoving()+
public Rectangle getVisiblePart()+
public void recycle()+
public boolean isPhoto()+
public boolean initializeNativePart(long frameAnalyzersPtr)+
frameAnalyzersPtr
- Native pointer to class containing all native elements frame needs (frame quality estimator, white balance analyzer etc.)public long getNativeCameraFrame()+
public double getFrameQuality()+
public void setOrientation(Orientation orientation)+
orientation
- public Orientation getOrientation()+
public long getFrameID()+
public void setFrameID(long id)+
public void initializePoolObject()+
public void finalizePoolObject()+
Class | +Description | +
---|---|
BitmapCameraFrame | +
+ Created by dodo on 29/07/15.
+ |
+
Interface | +Description | +
---|---|
DirectApiErrorListener | +
+ Created by dodo on 29/06/15.
+ |
+
Class | +Description | +
---|---|
Recognizer | +
+ DirectAPI Recognizer singleton that can be used to perform recognition of Bitmaps and Images.
+ |
+
Enum | +Description | +
---|---|
Recognizer.State | ++ |
public class Point
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Point> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+Point()
+Constructor that creates default point at position (0,0).
+ |
+
|
+Point(float x,
+ float y)
+Constructor that creates point at position (x,y).
+ |
+
protected |
+Point(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
Point |
+clamp(float length)
+Calculate and return point clamped to given norm (length).
+ |
+
Point |
+clamp(float minLength,
+ float maxLength)
+Calculate and return point clamped to given norm (lengths).
+ |
+
int |
+describeContents() |
+
float |
+distance(Point other)
+Calculates and returns the distance to given point.
+ |
+
void |
+draw(android.graphics.Canvas canvas,
+ android.graphics.Paint paint,
+ int pointRadius)
+Draws the point to given canvas with given paint.
+ |
+
boolean |
+equals(java.lang.Object o) |
+
float |
+getX() |
+
float |
+getY() |
+
boolean |
+isZero()
+Returns true if point has coordinates (0,0).
+ |
+
void |
+log()
+Logs the point coordinates to LOG_DEBUG log.
+ |
+
Point |
+makeCopy() |
+
Point |
+mirrorX(float maxXDimension)
+Return point mirrored around X axis.
+ |
+
void |
+mirrorXInPlace(float maxXDimension)
+Mirrors point around X axis.
+ |
+
Point |
+mirrorXY(float maxXDimension,
+ float maxYDimension)
+Return point mirrored around both X and Y axis
+ |
+
void |
+mirrorXYInPlace(float maxXDimension,
+ float maxYDimension)
+Mirrors point around both X and Y axis
+ |
+
Point |
+mirrorY(float maxYDimension)
+Return point mirrored around Y axis.
+ |
+
void |
+mirrorYInPlace(float maxYDimension)
+Mirrors point around Y axis.
+ |
+
Point |
+negative() |
+
Point |
+negativeClone()
+Calculate and return negative of current point.
+ |
+
float |
+norm()
+Calculate and return norm of the point.
+ |
+
Point |
+normalize()
+Calculate and return point that has same direction as this point, but norm 1.
+ |
+
Point |
+normalize(float length)
+Calculate and return point that has same direction as this point, but norm as given.
+ |
+
Point |
+operatorMinus(Point other)
+- operator on the point.
+ |
+
Point |
+operatorMinusEquals(Point other) |
+
Point |
+operatorMultiply(float factor)
+Multiplication of the point with scalar.
+ |
+
Point |
+operatorMultiplyEquals(float factor) |
+
Point |
+operatorPlus(Point other)
++ operator on the point.
+ |
+
void |
+operatorPlusEquals(Point other)
++= operator on the point.
+ |
+
void |
+setX(float x)
+Sets the x coordinate of the point.
+ |
+
void |
+setY(float y)
+Sets the y coordinate of the point.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<Point> CREATOR+
public Point()+
public Point(float x, + float y)+
x
- x-coordinate of the pointy
- y-coordinate of the poingprotected Point(android.os.Parcel in)+
public java.lang.String toString()+
toString
in class java.lang.Object
public boolean isZero()+
public Point operatorPlus(Point other)+
other
- Point to be added to current pointpublic void operatorPlusEquals(Point other)+
other
- Point to be added to current pointpublic Point operatorMinus(Point other)+
other
- Point to be substracted from current pointpublic Point operatorMultiply(float factor)+
factor
- Scalar with which point should be multipliedpublic Point operatorMultiplyEquals(float factor)+
public Point negativeClone()+
public Point negative()+
public float norm()+
public Point normalize()+
public Point normalize(float length)+
length
- Desired norm of the point.public Point clamp(float length)+
length
- Desired norm to which point should be clamped.public Point clamp(float minLength, + float maxLength)+
minLength
- Minimum desired norm of the point.maxLength
- Maximum desired norm of the point.public Point mirrorX(float maxXDimension)+
maxXDimension
- Maximum dimension of X axis.public void mirrorXInPlace(float maxXDimension)+
maxXDimension
- Maximum dimension of X axis.public Point mirrorY(float maxYDimension)+
maxYDimension
- Maximum dimension of Y axis.public void mirrorYInPlace(float maxYDimension)+
maxYDimension
- Maximum dimension of Y axis.public Point mirrorXY(float maxXDimension, + float maxYDimension)+
maxXDimension
- Maximum dimension of X axis.maxYDimension
- Maximum dimension of Y axis.public void mirrorXYInPlace(float maxXDimension, + float maxYDimension)+
maxXDimension
- Maximum dimension of X axis.maxYDimension
- Maximum dimension of Y axis.public Point makeCopy()+
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public float distance(Point other)+
other
- Point to which distance is calculated.public void log()+
public void draw(android.graphics.Canvas canvas, + android.graphics.Paint paint, + int pointRadius)+
canvas
- Canvas to which point should be drawn.paint
- Paint used to draw point.pointRadius
- Radius of the circle that represents the point.public float getX()+
public void setX(float x)+
x
- x coordinate of the pointpublic float getY()+
public void setY(float y)+
y
- y coordinate of the pointpublic int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class Quadrilateral
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Quadrilateral> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+Quadrilateral() |
+
|
+Quadrilateral(float[] points)
+Constructor from float array.
+ |
+
|
+Quadrilateral(int top,
+ int bottom,
+ int left,
+ int right,
+ int hostActivityOrientation) |
+
protected |
+Quadrilateral(android.os.Parcel in) |
+
|
+Quadrilateral(Point uleft,
+ Point uright,
+ Point lleft,
+ Point lright) |
+
Modifier and Type | +Method and Description | +
---|---|
Quadrilateral |
+clone() |
+
int |
+describeContents() |
+
int |
+getColor() |
+
Point |
+getLowerLeft()
+Returns the point nearest to (0, height) coordinate
+ |
+
Point |
+getLowerRight()
+Returns the point nearest to (width, height) coordinate
+ |
+
Quadrilateral |
+getSortedQuad()
+Returns the Quadrilateral which has same corners as original, but it guarantees that upper left
+ point is the point nearest to (0,0) coordinate.
+ |
+
Point |
+getUpperLeft()
+Returns the point nearest to (0, 0) coordinate.
+ |
+
Point |
+getUpperRight()
+Returns the point nearest to (width, 0) coordinate
+ |
+
boolean |
+isDefaultQuad() |
+
boolean |
+isEmpty()
+Returns true if quadrilateral is empty, i.e.
+ |
+
boolean |
+matchesMargins(int top,
+ int bottom,
+ int left,
+ int right,
+ int hostActivityOrientation) |
+
void |
+mirror(int canvasWidth,
+ int canvasHeight,
+ int hostActivityOrientation)
+Mirrors the quadrangle so that it can be properly drawn on mirrored camera preview
+ |
+
void |
+setColor(int color) |
+
void |
+setIsDefaultQuad(boolean defaultQuad) |
+
void |
+setMargins(int top,
+ int bottom,
+ int left,
+ int right,
+ int hostActivityOrientation) |
+
void |
+setPoints(Point uleft,
+ Point uright,
+ Point lleft,
+ Point lright) |
+
void |
+toFloatArray(float[] arr)
+Converts this quadrilateral to array of float points.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<Quadrilateral> CREATOR+
public Quadrilateral(int top, + int bottom, + int left, + int right, + int hostActivityOrientation)+
public Quadrilateral()+
public Quadrilateral(Point uleft, + Point uright, + Point lleft, + Point lright)+
public Quadrilateral(float[] points)+
points
- float pairs representing quadrilateral pointsprotected Quadrilateral(android.os.Parcel in)+
public void setMargins(int top, + int bottom, + int left, + int right, + int hostActivityOrientation)+
public boolean matchesMargins(int top, + int bottom, + int left, + int right, + int hostActivityOrientation)+
public boolean isEmpty()+
public void toFloatArray(@NonNull + float[] arr)+
public java.lang.String toString()+
toString
in class java.lang.Object
public void mirror(int canvasWidth, + int canvasHeight, + int hostActivityOrientation)+
canvasWidth
- width of canvascanvasHeight
- height of canvaspublic Quadrilateral getSortedQuad()+
public Point getUpperLeft()+
public Point getUpperRight()+
public Point getLowerLeft()+
public Point getLowerRight()+
public int getColor()+
public void setColor(int color)+
public boolean isDefaultQuad()+
public void setIsDefaultQuad(boolean defaultQuad)+
public Quadrilateral clone()+
clone
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class Rectangle
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Rectangle> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
Rectangle(float x,
+ float y,
+ float width,
+ float height)
+Rectangle constructor.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
static Rectangle |
+getDefaultROI()
+Returns the default rectangle that defines the whole image or view
+ |
+
float |
+getHeight() |
+
float |
+getWidth() |
+
float |
+getX() |
+
float |
+getY() |
+
boolean |
+isRelative()
+Return true if rectangle is given in relative coordinates.
+ |
+
void |
+log() |
+
void |
+normalizeToUnitRectangle() |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static android.os.Parcelable.Creator<Rectangle> CREATOR+
public Rectangle(float x, + float y, + float width, + float height)+
x
- top left x coordinatey
- top left y coordinatewidth
- rectangle widthheight
- rectangle heightpublic boolean isRelative()+
public static Rectangle getDefaultROI()+
public java.lang.String toString()+
toString
in class java.lang.Object
public void log()+
public void normalizeToUnitRectangle()+
public float getX()+
public float getY()+
public float getWidth()+
public float getHeight()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
Class | +Description | +
---|---|
Point | ++ |
Quadrilateral | ++ |
Rectangle | ++ |
public interface SuccessCallback
+Modifier and Type | +Method and Description | +
---|---|
void |
+onOperationDone(boolean success) |
+
public interface ShakeCallback
+Modifier and Type | +Method and Description | +
---|---|
void |
+onShakingStarted()
+Called when device starts to shake/move.
+ |
+
void |
+onShakingStopped()
+Called when device stops shaking/moving.
+ |
+
Interface | +Description | +
---|---|
ShakeCallback | ++ |
public interface AutofocusListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onAutofocusFailed()
+This method will be called when camera focusing has failed.
+ |
+
void |
+onAutofocusStarted(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has started.
+ |
+
void |
+onAutofocusStopped(android.graphics.Rect[] focusAreas)
+This method will be called when camera focusing has stopped.
+ |
+
void onAutofocusFailed()+
void onAutofocusStarted(android.graphics.Rect[] focusAreas)+
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlvoid onAutofocusStopped(android.graphics.Rect[] focusAreas)+
focusAreas
- Areas where focus is being measured. Null on devices that do not support fine-grained camera controlpublic enum CameraType +extends java.lang.Enum<CameraType> +implements android.os.Parcelable+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Enum Constant and Description | +
---|
CAMERA_BACKFACE
+Will use device's back facing camera, if it exists.
+ |
+
CAMERA_DEFAULT
+Will use device's default camera.
+ |
+
CAMERA_FRONTFACE
+Will use device's frontfacing camera, if it exists.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<CameraType> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
static CameraType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static CameraType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final CameraType CAMERA_DEFAULT+
public static final CameraType CAMERA_BACKFACE+
public static final CameraType CAMERA_FRONTFACE+
public static final android.os.Parcelable.Creator<CameraType> CREATOR+
public static CameraType[] values()+
+for (CameraType c : CameraType.values()) + System.out.println(c); +
public static CameraType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public enum VideoResolutionPreset +extends java.lang.Enum<VideoResolutionPreset> +implements android.os.Parcelable+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Enum Constant and Description | +
---|
VIDEO_RESOLUTION_1080p
+Attempts to choose camera video resolution as closely as 1080p
+ |
+
VIDEO_RESOLUTION_2160p
+Attempts to choose camera video resolution as closely as 2160p
+ |
+
VIDEO_RESOLUTION_480p
+Attempts to choose camera video resolution as closely as 480p
+ |
+
VIDEO_RESOLUTION_720p
+Attempts to choose camera video resolution as closely as 720p
+ |
+
VIDEO_RESOLUTION_DEFAULT
+Will choose camera video resolution which is best for current device.
+ |
+
VIDEO_RESOLUTION_MAX_AVAILABLE
+Will choose max available camera video resolution
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<VideoResolutionPreset> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
int |
+getIdealHeight() |
+
static VideoResolutionPreset |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static VideoResolutionPreset[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final VideoResolutionPreset VIDEO_RESOLUTION_DEFAULT+
public static final VideoResolutionPreset VIDEO_RESOLUTION_480p+
public static final VideoResolutionPreset VIDEO_RESOLUTION_720p+
public static final VideoResolutionPreset VIDEO_RESOLUTION_1080p+
public static final VideoResolutionPreset VIDEO_RESOLUTION_2160p+
public static final VideoResolutionPreset VIDEO_RESOLUTION_MAX_AVAILABLE+
public static final android.os.Parcelable.Creator<VideoResolutionPreset> CREATOR+
public static VideoResolutionPreset[] values()+
+for (VideoResolutionPreset c : VideoResolutionPreset.values()) + System.out.println(c); +
public static VideoResolutionPreset valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getIdealHeight()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
Interface | +Description | +
---|---|
AutofocusListener | ++ |
Enum | +Description | +
---|---|
CameraType | ++ |
VideoResolutionPreset | +
+ Created by dodo on 26/10/15.
+ |
+
public enum Orientation +extends java.lang.Enum<Orientation>+
Enum Constant and Description | +
---|
ORIENTATION_LANDSCAPE_LEFT
+Device is in landscape mode and buttons are left of screen
+ |
+
ORIENTATION_LANDSCAPE_RIGHT
+Device is in landscape mode and buttons are right of screen
+ |
+
ORIENTATION_PORTRAIT
+Device is in portrait mode and buttons are below screen
+ |
+
ORIENTATION_PORTRAIT_UPSIDE
+Device is in portrait mode and buttons are above screen
+ |
+
ORIENTATION_UNKNOWN
+Device is lying on the table
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static Orientation |
+fromInt(int value) |
+
int |
+intValue() |
+
boolean |
+isHorizontal() |
+
boolean |
+isVertical() |
+
Orientation |
+rotate180()
+Returns orientation obtained by rotating current orientation by 180 degrees.
+ |
+
Orientation |
+rotate90Clockwise()
+Returns orientation obtained by rotating current orientation by 90 degrees clockwise.
+ |
+
Orientation |
+rotate90CounterClockwise()
+Returns orientation obtained by rotating current orientation by 90 degrees counter-clockwise.
+ |
+
java.lang.String |
+toString() |
+
static Orientation |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Orientation[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Orientation ORIENTATION_PORTRAIT+
public static final Orientation ORIENTATION_LANDSCAPE_RIGHT+
public static final Orientation ORIENTATION_PORTRAIT_UPSIDE+
public static final Orientation ORIENTATION_LANDSCAPE_LEFT+
public static final Orientation ORIENTATION_UNKNOWN+
public static Orientation[] values()+
+for (Orientation c : Orientation.values()) + System.out.println(c); +
public static Orientation valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int intValue()+
public boolean isVertical()+
public boolean isHorizontal()+
public Orientation rotate90Clockwise()+
public Orientation rotate90CounterClockwise()+
public Orientation rotate180()+
public java.lang.String toString()+
toString
in class java.lang.Enum<Orientation>
public static Orientation fromInt(int value)+
Enum | +Description | +
---|---|
Orientation | ++ |
Interface | +Description | +
---|---|
SuccessCallback | +
+ Created by dodo on 12/11/14.
+ |
+
public class Image
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
Image |
+clone()
+Creates and returns a copy of this image object.
+ |
+
android.graphics.Bitmap |
+convertToBitmap()
+Converts this image into Android Bitmap.
+ |
+
void |
+dispose()
+Disposes native object containing image pixels.
+ |
+
protected void |
+finalize() |
+
java.nio.ByteBuffer |
+getBuffer()
+Returns the native buffer that contains image pixels.
+ |
+
int |
+getHeight()
+Returns the height of the image.
+ |
+
ImageFormat |
+getImageFormat()
+Returns the format of the image.
+ |
+
java.lang.String |
+getImageName()
+Returns the name of the image.
+ |
+
Orientation |
+getImageOrientation()
+Returns the orientation of the image.
+ |
+
ImageType |
+getImageType()
+Returns the type of the image.
+ |
+
int |
+getPixelStride()
+Returns the pixel stride for image buffer.
+ |
+
android.graphics.Rect |
+getROI()
+Returns the region of interest in image.
+ |
+
int |
+getRowStride()
+Returns the row stride for image buffer.
+ |
+
int |
+getWidth()
+Returns the width of the image.
+ |
+
boolean |
+isDisposed()
+Returns true if image's internal buffers are disposed and cannot be used anymore.
+ |
+
void |
+setImageOrientation(Orientation orientation)
+Use this method to change Image's orientation.
+ |
+
void |
+setROI(android.graphics.Rect roi)
+Sets the region of interest in image.
+ |
+
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void dispose()+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public Image clone()+
clone
in class java.lang.Object
public int getWidth()+
public int getHeight()+
public ImageType getImageType()+
public ImageFormat getImageFormat()+
public java.lang.String getImageName()+
public java.nio.ByteBuffer getBuffer()+
public int getPixelStride()+
public int getRowStride()+
public android.graphics.Rect getROI()+
public void setROI(android.graphics.Rect roi)+
roi
- region of interest in imagepublic Orientation getImageOrientation()+
public void setImageOrientation(@NonNull + Orientation orientation)+
orientation
- public boolean isDisposed()+
@Nullable +public android.graphics.Bitmap convertToBitmap()+
public class ImageBuilder
+extends java.lang.Object
+Constructor and Description | +
---|
ImageBuilder() |
+
Modifier and Type | +Method and Description | +
---|---|
static Image |
+buildImageFromCamera1NV21Frame(byte[] imageBuffer,
+ int imageWidth,
+ int imageHeight,
+ Orientation imageOrientation,
+ Rectangle scanningRegion) |
+
static Image |
+buildImageFromCamera2Image(android.media.Image image,
+ Orientation imageOrientation,
+ Rectangle scanningRegion)
+Builds image object from Camera2 frame in YUV_420_888 format.
+ |
+
static Image |
+buildImageFromNativeContext(long nativeContext)
+Builds image object from native context.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static Image buildImageFromNativeContext(long nativeContext)+
nativeContext
- Native pointer containing native image object.Image
object for usage via DirectAPI's Recognizer
object.public static Image buildImageFromCamera2Image(@NonNull + android.media.Image image, + @NonNull + Orientation imageOrientation, + @Nullable + Rectangle scanningRegion)+
image
- Image
object that contains image from which MicroBlink Image
will be built. You must ensure that this object is not closed
+ while returned Image
is in use. Doing so will lead to undefined behaviour.imageOrientation
- Orientation of the device at the time Image
was created. Cannot be null nor Orientation.ORIENTATION_UNKNOWN
.scanningRegion
- Region of image that will be used for recognition. If null, entire image will be used.Image
object for usage via DirectAPI's Recognizer
object.public static Image buildImageFromCamera1NV21Frame(@NonNull + byte[] imageBuffer, + int imageWidth, + int imageHeight, + @NonNull + Orientation imageOrientation, + @Nullable + Rectangle scanningRegion)+
public enum ImageFormat +extends java.lang.Enum<ImageFormat>+
Enum Constant and Description | +
---|
ALPHA_8
+A single plane, grayscale image.
+ |
+
BGRA_8888
+A single plane, color image.
+ |
+
YUV_NV21
+A single plane, color image.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static ImageFormat |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ImageFormat[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ImageFormat ALPHA_8+
public static final ImageFormat BGRA_8888+
public static final ImageFormat YUV_NV21+
public static ImageFormat[] values()+
+for (ImageFormat c : ImageFormat.values()) + System.out.println(c); +
public static ImageFormat valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class ImageFrame
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
protected Image |
+mImage |
+
Constructor and Description | +
---|
ImageFrame(Image image,
+ long id) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+finalizePoolObject()
+Finalization method.
+ |
+
CameraDataFormat |
+getFormat() |
+
long |
+getFrameID()
+Returns the unique frame identifier
+ |
+
double |
+getFrameQuality()
+Returns the quality of the current frame.
+ |
+
int |
+getHeight()
+returns the height of the frame
+ |
+
long |
+getNativeCameraFrame()
+Accessed from native code to obtain pointer to implementation of native camera frame
+ |
+
Orientation |
+getOrientation()
+Returns the orientation of the current frame.
+ |
+
Rectangle |
+getVisiblePart()
+returns the region that defines the visible part of frame
+ |
+
int |
+getWidth()
+returns the width of the frame
+ |
+
boolean |
+initializeNativePart(long frameAnalyzersPtr) |
+
void |
+initializePoolObject()
+Initialization method.
+ |
+
boolean |
+isDeviceMoving()
+returns true if device was moving while frame was created
+ |
+
boolean |
+isFocused()
+returns true if camera thinks this frame is focused
+ |
+
boolean |
+isPhoto()
+Returns true if frame is photograph
+ |
+
void |
+recycle() |
+
void |
+setOrientation(Orientation orientation)
+Sets the orientation of the current frame.
+ |
+
void |
+setVisiblePart(Rectangle visiblePart)
+sets the region that defines the visible part of frame
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public final int getWidth()+
public final int getHeight()+
public final void setVisiblePart(Rectangle visiblePart)+
visiblePart
- public CameraDataFormat getFormat()+
public final boolean isFocused()+
public final boolean isDeviceMoving()+
public final Rectangle getVisiblePart()+
public final boolean isPhoto()+
public boolean initializeNativePart(long frameAnalyzersPtr)+
public void recycle()+
public final long getNativeCameraFrame()+
public final double getFrameQuality()+
public final void setOrientation(Orientation orientation)+
orientation
- public final Orientation getOrientation()+
public final long getFrameID()+
public final void initializePoolObject()+
public final void finalizePoolObject()+
public interface ImageListener
+extends android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
void |
+onImageAvailable(Image image)
+Called on processing thread when it wants to show an image it is currently in process.
+ |
+
describeContents, writeToParcel
void onImageAvailable(Image image)+
image
- Image that is currently in process.Enum Constant and Description | +
---|
DEBUG_DETECTION
+This is the image that was used as scratch surface to display document detection process (if any).
+ |
+
DEBUG_DEWARPED
+This is the dewarped image that is obtained after performing perspecitve correction
+ of each element that needs to be scanned.
+ |
+
DEBUG_MARKED_DEWARPED
+This is same as DEBUG_DEWARPED, except it also contains visualisation of OCR result layered
+ onto image.
+ |
+
DEBUG_OCR_INPUT
+This is grayscale image preprocessed with OCR engine.
+ |
+
DEWARPED
+This is the dewarped image that is obtained after performing perspective correction
+ of the detected item.
+ |
+
ORIGINAL
+This is the original image that arrived from camera.
+ |
+
SUCCESSFUL_SCAN
+This is the original image that arrived from camera that was used to recognize
+ item.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static ImageType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ImageType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ImageType ORIGINAL+
public static final ImageType SUCCESSFUL_SCAN+
public static final ImageType DEWARPED+
public static final ImageType DEBUG_DETECTION+
public static final ImageType DEBUG_OCR_INPUT+
public static final ImageType DEBUG_DEWARPED+
public static final ImageType DEBUG_MARKED_DEWARPED+
public static ImageType[] values()+
+for (ImageType c : ImageType.values()) + System.out.println(c); +
public static ImageType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullInterface | +Description | +
---|---|
ImageListener | +
+ Created by dodo on 16/12/14.
+ |
+
Class | +Description | +
---|---|
Image | +
+ Created by dodo on 16/12/14.
+ |
+
ImageBuilder | +
+ Created by dodo on 10/02/16.
+ |
+
ImageFrame | +
+ Created by dodo on 24/08/15.
+ |
+
Enum | +Description | +
---|---|
ImageFormat | +
+ Created by dodo on 16/12/14.
+ |
+
ImageType | +
+ Created by dodo on 16/12/14.
+ |
+
Enum Constant and Description | +
---|
Croatian |
+
English |
+
German |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getCountry() |
+
java.lang.String |
+getLanguage() |
+
static Language |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Language[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Language Croatian+
public static final Language English+
public static final Language German+
public static Language[] values()+
+for (Language c : Language.values()) + System.out.println(c); +
public static Language valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getLanguage()+
public java.lang.String getCountry()+
public class LanguageUtils
+extends java.lang.Object
+Constructor and Description | +
---|
LanguageUtils() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+setLanguage(Language lang,
+ android.content.Context ctx)
+Sets the application language.
+ |
+
static void |
+setLanguageAndCountry(java.lang.String language,
+ java.lang.String country,
+ android.content.Context ctx)
+Sets the language and country locale for given language and country.
+ |
+
static void |
+setLanguageConfiguration(android.content.res.Resources res)
+Method that will set correct language configuration to given Resources
+ object.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static void setLanguage(Language lang, + android.content.Context ctx)+
lang
- Languagectx
- context which configuration should be updatedpublic static void setLanguageAndCountry(java.lang.String language, + java.lang.String country, + android.content.Context ctx)+
language
- desired languagecountry
- desired country (to select country-specific language locale)ctx
- context for accessing shared preferencespublic static void setLanguageConfiguration(android.content.res.Resources res)+
res
- Resources object whose language configuration should be
+ updated.Class | +Description | +
---|---|
LanguageUtils | ++ |
Enum | +Description | +
---|---|
Language | ++ |
public class DetectionMetadata +extends Metadata+
Constructor and Description | +
---|
DetectionMetadata(DetectorResult detectorResult) |
+
Modifier and Type | +Method and Description | +
---|---|
DetectorResult |
+getDetectionResult()
+Returns the result of detection or null if detection has failed.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public DetectionMetadata(@Nullable + DetectorResult detectorResult)+
@Nullable +public DetectorResult getDetectionResult()+
public class ImageMetadata +extends Metadata+
Constructor and Description | +
---|
ImageMetadata(Image image) |
+
Modifier and Type | +Method and Description | +
---|---|
Image |
+getImage()
+Returns the image
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public abstract class Metadata
+extends java.lang.Object
+public interface MetadataListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onMetadataAvailable(Metadata metadata) |
+
public static class MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+DebugImageMetadataSettings() |
+
protected |
+DebugImageMetadataSettings(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
boolean |
+isDetectionImageEnabled()
+Returns true if detection image will be available in MetadataListener.
+ |
+
boolean |
+isDewarpedImageEnabled()
+Returns true if dewarped debug image should be available in MetadataListener.
+ |
+
boolean |
+isMarkedDewarpedImageEnabled()
+Returns true if marked dewarped debug image should be available in MetadataListener.
+ |
+
boolean |
+isOcrInputImageEnabled()
+Returns true if OCR input image should be available in MetadataListener.
+ |
+
void |
+setAll(boolean flag)
+Sets all settings to same value.
+ |
+
void |
+setDetectionImageEnabled(boolean detectionImageEnabled)
+Sets whether detection image will be available in MetadataListener.
+ |
+
void |
+setDewarpedImageEnabled(boolean dewarpedImageEnabled)
+Sets whether dewarped debug image should be available in MetadataListener.
+ |
+
void |
+setMarkedDewarpedImageEnabled(boolean markedDewarpedImageEnabled)
+Sets whether marked dewarped debug image should be available in MetadataListener.
+ |
+
void |
+setOcrInputImageEnabled(boolean ocrInputImageEnabled)
+Sets whether OCR input image should be available in MetadataListener.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings> CREATOR+
public DebugImageMetadataSettings()+
protected DebugImageMetadataSettings(android.os.Parcel in)+
public void setAll(boolean flag)+
flag
- value to which all settings will be setpublic boolean isDetectionImageEnabled()+
public void setDetectionImageEnabled(boolean detectionImageEnabled)+
detectionImageEnabled
- whether detection image will be available in MetadataListener.public boolean isOcrInputImageEnabled()+
public void setOcrInputImageEnabled(boolean ocrInputImageEnabled)+
ocrInputImageEnabled
- whether OCR input image should be available in MetadataListener.public boolean isDewarpedImageEnabled()+
public void setDewarpedImageEnabled(boolean dewarpedImageEnabled)+
dewarpedImageEnabled
- whether dewarped debug image should be available in MetadataListener.public boolean isMarkedDewarpedImageEnabled()+
public void setMarkedDewarpedImageEnabled(boolean markedDewarpedImageEnabled)+
markedDewarpedImageEnabled
- whether marked dewarped debug image should be available in MetadataListener.public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public static class MetadataSettings.ImageMetadataSettings
+extends java.lang.Object
+implements android.os.Parcelable
+Modifier and Type | +Class and Description | +
---|---|
static class |
+MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings |
+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<MetadataSettings.ImageMetadataSettings> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+ImageMetadataSettings() |
+
protected |
+ImageMetadataSettings(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings |
+getDebugImageMetadataSettings()
+Returns the object containing settings defining which debug images should be available in MetadataListener.
+ |
+
boolean |
+isCurrentVideoFrameEnabled()
+Returns true if current video frame should be available in MetadataListener.
+ |
+
boolean |
+isDewarpedImageEnabled()
+Returns true if dewarped image should be available in MetadataListener.
+ |
+
boolean |
+isSuccessfulScanFrameEnabled()
+Returns true if image that was used to obtain valid scanning result will be available in MetadataListener.
+ |
+
void |
+setCurrentVideoFrameEnabled(boolean currentVideoFrameEnabled)
+Sets whether current video frame should be available in MetadataListener.
+ |
+
void |
+setDebugImageMetadataSettings(MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings debugImageMetadataSettings)
+Sets object containing settings defining which debug images should be available in MetadataListener.
+ |
+
void |
+setDewarpedImageEnabled(boolean dewarpedImageEnabled)
+Sets whether dewarped image should be available in MetadataListener.
+ |
+
void |
+setSuccessfulScanFrameEnabled(boolean successfulScanFrameEnabled)
+Sets whether image that was used to obtain valid scanning result will be available in MetadataListener.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<MetadataSettings.ImageMetadataSettings> CREATOR+
public ImageMetadataSettings()+
protected ImageMetadataSettings(android.os.Parcel in)+
public boolean isCurrentVideoFrameEnabled()+
public void setCurrentVideoFrameEnabled(boolean currentVideoFrameEnabled)+
currentVideoFrameEnabled
- whether current video frame should be available in MetadataListener.public boolean isDewarpedImageEnabled()+
public void setDewarpedImageEnabled(boolean dewarpedImageEnabled)+
dewarpedImageEnabled
- whether dewarped image should be available in MetadataListener.public boolean isSuccessfulScanFrameEnabled()+
public void setSuccessfulScanFrameEnabled(boolean successfulScanFrameEnabled)+
successfulScanFrameEnabled
- whether image that was used to obtain valid scanning result will be available in MetadataListener.public MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings getDebugImageMetadataSettings()+
public void setDebugImageMetadataSettings(MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings debugImageMetadataSettings)+
debugImageMetadataSettings
- object containing settings defining which debug images should be available in MetadataListener.public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class MetadataSettings
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+MetadataSettings.ImageMetadataSettings
+Settings specific to which image metadata will be available in MetadataListener
+ |
+
Constructor and Description | +
---|
MetadataSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
MetadataSettings.ImageMetadataSettings |
+getImageMetadataSettings()
+Returns the object containing settings defining which images should be available in MetadataListener.
+ |
+
boolean |
+isDebugMetadataAllowed()
+Returns true if debug metadata will be available in MetadataListener.
+ |
+
boolean |
+isDetectionMetadataAllowed()
+Returns true if detection metadata will be available in MetadataListener.
+ |
+
boolean |
+isOcrMetadataAllowed()
+Returns true if OCR metadata will be available in MetadataListener.
+ |
+
void |
+setDebugMetadataAllowed(boolean debugMetadataAllowed)
+Sets whether debug metadata should be available in MetadataListener.
+ |
+
void |
+setDetectionMetadataAllowed(boolean detectionMetadataAllowed)
+Sets whether detection metadata should be available in MetadataListener.
+ |
+
void |
+setImageMetadataSettings(MetadataSettings.ImageMetadataSettings imageMetadataSettings)
+Sets object containing settings defining which images should be available in MetadataListener.
+ |
+
void |
+setOcrMetadataAllowed(boolean ocrMetadataAllowed)
+Sets whether OCR metadata should be available in MetadataListener.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public boolean isDetectionMetadataAllowed()+
public void setDetectionMetadataAllowed(boolean detectionMetadataAllowed)+
detectionMetadataAllowed
- whether detection metadata should be available in MetadataListener.public boolean isDebugMetadataAllowed()+
public void setDebugMetadataAllowed(boolean debugMetadataAllowed)+
debugMetadataAllowed
- whether debug metadata should be available in MetadataListener.public boolean isOcrMetadataAllowed()+
public void setOcrMetadataAllowed(boolean ocrMetadataAllowed)+
ocrMetadataAllowed
- whether OCR metadata should be available in MetadataListener.public MetadataSettings.ImageMetadataSettings getImageMetadataSettings()+
public void setImageMetadataSettings(MetadataSettings.ImageMetadataSettings imageMetadataSettings)+
imageMetadataSettings
- object containing settings defining which images should be available in MetadataListener.public class OcrMetadata +extends Metadata+
Constructor and Description | +
---|
OcrMetadata(OcrResult ocrResult) |
+
Modifier and Type | +Method and Description | +
---|---|
OcrResult |
+getOcrResult()
+Returns the OCR result obtained during recognition process
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class TextMetadata +extends Metadata+
Constructor and Description | +
---|
TextMetadata(java.lang.String text) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getText() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Interface | +Description | +
---|---|
MetadataListener | +
+ Created by dodo on 17/11/15.
+ |
+
Class | +Description | +
---|---|
DetectionMetadata | +
+ Represents an object detection during recognition process.
+ |
+
ImageMetadata | +
+ Represents a metadata containing an image from recognition process.
+ |
+
Metadata | +
+ Represents a Metadata that can become available during recognition process.
+ |
+
MetadataSettings | +
+ Class that defines which metadata will be available in MetadataListener.
+ |
+
MetadataSettings.ImageMetadataSettings | +
+ Settings specific to which image metadata will be available in MetadataListener
+ |
+
MetadataSettings.ImageMetadataSettings.DebugImageMetadataSettings | ++ |
OcrMetadata | +
+ Represents an OCR result obtained during recognition process.
+ |
+
TextMetadata | +
+ Metadata that represents a text.
+ |
+
public class RandomScanElement
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<RandomScanElement> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
RandomScanElement(int titleResource,
+ java.lang.String parserName,
+ OcrParserSettings parserSettings)
+Constructor which takes string resource ID for string that will appear in UI.
+ |
+
RandomScanElement(java.lang.String title,
+ java.lang.String parserName,
+ OcrParserSettings parserSettings)
+Constructor which takes normal string for text that appears in UI.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
java.lang.String |
+getParserGroup() |
+
java.lang.String |
+getParserName()
+Returns the name of the parser.
+ |
+
OcrParserSettings |
+getParserSettings()
+Returns the parser settings that will be used to instantiate parser.
+ |
+
java.lang.String |
+getTitle(android.content.Context ctx)
+Returns title that will be displayed.
+ |
+
int |
+getTitleResource()
+Returns the resource ID representing title that will be displayed or 0 if resource ID is not available.
+ |
+
boolean |
+isOptional()
+Returns whether scan field with this configuration is optional.
+ |
+
void |
+setOptional(boolean optional)
+Sets the flag that indicates whether this scan element is optional, which means
+ that the result can be returned without scanning this element.
+ |
+
void |
+setParserGroup(java.lang.String parserGroup)
+Sets the parser group for parser that is responsible for this scan element.
+ |
+
void |
+setParserName(java.lang.String parserName)
+Sets the name of the parser.
+ |
+
void |
+setParserSettings(OcrParserSettings parserSettings)
+Sets the parser settings that will be used to instantiate parser.
+ |
+
void |
+setTitle(java.lang.String title)
+Sets the title that will be displayed.
+ |
+
void |
+setTitleResource(int titleResource)
+Sets the resource ID representing title that will be displayed.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<RandomScanElement> CREATOR+
public RandomScanElement(@StringRes + int titleResource, + @NonNull + java.lang.String parserName, + @NonNull + OcrParserSettings parserSettings)+
titleResource
- String resource ID representing parser title displayed.parserName
- Name of the parser which is used to identify result of the parser in BlinkOCRRecognitionResult
.parserSettings
- Parser settings used for instantiation of parser.public RandomScanElement(@NonNull + java.lang.String title, + @NonNull + java.lang.String parserName, + @NonNull + OcrParserSettings parserSettings)+
title
- Parser title displayed.parserName
- Name of the parser which is used to identify result of the parser in BlinkOCRRecognitionResult
.parserSettings
- Parser settings used for instantiation of parser.public void setTitle(@Nullable + java.lang.String title)+
setTitleResource(int)
).
+ Set to null to use resource set with setTitleResource(int)
.title
- Title that will be displayed or null to use resource set with setTitleResource(int)
.@NonNull +public java.lang.String getTitle(@NonNull + android.content.Context ctx)+
setTitle(String)
, that string will be returned.
+ If title was set as resource with setTitleResource(int)
, string resource will be resolved and resolved string will be
+ returned.ctx
- Context used for resolving string resource set with setTitleResource(int)
.@StringRes +public int getTitleResource()+
public void setTitleResource(@StringRes + int titleResource)+
titleResource
- String resource representing title that will be displayed.@NonNull +public java.lang.String getParserName()+
BlinkOCRRecognitionResult
.public void setParserName(@NonNull + java.lang.String parserName)+
BlinkOCRRecognitionResult
.parserName
- the name of the parserpublic OcrParserSettings getParserSettings()+
public void setParserSettings(@NonNull + OcrParserSettings parserSettings)+
parserSettings
- parser settings that will be used to instantiate parser.public boolean isOptional()+
setOptional(boolean)
(boolean)}.setOptional(boolean)
(boolean)}.public void setOptional(boolean optional)+
false
and the scan element is mandatory.optional
- If set to true
scan element is optional, otherwise it is mandatory.public java.lang.String getParserGroup()+
public void setParserGroup(java.lang.String parserGroup)+
parserGroup
- parser group for parser that is responsible for this scan elementpublic java.lang.String toString()+
toString
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class ScanConfiguration
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<ScanConfiguration> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
ScanConfiguration(int titleResource,
+ int textResource,
+ java.lang.String parserName,
+ OcrParserSettings parserSettings)
+Constructor which takes string resource ID's for string that will appear in UI.
+ |
+
ScanConfiguration(java.lang.String title,
+ java.lang.String text,
+ java.lang.String parserName,
+ OcrParserSettings parserSettings)
+Constructor which takes normal strings for text that appears in UI.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
java.lang.String |
+getParserName()
+Returns the name of the parser.
+ |
+
OcrParserSettings |
+getParserSettings()
+Returns the parser settings that will be used to instatiate parser.
+ |
+
float |
+getScanRegionRelativeHeight()
+Returns the current scan region height, represented as percentage of maximal allowed scan region height.
+ |
+
float |
+getScanRegionRelativeWidth()
+Returns the current scan region width, represented as percentage of maximal allowed scan region width.
+ |
+
float |
+getShownScanRegionRelativeHeight()
+Returns the current height of the scan region that will be shown to the user, represented as percentage
+ of maximal allowed scan region height.
+ |
+
float |
+getShownScanRegionRelativeWidth()
+Returns the current width of the scan region that will be shown to the user, represented as percentage
+ of maximal allowed scan region width.
+ |
+
java.lang.String |
+getText(android.content.Context ctx)
+Returns the text that will be displayed when parser is active.
+ |
+
int |
+getTextResource()
+Returns the resource ID representing text that will be displayed when parser is active.
+ |
+
java.lang.String |
+getTitle(android.content.Context ctx)
+Returns title that will be displayed.
+ |
+
int |
+getTitleResource()
+Returns the resource ID representing title that will be displayed or 0 if resource ID is not available.
+ |
+
boolean |
+isOptional()
+Returns whether scan field with this configuration is optional.
+ |
+
void |
+setOptional(boolean optional)
+Sets the flag that indicates whether this scan configuration is optional, which means
+ that the data from the scan field with this configuration is not mandatory and can be skipped by user.
+ |
+
void |
+setParserName(java.lang.String parserName)
+Sets the name of the parser.
+ |
+
void |
+setParserSettings(OcrParserSettings parserSettings)
+Sets the parser settings that will be used to instatiate parser.
+ |
+
void |
+setScanRegionRelativeHeight(float scanRegionRelativeHeight)
+Sets the scan region height, represented as percentage of maximal allowed scan region height.
+ |
+
void |
+setScanRegionRelativeWidth(float scanRegionRelativeWidth)
+Sets the scan region width, represented as percentage of maximal allowed scan region width.
+ |
+
void |
+setShownScanRegionRelativeHeight(float shownScanRegionRelativeHeight)
+Sets the height of the scan region that will be shown to the user, represented as percentage
+ of maximal allowed scan region height.
+ |
+
void |
+setShownScanRegionRelativeWidth(float shownScanRegionRelativeWidth)
+Sets the width of the scan region that will be shown to the user, represented as percentage
+ of maximal allowed scan region width.
+ |
+
void |
+setText(java.lang.String text)
+Sets the text that will be displayed when parser is active.
+ |
+
void |
+setTextResource(int textResource)
+Sets the resource ID representing text that will be displayed when parser is active.
+ |
+
void |
+setTitle(java.lang.String title)
+Sets the title that will be displayed.
+ |
+
void |
+setTitleResource(int titleResource)
+Sets the resource ID representing title that will be displayed.
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<ScanConfiguration> CREATOR+
public ScanConfiguration(@StringRes + int titleResource, + @StringRes + int textResource, + @NonNull + java.lang.String parserName, + @NonNull + OcrParserSettings parserSettings)+
titleResource
- String resource ID representing parser title displayed.textResource
- String resource ID representing message that will be displayed when parser is active.parserName
- Name of the parser which is used to identify result of the parser in BlinkOCRRecognitionResult
.parserSettings
- Parser settings used for instatiation of parser.public ScanConfiguration(@NonNull + java.lang.String title, + @NonNull + java.lang.String text, + @NonNull + java.lang.String parserName, + @NonNull + OcrParserSettings parserSettings)+
title
- Parser title displayed.text
- Message that will be displayed when parser is active.parserName
- Name of the parser which is used to identify result of the parser in BlinkOCRRecognitionResult
.parserSettings
- Parser settings used for instatiation of parser.public void setTitle(@Nullable + java.lang.String title)+
setTitleResource(int)
).
+ Set to null to use resource set with setTitleResource(int)
.title
- Title that will be displayed or null to use resource set with setTitleResource(int)
.@NonNull +public java.lang.String getTitle(@NonNull + android.content.Context ctx)+
setTitle(String)
, that string will be returned.
+ If title was set as resource with setTitleResource(int)
, string resource will be resolved and resolved string will be
+ returned.ctx
- Context used for resolving string resource set with setTitleResource(int)
.@StringRes +public int getTitleResource()+
public void setTitleResource(@StringRes + int titleResource)+
titleResource
- String reosource representing title that will be displayed.@StringRes +public int getTextResource()+
public void setTextResource(@StringRes + int textResource)+
textResource
- the resource ID representing text that will be displayed when parser is active.@NonNull +public java.lang.String getText(@NonNull + android.content.Context ctx)+
setText(String)
,
+ the same string is returned. If text was set with setTextResource(int)
, the text resource ID will
+ be resolved and resolved string will be returned.ctx
- Context used to resolve string resource.public void setText(@Nullable + java.lang.String text)+
setTextResource(int)
. Set the text to null to use text loaded from resource set with
+ setTextResource(int)
.text
- text that will be displayed when parser is active or null to use resource set with setTextResource(int)
.@NonNull +public java.lang.String getParserName()+
BlinkOCRRecognitionResult
.public void setParserName(@NonNull + java.lang.String parserName)+
BlinkOCRRecognitionResult
.parserName
- the name of the parserpublic OcrParserSettings getParserSettings()+
public void setParserSettings(@NonNull + OcrParserSettings parserSettings)+
parserSettings
- parser settings that will be used to instatiate parser.public boolean isOptional()+
setOptional(boolean)
(boolean)}.setOptional(boolean)
(boolean)}.public void setOptional(boolean optional)+
false
and the scan field is mandatory.optional
- If set to true
, scan field with this configuration is optional
+ and user can skip it, otherwise the scan field is mandatory.public float getScanRegionRelativeWidth()+
public void setScanRegionRelativeWidth(float scanRegionRelativeWidth)+
scanRegionRelativeWidth
- scan region width, represented as percentage of maximal allowed scan region width.public float getScanRegionRelativeHeight()+
public void setScanRegionRelativeHeight(float scanRegionRelativeHeight)+
scanRegionRelativeHeight
- scan region height, represented as percentage of maximal allowed scan region height.public float getShownScanRegionRelativeWidth()+
public void setShownScanRegionRelativeWidth(float shownScanRegionRelativeWidth)+
shownScanRegionRelativeWidth
- width of the scan region that will be shown to the user, represented as
+ percentage of maximal allowed scan region width.public float getShownScanRegionRelativeHeight()+
public void setShownScanRegionRelativeHeight(float shownScanRegionRelativeHeight)+
shownScanRegionRelativeHeight
- scan region height that will be shown to the user, represented as
+ percentage of maximal allowed scan region height.public java.lang.String toString()+
toString
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
Class | +Description | +
---|---|
RandomScanElement | +
+ This class holds a combination of parser settings, parser name (which is important for obtaining
+ scan result), parser group and parser title (shown in UI).
+ |
+
ScanConfiguration | +
+ This class will hold a combination of parser settings, parser name, parser title (shown in UI) and
+ parser message (shown in UI).
+ |
+
public class InvalidLicenceKeyException
+extends java.lang.Exception
+Constructor and Description | +
---|
InvalidLicenceKeyException(java.lang.String msg) |
+
InvalidLicenceKeyException(java.lang.String msg,
+ java.lang.Throwable innerExc) |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public class ResourceManager
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static ResourceManager |
+INSTANCE |
+
Constructor and Description | +
---|
ResourceManager() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+finalize() |
+
void |
+loadAllResources(android.content.Context context)
+Loads all resources that are required for native processing.
+ |
+
void |
+unloadAllResources()
+Clears all resources that are required for native processing and frees the memory.
+ |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final ResourceManager INSTANCE+
public void loadAllResources(android.content.Context context)+
context
- Application context required to access resources.public void unloadAllResources()+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
Class | +Description | +
---|---|
ResourceManager | +
+ Class for managing raw resources data Singleton implemented as enum
+ |
+
Exception | +Description | +
---|---|
InvalidLicenceKeyException | +
+ Thrown when invalid licence key is set to library.
+ |
+
public abstract class BaseRecognitionResult
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+BaseRecognitionResult(android.os.Bundle dataBundle,
+ boolean empty,
+ boolean valid) |
+
|
+BaseRecognitionResult(long nativeHolderPtr,
+ boolean empty,
+ boolean valid)
+Creates the RecognitionData object.
+ |
+
protected |
+BaseRecognitionResult(android.os.Parcel in)
+Constructor from Parcel
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents()
+Describe the kinds of special objects contained in this Parcelable's
+ marshalled representation.
+ |
+
int |
+getIntElement(java.lang.String key) |
+
IResultHolder |
+getResultHolder() |
+
java.lang.String |
+getStringElement(java.lang.String key) |
+
java.lang.String |
+getTitle() |
+
boolean |
+isEmpty()
+Flag denoting no data was recognized.
+ |
+
boolean |
+isValid()
+Flag denoting recognizer believes this is valid data.
+ |
+
void |
+log()
+Logs recognition data object to Logcat
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags)
+Method serializes the object to android Parcel.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public BaseRecognitionResult(long nativeHolderPtr, + boolean empty, + boolean valid)+
nativeHolderPtr
- pointer to native holder holding recognition resultsempty
- Is RecognitionData empty?valid
- Is RecognitionData valid?protected BaseRecognitionResult(android.os.Bundle dataBundle, + boolean empty, + boolean valid)+
protected BaseRecognitionResult(android.os.Parcel in)+
in
- parcel objectpublic final IResultHolder getResultHolder()+
public java.lang.String getTitle()+
public java.lang.String toString()+
toString
in class java.lang.Object
public void log()+
public java.lang.String getStringElement(java.lang.String key)+
public int getIntElement(java.lang.String key)+
public boolean isValid()+
public boolean isEmpty()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
dest
- Destinationflags
- Additional serializer flags.public int describeContents()+
describeContents
in interface android.os.Parcelable
public interface IResultHolder
+Modifier and Type | +Method and Description | +
---|---|
boolean |
+getBoolean(java.lang.String key,
+ boolean defaultValue) |
+
int |
+getInt(java.lang.String key,
+ int defaultValue) |
+
java.lang.Object |
+getObject(java.lang.String key) |
+
android.os.Parcelable |
+getParcelable(java.lang.String key) |
+
java.lang.String |
+getString(java.lang.String key) |
+
boolean |
+isEmpty() |
+
boolean |
+isValid() |
+
java.util.Set<java.lang.String> |
+keySet() |
+
void |
+writeToParcel(android.os.Parcel dest) |
+
java.util.Set<java.lang.String> keySet()+
void writeToParcel(android.os.Parcel dest)+
android.os.Parcelable getParcelable(java.lang.String key)+
java.lang.String getString(java.lang.String key)+
int getInt(java.lang.String key, + int defaultValue)+
boolean getBoolean(java.lang.String key, + boolean defaultValue)+
java.lang.Object getObject(java.lang.String key)+
boolean isValid()+
boolean isEmpty()+
public class LibraryInfoResult +extends BaseRecognitionResult+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<LibraryInfoResult> |
+CREATOR
+Parcelable creator object
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+LibraryInfoResult(long data,
+ boolean empty,
+ boolean valid) |
+
protected |
+LibraryInfoResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getLibraryInformationString() |
+
java.lang.String |
+getTitle() |
+
java.lang.String |
+toString() |
+
describeContents, getIntElement, getResultHolder, getStringElement, isEmpty, isValid, log, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<LibraryInfoResult> CREATOR+
public LibraryInfoResult(long data, + boolean empty, + boolean valid)+
protected LibraryInfoResult(android.os.Parcel in)+
public java.lang.String getLibraryInformationString()+
public java.lang.String toString()+
toString
in class BaseRecognitionResult
public java.lang.String getTitle()+
getTitle
in class BaseRecognitionResult
public interface RecognitionResultConstants
+Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+ACCOUNT_NUMBER
+Key for accessing Account number element.
+ |
+
static java.lang.String |
+AMOUNT
+Key for accessing Amount element.
+ |
+
static java.lang.String |
+AUTHORITY |
+
static java.lang.String |
+BANK_CODE
+Key for accessing Bank code element.
+ |
+
static java.lang.String |
+BANK_NAME
+Key for accessing Bank name element.
+ |
+
static java.lang.String |
+BARCODE_DATA
+Key for accessing generic barcode data
+ |
+
static java.lang.String |
+BARCODE_EXTENDED_DATA
+Key for accessing extended barcode data for code39 barcode
+ |
+
static java.lang.String |
+BARCODE_LOCATION
+Key for accessing barcode location
+ |
+
static java.lang.String |
+BELEGNUMMER
+Key for accessing the document type information in Austrian payslips
+ |
+
static java.lang.String |
+BIC
+Key for accessing BIC element.
+ |
+
static java.lang.String |
+BILL_NUMBER
+Key for accessing bill number result
+ |
+
static java.lang.String |
+CODE128_RESULT
+Key for accessing the code128 1D barcode result in USDL
+ |
+
static java.lang.String |
+CODE39_RESULT
+Key for accessing the code39 1D barcode result in USDL
+ |
+
static java.lang.String |
+CONSTANT_SYMBOL |
+
static java.lang.String |
+CONTRACT_ACCOUNT
+Key for accessing the contract account information in Austrian payslips
+ |
+
static java.lang.String |
+COUNTRY_ID |
+
static java.lang.String |
+CREDITOR_ID |
+
static java.lang.String |
+CURRENCY
+Key for accessing Currency element.
+ |
+
static java.lang.String |
+CUSTOMER_DATA
+Key for accessing Tax number element.
+ |
+
static java.lang.String |
+CUSTOMER_NUMBER
+Key for accessing customer number result
+ |
+
static java.lang.String |
+DATE_OF_SIGNATURE |
+
static java.lang.String |
+DETECTIOR_RESULT |
+
static java.lang.String |
+DISPLAY_DATA
+Key for accessing the display data information in Austrian payslips
+ |
+
static java.lang.String |
+DOCUMENT_CLASSIFICATION |
+
static java.lang.String |
+DOCUMENT_EXPIRY_DATE |
+
static java.lang.String |
+DOCUMENT_ISSUE_DATE |
+
static java.lang.String |
+DOCUMENT_ISSUING_AUTHORITY |
+
static java.lang.String |
+DRIVER_NUMBER |
+
static java.lang.String |
+DUE_DATE
+Key for accessing Due date element.
+ |
+
static java.lang.String |
+EXECUTION_DATE |
+
static java.lang.String |
+FORM_FUNCTION |
+
static java.lang.String |
+FORM_ID
+Key for accessing Form ID element.
+ |
+
static java.lang.String |
+FORM_TYPE |
+
static java.lang.String |
+FORM_VERSION |
+
static java.lang.String |
+IBAN
+Key for accessing IBAN element.
+ |
+
static java.lang.String |
+INVOICE_ID |
+
static java.lang.String |
+LIBINFO
+Key for accessing the library info for barcode readers
+ |
+
static java.lang.String |
+MANDATE_ID |
+
static java.lang.String |
+MRTD_ALIEN_NUMBER |
+
static java.lang.String |
+MRTD_APPLICATION_RECIEPT_NUMBER |
+
static java.lang.String |
+MRTD_DATE_OF_BIRTH |
+
static java.lang.String |
+MRTD_DATE_OF_EXPIRY |
+
static java.lang.String |
+MRTD_DOCUMENT_CODE |
+
static java.lang.String |
+MRTD_DOCUMENT_NUMBER |
+
static java.lang.String |
+MRTD_DOCUMENT_TYPE |
+
static java.lang.String |
+MRTD_IMMIGRANT_CASE_NUMBER |
+
static java.lang.String |
+MRTD_ISSUER |
+
static java.lang.String |
+MRTD_NATIONALITY |
+
static java.lang.String |
+MRTD_OPT1 |
+
static java.lang.String |
+MRTD_OPT2 |
+
static java.lang.String |
+MRTD_PARSED |
+
static java.lang.String |
+MRTD_PRIMARY_ID |
+
static java.lang.String |
+MRTD_RAW |
+
static java.lang.String |
+MRTD_SECONDARY_ID |
+
static java.lang.String |
+MRTD_SEX |
+
static java.lang.String |
+NRIC_NUMBER |
+
static java.lang.String |
+OCR_RESULT |
+
static java.lang.String |
+OPTIONAL_DATA |
+
static java.lang.String |
+OWNER_ADDRESS |
+
static java.lang.String |
+OWNER_BIRTH_DATA |
+
static java.lang.String |
+OWNER_BIRTH_DATE |
+
static java.lang.String |
+OWNER_FIRST_NAME |
+
static java.lang.String |
+OWNER_FULL_NAME |
+
static java.lang.String |
+OWNER_LAST_NAME |
+
static java.lang.String |
+OWNER_RELIGION |
+
static java.lang.String |
+OWNER_SEX |
+
static java.lang.String |
+PAYBULL_URL
+Key for accessing PayBull URL element.
+ |
+
static java.lang.String |
+PAYER_ACCOUNT_NUMBER
+Key for accessing Payer Account number element.
+ |
+
static java.lang.String |
+PAYER_ADDRESS
+Key for accessing payer address element.
+ |
+
static java.lang.String |
+PAYER_BANK_CODE
+Key for accessing Payer bank code element.
+ |
+
static java.lang.String |
+PAYER_DETAILED_ADDRESS
+Key for accessing payer detailed address element.
+ |
+
static java.lang.String |
+PAYER_IBAN
+Key for accessing Payer IBAN element.
+ |
+
static java.lang.String |
+PAYER_ID
+Key for accessing Payer ID element.
+ |
+
static java.lang.String |
+PAYER_NAME
+Key for accessing Payer name element.
+ |
+
static java.lang.String |
+PAYER_REFERENCE
+Key for accessing Payer reference element.
+ |
+
static java.lang.String |
+PAYER_REFERENCE_MODEL
+Key for accessing Payer reference model element.
+ |
+
static java.lang.String |
+PAYMENT_DESCRIPTION
+Key for accessing PaymentDescription element.
+ |
+
static java.lang.String |
+PAYMENT_DESCRIPTION_CODE
+Key for accessing Payment Description code element.
+ |
+
static java.lang.String |
+PAYMENT_TYPE |
+
static java.lang.String |
+PDF417_RESULT
+Key for accessing the pdf417 2D barcode result in USDL
+ |
+
static java.lang.String |
+PERIODIC_FIRST_EXECUTION_DATE |
+
static java.lang.String |
+PERIODIC_LAST_EXECUTION_DATE |
+
static java.lang.String |
+PERIODIC_TIME_UNIT |
+
static java.lang.String |
+PERIODIC_TIME_UNIT_ROTATION |
+
static java.lang.String |
+PHOTOMATH_DATA
+Key for string PhotoMath data
+ |
+
static java.lang.String |
+POSTING_KEY |
+
static java.lang.String |
+PRUFZIFFER
+Key for accessing the check digit of Austrian SEPA payslips
+ |
+
static java.lang.String |
+PURPOSE_CODE
+Key for accessing Purpose Code element.
+ |
+
static java.lang.String |
+RAW_BARCODE_DATA
+Key for accessing raw barcode data.
+ |
+
static java.lang.String |
+RAW_BARCODE_EXTENDED_DATA
+Key for accessing extended raw barcode data for code39 barcode.
+ |
+
static java.lang.String |
+RAW_PDF417_RESULT |
+
static java.lang.String |
+RAW_RESULT
+Key for accessing the raw result of OCR/barcode decode.
+ |
+
static java.lang.String |
+RECIPIENT_ADDRESS
+Key for accessing Recipient address element.
+ |
+
static java.lang.String |
+RECIPIENT_DETAILED_ADDRESS
+Key for accessing Recipient detailed address element.
+ |
+
static java.lang.String |
+RECIPIENT_NAME
+Key for accessing Recipient name element.
+ |
+
static java.lang.String |
+RECOGNITIONDATA_TYPE
+Key for accessing Recognition data type element.
+ |
+
static java.lang.String |
+REFERENCE
+Key for accessing Reference element.
+ |
+
static java.lang.String |
+REFERENCE_MODEL
+Key for accessing Reference model element.
+ |
+
static java.lang.String |
+REFERENCE_STATUS
+Key for accessing Reference status element.
+ |
+
static java.lang.String |
+SLIP_ID
+Key for accessing SlipID element.
+ |
+
static java.lang.String |
+SORTING_CODE
+Key for accessing sorting code result
+ |
+
static java.lang.String |
+SPECIFIC_SYMBOL |
+
static java.lang.String |
+SUBSCRIBER_NUMBER |
+
static java.lang.String |
+TAX_NUMBER
+Key for accessing Tax number element.
+ |
+
static java.lang.String |
+TRANSACTION_CODE
+Key for accessing transaction code result
+ |
+
static java.lang.String |
+UNCERTAIN |
+
static java.lang.String |
+UTILITY_ID
+Key for accessing Kosovo's utility ID
+ |
+
static java.lang.String |
+VARIABLE_SYMBOL |
+
static final java.lang.String RECOGNITIONDATA_TYPE+
static final java.lang.String AMOUNT+
static final java.lang.String CURRENCY+
static final java.lang.String IBAN+
static final java.lang.String BIC+
static final java.lang.String ACCOUNT_NUMBER+
static final java.lang.String REFERENCE+
static final java.lang.String REFERENCE_MODEL+
static final java.lang.String REFERENCE_STATUS+
static final java.lang.String BANK_CODE+
static final java.lang.String RECIPIENT_NAME+
static final java.lang.String RECIPIENT_ADDRESS+
static final java.lang.String RECIPIENT_DETAILED_ADDRESS+
static final java.lang.String BANK_NAME+
static final java.lang.String FORM_ID+
static final java.lang.String SLIP_ID+
static final java.lang.String PAYMENT_DESCRIPTION+
static final java.lang.String PAYER_IBAN+
static final java.lang.String PAYER_ACCOUNT_NUMBER+
static final java.lang.String PAYER_BANK_CODE+
static final java.lang.String PAYER_REFERENCE+
static final java.lang.String PAYER_REFERENCE_MODEL+
static final java.lang.String PAYER_ID+
static final java.lang.String PAYER_NAME+
static final java.lang.String PAYER_ADDRESS+
static final java.lang.String PAYER_DETAILED_ADDRESS+
static final java.lang.String DUE_DATE+
static final java.lang.String PAYMENT_DESCRIPTION_CODE+
static final java.lang.String PURPOSE_CODE+
static final java.lang.String PAYBULL_URL+
static final java.lang.String TAX_NUMBER+
static final java.lang.String CUSTOMER_DATA+
static final java.lang.String RAW_RESULT+
static final java.lang.String PRUFZIFFER+
static final java.lang.String BELEGNUMMER+
static final java.lang.String CONTRACT_ACCOUNT+
static final java.lang.String DISPLAY_DATA+
static final java.lang.String LIBINFO+
static final java.lang.String CODE39_RESULT+
static final java.lang.String CODE128_RESULT+
static final java.lang.String PDF417_RESULT+
static final java.lang.String BARCODE_DATA+
static final java.lang.String BARCODE_LOCATION+
static final java.lang.String BARCODE_EXTENDED_DATA+
static final java.lang.String RAW_BARCODE_DATA+
static final java.lang.String RAW_BARCODE_EXTENDED_DATA+
static final java.lang.String BILL_NUMBER+
static final java.lang.String CUSTOMER_NUMBER+
static final java.lang.String TRANSACTION_CODE+
static final java.lang.String SORTING_CODE+
static final java.lang.String PHOTOMATH_DATA+
static final java.lang.String UTILITY_ID+
static final java.lang.String UNCERTAIN+
static final java.lang.String RAW_PDF417_RESULT+
static final java.lang.String FORM_FUNCTION+
static final java.lang.String FORM_VERSION+
static final java.lang.String FORM_TYPE+
static final java.lang.String POSTING_KEY+
static final java.lang.String AUTHORITY+
static final java.lang.String DETECTIOR_RESULT+
static final java.lang.String COUNTRY_ID+
static final java.lang.String EXECUTION_DATE+
static final java.lang.String CREDITOR_ID+
static final java.lang.String MANDATE_ID+
static final java.lang.String DATE_OF_SIGNATURE+
static final java.lang.String PERIODIC_TIME_UNIT+
static final java.lang.String PERIODIC_TIME_UNIT_ROTATION+
static final java.lang.String PERIODIC_FIRST_EXECUTION_DATE+
static final java.lang.String PERIODIC_LAST_EXECUTION_DATE+
static final java.lang.String MRTD_DOCUMENT_TYPE+
static final java.lang.String MRTD_PRIMARY_ID+
static final java.lang.String MRTD_SECONDARY_ID+
static final java.lang.String MRTD_DATE_OF_BIRTH+
static final java.lang.String MRTD_DOCUMENT_CODE+
static final java.lang.String MRTD_ISSUER+
static final java.lang.String MRTD_DOCUMENT_NUMBER+
static final java.lang.String MRTD_DATE_OF_EXPIRY+
static final java.lang.String MRTD_NATIONALITY+
static final java.lang.String MRTD_SEX+
static final java.lang.String MRTD_OPT1+
static final java.lang.String MRTD_OPT2+
static final java.lang.String MRTD_RAW+
static final java.lang.String MRTD_ALIEN_NUMBER+
static final java.lang.String MRTD_APPLICATION_RECIEPT_NUMBER+
static final java.lang.String MRTD_IMMIGRANT_CASE_NUMBER+
static final java.lang.String OWNER_FIRST_NAME+
static final java.lang.String OWNER_LAST_NAME+
static final java.lang.String OWNER_FULL_NAME+
static final java.lang.String OWNER_ADDRESS+
static final java.lang.String OWNER_BIRTH_DATA+
static final java.lang.String OWNER_BIRTH_DATE+
static final java.lang.String OWNER_SEX+
static final java.lang.String OWNER_RELIGION+
static final java.lang.String DOCUMENT_ISSUE_DATE+
static final java.lang.String DOCUMENT_EXPIRY_DATE+
static final java.lang.String DOCUMENT_ISSUING_AUTHORITY+
static final java.lang.String DRIVER_NUMBER+
static final java.lang.String NRIC_NUMBER+
static final java.lang.String OPTIONAL_DATA+
static final java.lang.String SUBSCRIBER_NUMBER+
static final java.lang.String OCR_RESULT+
static final java.lang.String MRTD_PARSED+
static final java.lang.String DOCUMENT_CLASSIFICATION+
static final java.lang.String VARIABLE_SYMBOL+
static final java.lang.String CONSTANT_SYMBOL+
static final java.lang.String SPECIFIC_SYMBOL+
static final java.lang.String PAYMENT_TYPE+
static final java.lang.String INVOICE_ID+
public class RecognitionResults
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<RecognitionResults> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+RecognitionResults(BaseRecognitionResult[] results,
+ RecognitionType recognitionType) |
+
protected |
+RecognitionResults(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
BaseRecognitionResult[] |
+getRecognitionResults()
+Returns the array of recognition results or null if nothing was scanned.
+ |
+
RecognitionType |
+getRecognitionType()
+Returns the type of recognition.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<RecognitionResults> CREATOR+
public RecognitionResults(BaseRecognitionResult[] results, + RecognitionType recognitionType)+
protected RecognitionResults(android.os.Parcel in)+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
@Nullable +public BaseRecognitionResult[] getRecognitionResults()+
public RecognitionType getRecognitionType()+
public enum BarcodeType +extends java.lang.Enum<BarcodeType>+
Enum Constant and Description | +
---|
AZTEC |
+
CODE128 |
+
CODE39 |
+
DATA_MATRIX |
+
EAN13 |
+
EAN8 |
+
ITF |
+
PDF417 |
+
QR |
+
UPCA |
+
UPCE |
+
Modifier and Type | +Method and Description | +
---|---|
static BarcodeType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static BarcodeType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final BarcodeType AZTEC+
public static final BarcodeType CODE128+
public static final BarcodeType CODE39+
public static final BarcodeType DATA_MATRIX+
public static final BarcodeType EAN13+
public static final BarcodeType EAN8+
public static final BarcodeType ITF+
public static final BarcodeType QR+
public static final BarcodeType UPCA+
public static final BarcodeType UPCE+
public static final BarcodeType PDF417+
public static BarcodeType[] values()+
+for (BarcodeType c : BarcodeType.values()) + System.out.println(c); +
public static BarcodeType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class BarDecoderRecognizerSettings +extends RecognizerSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BarDecoderRecognizerSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
BarDecoderRecognizerSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isAutoScaleDetectionEnabled() |
+
boolean |
+isInverseScanMode() |
+
boolean |
+isTryingHarder() |
+
void |
+setAutoScaleDetection(boolean autoScaleDetection)
+Allow enabling the autodetection of image scale when scanning barcodes.
+ |
+
void |
+setInverseScanning(boolean inverseBarcodeScanning) |
+
void |
+setScanCode128(boolean scanCode128) |
+
void |
+setScanCode39(boolean scanCode39) |
+
void |
+setTryHarder(boolean tryHarder) |
+
boolean |
+shouldScanCode128() |
+
boolean |
+shouldScanCode39() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, isEnabled, requiresAutofocus, requiresLandscapeMode, setEnabled
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<BarDecoderRecognizerSettings> CREATOR+
public BarDecoderRecognizerSettings()+
public boolean shouldScanCode128()+
public void setScanCode128(boolean scanCode128)+
scanCode128
- whether or not Code128 barcode should be scannedpublic boolean shouldScanCode39()+
public void setScanCode39(boolean scanCode39)+
scanCode39
- whether or not Code39 barcode should be scannedpublic void setInverseScanning(boolean inverseBarcodeScanning)+
inverseBarcodeScanning
- Enables scanning of barcodes with inverse intensity values
+ (e.g. white barcode on black background)public boolean isInverseScanMode()+
public void setAutoScaleDetection(boolean autoScaleDetection)+
autoScaleDetection
- If set to true, prior reading barcode, image scale will be
+ corrected. This enabled correct reading of barcodes on high
+ resolution images but slows down the recognition process.public boolean isAutoScaleDetectionEnabled()+
public void setTryHarder(boolean tryHarder)+
tryHarder
- Enables scanning of lower resolution barcodes at cost of additional processing time.public boolean isTryingHarder()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
public class BarDecoderScanResult +extends BaseRecognitionResult+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BarDecoderScanResult> |
+CREATOR
+Parcelable creator object
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+BarDecoderScanResult(long data,
+ boolean empty,
+ boolean valid) |
+
protected |
+BarDecoderScanResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
BarcodeType |
+getBarcodeType()
+Returns the type of barcode scanned with BarDecoder recognizer.
+ |
+
BarcodeDetailedData |
+getExtendedRawData()
+Returns the raw extended barcode data.
+ |
+
java.lang.String |
+getExtendedStringData()
+Returns the string representation of extended data.
+ |
+
BarcodeDetailedData |
+getRawData()
+Returns the raw barcode data.
+ |
+
java.lang.String |
+getStringData()
+Returns the string representation of data inside barcode.
+ |
+
java.lang.String |
+getTitle() |
+
java.lang.String |
+toString() |
+
describeContents, getIntElement, getResultHolder, getStringElement, isEmpty, isValid, log, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<BarDecoderScanResult> CREATOR+
public BarDecoderScanResult(long data, + boolean empty, + boolean valid)+
protected BarDecoderScanResult(android.os.Parcel in)+
@Nullable +public BarcodeType getBarcodeType()+
@Nullable +public java.lang.String getStringData()+
@Nullable +public java.lang.String getExtendedStringData()+
public java.lang.String toString()+
toString
in class BaseRecognitionResult
@Nullable +public BarcodeDetailedData getRawData()+
@Nullable +public BarcodeDetailedData getExtendedRawData()+
public java.lang.String getTitle()+
getTitle
in class BaseRecognitionResult
Class | +Description | +
---|---|
BarDecoderRecognizerSettings | +
+ Created by igor on 11/20/14.
+ |
+
BarDecoderScanResult | +
+ Created by dodo on 02/12/14.
+ |
+
Enum | +Description | +
---|---|
BarcodeType | +
+ Created by dodo on 02/12/14.
+ |
+
public class Pdf417RecognizerSettings +extends RecognizerSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Pdf417RecognizerSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
Pdf417RecognizerSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isInverseScanMode() |
+
boolean |
+isNullQuietZoneAllowed() |
+
boolean |
+isUncertainScanMode() |
+
void |
+setInverseScanning(boolean inverseBarcodeScanning) |
+
void |
+setNullQuietZoneAllowed(boolean nullQuietZoneAllowed) |
+
void |
+setUncertainScanning(boolean uncertainScanning) |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, isEnabled, requiresAutofocus, requiresLandscapeMode, setEnabled
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<Pdf417RecognizerSettings> CREATOR+
public Pdf417RecognizerSettings()+
public void setUncertainScanning(boolean uncertainScanning)+
uncertainScanning
- Enable scanning of non-standard elements, but there is no
+ guarantee that all data will be read. For Pdf417 barcode to be
+ used when multiple rows are missing (e.g. not whole barcode is
+ printed)public boolean isUncertainScanMode()+
public void setNullQuietZoneAllowed(boolean nullQuietZoneAllowed)+
nullQuietZoneAllowed
- Allow scanning barcodes which don't have quiet zone
+ surrounding it (e.g. text concatenated with barcode). This
+ option can significantly increase recognition time.public boolean isNullQuietZoneAllowed()+
public void setInverseScanning(boolean inverseBarcodeScanning)+
inverseBarcodeScanning
- Enables scanning of barcodes with inverse intensity values
+ (e.g. white barcode on black background)public boolean isInverseScanMode()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
public class Pdf417ScanResult +extends BaseRecognitionResult+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Pdf417ScanResult> |
+CREATOR
+Parcelable creator object
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+Pdf417ScanResult(long data,
+ boolean empty,
+ boolean valid) |
+
protected |
+Pdf417ScanResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
Quadrilateral |
+getPositionOnImage()
+Returns the position of barcode on image.
+ |
+
BarcodeDetailedData |
+getRawData()
+Returns the raw barcode data.
+ |
+
java.lang.String |
+getStringData()
+Returns the string representation of data inside barcode.
+ |
+
java.lang.String |
+getTitle() |
+
boolean |
+isUncertain()
+Returns true if returned data is uncertain, only applicable if used with Pdf417RecognizerSettings.setUncertainScanning(true)
+ |
+
java.lang.String |
+toString() |
+
describeContents, getIntElement, getResultHolder, getStringElement, isEmpty, isValid, log, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<Pdf417ScanResult> CREATOR+
public Pdf417ScanResult(long data, + boolean empty, + boolean valid)+
protected Pdf417ScanResult(android.os.Parcel in)+
@Nullable +public java.lang.String getStringData()+
@Nullable +public BarcodeDetailedData getRawData()+
public boolean isUncertain()+
@Nullable +public Quadrilateral getPositionOnImage()+
public java.lang.String getTitle()+
getTitle
in class BaseRecognitionResult
public java.lang.String toString()+
toString
in class BaseRecognitionResult
Class | +Description | +
---|---|
Pdf417RecognizerSettings | +
+ Created by igor on 11/19/14.
+ |
+
Pdf417ScanResult | +
+ Created by dodo on 02/12/14.
+ |
+
public class ZXingRecognizerSettings +extends RecognizerSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<ZXingRecognizerSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
ZXingRecognizerSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isInverseScanMode() |
+
boolean |
+isSlowThoroughScan()
+Returns true if slower, more thorough scan procedure is used
+ |
+
void |
+setInverseScanning(boolean inverseBarcodeScanning) |
+
void |
+setScanAztecCode(boolean scanAztecCode) |
+
void |
+setScanCode128(boolean scanCode128) |
+
void |
+setScanCode39(boolean scanCode39) |
+
void |
+setScanDataMatrixCode(boolean scanDataMatrixCode) |
+
void |
+setScanEAN13Code(boolean scanEAN13Code) |
+
void |
+setScanEAN8Code(boolean scanEAN8Code) |
+
void |
+setScanITFCode(boolean scanITFCode) |
+
void |
+setScanQRCode(boolean scanQRCode) |
+
void |
+setScanUPCACode(boolean scanUPCACode) |
+
void |
+setScanUPCECode(boolean scanUPCECode) |
+
void |
+setSlowThoroughScan(boolean slowThoroughScan)
+If this is enabled (default), then scanning will be slower, but more thorough, thus
+ giving higher possibility of successful scan.
+ |
+
boolean |
+shouldScanAztecCode() |
+
boolean |
+shouldScanCode128() |
+
boolean |
+shouldScanCode39() |
+
boolean |
+shouldScanDataMatrixCode() |
+
boolean |
+shouldScanEAN13Code() |
+
boolean |
+shouldScanEAN8Code() |
+
boolean |
+shouldScanITFCode() |
+
boolean |
+shouldScanQRCode() |
+
boolean |
+shouldScanUPCACode() |
+
boolean |
+shouldScanUPCECode() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, isEnabled, requiresAutofocus, requiresLandscapeMode, setEnabled
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<ZXingRecognizerSettings> CREATOR+
public ZXingRecognizerSettings()+
public boolean shouldScanAztecCode()+
public void setScanAztecCode(boolean scanAztecCode)+
scanAztecCode
- whether or not Aztec 2D barcode should be scannedpublic boolean shouldScanCode128()+
public void setScanCode128(boolean scanCode128)+
scanCode128
- whether or not Code128 barcode should be scannedpublic boolean shouldScanCode39()+
public void setScanCode39(boolean scanCode39)+
scanCode39
- whether or not Code39 barcode should be scannedpublic boolean shouldScanDataMatrixCode()+
public void setScanDataMatrixCode(boolean scanDataMatrixCode)+
scanDataMatrixCode
- whether or not DataMatrix 2D barcode should be scannedpublic boolean shouldScanEAN13Code()+
public void setScanEAN13Code(boolean scanEAN13Code)+
scanEAN13Code
- whether or not EAN13 barcode should be scannedpublic boolean shouldScanEAN8Code()+
public void setScanEAN8Code(boolean scanEAN8Code)+
scanEAN8Code
- whether or not EAN8 barcode should be scannedpublic boolean shouldScanITFCode()+
public void setScanITFCode(boolean scanITFCode)+
scanITFCode
- whether or not ITF barcode should be scannedpublic boolean shouldScanQRCode()+
public void setScanQRCode(boolean scanQRCode)+
scanQRCode
- whether or not QR code should be scannedpublic boolean shouldScanUPCACode()+
public void setScanUPCACode(boolean scanUPCACode)+
scanUPCACode
- whether or not UPCA barcode should be scannedpublic boolean shouldScanUPCECode()+
public void setScanUPCECode(boolean scanUPCECode)+
scanUPCECode
- whether or not UPCE barcode should be scannedpublic void setInverseScanning(boolean inverseBarcodeScanning)+
inverseBarcodeScanning
- Enables scanning of barcodes with inverse intensity values
+ (e.g. white barcode on black background)public boolean isInverseScanMode()+
public void setSlowThoroughScan(boolean slowThoroughScan)+
slowThoroughScan
- should slower, more thorough scan procedure be usedpublic boolean isSlowThoroughScan()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
public class ZXingScanResult +extends BaseRecognitionResult+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<ZXingScanResult> |
+CREATOR
+Parcelable creator object
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+ZXingScanResult(long data,
+ boolean empty,
+ boolean valid) |
+
protected |
+ZXingScanResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
BarcodeType |
+getBarcodeType()
+Returns the type of barcode scanned with ZXing recognizer.
+ |
+
BarcodeDetailedData |
+getExtendedRawData()
+Returns the raw extended barcode data for code39.
+ |
+
java.lang.String |
+getExtendedStringData()
+Returns the string representation of extended data of code39.
+ |
+
BarcodeDetailedData |
+getRawData()
+Returns the raw barcode data.
+ |
+
java.lang.String |
+getStringData()
+Returns the string representation of data inside barcode.
+ |
+
java.lang.String |
+getTitle() |
+
java.lang.String |
+toString() |
+
describeContents, getIntElement, getResultHolder, getStringElement, isEmpty, isValid, log, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<ZXingScanResult> CREATOR+
public ZXingScanResult(long data, + boolean empty, + boolean valid)+
protected ZXingScanResult(android.os.Parcel in)+
@Nullable +public BarcodeType getBarcodeType()+
@Nullable +public java.lang.String getStringData()+
@Nullable +public java.lang.String getExtendedStringData()+
@Nullable +public BarcodeDetailedData getRawData()+
@Nullable +public BarcodeDetailedData getExtendedRawData()+
public java.lang.String toString()+
toString
in class BaseRecognitionResult
public java.lang.String getTitle()+
getTitle
in class BaseRecognitionResult
Class | +Description | +
---|---|
ZXingRecognizerSettings | +
+ Created by igor on 11/19/14.
+ |
+
ZXingScanResult | +
+ Created by dodo on 02/12/14.
+ |
+
public class BlinkOCRRecognitionResult +extends TemplatingRecognitionResult +implements android.os.Parcelable+
BlinkOCRRecognizerSettings
.android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BlinkOCRRecognitionResult> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+BlinkOCRRecognitionResult(android.os.Bundle data,
+ boolean empty,
+ boolean valid) |
+
|
+BlinkOCRRecognitionResult(long data,
+ boolean empty,
+ boolean valid) |
+
protected |
+BlinkOCRRecognitionResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents()
+Describe the kinds of special objects contained in this Parcelable's
+ marshalled representation.
+ |
+
java.lang.String |
+getDocumentClassificationResult()
+Returns result of document classification, as calculated by
+DocumentClassifier set
+ with BlinkOCRRecognizerSettings.setDocumentClassifier(DocumentClassifier) . |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags)
+Method serializes the object to android Parcel.
+ |
+
getOcrResult, getOcrResult, getParsedResult, getParsedResult, getSpecificParsedResult, getSpecificParsedResult
getIntElement, getResultHolder, getStringElement, getTitle, isEmpty, isValid, log, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<BlinkOCRRecognitionResult> CREATOR+
public BlinkOCRRecognitionResult(long data, + boolean empty, + boolean valid)+
public BlinkOCRRecognitionResult(android.os.Bundle data, + boolean empty, + boolean valid)+
protected BlinkOCRRecognitionResult(android.os.Parcel in)+
@Nullable +public java.lang.String getDocumentClassificationResult()+
DocumentClassifier
set
+ with BlinkOCRRecognizerSettings.setDocumentClassifier(DocumentClassifier)
. If no document
+ classifier was used, returns null.getDocumentClassificationResult
in class TemplatingRecognitionResult
public int describeContents()+
BaseRecognitionResult
describeContents
in interface android.os.Parcelable
describeContents
in class BaseRecognitionResult
public void writeToParcel(android.os.Parcel dest, + int flags)+
BaseRecognitionResult
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class BaseRecognitionResult
dest
- Destinationflags
- Additional serializer flags.public class BlinkOCRRecognizerSettings +extends TemplatingRecognizerSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BlinkOCRRecognizerSettings> |
+CREATOR |
+
kDefaultParserGroup
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
BlinkOCRRecognizerSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+finalize() |
+
boolean |
+isAllowFlippedRecognition()
+Returns whether or not flipped recognition feature is enabled.
+ |
+
void |
+setAllowFlippedRecognition(boolean allowFlippedRecognition)
+Set this to true to enable recognition of document also in upside down direction.
+ |
+
void |
+setDetectorSettings(DetectorSettings settings)
+Sets detector settings that will define which detector will be used.
+ |
+
void |
+setDocumentClassifier(DocumentClassifier documentClassifier)
+Sets the
+DocumentClassifier that can be used for classification of the documents based
+ on the extraction result of parser groups associated with decoding infos of detector set
+ with setDetectorSettings(DetectorSettings) . |
+
void |
+setParserDecodingInfos(DecodingInfo[] decodingInfos,
+ java.lang.String decodingInfoSet)
+Sets the named decoding info set, for specific document type, whose elements contain location
+ information about additional document elements that should be recognized together with
+ elements defined within
+DetectorSettings given with setDetectorSettings(DetectorSettings) . |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
addParser, addParserToParserGroup, getAllowUnparsedResults, initFromParcel, removeAllParserDecodingInfoSets, removeAllParsers, removeAllParsersFromGroup, removeParser, removeParserDecodingInfoSet, removeParserFromParserGroup, setAllowUnparsedResults
describeContents, getNativeContext, isEnabled, requiresAutofocus, requiresLandscapeMode, setEnabled
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<BlinkOCRRecognizerSettings> CREATOR+
public BlinkOCRRecognizerSettings()+
public void setDetectorSettings(@Nullable + DetectorSettings settings)+
DecodingInfo
objects will be consulted
+ to perform dewarping of defined locations and parsers from parser group having the same
+ name as dewarped location will be used to extract OCR data.settings
- detector settings that will define which detector will be used or null.public void setAllowFlippedRecognition(boolean allowFlippedRecognition)+
DocumentDetectorSettings
).
+ Keep in mind that enabling this feature will make recognition two times slower
+ and possibly less accurate. By default, this is turned off.allowFlippedRecognition
- whether or not flipped recognition is allowedpublic boolean isAllowFlippedRecognition()+
setAllowFlippedRecognition(boolean)
.public void setParserDecodingInfos(@NonNull + DecodingInfo[] decodingInfos, + @NonNull + java.lang.String decodingInfoSet)+
DetectorSettings
given with setDetectorSettings(DetectorSettings)
.
+
+ Use this method if document contains additional information (elements) of interest that should
+ be recognized and there are multiple document types that can be
+ distinguished using the extraction result from locations defined within given detector. DecodingInfo
object which
+ holds the location for that element of interest (relative to full document detection) and the
+ desired dewarp height (in number of pixels), for that location. Name of the decoding info
+ must be equal to the name of the parser group that will be used for parsing that element. setDocumentClassifier(DocumentClassifier)
.setParserDecodingInfos
in class TemplatingRecognizerSettings
decodingInfos
- Array that contains the decoding infos for additional document elements of
+ interest that should be recognized together with the MRZ zone.decodingInfoSet
- Name of the decoding info set, must be equal to the classifier result
+ for corresponding document type.public void setDocumentClassifier(@Nullable + DocumentClassifier documentClassifier)+
DocumentClassifier
that can be used for classification of the documents based
+ on the extraction result of parser groups associated with decoding infos of detector set
+ with setDetectorSettings(DetectorSettings)
.
+ This method should be used if multiple document types having same physical size are expected
+ and additional information (elements) of interest should be recognized. In addition, decoding
+ infos for each document type should be set with method setParserDecodingInfos(DecodingInfo[], String)
+ method. For each document type, name of the decoding info set must be equal to corresponding classifier result.documentClassifier
- Document classifier that will be used for document classification based on the extraction results.
+ Classifier result, for each document type, must be equal to the name of the corresponding
+ decoding info set for that document type.protected void finalize() + throws java.lang.Throwable+
finalize
in class RecognizerSettings
java.lang.Throwable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class TemplatingRecognizerSettings
public interface DocumentClassifier
+extends android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+classifyDocument(BlinkOCRRecognitionResult extractionResult)
+Based on
+BlinkOCRRecognitionResult which contains data extracted from decoding infos
+ inherent to detector, classifies the document. |
+
describeContents, writeToParcel
java.lang.String classifyDocument(BlinkOCRRecognitionResult extractionResult)+
BlinkOCRRecognitionResult
which contains data extracted from decoding infos
+ inherent to detector, classifies the document. For each document type that you want to support,
+ returned result string has to be equal to the name of the corresponding set of DecodingInfo
+ objects which are defined for that document type. Named decoding info sets should be defined using
+ BlinkOCRRecognizerSettings.setParserDecodingInfos(DecodingInfo[], String)
method.extractionResult
- Extraction result containing data extracted from DecodingInfo
objects
+ inherent to detector set with BlinkOCRRecognizerSettings.setDetectorSettings(DetectorSettings)
public class BlinkOCRCharKey
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BlinkOCRCharKey> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
BlinkOCRCharKey(int key,
+ OcrFont font) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
boolean |
+equals(java.lang.Object o) |
+
OcrFont |
+getFont() |
+
int |
+getKey() |
+
int |
+hashCode() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<BlinkOCRCharKey> CREATOR+
public BlinkOCRCharKey(int key, + @NonNull + OcrFont font)+
public int getKey()+
public OcrFont getFont()+
public int hashCode()+
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class BlinkOCREngineOptions
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BlinkOCREngineOptions> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
BlinkOCREngineOptions() |
+
Modifier and Type | +Method and Description | +
---|---|
BlinkOCREngineOptions |
+addAllDigitsToWhitelist(OcrFont font)
+Adds all digits with given font to whitelist.
+ |
+
BlinkOCREngineOptions |
+addCharIntervalToWhitelist(char firstValue,
+ char lastValue,
+ OcrFont font)
+Adds a interval of chars including first and last to whitelist in given font (use OcrFont.ANY to cover all available fonts).
+ |
+
BlinkOCREngineOptions |
+addCharToWhitelist(BlinkOCRCharKey charKey)
+Adds a char+font combination to set of allowed chars.
+ |
+
BlinkOCREngineOptions |
+addCharToWhitelist(char value,
+ OcrFont font)
+Adds a char+font combination to set of allowed chars.
+ |
+
BlinkOCREngineOptions |
+addLowercaseCharsToWhitelist(OcrFont font)
+Adds all lowercase ascii chars with given font to whitelist.
+ |
+
BlinkOCREngineOptions |
+addUppercaseCharsToWhitelist(OcrFont font)
+Adds all uppercase ascii chars with given font to whitelist.
+ |
+
BlinkOCREngineOptions |
+allowAllCharsAndAllFonts()
+Allows all supported chars in all supported fonts.
+ |
+
int |
+describeContents() |
+
protected void |
+finalize() |
+
java.util.Set<BlinkOCRCharKey> |
+getCharWhitelist()
+Returns the set of all supported char+font combinations.
+ |
+
OcrDocumentType |
+getDocumentType()
+Returns the current OCR document type.
+ |
+
int |
+getMaximumAllowedCharRecognitionVariants()
+Returns the maximum allowed number of char recognition variants OCR engine will produce
+ for each OcrChar.
+ |
+
int |
+getMaximumCharsExpected()
+Returns the maximum number of chars expected in the image.
+ |
+
int |
+getMaximumLineHeight()
+Returns the maximum height of the line of text given in pixels.
+ |
+
int |
+getMinimumCharHeight()
+Returns the minimum height of char that can be classified.
+ |
+
int |
+getMinimumLineHeight()
+Returns the minimum height of the line of text given in pixels.
+ |
+
long |
+getNativeContext() |
+
boolean |
+isCasePostprocessorEnabled()
+Returns whether case postprocessing is enabled.
+ |
+
boolean |
+isColorDropoutEnabled()
+Returns true if the additional image processing which drops background colors will be performed.
+ |
+
boolean |
+isCutoffCharFilterEnabled()
+Returns whether cutoff char filter is enabled.
+ |
+
boolean |
+isDetectFlippedTextEnabled()
+Returns whether flipped text detection is enabled.
+ |
+
boolean |
+isImageProcessingEnabled()
+Returns true if image processing is performed on image.
+ |
+
boolean |
+isLineGroupingEnabled()
+Returns whether line grouping is enabled.
+ |
+
boolean |
+isNoisePostprocessingEnabled()
+Returns whether noise postprocessing is enabled.
+ |
+
boolean |
+isRatioPostprocessorEnabled()
+Returns whether ratio postprocessor is enabled.
+ |
+
boolean |
+isWordProcessingEnabled()
+Returns whether word processing is enabled.
+ |
+
BlinkOCREngineOptions |
+setCasePostprocessorEnabled(boolean casePostprocessorEnabled)
+If enabled, classification will be aided by character position in line.
+ |
+
BlinkOCREngineOptions |
+setColorDropoutEnabled(boolean colorDropoutEnabled)
+Specifies if the additional image processing which drops the background colors should be performed.
+ |
+
BlinkOCREngineOptions |
+setCutoffCharFilterEnabled(boolean cutoffCharFilterEnabled)
+If enabled, all chars that are classified as cutoff, in other words chars
+ that exceed image bounds, will be removed from the result.
+ |
+
BlinkOCREngineOptions |
+setDetectFlippedTextEnabled(boolean detectFlippedTextEnabled)
+If enabled, OCR will produce result for the input image and for
+ input image rotated by 180 degrees.
+ |
+
BlinkOCREngineOptions |
+setDocumentType(OcrDocumentType documentType)
+Specifies the OCR document type that will be used to adjust the ocr engine settings.
+ |
+
BlinkOCREngineOptions |
+setImageProcessingEnabled(boolean imageProcessingEnabled)
+Specifies if the image processing is performed on image
+
+ By default it's set to true.
+ |
+
BlinkOCREngineOptions |
+setLineGroupingEnabled(boolean lineGroupingEnabled)
+If line grouping is enabled, chars are grouped into lines.
+ |
+
BlinkOCREngineOptions |
+setMaximumAllowedCharRecognitionVariants(int maximumAllowedCharRecognitionVariants)
+Sets the maximum allowed number of char recognition variants OCR engine will produce
+ for each OcrChar.
+ |
+
BlinkOCREngineOptions |
+setMaximumCharsExpected(int maximumCharsExpected)
+Sets the maximum number of chars expected in the image.
+ |
+
BlinkOCREngineOptions |
+setMaximumLineHeight(int maximumLineHeight)
+Sets the maximum height of the line of text given in pixels.
+ |
+
BlinkOCREngineOptions |
+setMinimumCharHeight(int minimumCharHeight)
+Sets the minimum height of the char that can be classified.
+ |
+
BlinkOCREngineOptions |
+setMinimumLineHeight(int minimumLineHeight)
+Sets the minimum height of the line of thxt given in pixels.
+ |
+
BlinkOCREngineOptions |
+setNoisePostprocessingEnabled(boolean noisePostprocessingEnabled)
+If enabled noisy lines will be removed from the result.
+ |
+
BlinkOCREngineOptions |
+setRatioPostprocessorEnabled(boolean ratioPostprocessorEnabled)
+If enabled, char quality will be influenced by character ratio difference
+ from the original character in font specified by classification.
+ |
+
BlinkOCREngineOptions |
+setWordProcessingEnabled(boolean wordProcessingEnabled)
+If the option is enabled, words in the OCR result will be
+ processed and possibly classified as numbers, lower case
+ words, upper case, ...
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<BlinkOCREngineOptions> CREATOR+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public long getNativeContext()+
public int getMaximumAllowedCharRecognitionVariants()+
OcrChar
public BlinkOCREngineOptions setMaximumAllowedCharRecognitionVariants(int maximumAllowedCharRecognitionVariants)+
maximumAllowedCharRecognitionVariants
- maximum allowed number of char recognition
+ variants OCR engine will produce for each OcrCharOcrChar
public int getMinimumLineHeight()+
public BlinkOCREngineOptions setMinimumLineHeight(int minimumLineHeight)+
minimumLineHeight
- minimum height of the linepublic int getMinimumCharHeight()+
public BlinkOCREngineOptions setMinimumCharHeight(int minimumCharHeight)+
setMinimumLineHeight(int)
, this value refers to individual
+ chars, while setMinimumLineHeight(int)
refers to line height, which equals to height
+ of largest char in line.minimumCharHeight
- minimum height of the charpublic int getMaximumLineHeight()+
public BlinkOCREngineOptions setMaximumLineHeight(int maximumLineHeight)+
maximumLineHeight
- maximum height of the linepublic int getMaximumCharsExpected()+
public BlinkOCREngineOptions setMaximumCharsExpected(int maximumCharsExpected)+
maximumCharsExpected
- the maximum number of chars expected in the image.public boolean isColorDropoutEnabled()+
public BlinkOCREngineOptions setColorDropoutEnabled(boolean colorDropoutEnabled)+
colorDropoutEnabled
- whether dropping of colors from image should be performedpublic BlinkOCREngineOptions setImageProcessingEnabled(boolean imageProcessingEnabled)+
imageProcessingEnabled
- whether or not image processing should be performed on imagepublic boolean isImageProcessingEnabled()+
public BlinkOCREngineOptions setDocumentType(@NonNull + OcrDocumentType documentType)+
OcrDocumentType.OCR_DOCUMENT_TYPE_GENERIC
.
+ Default OCR document type is the best option in most cases and should not be changed unless
+ the specific type is required.documentType
- Desired OCR document type that will be used to adjust the ocr engine settings.public OcrDocumentType getDocumentType()+
setDocumentType(OcrDocumentType)
.public BlinkOCREngineOptions addCharToWhitelist(@NonNull + BlinkOCRCharKey charKey)+
charKey
- char+font combination that should be allowedpublic BlinkOCREngineOptions addCharToWhitelist(char value, + @NonNull + OcrFont font)+
value
- Value of the char. Whitespace characters are ignored.font
- Font in which char will be allowed. Use OcrFont.ANY to cover all available fonts.public BlinkOCREngineOptions addCharIntervalToWhitelist(char firstValue, + char lastValue, + @NonNull + OcrFont font)+
firstValue
- first char that will be added to whitelistlastValue
- last char that will be added to whitelistfont
- font in which chars will be allowed. Use OcrFont.ANY to cover all available fonts.public BlinkOCREngineOptions addAllDigitsToWhitelist(@NonNull + OcrFont font)+
font
- font in which chars will be allowed. Use OcrFont.ANY to cover all available fonts.public BlinkOCREngineOptions addLowercaseCharsToWhitelist(@NonNull + OcrFont font)+
font
- font in which chars will be allowed. Use OcrFont.ANY to cover all available fonts.public BlinkOCREngineOptions addUppercaseCharsToWhitelist(@NonNull + OcrFont font)+
font
- font in which chars will be allowed. Use OcrFont.ANY to cover all available fonts.public BlinkOCREngineOptions allowAllCharsAndAllFonts()+
public java.util.Set<BlinkOCRCharKey> getCharWhitelist()+
public BlinkOCREngineOptions setWordProcessingEnabled(boolean wordProcessingEnabled)+
public boolean isWordProcessingEnabled()+
setWordProcessingEnabled(boolean)
setWordProcessingEnabled(boolean)
public BlinkOCREngineOptions setDetectFlippedTextEnabled(boolean detectFlippedTextEnabled)+
public boolean isDetectFlippedTextEnabled()+
setDetectFlippedTextEnabled(boolean)
.setDetectFlippedTextEnabled(boolean)
.public BlinkOCREngineOptions setCasePostprocessorEnabled(boolean casePostprocessorEnabled)+
public boolean isCasePostprocessorEnabled()+
setCasePostprocessorEnabled(boolean)
.setCasePostprocessorEnabled(boolean)
.public BlinkOCREngineOptions setNoisePostprocessingEnabled(boolean noisePostprocessingEnabled)+
public boolean isNoisePostprocessingEnabled()+
setNoisePostprocessingEnabled(boolean)
.setNoisePostprocessingEnabled(boolean)
.public BlinkOCREngineOptions setRatioPostprocessorEnabled(boolean ratioPostprocessorEnabled)+
public boolean isRatioPostprocessorEnabled()+
setRatioPostprocessorEnabled(boolean)
.setRatioPostprocessorEnabled(boolean)
.public BlinkOCREngineOptions setCutoffCharFilterEnabled(boolean cutoffCharFilterEnabled)+
public boolean isCutoffCharFilterEnabled()+
setCutoffCharFilterEnabled(boolean)
.setCutoffCharFilterEnabled(boolean)
.public BlinkOCREngineOptions setLineGroupingEnabled(boolean lineGroupingEnabled)+
public boolean isLineGroupingEnabled()+
setLineGroupingEnabled(boolean)
.setLineGroupingEnabled(boolean)
.public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public enum OcrDocumentType +extends java.lang.Enum<OcrDocumentType>+
Enum Constant and Description | +
---|
OCR_DOCUMENT_TYPE_ARABIC
+Supports the recognition of Arabic-Indic numerals and punctuation marks used in amounts.
+ |
+
OCR_DOCUMENT_TYPE_GENERIC
+Supports latin alphabet, numbers, punctuation marks, currency symbols and common country
+ specific characters for large number of commonly used fonts.
+ |
+
OCR_DOCUMENT_TYPE_MICR
+Supports the recognition of MICR (Magnetic Ink Character Recognition) font characters
+ which are used mainly by the banking industry.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static OcrDocumentType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static OcrDocumentType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final OcrDocumentType OCR_DOCUMENT_TYPE_GENERIC+
public static final OcrDocumentType OCR_DOCUMENT_TYPE_MICR+
public static final OcrDocumentType OCR_DOCUMENT_TYPE_ARABIC+
public static OcrDocumentType[] values()+
+for (OcrDocumentType c : OcrDocumentType.values()) + System.out.println(c); +
public static OcrDocumentType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullClass | +Description | +
---|---|
BlinkOCRCharKey | +
+ Class representing a char in specific font.
+ |
+
BlinkOCREngineOptions | +
+ Options used in OCR.
+ |
+
Enum | +Description | +
---|---|
OcrDocumentType | +
+ Available OCR document types.
+ |
+
Interface | +Description | +
---|---|
DocumentClassifier | +
+ Classifier that is used to classify documents based on data extracted from detector's
+ decoding info fields.
+ |
+
Class | +Description | +
---|---|
BlinkOCRRecognitionResult | +
+ Represents recognition result produced by BlinkOCR recognizer which was configured
+ with
+BlinkOCRRecognizerSettings . |
+
BlinkOCRRecognizerSettings | +
+ Represents settings for generic OCR recognizer used for scanning segments.
+ |
+
public abstract class OcrParserSettings
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
protected long |
+mNativeContext
+used for storing native OcrParserSettings class
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+OcrParserSettings()
+Default constructor with all recognizers turned off.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
protected void |
+finalize() |
+
long |
+getNativeContext()
+Returns the pointer containing native part of the implementation.
+ |
+
int |
+getPriority() |
+
protected void |
+initNativeFromParcel(android.os.Parcel in)
+Call this method from derived class after initializing native context.
+ |
+
boolean |
+isRequired()
+Returns whether parser configured with this parser settings object will be required
+ |
+
void |
+setRequired(boolean required)
+Defines whether the parser configured with this parser settings object will be required
+ or optional.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected long mNativeContext+
protected OcrParserSettings()+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public long getNativeContext()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
@CallSuper +public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
@CallSuper +protected void initNativeFromParcel(android.os.Parcel in)+
in
- Parcel from which data is read.public void setRequired(boolean required)+
ScanResultListener.onScanningDone(RecognitionResults)
+ until all parsers that are required have produced result.
+
+ By default, every parser is required. Set this to false in cases when you will manually
+ manage which parser has produced result, and which did not (for example in random scan use case).required
- whether this parser is required or notpublic boolean isRequired()+
public int getPriority()+
public static enum AmountParserSettings.Preset +extends java.lang.Enum<AmountParserSettings.Preset>+
Enum Constant and Description | +
---|
GENERIC
+Amount parser settings for amounts with decimal point.
+ |
+
LARGE_AMOUNT
+Amount parser settings for parsing large amounts.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static AmountParserSettings.Preset |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static AmountParserSettings.Preset[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final AmountParserSettings.Preset GENERIC+
public static final AmountParserSettings.Preset LARGE_AMOUNT+
public static AmountParserSettings.Preset[] values()+
+for (AmountParserSettings.Preset c : AmountParserSettings.Preset.values()) + System.out.println(c); +
public static AmountParserSettings.Preset valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class AmountParserSettings +extends OcrParserSettings +implements android.os.Parcelable+
Modifier and Type | +Class and Description | +
---|---|
static class |
+AmountParserSettings.Preset
+Available presets for amount parser settings.
+ |
+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<AmountParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
AmountParserSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+areMissingDecimalsAllowed()
+Returns true if amounts without decimal are accepted as valid.
+ |
+
boolean |
+areNegativeAmountsAllowed()
+Returns true if negative values are accepted as valid amount.
+ |
+
boolean |
+areSpaceSeparatorsAllowed()
+Returns true if amounts with spaces between groups of digits(thousands) are allowed.
+ |
+
static AmountParserSettings |
+createFromPreset(AmountParserSettings.Preset preset)
+Creates amount parser settings from preset.
+ |
+
int |
+getIdealNumberOfDigits()
+Returns current ideal number of digits before decimal part.
+ |
+
boolean |
+isArabicIndicModeEnabled()
+Checks whether the Arabic-Indic mode is enabled.
+ |
+
boolean |
+isAsterixOrEqualsPrefixExpected() |
+
boolean |
+isCurrencySymbolExpected()
+Returns true if currency symbol is expected to be found before or after the actual amount.
+ |
+
void |
+setAllowMissingDecimals(boolean allowMissingDecimals)
+Sets whether amounts without decimal are accepted as valid amount, for example 1.465 is
+ accepted as valid amount.
+ |
+
void |
+setAllowNegativeAmounts(boolean allowNegativeAmounts)
+Sets whether negative values are accepted as valid amounts, for example -27,56 is
+ valid amount.
+ |
+
void |
+setAllowSpaceSeparators(boolean allowSpaceSeparators)
+Sets whether amounts with space separators between groups of digits(thousands) are allowed.
+ |
+
void |
+setArabicIndicModeEnabled(boolean enableArabicMode)
+Sets whether the Arabic-Indic mode is enabled.
+ |
+
void |
+setExpectAsterixOrEqualsPrefix(boolean expectAsterixOrEqualsPrefix)
+Sets wether * or = is expected to be found before actual amount.
+ |
+
void |
+setExpectCurrencySymbol(boolean expectCurrencySymbol)
+Sets whether currency symbol is expected to be found before or after the actual amount.
+ |
+
void |
+setIdealNumberOfDigits(int idealNumberOfDigits)
+Sets ideal(expected) number of digits.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents
public static final android.os.Parcelable.Creator<AmountParserSettings> CREATOR+
public void setArabicIndicModeEnabled(boolean enableArabicMode)+
enableArabicMode
- whether or not Arabic-Indic mode is enabled.public boolean isArabicIndicModeEnabled()+
true
if Arabic-Indic mode is enabled, false
otherwise.setArabicIndicModeEnabled(boolean)
public void setAllowMissingDecimals(boolean allowMissingDecimals)+
allowMissingDecimals
- whether or not amounts without decimals are allowed.public boolean areMissingDecimalsAllowed()+
public void setAllowSpaceSeparators(boolean allowSpaceSeparators)+
allowSpaceSeparators
- whether or not amounts with spaces between groups
+ of digits(thousands) are allowed.public boolean areSpaceSeparatorsAllowed()+
public void setAllowNegativeAmounts(boolean allowNegativeAmounts)+
allowNegativeAmounts
- whether or not amount can have negative value.public boolean areNegativeAmountsAllowed()+
public void setExpectCurrencySymbol(boolean expectCurrencySymbol)+
expectCurrencySymbol
- whether or not to expect currency symbolpublic boolean isCurrencySymbolExpected()+
public void setExpectAsterixOrEqualsPrefix(boolean expectAsterixOrEqualsPrefix)+
expectAsterixOrEqualsPrefix
- whether or not to expect asterix or equals prefixpublic boolean isAsterixOrEqualsPrefixExpected()+
public void setIdealNumberOfDigits(int idealNumberOfDigits)+
idealNumberOfDigits
- ideal(expected) number of digits before decimal part.public int getIdealNumberOfDigits()+
public static final AmountParserSettings createFromPreset(AmountParserSettings.Preset preset)+
preset
- Chosen predefined settings for amount parser.public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class OcrParserSettings
public static enum DateParserSettings.DateFormat +extends java.lang.Enum<DateParserSettings.DateFormat>+
Enum Constant and Description | +
---|
DATE_FORMAT_DDMMYY |
+
DATE_FORMAT_DDMMYYYY |
+
DATE_FORMAT_MMDDYY |
+
DATE_FORMAT_MMDDYYYY |
+
DATE_FORMAT_YYMMDD |
+
DATE_FORMAT_YYYYMMDD |
+
Modifier and Type | +Method and Description | +
---|---|
static DateParserSettings.DateFormat |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static DateParserSettings.DateFormat[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final DateParserSettings.DateFormat DATE_FORMAT_DDMMYYYY+
public static final DateParserSettings.DateFormat DATE_FORMAT_DDMMYY+
public static final DateParserSettings.DateFormat DATE_FORMAT_MMDDYYYY+
public static final DateParserSettings.DateFormat DATE_FORMAT_MMDDYY+
public static final DateParserSettings.DateFormat DATE_FORMAT_YYYYMMDD+
public static final DateParserSettings.DateFormat DATE_FORMAT_YYMMDD+
public static DateParserSettings.DateFormat[] values()+
+for (DateParserSettings.DateFormat c : DateParserSettings.DateFormat.values()) + System.out.println(c); +
public static DateParserSettings.DateFormat valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class DateParserSettings +extends OcrParserSettings+
Modifier and Type | +Class and Description | +
---|---|
static class |
+DateParserSettings.DateFormat
+Available date formats for date parser.
+ |
+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DateParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
DateParserSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
DateParserSettings.DateFormat[] |
+getDateFormats()
+Returns current date formats.
+ |
+
char[] |
+getDateSeparatorChars()
+Returns current date separator characters.
+ |
+
void |
+setDateFormats(DateParserSettings.DateFormat[] dateFormats)
+Specifies the date formats that will be accepted by date parser.
+ |
+
void |
+setDateSeparatorChars(char[] dateSeparatorChars)
+Specifies the date separator characters between date parts (day, month, year) that will be
+ accepted by date parser.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<DateParserSettings> CREATOR+
public void setDateFormats(DateParserSettings.DateFormat[] dateFormats)+
DateParserSettings.DateFormat
enum will be accepted.dateFormats
- Array of expected date formats, if it is null
or empty,
+ date formats will be set to default value.public DateParserSettings.DateFormat[] getDateFormats()+
public void setDateSeparatorChars(char[] dateSeparatorChars)+
dateSeparatorChars
- Array of expected date separator characters, if it is null
or empty,
+ date separator characters will be set to default value.public char[] getDateSeparatorChars()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class OcrParserSettings
public class EMailParserSettings +extends OcrParserSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<EMailParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
EMailParserSettings() |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired, writeToParcel
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<EMailParserSettings> CREATOR+
public class IbanParserSettings +extends OcrParserSettings +implements android.os.Parcelable+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<IbanParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
IbanParserSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addCountryCodeToWhitelist(java.lang.String countryCode)
+Adds country code to the set of allowed country codes.
+ |
+
java.util.Set<java.lang.String> |
+getCountryCodeWhitelist()
+Returns the set of all allowed IBAN country codes.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents
public static final android.os.Parcelable.Creator<IbanParserSettings> CREATOR+
public void addCountryCodeToWhitelist(@NonNull + java.lang.String countryCode)+
countryCode
- country code that should be allowedpublic java.util.Set<java.lang.String> getCountryCodeWhitelist()+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class OcrParserSettings
public class RawParserSettings +extends OcrParserSettings +implements android.os.Parcelable+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<RawParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
RawParserSettings()
+Constructor for Raw Parser Settings, initialised with default OCR engine options.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
BlinkOCREngineOptions |
+getOcrEngineOptions()
+Returns the OCR engine options used in Raw OCR parser.
+ |
+
boolean |
+isUsingSieve()
+Returns true if algorithm for combining consecutive OCR results between video frames
+ for improving OCR quality is used.
+ |
+
void |
+setOcrEngineOptions(BlinkOCREngineOptions options)
+Sets the OCR engine options used in Raw OCR parser.
+ |
+
void |
+setUseSieve(boolean useSieve)
+Enable the usage of algorithm for combining consecutive OCR results between video frames
+ for improving OCR quality.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
describeContents
public static final android.os.Parcelable.Creator<RawParserSettings> CREATOR+
public RawParserSettings()+
setOcrEngineOptions(BlinkOCREngineOptions)
and/or you should enable reusing of
+ time redundant information between consecutive video frames to improve OCR quality with
+ setUseSieve(boolean)
.public void setUseSieve(boolean useSieve)+
useSieve
- whether or not sieve algorithm should be usedpublic boolean isUsingSieve()+
@NonNull +public BlinkOCREngineOptions getOcrEngineOptions()+
public void setOcrEngineOptions(@NonNull + BlinkOCREngineOptions options)+
options
- OCR engine options used in Raw OCR parserpublic void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class OcrParserSettings
Class | +Description | +
---|---|
AmountParserSettings | +
+ Created by dodo on 02/03/15.
+ |
+
DateParserSettings | +
+ Represents a settings for setting up Date Parser.
+ |
+
EMailParserSettings | +
+ Created by dodo on 19/03/15.
+ |
+
IbanParserSettings | +
+ Created by dodo on 02/03/15.
+ |
+
RawParserSettings | +
+ Represents a parser which simply returns the string version of OCR result, without
+ performing any smarter parse operations.
+ |
+
Enum | +Description | +
---|---|
AmountParserSettings.Preset | +
+ Available presets for amount parser settings.
+ |
+
DateParserSettings.DateFormat | +
+ Available date formats for date parser.
+ |
+
public class LicensePlatesParserSettings +extends OcrParserSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<LicensePlatesParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
LicensePlatesParserSettings() |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired, writeToParcel
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<LicensePlatesParserSettings> CREATOR+
Class | +Description | +
---|---|
LicensePlatesParserSettings | +
+ Parser that supports parsing of license plates
+ |
+
public static enum MobileCouponsParserSettings.TopUpPrefix +extends java.lang.Enum<MobileCouponsParserSettings.TopUpPrefix>+
Enum Constant and Description | +
---|
TOP_UP_PREFIX_103
+For mobile coupons which begins with *103*
+ |
+
TOP_UP_PREFIX_123
+For mobile coupons which begins with *123*
+ |
+
TOP_UP_PREFIX_131
+For mobile coupons which begins with *131*
+ |
+
TOP_UP_PREFIX_COUNT
+count
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static MobileCouponsParserSettings.TopUpPrefix |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static MobileCouponsParserSettings.TopUpPrefix[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final MobileCouponsParserSettings.TopUpPrefix TOP_UP_PREFIX_123+
public static final MobileCouponsParserSettings.TopUpPrefix TOP_UP_PREFIX_103+
public static final MobileCouponsParserSettings.TopUpPrefix TOP_UP_PREFIX_131+
public static final MobileCouponsParserSettings.TopUpPrefix TOP_UP_PREFIX_COUNT+
public static MobileCouponsParserSettings.TopUpPrefix[] values()+
+for (MobileCouponsParserSettings.TopUpPrefix c : MobileCouponsParserSettings.TopUpPrefix.values()) + System.out.println(c); +
public static MobileCouponsParserSettings.TopUpPrefix valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class MobileCouponsParserSettings +extends OcrParserSettings+
Modifier and Type | +Class and Description | +
---|---|
static class |
+MobileCouponsParserSettings.TopUpPrefix
+Supported top up prefixes
+ |
+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<MobileCouponsParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
MobileCouponsParserSettings(MobileCouponsParserSettings.TopUpPrefix topUpPrefix)
+Constructor which initializes settings with given
+topupPrefix . |
+
MobileCouponsParserSettings(java.lang.String prefixString,
+ int USSDCodeLength)
+Constructor which initializes settings with given prefix code and ussd code length
+ in form *prefixString*USSDCodeLength digits#
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+getAllowNoPrefix()
+Returnes if ussd codes without prefix are allowed.
+ |
+
java.lang.String |
+getPrefixString()
+Returns the prefix string for which extraction will be performed.
+ |
+
int |
+getUSSDCodeLength()
+Returns ussd code length i.e.
+ |
+
static boolean |
+nativeGetAllowNoPrefix(long nativePtr) |
+
static java.lang.String |
+nativeGetPrefixString(long nativePtr) |
+
static int |
+nativeGetUSSDCodeLength(long nativePtr) |
+
static void |
+nativeSetAllowNoPrefix(long nativePtr,
+ boolean allowNoPrefix) |
+
static void |
+nativeSetPrefixString(long nativePtr,
+ java.lang.String prefixString) |
+
static void |
+nativeSetUSSDCodeLength(long nativePtr,
+ int ussdCodeLength) |
+
void |
+setAllowNoPrefix(boolean allowNoPrefix)
+Sets if ussd codes without prefix is allowed
+ |
+
void |
+setPrefixString(java.lang.String prefixString)
+Sets prefix string for which extraction will be performed
+ |
+
void |
+setUSSDCodeLength(int ussdCodeLength)
+Sets ussd code length i.e.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<MobileCouponsParserSettings> CREATOR+
public MobileCouponsParserSettings(@NonNull + MobileCouponsParserSettings.TopUpPrefix topUpPrefix)+
topupPrefix
.topUpPrefix
- The top up prefix for which extraction will be performed, it
+ must be defined (non null value).java.lang.IllegalArgumentException
- If the given topUpPrefix
is null.public MobileCouponsParserSettings(@NonNull + java.lang.String prefixString, + int USSDCodeLength)+
prefixString
- prefix string enclosed with asterixUSSDCodeLength
- number of digits between prefix and hashpublic void setPrefixString(@NonNull + java.lang.String prefixString)+
prefixString
- The prefix string for extractionpublic static void nativeSetPrefixString(long nativePtr, + java.lang.String prefixString)+
public java.lang.String getPrefixString()+
public static java.lang.String nativeGetPrefixString(long nativePtr)+
public void setUSSDCodeLength(int ussdCodeLength)+
ussdCodeLength
- Number of digits after prefix string.public static void nativeSetUSSDCodeLength(long nativePtr, + int ussdCodeLength)+
public int getUSSDCodeLength()+
public static int nativeGetUSSDCodeLength(long nativePtr)+
public void setAllowNoPrefix(boolean allowNoPrefix)+
allowNoPrefix
- Is ussd codes without prefix allowed.public static void nativeSetAllowNoPrefix(long nativePtr, + boolean allowNoPrefix)+
public boolean getAllowNoPrefix()+
public static boolean nativeGetAllowNoPrefix(long nativePtr)+
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class OcrParserSettings
Class | +Description | +
---|---|
MobileCouponsParserSettings | +
+ Represents a parser that can parse mobile coupons.
+ |
+
Enum | +Description | +
---|---|
MobileCouponsParserSettings.TopUpPrefix | +
+ Supported top up prefixes
+ |
+
Class | +Description | +
---|---|
OcrParserSettings | +
+ Abstract class that represents settings for OCR parser.
+ |
+
public class RegexParserSettings +extends OcrParserSettings +implements android.os.Parcelable+
BlinkOCREngineOptions
). Due to differences between parsing normal strings
+ and OCR results, this parser does not support some regex features found in java's regex engine,
+ like back references. See setRegex(String)
for more information about what is supported.android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<RegexParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
RegexParserSettings(java.lang.String regex)
+Constructor using default OCR engine options and provided regular expression.
+ |
+
RegexParserSettings(java.lang.String regex,
+ BlinkOCREngineOptions ocrEngineOptions)
+Constructor using provided OCR engine options and provided regular expression.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
BlinkOCREngineOptions |
+getOcrEngineOptions()
+Returns the OCR engine options used in Regex OCR parser.
+ |
+
java.lang.String |
+getRegex()
+Returns the currently set regular expression.
+ |
+
boolean |
+isMustEndWithWhitespace()
+Returns whether matched string must end with whitespace.
+ |
+
boolean |
+isMustStartWithWhitespace()
+Returns whether matched string must start with whitespace.
+ |
+
boolean |
+isUsingSieve()
+Returns true if algorithm for combining consecutive OCR results between video frames
+ for improving OCR quality is used.
+ |
+
void |
+setMustEndWithWhitespace(boolean mustEndWithWhitespace)
+If set to true, regex will not be matched if there is no whitespace after matched string.
+ |
+
void |
+setMustStartWithWhitespace(boolean mustStartWithWhitespace)
+If set to true, regex will not be matched if there is no whitespace before matched string.
+ |
+
void |
+setOcrEngineOptions(BlinkOCREngineOptions ocrEngineOptions)
+Sets the OCR engine options used in Regex OCR parser.
+ |
+
void |
+setRegex(java.lang.String regex)
+Defines regex that will be used to parse OCR data.
+ |
+
void |
+setUseSieve(boolean useSieve)
+Enable the usage of algorithm for combining consecutive OCR results between video frames
+ for improving OCR quality.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<RegexParserSettings> CREATOR+
public RegexParserSettings(@NonNull + java.lang.String regex)+
RegexParserSettings(String, BlinkOCREngineOptions)
+ constructor. For more information about regex support, see setRegex(String)
.regex
- Regular expression.java.lang.IllegalArgumentException
- if regular expression cannot be compiledpublic RegexParserSettings(@NonNull + java.lang.String regex, + @NonNull + BlinkOCREngineOptions ocrEngineOptions)+
setRegex(String)
.regex
- Regular expression.ocrEngineOptions
- OCR engine options used for performing OCR.java.lang.IllegalArgumentException
- if regular expression cannot be compiledpublic void setRegex(@NonNull + java.lang.String regex)+
regex
- Regular expression to be used for parsing OCR result.java.lang.IllegalArgumentException
- if regular expression cannot be compiledpublic java.lang.String getRegex()+
public void setOcrEngineOptions(@NonNull + BlinkOCREngineOptions ocrEngineOptions)+
ocrEngineOptions
- OCR engine options used in Regex OCR parserpublic void setUseSieve(boolean useSieve)+
useSieve
- whether or not sieve algorithm should be usedpublic boolean isUsingSieve()+
public void setMustStartWithWhitespace(boolean mustStartWithWhitespace)+
mustStartWithWhitespace
- whether or not whitespace is required before matched stringpublic boolean isMustStartWithWhitespace()+
public void setMustEndWithWhitespace(boolean mustEndWithWhitespace)+
mustEndWithWhitespace
- whether or not whitespace is required after matched stringpublic boolean isMustEndWithWhitespace()+
@NonNull +public BlinkOCREngineOptions getOcrEngineOptions()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class OcrParserSettings
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class OcrParserSettings
Class | +Description | +
---|---|
RegexParserSettings | +
+ Represents a parser which parses OCR result according to given regular expression.
+ |
+
public class VinParserSettings +extends OcrParserSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<VinParserSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
VinParserSettings() |
+
describeContents, finalize, getNativeContext, getPriority, initNativeFromParcel, isRequired, setRequired, writeToParcel
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<VinParserSettings> CREATOR+
Class | +Description | +
---|---|
VinParserSettings | +
+ Parser that can parse VIN numbers (Vehicle identification numbers).
+ |
+
public class DetectorRecognitionResult +extends BaseRecognitionResult+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DetectorRecognitionResult> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
|
+DetectorRecognitionResult(long nativeHolderPtr,
+ boolean empty,
+ boolean valid) |
+
protected |
+DetectorRecognitionResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
DetectorResult |
+getDetectorResult()
+Returns detector result.
+ |
+
describeContents, getIntElement, getResultHolder, getStringElement, getTitle, isEmpty, isValid, log, toString, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<DetectorRecognitionResult> CREATOR+
public DetectorRecognitionResult(long nativeHolderPtr, + boolean empty, + boolean valid)+
protected DetectorRecognitionResult(android.os.Parcel in)+
@Nullable +public DetectorResult getDetectorResult()+
public class DetectorRecognizerSettings +extends RecognizerSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DetectorRecognizerSettings> |
+CREATOR |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
DetectorRecognizerSettings(DetectorSettings settings) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
void |
+setDetectorSettings(DetectorSettings settings)
+Sets detector settings that will define which detector will be used.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
finalize, getNativeContext, isEnabled, requiresAutofocus, requiresLandscapeMode, setEnabled
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<DetectorRecognizerSettings> CREATOR+
public DetectorRecognizerSettings(@NonNull + DetectorSettings settings)+
public void setDetectorSettings(@NonNull + DetectorSettings settings)+
settings
- detector settings that will define which detector will be used.public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class RecognizerSettings
public void writeToParcel(android.os.Parcel dest, + int flags)+
Class | +Description | +
---|---|
DetectorRecognitionResult | +
+ Created by dodo on 20/11/15.
+ |
+
DetectorRecognizerSettings | +
+ Created by dodo on 16/10/15.
+ |
+
Interface | +Description | +
---|---|
IResultHolder | +
+ Created by dodo on 13/11/15.
+ |
+
RecognitionResultConstants | +
+ Created by dodo on 28/10/14.
+ |
+
Class | +Description | +
---|---|
BaseRecognitionResult | +
+ Class with all payment data available after recognition process
+ |
+
LibraryInfoResult | +
+ Created by dodo on 06/12/14.
+ |
+
RecognitionResults | +
+ Contains one or more recognition results, depending on RecognitionSettings.
+ |
+
public static enum RecognitionSettings.FrameQualityEstimationMode +extends java.lang.Enum<RecognitionSettings.FrameQualityEstimationMode>+
Enum Constant and Description | +
---|
ALWAYS_OFF
+Frame quality estimation will always be turned off, regardless of active recognizers
+ |
+
ALWAYS_ON
+Frame quality estimation will always be turned on, regardless of active recognizers
+ |
+
AUTOMATIC
+Frame quality estimation will be turned on if at least one recognizer requires that
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static RecognitionSettings.FrameQualityEstimationMode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static RecognitionSettings.FrameQualityEstimationMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final RecognitionSettings.FrameQualityEstimationMode AUTOMATIC+
public static final RecognitionSettings.FrameQualityEstimationMode ALWAYS_ON+
public static final RecognitionSettings.FrameQualityEstimationMode ALWAYS_OFF+
public static RecognitionSettings.FrameQualityEstimationMode[] values()+
+for (RecognitionSettings.FrameQualityEstimationMode c : RecognitionSettings.FrameQualityEstimationMode.values()) + System.out.println(c); +
public static RecognitionSettings.FrameQualityEstimationMode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class RecognitionSettings
+extends java.lang.Object
+implements android.os.Parcelable
+Modifier and Type | +Class and Description | +
---|---|
static class |
+RecognitionSettings.FrameQualityEstimationMode |
+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
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
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
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) |
+
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public abstract class RecognizerSettings
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
protected long |
+mNativeContext
+used for storing native RecognizerSettings class
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+RecognizerSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
protected void |
+finalize() |
+
long |
+getNativeContext()
+Returns the pointer containing native part of the implementation.
+ |
+
boolean |
+isEnabled() |
+
boolean |
+requiresAutofocus()
+Returns true if this recognizer requires camera with autofocus.
+ |
+
boolean |
+requiresLandscapeMode()
+Returns true if this recognizer works only in landscape mode.
+ |
+
void |
+setEnabled(boolean enabled) |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
writeToParcel
protected long mNativeContext+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public long getNativeContext()+
public boolean requiresAutofocus()+
public boolean requiresLandscapeMode()+
public void setEnabled(boolean enabled)+
public boolean isEnabled()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public class RecognizerSettingsUtils
+extends java.lang.Object
+Constructor and Description | +
---|
RecognizerSettingsUtils() |
+
Modifier and Type | +Method and Description | +
---|---|
static RecognizerSettings[] |
+filterOutRecognizersThatRequireAutofocus(RecognizerSettings[] settings) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public RecognizerSettingsUtils()+
public static RecognizerSettings[] filterOutRecognizersThatRequireAutofocus(RecognizerSettings[] settings)+
Class | +Description | +
---|---|
RecognitionSettings | +
+ Created by dodo on 25/11/14.
+ |
+
RecognizerSettings | ++ |
RecognizerSettingsUtils | ++ |
Enum | +Description | +
---|---|
RecognitionSettings.FrameQualityEstimationMode | ++ |
public abstract class TemplatingRecognitionResult +extends BaseRecognitionResult+
TemplatingRecognizerSettings
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+TemplatingRecognitionResult(android.os.Bundle dataBundle,
+ boolean empty,
+ boolean valid) |
+
protected |
+TemplatingRecognitionResult(long nativeHolderPtr,
+ boolean empty,
+ boolean valid) |
+
protected |
+TemplatingRecognitionResult(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getDocumentClassificationResult()
+Returns result of document classification, if any.
+ |
+
OcrResult |
+getOcrResult()
+Gets the OCR result for default parser group.
+ |
+
OcrResult |
+getOcrResult(java.lang.String parserGroupName)
+Gets the OCR result for given parser group.
+ |
+
java.lang.String |
+getParsedResult(java.lang.String parserName)
+Get the result of parser from default parsing group.
+ |
+
java.lang.String |
+getParsedResult(java.lang.String parserGroupName,
+ java.lang.String parserName)
+Get the result of parser in given parser group.
+ |
+
java.lang.Object |
+getSpecificParsedResult(java.lang.String parserName)
+Returns specific parser result for concrete parser with the given parser name in default parser group.
+ |
+
java.lang.Object |
+getSpecificParsedResult(java.lang.String parserGroupName,
+ java.lang.String parserName)
+Returns specific parser result for concrete parser with the given parser name in the given parser group.
+ |
+
describeContents, getIntElement, getResultHolder, getStringElement, getTitle, isEmpty, isValid, log, toString, writeToParcel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected TemplatingRecognitionResult(long nativeHolderPtr, + boolean empty, + boolean valid)+
protected TemplatingRecognitionResult(android.os.Bundle dataBundle, + boolean empty, + boolean valid)+
protected TemplatingRecognitionResult(android.os.Parcel in)+
@Nullable +public java.lang.String getParsedResult(java.lang.String parserName)+
parserName
- Name of the parser.@Nullable +public java.lang.String getParsedResult(java.lang.String parserGroupName, + java.lang.String parserName)+
parserGroupName
- Name of the parser group where parser was added.parserName
- Name of the parser.@Nullable +public java.lang.Object getSpecificParsedResult(java.lang.String parserName)+
DateParserSettings
+ can return parsed date as Date
object. It is always possible to obtain parsed result as raw string by using
+ getParsedResult(String)
or getParsedResult(String, String)
method.parserName
- Name of the parser.parserName
does not exists in default parser group, returns null
.
+ If parser exists, but has failed to parse any data, returns null
or empty string.@Nullable +public java.lang.Object getSpecificParsedResult(java.lang.String parserGroupName, + java.lang.String parserName)+
DateParserSettings
+ can return parsed date as Date
object. It is always possible to obtain parsed result as raw string by using
+ getParsedResult(String)
or getParsedResult(String, String)
method.parserGroupName
- Name of the parser group where parser was added.parserName
- Name of the parser.parserName
does not exists in parser group with name
+ parserGroupName
or if parser group does not exists, returns null
. If parser exists, but has failed to parse any data,
+ returns null
or empty string.@Nullable +public OcrResult getOcrResult()+
@Nullable +public OcrResult getOcrResult(java.lang.String parserGroupName)+
parserGroupName
- Name of the parser group for which OCR result should be returned.@Nullable +public java.lang.String getDocumentClassificationResult()+
public abstract class TemplatingRecognizerSettings +extends RecognizerSettings+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+kDefaultParserGroup |
+
mNativeContext
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+TemplatingRecognizerSettings() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addParser(java.lang.String parserName,
+ OcrParserSettings parserSettings)
+Adds parser to default parser group.
+ |
+
void |
+addParserToParserGroup(java.lang.String parserGroupName,
+ java.lang.String parserName,
+ OcrParserSettings parserSettings)
+Adds parser to given parser group.
+ |
+
boolean |
+getAllowUnparsedResults()
+Checks whether unparsed results are allowed.
+ |
+
protected void |
+initFromParcel(android.os.Parcel in) |
+
void |
+removeAllParserDecodingInfoSets()
+Removes all decoding info sets.
+ |
+
void |
+removeAllParsers()
+Removes all parsers from all parser groups.
+ |
+
void |
+removeAllParsersFromGroup(java.lang.String parserGroupName)
+Removes all parsers from given parser group.
+ |
+
void |
+removeParser(java.lang.String parserName)
+Removes parser from default parser group.
+ |
+
void |
+removeParserDecodingInfoSet(java.lang.String decodingInfoSet)
+Removes the decoding info set with the given name.
+ |
+
void |
+removeParserFromParserGroup(java.lang.String parserGroupName,
+ java.lang.String parserName)
+Removes parser from given parser group.
+ |
+
void |
+setAllowUnparsedResults(boolean unparsedResultsAllowed)
+Sets whether unparsed results will be allowed.
+ |
+
void |
+setParserDecodingInfos(DecodingInfo[] decodingInfos,
+ java.lang.String decodingInfoSet)
+Sets the named decoding info set, for specific document type, whose elements contain location
+ information about additional document elements that should be recognized together with
+ specific field type of concrete recognizer.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
describeContents, finalize, getNativeContext, isEnabled, requiresAutofocus, requiresLandscapeMode, setEnabled
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String kDefaultParserGroup+
protected TemplatingRecognizerSettings()+
public void addParser(@NonNull + java.lang.String parserName, + @NonNull + OcrParserSettings parserSettings)+
parserName
- Name of the parser (also the name where parser result will be stored in BlinkOCRRecognitionResult)parserSettings
- Settings for the parser that will be added.public void addParserToParserGroup(@NonNull + java.lang.String parserGroupName, + @NonNull + java.lang.String parserName, + @NonNull + OcrParserSettings parserSettings)+
parserGroupName
- Name of the parser group where parser will be added.parserName
- Name of the parser (also the name where parser result will be stored in BlinkOCRRecognitionResult in given parser group)parserSettings
- Settings for the parser that will be added.public void removeParser(@NonNull + java.lang.String parserName)+
parserName
- Name of the parser to be removed.public void removeAllParsersFromGroup(@NonNull + java.lang.String parserGroupName)+
parserGroupName
- Name of the parser group to be cleared.public void removeAllParsers()+
public void removeParserFromParserGroup(@NonNull + java.lang.String parserGroupName, + @NonNull + java.lang.String parserName)+
parserGroupName
- Name of the parser group from which parser should be removed.parserName
- Name of the parser to be removed.public void setAllowUnparsedResults(boolean unparsedResultsAllowed)+
unparsedResultsAllowed
- If true
then unparsed results will be allowed, otherwise they
+ will not be allowed.public boolean getAllowUnparsedResults()+
true
then unparsed results are allowed, otherwise they
+ are not allowed.public void setParserDecodingInfos(@NonNull + DecodingInfo[] decodingInfos, + @NonNull + java.lang.String decodingInfoSet)+
DecodingInfo
object which
+ holds the location for that element of interest, relative to full document detection and the
+ desired dewarped height, in number of pixels, for that location. Name of the decoding info
+ must be equal to the name of the parser group that will be used for parsing that element. decodingInfos
- Array that contains the decoding infos for additional document elements of
+ interest that should be recognized together with specific field from concrete
+ recognizer.decodingInfoSet
- Name of the decoding info set.public void removeParserDecodingInfoSet(@NonNull + java.lang.String decodingInfoSet)+
decodingInfoSet
- Name of the decoding info set that will be removed.public void removeAllParserDecodingInfoSets()+
@CallSuper +public void writeToParcel(android.os.Parcel dest, + int flags)+
@CallSuper +protected void initFromParcel(android.os.Parcel in)+
Class | +Description | +
---|---|
TemplatingRecognitionResult | +
+ Represents base class for all recognition results that are produced by recognizers
+ which were configured with settings that derive
+TemplatingRecognizerSettings |
+
TemplatingRecognizerSettings | +
+ Represents base of all recognizer settings which support specifying decoding
+ infos and parser groups required for scanning generic documents.
+ |
+
public class BarcodeDetailedData
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BarcodeDetailedData> |
+CREATOR
+Parcelable creator object
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
BarcodeDetailedData(long nativePtr) |
+
BarcodeDetailedData(android.os.Parcel in)
+Constructor from Parcel
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
protected void |
+finalize() |
+
byte[] |
+getAllData()
+Use this method to get all barcode data in one byte array.
+ |
+
BarcodeElement[] |
+getElements() |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<BarcodeDetailedData> CREATOR+
public BarcodeDetailedData(long nativePtr)+
public BarcodeDetailedData(android.os.Parcel in)+
in
- protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
@Nullable +public BarcodeElement[] getElements()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
@Nullable +public byte[] getAllData()+
public java.lang.String toString()+
toString
in class java.lang.Object
public class BarcodeElement
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<BarcodeElement> |
+CREATOR
+Parcelable creator object
+ |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
BarcodeElement(long nativePtr,
+ BarcodeDetailedData parent) |
+
BarcodeElement(android.os.Parcel in)
+Constructor from Parcel
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
byte[] |
+getElementBytes() |
+
ElementType |
+getElementType() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<BarcodeElement> CREATOR+
public BarcodeElement(long nativePtr, + BarcodeDetailedData parent)+
public BarcodeElement(android.os.Parcel in)+
in
- public ElementType getElementType()+
public byte[] getElementBytes()+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public enum ElementType +extends java.lang.Enum<ElementType>+
Enum Constant and Description | +
---|
BYTE_DATA
+Indicates that barcode element is arbitrary byte array
+ |
+
TEXT_DATA
+Indicates that barcode element is text and can be read as string
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static ElementType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ElementType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ElementType TEXT_DATA+
public static final ElementType BYTE_DATA+
public static ElementType[] values()+
+for (ElementType c : ElementType.values()) + System.out.println(c); +
public static ElementType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullClass | +Description | +
---|---|
BarcodeDetailedData | ++ |
BarcodeElement | ++ |
Enum | +Description | +
---|---|
ElementType | ++ |
public class DateResult
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<DateResult> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
static DateResult |
+createFromDMY(int day,
+ int month,
+ int year,
+ java.lang.String originalDateString) |
+
static DateResult |
+createFromDMY(java.lang.String originalDateString) |
+
int |
+describeContents() |
+
java.util.Date |
+getDate()
+Date getter, if
+Date representation of date result exists returns it,
+ otherwise returns null. |
+
java.lang.String |
+getOriginalDateString()
+Returns original string representation of the date which has been extracted from the OCR result.
+ |
+
void |
+writeToParcel(android.os.Parcel parcel,
+ int i) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<DateResult> CREATOR+
@NonNull +public java.lang.String getOriginalDateString()+
Date
object, it can be obtained by using getDate()
method.@Nullable +public java.util.Date getDate()+
Date
representation of date result exists returns it,
+ otherwise returns null. To obtain original date string use getOriginalDateString()
+ method.Date
representation of date result exists returns it,
+ otherwise returns null.public static DateResult createFromDMY(int day, + int month, + int year, + @NonNull + java.lang.String originalDateString)+
public static DateResult createFromDMY(@NonNull + java.lang.String originalDateString)+
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel parcel, + int i)+
writeToParcel
in interface android.os.Parcelable
Class | +Description | +
---|---|
DateResult | +
+ Helper class for obtaining recognition date results.
+ |
+
public class OcrBlock
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<OcrBlock> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
OcrBlock(long nativePtr,
+ OcrResult parentResult) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
OcrLine[] |
+getLines() |
+
Rectangle |
+getPosition() |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<OcrBlock> CREATOR+
public OcrBlock(long nativePtr, + OcrResult parentResult)+
public Rectangle getPosition()+
public OcrLine[] getLines()+
public java.lang.String toString()+
toString
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class OcrChar
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<OcrChar> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
OcrChar(long nativePtr,
+ OcrLine parentLine) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
OcrFont |
+getFont()
+Returns the font of the character
+ |
+
int |
+getHeight()
+Returns the height of the char, in pixels.
+ |
+
Rectangle |
+getPosition()
+Returns the position of char in image
+ |
+
int |
+getQuality()
+Returns the recognition quality of the char.
+ |
+
OcrChar[] |
+getRecognitionVariants()
+Returns the recognition variants of this char or null if there are no variants.
+ |
+
char |
+getValue()
+Returns the value of the char.
+ |
+
boolean |
+isBold()
+Returns true if char is bold.
+ |
+
boolean |
+isItalic()
+Returns true if char is italic.
+ |
+
boolean |
+isUncertain()
+Returns true if OCR engine thinks this char is uncertain
+ |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<OcrChar> CREATOR+
public OcrChar(long nativePtr, + OcrLine parentLine)+
public char getValue()+
public int getHeight()+
public boolean isBold()+
public boolean isItalic()+
public boolean isUncertain()+
public int getQuality()+
public Rectangle getPosition()+
public OcrFont getFont()+
public OcrChar[] getRecognitionVariants()+
public java.lang.String toString()+
toString
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
Modifier and Type | +Method and Description | +
---|---|
static OcrFont |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static OcrFont[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final OcrFont OCR_FONT_AKZIDENZ_GROTESK+
public static final OcrFont OCR_FONT_ARIAL+
public static final OcrFont OCR_FONT_ARIAL_BLACK+
public static final OcrFont OCR_FONT_ARNHEM+
public static final OcrFont OCR_FONT_AVANT_GARDE+
public static final OcrFont OCR_FONT_BEMBO+
public static final OcrFont OCR_FONT_BODONI+
public static final OcrFont OCR_FONT_CALIBRI+
public static final OcrFont OCR_FONT_CALIBRI_BOLD+
public static final OcrFont OCR_FONT_CHAINPRINTER+
public static final OcrFont OCR_FONT_COMIC_SANS+
public static final OcrFont OCR_FONT_CONCERTO_ROUNDED_SG+
public static final OcrFont OCR_FONT_COURIER+
public static final OcrFont OCR_FONT_COURIER_BOLD+
public static final OcrFont OCR_FONT_COURIER_MEDIUM_BOLD+
public static final OcrFont OCR_FONT_COURIER_NEW_BOLD+
public static final OcrFont OCR_FONT_COURIER_NEW_CE+
public static final OcrFont OCR_FONT_COURIER_CONDENSED+
public static final OcrFont OCR_FONT_DEJAVU_SANS_MONO+
public static final OcrFont OCR_FONT_DIN+
public static final OcrFont OCR_FONT_EUROPA_GROTESK_NO_2_SB_BOLD+
public static final OcrFont OCR_FONT_EUROSTILE+
public static final OcrFont OCR_FONT_F25_BANK_PRINTER_BOLD+
public static final OcrFont OCR_FONT_FRANKLIN_GOTHIC+
public static final OcrFont OCR_FONT_FRUTIGER+
public static final OcrFont OCR_FONT_FUTURA+
public static final OcrFont OCR_FONT_FUTURA_BOLD+
public static final OcrFont OCR_FONT_GARAMOND+
public static final OcrFont OCR_FONT_GEORGIA+
public static final OcrFont OCR_FONT_GILL_SANS+
public static final OcrFont OCR_FONT_HELVETICA+
public static final OcrFont OCR_FONT_HELVETICA_BOLD+
public static final OcrFont OCR_FONT_HELVETICA_CONDENSED_LIGHT+
public static final OcrFont OCR_FONT_HYPERMARKET+
public static final OcrFont OCR_FONT_INTERSTATE+
public static final OcrFont OCR_FONT_LATIN_MODERN+
public static final OcrFont OCR_FONT_LATIN_MODERN_ITALIC+
public static final OcrFont OCR_FONT_LETTER_GOTHIC+
public static final OcrFont OCR_FONT_LUCIDA+
public static final OcrFont OCR_FONT_LUCIDA_SANS+
public static final OcrFont OCR_FONT_MATRIX+
public static final OcrFont OCR_FONT_META+
public static final OcrFont OCR_FONT_MINION+
public static final OcrFont OCR_FONT_OCRA+
public static final OcrFont OCR_FONT_OCRB+
public static final OcrFont OCR_FONT_OFFICINA+
public static final OcrFont OCR_FONT_OPTIMA+
public static final OcrFont OCR_FONT_PRINTF+
public static final OcrFont OCR_FONT_ROCKWELL+
public static final OcrFont OCR_FONT_ROTIS_SANS_SERIF+
public static final OcrFont OCR_FONT_ROTIS_SERIF+
public static final OcrFont OCR_FONT_SABON+
public static final OcrFont OCR_FONT_STONE+
public static final OcrFont OCR_FONT_SV_BASIC_MANUAL+
public static final OcrFont OCR_FONT_TAHOMA+
public static final OcrFont OCR_FONT_TAHOMA_BOLD+
public static final OcrFont OCR_FONT_TEX_GYRE_TERMES+
public static final OcrFont OCR_FONT_TEX_GYRE_TERMES_ITALIC+
public static final OcrFont OCR_FONT_THE_SANS_MONO_CONDENSED_BLACK+
public static final OcrFont OCR_FONT_THESIS+
public static final OcrFont OCR_FONT_TICKET_DE_CAISSE+
public static final OcrFont OCR_FONT_TIMES_NEW_ROMAN+
public static final OcrFont OCR_FONT_TRAJAN+
public static final OcrFont OCR_FONT_TRINITE+
public static final OcrFont OCR_FONT_UNIVERS+
public static final OcrFont OCR_FONT_VERDANA+
public static final OcrFont OCR_FONT_VOLTAIRE+
public static final OcrFont OCR_FONT_WALBAUM+
public static final OcrFont OCR_FONT_EUROPA_GRO_SB+
public static final OcrFont OCR_FONT_EUROPA_GRO_SB_LIGHT+
public static final OcrFont OCR_FONT_FE_SCHRIFT+
public static final OcrFont OCR_FONT_MICR+
public static final OcrFont OCR_FONT_ARABIC_NILE+
public static final OcrFont OCR_FONT_UNKNOWN+
public static final OcrFont OCR_FONT_HANDWRITTEN+
public static final OcrFont OCR_FONT_XITS_MATH+
public static final OcrFont OCR_FONT_ANY+
public static final OcrFont OCR_FONT_UNKNOWN_MATH+
public static final OcrFont OCR_FONT_UKDL_LIGHT+
public static OcrFont[] values()+
+for (OcrFont c : OcrFont.values()) + System.out.println(c); +
public static OcrFont valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class OcrLine
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<OcrLine> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
OcrLine(long nativePtr,
+ OcrBlock parentBlock) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
OcrChar[] |
+getChars() |
+
Rectangle |
+getPosition() |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<OcrLine> CREATOR+
public OcrLine(long nativePtr, + OcrBlock parentBlock)+
public Rectangle getPosition()+
public OcrChar[] getChars()+
public java.lang.String toString()+
toString
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class OcrResult
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<OcrResult> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description | +
---|
OcrResult(long nativePtr)
+Constructor from native code
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
protected void |
+finalize() |
+
OcrBlock[] |
+getBlocks() |
+
java.lang.String |
+getResultName() |
+
android.graphics.Matrix |
+getTransformation() |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<OcrResult> CREATOR+
public OcrResult(long nativePtr)+
protected void finalize() + throws java.lang.Throwable+
finalize
in class java.lang.Object
java.lang.Throwable
public OcrBlock[] getBlocks()+
public java.lang.String getResultName()+
public android.graphics.Matrix getTransformation()+
public java.lang.String toString()+
toString
in class java.lang.Object
public int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public class CameraPermissionManager
+extends java.lang.Object
+Constructor and Description | +
---|
CameraPermissionManager(android.app.Activity cameraActivity)
+Creates new camera permission manager and attaches it to activity.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+askForCameraPermission()
+Asks the user to give camera permission and displays the layout returned by
+ getAskPermissionOverlay if user denies the permission.
+ |
+
android.view.View |
+getAskPermissionOverlay()
+Returns the layout that should be displayed when camera permission is not given.
+ |
+
boolean |
+hasCameraPermission()
+Returns true if camera permission is available.
+ |
+
void |
+onRequestPermissionsResult(int requestCode,
+ java.lang.String[] permissions,
+ int[] grantResults)
+This method handles request permission results as given to onRequestPermissionResult callback of Activity.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@UiThread +public CameraPermissionManager(@NonNull + android.app.Activity cameraActivity)+
cameraActivity
- The activity that contains camera view.@Nullable + @UiThread +public android.view.View getAskPermissionOverlay()+
@UiThread +public boolean hasCameraPermission()+
@UiThread +public void askForCameraPermission()+
@UiThread +public void onRequestPermissionsResult(int requestCode, + java.lang.String[] permissions, + int[] grantResults)+
requestCode
- The request code as given to callback method.permissions
- The permissions array.grantResults
- The grant results as given to callback method.public class RecognizerCompatibility
+extends java.lang.Object
+Constructor and Description | +
---|
RecognizerCompatibility() |
+
Modifier and Type | +Method and Description | +
---|---|
static boolean |
+cameraHasAutofocus(CameraType cameraType,
+ android.content.Context context) |
+
static RecognizerCompatibilityStatus |
+getRecognizerCompatibilityStatus(android.content.Context context) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public RecognizerCompatibility()+
public static RecognizerCompatibilityStatus getRecognizerCompatibilityStatus(android.content.Context context)+
public static boolean cameraHasAutofocus(CameraType cameraType, + android.content.Context context)+
public enum RecognizerCompatibilityStatus +extends java.lang.Enum<RecognizerCompatibilityStatus>+
Enum Constant and Description | +
---|
DEVICE_BLACKLISTED
+Device is on blacklist and PhotoPay is not supported on that device.
+ |
+
NO_CAMERA
+Device does not have camera.
+ |
+
PROCESSOR_ARCHITECTURE_NOT_SUPPORTED
+Recognizer is not supported on device's processor architecture.
+ |
+
RECOGNIZER_NOT_SUPPORTED
+Recognizer is not supported (unknown reason).
+ |
+
RECOGNIZER_SUPPORTED
+Recognizer is fully supported on this device.
+ |
+
UNSUPPORTED_ANDROID_VERSION
+Device's Android version is not supported.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static RecognizerCompatibilityStatus |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static RecognizerCompatibilityStatus[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final RecognizerCompatibilityStatus RECOGNIZER_SUPPORTED+
public static final RecognizerCompatibilityStatus PROCESSOR_ARCHITECTURE_NOT_SUPPORTED+
public static final RecognizerCompatibilityStatus NO_CAMERA+
public static final RecognizerCompatibilityStatus DEVICE_BLACKLISTED+
public static final RecognizerCompatibilityStatus UNSUPPORTED_ANDROID_VERSION+
public static final RecognizerCompatibilityStatus RECOGNIZER_NOT_SUPPORTED+
public static RecognizerCompatibilityStatus[] values()+
+for (RecognizerCompatibilityStatus c : RecognizerCompatibilityStatus.values()) + System.out.println(c); +
public static RecognizerCompatibilityStatus valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullClass | +Description | +
---|---|
CameraPermissionManager | +
+ Helper class that shows the camera permission screen when user has denied camera permission
+ on Android 6.0+.
+ |
+
RecognizerCompatibility | ++ |
Enum | +Description | +
---|---|
RecognizerCompatibilityStatus | ++ |
protected abstract class BaseCameraView.BaseCameraListener
+extends java.lang.Object
+Modifier | +Constructor and Description | +
---|---|
protected |
+BaseCameraListener() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onAutofocusFailed() |
+
void |
+onAutofocusStarted(android.graphics.Rect[] areas) |
+
void |
+onAutofocusStopped(android.graphics.Rect[] areas) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public final void onAutofocusFailed()+
public final void onAutofocusStarted(android.graphics.Rect[] areas)+
public final void onAutofocusStopped(android.graphics.Rect[] areas)+
protected class BaseCameraView.BaseCameraViewEventsListener
+extends java.lang.Object
+Modifier | +Constructor and Description | +
---|---|
protected |
+BaseCameraViewEventsListener() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onCameraPinchEvent(float scale) |
+
void |
+onCameraTapEvent(float x,
+ float y) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected class BaseCameraView.BaseOrientationChangeListener
+extends java.lang.Object
+Modifier | +Constructor and Description | +
---|---|
protected |
+BaseOrientationChangeListener() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onOrientationChange(Orientation orientation) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected BaseOrientationChangeListener()+
public void onOrientationChange(Orientation orientation)+
public static enum BaseCameraView.CameraViewState +extends java.lang.Enum<BaseCameraView.CameraViewState>+
Enum Constant and Description | +
---|
CREATED
+Indicates that create() has been called, next you need to call start() method
+ |
+
DESTROYED
+View is in destroyed (destroy() has been called - all resources have been released) or initial state (nothing is yet loaded), you need to call create() method
+ |
+
RESUMED
+Indicates that resume() has been called, view will soon initialize camera and start receiving frames
+ |
+
STARTED
+Indicates that start() has been called, next you need to call resume() method
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static BaseCameraView.CameraViewState |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static BaseCameraView.CameraViewState[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final BaseCameraView.CameraViewState DESTROYED+
public static final BaseCameraView.CameraViewState CREATED+
public static final BaseCameraView.CameraViewState STARTED+
public static final BaseCameraView.CameraViewState RESUMED+
public static BaseCameraView.CameraViewState[] values()+
+for (BaseCameraView.CameraViewState c : BaseCameraView.CameraViewState.values()) + System.out.println(c); +
public static BaseCameraView.CameraViewState valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static class BaseCameraView.LayoutParams
+extends android.view.ViewGroup.LayoutParams
+FILL_PARENT, height, layoutAnimationParameters, MATCH_PARENT, width, WRAP_CONTENT
Constructor and Description | +
---|
LayoutParams(android.content.Context c,
+ android.util.AttributeSet attrs) |
+
LayoutParams(int width,
+ int height) |
+
LayoutParams(android.view.ViewGroup.LayoutParams source) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isRotatable() |
+
void |
+setRotatable(boolean rotatable) |
+
resolveLayoutDirection, setBaseAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public LayoutParams(android.content.Context c, + android.util.AttributeSet attrs)+
public LayoutParams(int width, + int height)+
public LayoutParams(android.view.ViewGroup.LayoutParams source)+
public abstract class BaseCameraView
+extends android.view.ViewGroup
+Modifier and Type | +Class and Description | +
---|---|
protected class |
+BaseCameraView.BaseCameraListener |
+
protected class |
+BaseCameraView.BaseCameraViewEventsListener |
+
protected class |
+BaseCameraView.BaseOrientationChangeListener |
+
static class |
+BaseCameraView.CameraViewState |
+
static class |
+BaseCameraView.LayoutParams
+Layout params for BaseCameraView.
+ |
+
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
Modifier and Type | +Field and Description | +
---|---|
protected CameraEventsListener |
+mCameraEventsListener
+Listener that will receive various camera events
+ |
+
protected BaseCameraView.CameraViewState |
+mCameraViewState |
+
protected DeviceManager |
+mDeviceManager
+Device manager that will load device list from resources
+ |
+
protected boolean |
+mErrorState
+Flag indicating there has been an unrecoverable error
+ |
+
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description | +
---|
BaseCameraView(android.content.Context context) |
+
BaseCameraView(android.content.Context context,
+ android.util.AttributeSet attrSet) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addChildView(android.view.View child,
+ boolean rotatable) |
+
void |
+addChildView(android.view.View child,
+ boolean rotatable,
+ int index) |
+
void |
+addView(android.view.View child) |
+
void |
+addView(android.view.View child,
+ int index) |
+
void |
+addView(android.view.View child,
+ int width,
+ int height) |
+
void |
+addView(android.view.View child,
+ int index,
+ android.view.ViewGroup.LayoutParams params) |
+
void |
+addView(android.view.View child,
+ android.view.ViewGroup.LayoutParams params) |
+
protected boolean |
+areCameraPixelsLandscapeLeft() |
+
void |
+changeConfiguration(android.content.res.Configuration newConfiguration)
+This method changes the view's configuration.
+ |
+
protected void |
+changeConfigurationInternal(android.content.res.Configuration newConfiguration) |
+
protected boolean |
+checkLayoutParams(android.view.ViewGroup.LayoutParams p) |
+
void |
+create()
+Creates the view and its subviews and initializes camera settings.
+ |
+
protected abstract CameraListener |
+createCameraListener()
+ABSTRACT METHODS
+ |
+
protected ICameraView.CameraViewEventListener |
+createCameraViewEventsListener() |
+
protected OrientationChangeListener |
+createOrientationChangeListener() |
+
void |
+destroy() |
+
boolean |
+dispatchTouchEvent(android.view.MotionEvent ev) |
+
void |
+focusCamera()
+Request a new autofocus cycle from camera.
+ |
+
protected android.view.ViewGroup.LayoutParams |
+generateDefaultLayoutParams() |
+
android.view.ViewGroup.LayoutParams |
+generateLayoutParams(android.util.AttributeSet attrs) |
+
CameraAspectMode |
+getAspectMode()
+Returns the aspect mode of camera preview.
+ |
+
CameraEventsListener |
+getCameraEventsListener()
+Returns the current camera events listener.
+ |
+
protected CameraSettings |
+getCameraFactorySettings() |
+
int |
+getCameraPreviewHeight()
+Returns the height in pixels of the actual camera preview (does not have to be same as getHeight).
+ |
+
int |
+getCameraPreviewWidth()
+Returns the width in pixels of the actual camera preview (does not have to be same as getWidth).
+ |
+
BaseCameraView.CameraViewState |
+getCameraViewState()
+Returns the current lifecycle state of camera view.
+ |
+
protected int |
+getConfigurationOrientation() |
+
Orientation |
+getCurrentOrientation() |
+
int |
+getHostScreenOrientation()
+Returns the host's screen orientation as detected internally.
+ |
+
Orientation |
+getInitialOrientation()
+Returns the initial orientation of rotatable view as set by setInitialOrientation.
+ |
+
CameraType |
+getOpenedCameraType()
+Returns the type of the currently opened camera or null if currently there is no opened camera.
+ |
+
OrientationChangeListener |
+getOrientationChangeListener()
+Returns the current oreintation change listener
+ |
+
int |
+getRotationAnimationDuration()
+Returns the duration of rotatable view's rotation animation in miliseconds.
+ |
+
Rectangle |
+getVisiblePart()
+Returns the rectangle that which part of camera frame is visible in view
+ |
+
float |
+getZoomLevel()
+Returns the current camera zoom level.
+ |
+
java.lang.Boolean |
+isAutofocusSupported()
+Returns true if opened camera supports autofocus.
+ |
+
boolean |
+isCameraActive()
+Returns true if camera is currently active.
+ |
+
boolean |
+isCameraFocused()
+Returns true if camera is currently in focus
+ |
+
boolean |
+isCameraTorchSupported()
+Returns true if camera has got torch.
+ |
+
boolean |
+isDeviceShaking()
+Returns true if the device is being shaken
+ |
+
protected boolean |
+isHostActivityOrientationOnSensor() |
+
protected boolean |
+isOrientationAllowed(Orientation orientation) |
+
boolean |
+isPinchToZoomAllowed()
+Returns true if camera view will handle pinch events to manage camera zoom level.
+ |
+
boolean |
+isTapToFocusAllowed()
+Returns true if camera view will handle tap events to ask camera to perform autofocus
+ on tapped area.
+ |
+
protected abstract void |
+onActivityFlip()
+Called when activity is flipped - this event is not raised by OS so we have custom detection
+ of that state.
+ |
+
protected void |
+onCameraPreviewStarted() |
+
protected void |
+onCameraPreviewStopped() |
+
protected ICameraManager |
+onCreateCameraManager(CameraSettings settings)
+Called inside onCreate method.
+ |
+
protected void |
+onLayout(boolean changed,
+ int l,
+ int t,
+ int r,
+ int b) |
+
protected void |
+onMeasure(int widthMeasureSpec,
+ int heightMeasureSpec) |
+
void |
+pause()
+This method must be called from activity's onPause.
+ |
+
protected void |
+prepareCameraSettings(CameraSettings settings)
+Called inside onCreate method before creating camera manager.
+ |
+
protected abstract boolean |
+requireAutofocusFeature()
+If autofocus feature is required, please return true from this method.
+ |
+
void |
+resume()
+This method must be called from activity's onResume.
+ |
+
protected void |
+runOnUIThread(java.lang.Runnable runnable)
+Ensures given runnable is run on UI thread.
+ |
+
void |
+setAnimateRotation(boolean animateRotation)
+Sets whether rotation of rotatable view will be animated.
+ |
+
void |
+setAspectMode(CameraAspectMode aspectMode)
+Defines the aspect mode of camera preview.
+ |
+
void |
+setCameraEventsListener(CameraEventsListener cameraEventsListener)
+Sets the listener that will receive various camera events, such as when camera preview has
+ started or camera initialization error has occurred.
+ |
+
void |
+setCameraType(CameraType cameraType)
+Sets the camera type that will be used.
+ |
+
void |
+setForceUseLegacyCamera(boolean useLegacyCamera)
+With this method you can request using legacy Camera API even on devices that natively support new Camera2 API.
+ |
+
void |
+setInitialOrientation(Orientation initialOrientation)
+Sets the initial orientation of rotatable view and recognizer.
+ |
+
void |
+setMeteringAreas(Rectangle[] meteringAreas,
+ boolean rotateAreasWithDevice)
+Sets the areas where camera will perform focus, exposure and white balance meterings.
+ |
+
void |
+setOnActivityFlipListener(OnActivityFlipListener onActivityFlipListener)
+Sets the listener that will be notified when activity flip event occurs.
+ |
+
void |
+setOnSizeChangedListener(OnSizeChangedListener onSizeChangedListener)
+Sets the listener that will be notified when size of child views changes.
+ |
+
void |
+setOptimizeCameraForNearScan(boolean nearScan) |
+
void |
+setOrientationAllowedListener(OrientationAllowedListener orientationAllowedListener)
+Sets the listener that will be asked if device orientation is allowed prior rotating
+ rotatable view and native recognizer to that orientation.
+ |
+
void |
+setOrientationChangeListener(OrientationChangeListener orientationChangeListener)
+Sets the orientation listener that will receive orientation change events that are already reported
+ to BaseCameraView.
+ |
+
void |
+setPhotoMode(boolean photoMode) |
+
void |
+setPinchToZoomAllowed(boolean allowPinchToZoom)
+Sets whether camear view will handle pinch events to manage camera zoom level.
+ |
+
void |
+setRotationAnimationDuration(int rotationAnimationDuration)
+Sets the duration of rotatable view rotation animation (valid only if setAnimateRotation(true) was called).
+ |
+
void |
+setShakeListener(ShakeCallback shakeCallback)
+Sets the shake callback that will be notified about device shake events.
+ |
+
void |
+setTapToFocusAllowed(boolean allowTapToFocus)
+Sets whether camera view will handle tap events to ask camera to perform autofocus
+ on tapped area.
+ |
+
void |
+setTorchState(boolean on,
+ SuccessCallback successCallback)
+Turns the torch on the camera on or off.
+ |
+
void |
+setUseTextureViewForCameraDisplay(boolean forceTextureView)
+In order to display camera preview, camera view must use one of two android's view's that are
+ capable of displaying camera preview video stream.
+ |
+
void |
+setVideoResolutionPreset(VideoResolutionPreset preset) |
+
void |
+setZoomLevel(float zoomLevel)
+Sets the camera zoom level.
+ |
+
boolean |
+shouldAnimateRotation()
+Returns true if rotatable view's rotation should be animated.
+ |
+
protected boolean |
+shouldStartCamera() |
+
void |
+start() |
+
void |
+stop() |
+
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAttachedToWindow, onCreateDrawableState, onDetachedFromWindow, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchStartTemporaryDetach, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayout
protected CameraEventsListener mCameraEventsListener+
protected boolean mErrorState+
protected DeviceManager mDeviceManager+
protected BaseCameraView.CameraViewState mCameraViewState+
@UiThread +public BaseCameraView(@NonNull + android.content.Context context, + android.util.AttributeSet attrSet)+
@UiThread +public BaseCameraView(android.content.Context context)+
@UiThread +public void addView(android.view.View child)+
addView
in class android.view.ViewGroup
@UiThread +public void addView(android.view.View child, + int index)+
addView
in class android.view.ViewGroup
@UiThread +public void addView(android.view.View child, + int index, + android.view.ViewGroup.LayoutParams params)+
addView
in class android.view.ViewGroup
@UiThread +public void addView(android.view.View child, + android.view.ViewGroup.LayoutParams params)+
addView
in interface android.view.ViewManager
addView
in class android.view.ViewGroup
@UiThread +public void addView(android.view.View child, + int width, + int height)+
addView
in class android.view.ViewGroup
protected android.view.ViewGroup.LayoutParams generateDefaultLayoutParams()+
generateDefaultLayoutParams
in class android.view.ViewGroup
public android.view.ViewGroup.LayoutParams generateLayoutParams(android.util.AttributeSet attrs)+
generateLayoutParams
in class android.view.ViewGroup
protected boolean checkLayoutParams(android.view.ViewGroup.LayoutParams p)+
checkLayoutParams
in class android.view.ViewGroup
@UiThread +public void addChildView(android.view.View child, + boolean rotatable)+
@UiThread +public void addChildView(android.view.View child, + boolean rotatable, + int index)+
protected void runOnUIThread(java.lang.Runnable runnable)+
runnable
- @UiThread +public void changeConfiguration(android.content.res.Configuration newConfiguration)+
newConfiguration
- New view configurationprotected void changeConfigurationInternal(android.content.res.Configuration newConfiguration)+
@UiThread +public void create()+
@UiThread +public void destroy()+
protected void prepareCameraSettings(CameraSettings settings)+
protected CameraSettings getCameraFactorySettings()+
protected ICameraManager onCreateCameraManager(CameraSettings settings)+
settings
- camera settings as returned by onCreateCameraFactorySettingsprotected boolean shouldStartCamera()+
protected void onCameraPreviewStarted()+
protected void onCameraPreviewStopped()+
@UiThread +public void start()+
@UiThread +public void resume()+
@UiThread +public void pause()+
@UiThread +public void stop()+
@UiThread +protected void onMeasure(int widthMeasureSpec, + int heightMeasureSpec)+
onMeasure
in class android.view.View
@UiThread +public boolean dispatchTouchEvent(android.view.MotionEvent ev)+
dispatchTouchEvent
in class android.view.ViewGroup
@UiThread +protected void onLayout(boolean changed, + int l, + int t, + int r, + int b)+
onLayout
in class android.view.ViewGroup
@UiThread +public final boolean isCameraFocused()+
@UiThread +public final CameraType getOpenedCameraType()+
@UiThread +public final void focusCamera()+
@UiThread +public final boolean isCameraTorchSupported()+
@Nullable + @UiThread +public final java.lang.Boolean isAutofocusSupported()+
@UiThread +public final void setTorchState(boolean on, + SuccessCallback successCallback)+
on
- If true, torch will be turned on, if false, torch will be turned off.successCallback
- callback that will receive information if torch was successfully put in desired statepublic Orientation getCurrentOrientation()+
protected boolean areCameraPixelsLandscapeLeft()+
@UiThread +public final float getZoomLevel()+
@UiThread +public final void setZoomLevel(float zoomLevel)+
zoomLevel
- Desired camera zoom level.@UiThread +public final BaseCameraView.CameraViewState getCameraViewState()+
public final boolean isTapToFocusAllowed()+
public final void setTapToFocusAllowed(boolean allowTapToFocus)+
allowTapToFocus
- whether or not tap to focus is allowedpublic final boolean isPinchToZoomAllowed()+
public final void setPinchToZoomAllowed(boolean allowPinchToZoom)+
allowPinchToZoom
- whether or not pinch to zoom is allowed. Default is false.public final boolean isDeviceShaking()+
public final int getCameraPreviewWidth()+
public final int getCameraPreviewHeight()+
public final boolean shouldAnimateRotation()+
@UiThread +public final void setAnimateRotation(boolean animateRotation)+
animateRotation
- public final int getRotationAnimationDuration()+
public final void setRotationAnimationDuration(int rotationAnimationDuration)+
rotationAnimationDuration
- protected final boolean isOrientationAllowed(Orientation orientation)+
@UiThread +public final void setMeteringAreas(Rectangle[] meteringAreas, + boolean rotateAreasWithDevice)+
meteringAreas
- array of rectangles that define areas where camera will perform focus, exposure and white balance meterings.rotateAreasWithDevice
- if set to true, metering areas will be readjusted each time device orientation changesjava.lang.NullPointerException
- if at least one element of meteringAreas is nulljava.lang.IllegalArgumentException
- if at least on element of meteringAreas has either zero surface or is not inside viewjava.lang.IllegalStateException
- if camera is not activepublic final Orientation getInitialOrientation()+
@UiThread +public final void setInitialOrientation(Orientation initialOrientation)+
initialOrientation
- @UiThread +public void setOrientationAllowedListener(OrientationAllowedListener orientationAllowedListener)+
public final boolean isCameraActive()+
protected final int getConfigurationOrientation()+
@UiThread +public void setCameraType(CameraType cameraType)+
cameraType
- @UiThread +public void setShakeListener(ShakeCallback shakeCallback)+
shakeCallback
- public CameraAspectMode getAspectMode()+
@UiThread +public void setAspectMode(CameraAspectMode aspectMode)+
aspectMode
- desired aspect mode@UiThread +public final void setOnSizeChangedListener(OnSizeChangedListener onSizeChangedListener)+
onSizeChangedListener
- @UiThread +public final void setOnActivityFlipListener(OnActivityFlipListener onActivityFlipListener)+
onActivityFlipListener
- Activity flip listener@UiThread +public final void setVideoResolutionPreset(VideoResolutionPreset preset)+
preset
- Sets the preset that will be used for choosing camera video resolution.@UiThread +public final void setForceUseLegacyCamera(boolean useLegacyCamera)+
useLegacyCamera
- If set to true, legacy Camera API will be used even on devices that support new Camera2 API.@UiThread +public final void setPhotoMode(boolean photoMode)+
photoMode
- If set to true, Photo camera manager will be used instead of Video camera manager. Thus, user will have to
+ take the picture before it goes to recognition. Default is false.@UiThread +public final void setOptimizeCameraForNearScan(boolean nearScan)+
nearScan
- Flag which indicates camera parameters should be optimized for near object scanning.
+ When camera parameters are optimized for near object scanning, macro focus mode will be
+ preferred over autofocus mode. Thus, camera will have easier time focusing on to near objects,
+ but might have harder time focusing on far objects. If you expect that most of your scans
+ will be performed by holding the device very near the object, turn on that parameter. By default,
+ this parameter is set to false.@UiThread +public final void setUseTextureViewForCameraDisplay(boolean forceTextureView)+
forceTextureView
- Whether TextureView should be used even for legacy camera API.public OrientationChangeListener getOrientationChangeListener()+
public void setOrientationChangeListener(OrientationChangeListener orientationChangeListener)+
orientationChangeListener
- public CameraEventsListener getCameraEventsListener()+
@UiThread +public void setCameraEventsListener(CameraEventsListener cameraEventsListener)+
cameraEventsListener
- public int getHostScreenOrientation()+
public Rectangle getVisiblePart()+
protected OrientationChangeListener createOrientationChangeListener()+
protected ICameraView.CameraViewEventListener createCameraViewEventsListener()+
protected abstract boolean requireAutofocusFeature()+
protected abstract void onActivityFlip()+
protected abstract CameraListener createCameraListener()+
protected boolean isHostActivityOrientationOnSensor()+
public enum CameraAspectMode +extends java.lang.Enum<CameraAspectMode> +implements android.os.Parcelable+
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Enum Constant and Description | +
---|
ASPECT_FILL
+Aspect ratio of the camera preview will be kept by zooming and cropping the camera preview
+ so that it will fill the given view.
+ |
+
ASPECT_FIT
+Aspect ratio of the camera preview will be kept by letterboxing the camera preview
+ into the given view.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<CameraAspectMode> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
static CameraAspectMode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static CameraAspectMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final CameraAspectMode ASPECT_FIT+
public static final CameraAspectMode ASPECT_FILL+
public static final android.os.Parcelable.Creator<CameraAspectMode> CREATOR+
public static CameraAspectMode[] values()+
+for (CameraAspectMode c : CameraAspectMode.values()) + System.out.println(c); +
public static CameraAspectMode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public interface CameraEventsListener +extends AutofocusListener+
Modifier and Type | +Method and Description | +
---|---|
void |
+onCameraPermissionDenied()
+Called on Android 6.0 and newer when runtime camera permission was not given to the app.
+ |
+
void |
+onCameraPreviewStarted()
+Called just after camera preview has successfully
+ started and no exceptions occurred.
+ |
+
void |
+onCameraPreviewStopped()
+Called inside pause method of CameraView just haver camera preview has been stopped.
+ |
+
void |
+onError(java.lang.Throwable exc)
+Called when recognition results with exception.
+ |
+
onAutofocusFailed, onAutofocusStarted, onAutofocusStopped
void onCameraPreviewStarted()+
void onCameraPreviewStopped()+
void onError(java.lang.Throwable exc)+
exc
- Exception that occurred during recognition.void onCameraPermissionDenied()+
public enum NotSupportedReason +extends java.lang.Enum<NotSupportedReason>+
Enum Constant and Description | +
---|
BLACKLISTED_DEVICE
+Indicates that device has been blacklisted by developers because it is known that scanning will not work on it
+ |
+
CUSTOM_UI_FORBIDDEN
+Indicates that current build configuration requires valid license key to be set with method setLicenseKey before using
+ the scanner and set license key does not allow setting this view on custom activity.
+ |
+
INVALID_LICENSE_KEY
+Indicates that current build configuration requires valid license key to be set with method setLicenseKey before using
+ the scanner and set license key is not valid
+ |
+
NO_AUTOFOCUS_CAMERA
+Indicates that current configuration requires camera autofocus support and current device does not support that feature
+ |
+
NO_CAMERA
+Indicates that device does not have camera
+ |
+
UNSUPPORTED_ANDROID_VERSION
+Indicates that current version of android is not supported.
+ |
+
UNSUPPORTED_PROCESSOR_ARCHITECTURE
+Indicates that device has a processor that is not supported (for example ARMv7 processor without NEON SIMD instruction support)
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getDescription() |
+
static NotSupportedReason |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static NotSupportedReason[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final NotSupportedReason UNSUPPORTED_ANDROID_VERSION+
public static final NotSupportedReason NO_CAMERA+
public static final NotSupportedReason NO_AUTOFOCUS_CAMERA+
public static final NotSupportedReason BLACKLISTED_DEVICE+
public static final NotSupportedReason INVALID_LICENSE_KEY+
public static final NotSupportedReason CUSTOM_UI_FORBIDDEN+
public static final NotSupportedReason UNSUPPORTED_PROCESSOR_ARCHITECTURE+
public static NotSupportedReason[] values()+
+for (NotSupportedReason c : NotSupportedReason.values()) + System.out.println(c); +
public static NotSupportedReason valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getDescription()+
public interface OnActivityFlipListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onActivityFlip()
+Called when activity is flipped.
+ |
+
void onActivityFlip()+
public interface OnSizeChangedListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onSizeChanged(int width,
+ int height)
+Called when CameraView changes the size of itself and its children.
+ |
+
public interface OrientationAllowedListener
+Modifier and Type | +Method and Description | +
---|---|
boolean |
+isOrientationAllowed(Orientation orientation)
+Called in onOrientationChange.
+ |
+
boolean isOrientationAllowed(Orientation orientation)+
orientation
- Orientation of the device.Interface | +Description | +
---|---|
CameraEventsListener | +
+ Created by dodo on 06/10/14.
+ |
+
OnActivityFlipListener | +
+ Listener that will notify you when activity flip has occurred.
+ |
+
OnSizeChangedListener | +
+ Created by dodo on 06/10/14.
+ |
+
OrientationAllowedListener | +
+ Created by dodo on 07/10/14.
+ |
+
Class | +Description | +
---|---|
BaseCameraView | +
+ A simple wrapper around a Camera and a SurfaceView that renders a centered
+ preview of the Camera to the surface.
+ |
+
BaseCameraView.LayoutParams | +
+ Layout params for BaseCameraView.
+ |
+
Enum | +Description | +
---|---|
BaseCameraView.CameraViewState | ++ |
CameraAspectMode | +
+ Created by dodo on 22/10/14.
+ |
+
NotSupportedReason | +
+ Created by dodo on 13/10/14.
+ |
+
public enum DetectionStatus +extends java.lang.Enum<DetectionStatus>+
Enum Constant and Description | +
---|
CAMERA_AT_ANGLE
+Object is detected, but camera is at too large angle to read it
+ |
+
CAMERA_TOO_HIGH
+Object detected, but the camera is too far above to read it
+ |
+
CAMERA_TOO_NEAR
+Object detected, but the camera is too far above to read it
+ |
+
FAIL
+Detection failed, nothing detected
+ |
+
PARTIAL_OBJECT
+Object is detected, but parts of it are not visible
+ |
+
SUCCESS
+Object successfully detected
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static DetectionStatus |
+fromNativeDetectionStatus(int nativeDetectionStatus) |
+
static DetectionStatus |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static DetectionStatus[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final DetectionStatus SUCCESS+
public static final DetectionStatus FAIL+
public static final DetectionStatus CAMERA_TOO_HIGH+
public static final DetectionStatus PARTIAL_OBJECT+
public static final DetectionStatus CAMERA_AT_ANGLE+
public static final DetectionStatus CAMERA_TOO_NEAR+
public static DetectionStatus[] values()+
+for (DetectionStatus c : DetectionStatus.values()) + System.out.println(c); +
public static DetectionStatus valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static DetectionStatus fromNativeDetectionStatus(int nativeDetectionStatus)+
public class RecognizerView +extends BaseCameraView+
BaseCameraView.BaseCameraListener, BaseCameraView.BaseCameraViewEventsListener, BaseCameraView.BaseOrientationChangeListener, BaseCameraView.CameraViewState, BaseCameraView.LayoutParams
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
Modifier and Type | +Field and Description | +
---|---|
protected RecognitionSettings |
+mRecognitionSettings
+Settings object
+ |
+
mCameraEventsListener, mCameraViewState, mDeviceManager, mErrorState
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description | +
---|
RecognizerView(android.content.Context context) |
+
RecognizerView(android.content.Context context,
+ android.util.AttributeSet attrSet) |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+changeConfigurationInternal(android.content.res.Configuration newConfig) |
+
void |
+create()
+This method must be called from activity's onCreate.
+ |
+
protected CameraListener |
+createCameraListener()
+ABSTRACT METHODS
+ |
+
protected OrientationChangeListener |
+createOrientationChangeListener() |
+
void |
+destroy()
+This method must be called from activity's onDestroy.
+ |
+
static java.lang.String |
+getNativeLibraryVersionString()
+Methods returns the version string of native library, if it has been
+ loaded.
+ |
+
RecognitionSettings |
+getRecognitionSettings()
+Returns the currently active generic settings that affect all recognizers and whole recognition process.
+ |
+
Rectangle |
+getScanningRegion()
+Returns the current scanning region or null if entire image is scanned.
+ |
+
ScanResultListener |
+getScanResultListener()
+Returns the listener that will obtain the results of the scanning.
+ |
+
boolean |
+isScanningPaused()
+Returns true if scanning is paused or if scanning still has not yet started.
+ |
+
protected void |
+onActivityFlip()
+Called when activity is flipped - this event is not raised by OS so we have custom detection
+ of that state.
+ |
+
protected void |
+onCameraPreviewStarted() |
+
protected void |
+onCameraPreviewStopped() |
+
void |
+pause()
+This method must be called from activity's onPause.
+ |
+
void |
+pauseScanning()
+Pauses the scanning loop.
+ |
+
protected void |
+prepareCameraSettings(CameraSettings settings)
+Called inside onCreate method before creating camera manager.
+ |
+
void |
+reconfigureRecognizers(RecognitionSettings recognitionSettings)
+Use this method to reconfigure available recognizers.
+ |
+
protected boolean |
+requireAutofocusFeature()
+If autofocus feature is required, please return true from this method.
+ |
+
void |
+resetRecognitionState()
+Resets the recognizer state, i.e.
+ |
+
void |
+resume()
+This method must be called from activity's onResume.
+ |
+
void |
+resumeScanning(boolean resetState)
+This method resumes scanning loop that was paused by calling
+pauseScanning() . |
+
void |
+setInitialScanningPaused(boolean initialScanningPaused)
+If you want to prevent automatic scan resuming immediately after camera starts, set this to true.
+ |
+
void |
+setLicenseKey(java.lang.String licenseKey)
+Set license key and unlock the library.
+ |
+
void |
+setLicenseKey(java.lang.String licenseKey,
+ java.lang.String licensee)
+Set license key and unlock the library.
+ |
+
void |
+setMetadataListener(MetadataListener metadataListener,
+ MetadataSettings metadataSettings)
+Sets the listener that will obtain metadata that is being processed.
+ |
+
void |
+setRecognitionSettings(RecognitionSettings recognitionSettings)
+Sets the generic settings that affect all recognizers and whole recognition process.
+ |
+
void |
+setScanningRegion(Rectangle scanningRegion,
+ boolean rotateRegionWithDevice)
+Define scanning region as a rectangle.
+ |
+
void |
+setScanResultListener(ScanResultListener scanResultListener)
+Sets the listener that will obtain the results of the scanning.
+ |
+
boolean |
+shouldRotateScanningRegion()
+Returns true if scanning region should be rotated with device.
+ |
+
protected boolean |
+shouldStartCamera() |
+
void |
+start()
+This method must be called from activity's onStart.
+ |
+
void |
+stop()
+This method must be called from activity's onStop.
+ |
+
addChildView, addChildView, addView, addView, addView, addView, addView, areCameraPixelsLandscapeLeft, changeConfiguration, checkLayoutParams, createCameraViewEventsListener, dispatchTouchEvent, focusCamera, generateDefaultLayoutParams, generateLayoutParams, getAspectMode, getCameraEventsListener, getCameraFactorySettings, getCameraPreviewHeight, getCameraPreviewWidth, getCameraViewState, getConfigurationOrientation, getCurrentOrientation, getHostScreenOrientation, getInitialOrientation, getOpenedCameraType, getOrientationChangeListener, getRotationAnimationDuration, getVisiblePart, getZoomLevel, isAutofocusSupported, isCameraActive, isCameraFocused, isCameraTorchSupported, isDeviceShaking, isHostActivityOrientationOnSensor, isOrientationAllowed, isPinchToZoomAllowed, isTapToFocusAllowed, onCreateCameraManager, onLayout, onMeasure, runOnUIThread, setAnimateRotation, setAspectMode, setCameraEventsListener, setCameraType, setForceUseLegacyCamera, setInitialOrientation, setMeteringAreas, setOnActivityFlipListener, setOnSizeChangedListener, setOptimizeCameraForNearScan, setOrientationAllowedListener, setOrientationChangeListener, setPhotoMode, setPinchToZoomAllowed, setRotationAnimationDuration, setShakeListener, setTapToFocusAllowed, setTorchState, setUseTextureViewForCameraDisplay, setVideoResolutionPreset, setZoomLevel, shouldAnimateRotation
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAttachedToWindow, onCreateDrawableState, onDetachedFromWindow, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchStartTemporaryDetach, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayout
protected RecognitionSettings mRecognitionSettings+
@UiThread +public RecognizerView(android.content.Context context, + android.util.AttributeSet attrSet)+
@UiThread +public RecognizerView(android.content.Context context)+
@UiThread +public void create()+
create
in class BaseCameraView
java.lang.UnsatisfiedLinkError
- if native library could not be loadedjava.lang.NullPointerException
- if scan result listener or camera events listener is not setjava.lang.IllegalStateException
- if recognizer settings array is null or emptyprotected final void prepareCameraSettings(CameraSettings settings)+
BaseCameraView
prepareCameraSettings
in class BaseCameraView
@UiThread +public final void start()+
start
in class BaseCameraView
@UiThread +public final void stop()+
stop
in class BaseCameraView
@UiThread +public final void resume()+
resume
in class BaseCameraView
@UiThread +public final void resumeScanning(boolean resetState)+
pauseScanning()
.
+ If resetState is 'true', resetRecognitionState()
will be called.
+ If resetState is 'false', recognition state will not be reset, so scanning after resume may use old scan data
+ to boost quality.
+
+ pauseScanning()
and resumeScanning(boolean)
are counting calls. This means
+ that if you called pauseScanning()
twice, you will also have to call resumeScanning(boolean)
twice
+ to actually resume scanning.resetState
- should internal state be reset when resuming scanning@UiThread +public final void pauseScanning()+
resumeScanning(boolean)
.
+ pauseScanning()
and resumeScanning(boolean)
are counting calls. This means
+ that if you called pauseScanning()
twice, you will also have to call resumeScanning(boolean)
+ to actually resume scanning.@UiThread +public final void pause()+
pause
in class BaseCameraView
protected void onCameraPreviewStopped()+
onCameraPreviewStopped
in class BaseCameraView
@UiThread +public final void destroy()+
destroy
in class BaseCameraView
protected final boolean shouldStartCamera()+
shouldStartCamera
in class BaseCameraView
protected void onCameraPreviewStarted()+
onCameraPreviewStarted
in class BaseCameraView
@UiThread +public final void resetRecognitionState()+
public boolean isScanningPaused()+
@UiThread +public void reconfigureRecognizers(RecognitionSettings recognitionSettings)+
recognitionSettings
- New recognition settings that will be applied.protected boolean requireAutofocusFeature()+
BaseCameraView
requireAutofocusFeature
in class BaseCameraView
protected final CameraListener createCameraListener()+
BaseCameraView
createCameraListener
in class BaseCameraView
protected final OrientationChangeListener createOrientationChangeListener()+
createOrientationChangeListener
in class BaseCameraView
@UiThread +public final void setLicenseKey(@NonNull + java.lang.String licenseKey) + throws InvalidLicenceKeyException+
licenseKey
- license key for unlocking the libraryInvalidLicenceKeyException
- if license key is not valid@UiThread +public final void setLicenseKey(@NonNull + java.lang.String licenseKey, + java.lang.String licensee) + throws InvalidLicenceKeyException+
licenseKey
- license key for unlocking the librarylicensee
- licenseeInvalidLicenceKeyException
- if license key is not valid@UiThread +public final void setScanningRegion(Rectangle scanningRegion, + boolean rotateRegionWithDevice)+
scanningRegion
- Rectangle to define a scanning region or null to scan entire image.rotateRegionWithDevice
- If set to true, scanning region will be rotate when device changes orientation.protected void changeConfigurationInternal(android.content.res.Configuration newConfig)+
changeConfigurationInternal
in class BaseCameraView
protected void onActivityFlip()+
BaseCameraView
onActivityFlip
in class BaseCameraView
public boolean shouldRotateScanningRegion()+
public Rectangle getScanningRegion()+
public static java.lang.String getNativeLibraryVersionString()+
public RecognitionSettings getRecognitionSettings()+
@UiThread +public void setRecognitionSettings(RecognitionSettings recognitionSettings)+
recognitionSettings
- generic settings that affect all recognizers and whole recognition process.@UiThread +public void setScanResultListener(@NonNull + ScanResultListener scanResultListener)+
scanResultListener
- listener that will obtain result of the scanning@UiThread +public void setMetadataListener(MetadataListener metadataListener, + MetadataSettings metadataSettings)+
metadataListener
- listener that will obtain metadata that is being processedpublic ScanResultListener getScanResultListener()+
@UiThread +public void setInitialScanningPaused(boolean initialScanningPaused)+
resumeScanning(boolean)
to resume scanning loop.initialScanningPaused
- whether or not scanning loop will be paused initiallypublic interface ScanResultListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onScanningDone(RecognitionResults results)
+This method is called when recognition is done.
+ |
+
void onScanningDone(@Nullable + RecognitionResults results)+
results
- Recognition results.Interface | +Description | +
---|---|
ScanResultListener | +
+ Created by dodo on 07/10/14.
+ |
+
Class | +Description | +
---|---|
RecognizerView | +
+ Created by dodo on 06/10/14.
+ |
+
Enum | +Description | +
---|---|
DetectionStatus | +
+ Created by dodo on 07/10/14.
+ |
+
public interface QuadViewAnimationListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onAnimationEnd()
+Called when quad view finishes quad animation.
+ |
+
void |
+onAnimationStart()
+Called when quad view starts animating quad.
+ |
+
public class QuadViewManager
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
protected QuadView |
+mQuadView |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+animateQuadToDefaultPosition()
+Call this method to begin quadrilateral animation to its default position.
+ |
+
void |
+animateQuadToDetectionPosition(QuadDetectorResult quadDetectionResult)
+Call this method to begin quadrilateral animation to detected quadrilateral.
+ |
+
void |
+configurationChanged(RecognizerView recognizerView,
+ android.content.res.Configuration newConfig)
+Inform quadview of configuration change event.
+ |
+
boolean |
+isAnimationInProgress()
+Returns true if quad view animation is currently in progress.
+ |
+
void |
+setAnimationDuration(long durationMs)
+Sets the duration in miliseconds of quadview animation.
+ |
+
void |
+setAnimationListener(QuadViewAnimationListener listener)
+Sets a listener that will be notified when quad animation has started and finished.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void animateQuadToDefaultPosition()+
public void animateQuadToDetectionPosition(@NonNull + QuadDetectorResult quadDetectionResult)+
quadDetectionResult
- detection result to which quad will be animatedpublic void setAnimationDuration(long durationMs)+
durationMs
- duration in miliseconds of quadview animations.public void configurationChanged(@NonNull + RecognizerView recognizerView, + @NonNull + android.content.res.Configuration newConfig)+
recognizerView
- RecognizerView used to create the QuadView. Make sure you've called changeConfiguration on it before calling this method.newConfig
- New configuration as given by onConfigurationChanged activity callback.public boolean isAnimationInProgress()+
public void setAnimationListener(QuadViewAnimationListener listener)+
listener
- public class QuadViewManagerFactory
+extends java.lang.Object
+Constructor and Description | +
---|
QuadViewManagerFactory() |
+
Modifier and Type | +Method and Description | +
---|---|
static QuadViewManager |
+createQuadViewFromPreset(RecognizerView recognizerView,
+ QuadViewPreset preset) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public QuadViewManagerFactory()+
public static QuadViewManager createQuadViewFromPreset(@NonNull + RecognizerView recognizerView, + @NonNull + QuadViewPreset preset)+
public enum QuadViewPreset +extends java.lang.Enum<QuadViewPreset>+
Enum Constant and Description | +
---|
DEFAULT_CORNERS_FROM_PDF417_SCAN_ACTIVITY
+Setup quad view in the same style as used in default Pdf417ScanActivity
+ |
+
DEFAULT_CORNERS_FROM_SCAN_ACTIVITY
+Setup quad view in the same style as used in default ScanActivity
+ |
+
DEFAULT_FROM_SCAN_CARD_ACTIVITY
+Setup quad view in the same style as used in default ScanCard activity
+ |
+
DEFAULT_FROM_SCAN_FOV_ACTIVITY
+Setup quad view in the same style as used in default ScanFOV activity
+ |
+
DEFAULT_FROM_SCAN_FOV_WITH_INFO_ACTIVITY
+Setup quad view in the same style as used in default ScanFovWithInfo activity
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static QuadViewPreset |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static QuadViewPreset[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final QuadViewPreset DEFAULT_CORNERS_FROM_SCAN_ACTIVITY+
public static final QuadViewPreset DEFAULT_CORNERS_FROM_PDF417_SCAN_ACTIVITY+
public static final QuadViewPreset DEFAULT_FROM_SCAN_CARD_ACTIVITY+
public static final QuadViewPreset DEFAULT_FROM_SCAN_FOV_ACTIVITY+
public static final QuadViewPreset DEFAULT_FROM_SCAN_FOV_WITH_INFO_ACTIVITY+
public static QuadViewPreset[] values()+
+for (QuadViewPreset c : QuadViewPreset.values()) + System.out.println(c); +
public static QuadViewPreset valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullInterface | +Description | +
---|---|
QuadViewAnimationListener | +
+ Listener that will be notified of QuadView's animation events.
+ |
+
Class | +Description | +
---|---|
QuadViewManager | +
+ Class that manages animated quadrilateral detection result view.
+ |
+
QuadViewManagerFactory | +
+ Created by dodo on 27/11/15.
+ |
+
Enum | +Description | +
---|---|
QuadViewPreset | +
+ Created by dodo on 27/11/15.
+ |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+EXTRAS_BEEP_RESOURCE |
+"EXTRAS_BEEP_RESOURCE" |
+
+
+public static final java.lang.String |
+EXTRAS_CAMERA_VIDEO_PRESET |
+"EXTRAS_CAMERA_VIDEO_PRESET" |
+
+
+public static final java.lang.String |
+EXTRAS_HELP_INTENT |
+"EXTRAS_HELP_INTENT" |
+
+
+public static final java.lang.String |
+EXTRAS_IMAGE_LISTENER |
+"EXTRAS_IMAGE_LISTENER" |
+
+
+public static final java.lang.String |
+EXTRAS_IMAGE_METADATA_SETTINGS |
+"EXTRAS_IMAGE_METADATA_SETTINGS" |
+
+
+public static final java.lang.String |
+EXTRAS_LICENSE_KEY |
+"EXTRAS_LICENSE_KEY" |
+
+
+public static final java.lang.String |
+EXTRAS_LICENSEE |
+"EXTRAS_LICENSEE" |
+
+
+public static final java.lang.String |
+EXTRAS_RECOGNITION_RESULTS |
+"EXTRAS_RECOGNITION_RESULTS" |
+
+
+public static final java.lang.String |
+EXTRAS_SCAN_CONFIGURATION |
+"EXTRAS_SCAN_CONFIGURATION" |
+
+
+public static final java.lang.String |
+EXTRAS_SCAN_MESSAGE |
+"EXTRAS_SCAN_MESSAGE" |
+
+
+public static final java.lang.String |
+EXTRAS_SCAN_RESULTS |
+"EXTRAS_SCAN_RESULTS" |
+
+
+public static final java.lang.String |
+EXTRAS_SHOW_OCR_RESULT |
+"EXTRAS_SHOW_OCR_RESULT" |
+
+
+public static final java.lang.String |
+EXTRAS_SHOW_OCR_RESULT_MODE |
+"EXTRAS_SHOW_OCR_RESULT_MODE" |
+
+
+public static final java.lang.String |
+EXTRAS_USE_LEGACY_CAMERA_API |
+"EXTRAS_USE_LEGACY_CAMERA_API" |
+
+
+public static final java.lang.String |
+STATE_SCANNED |
+"STATE_SCANNED" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+EXTRAS_CAMERA_VIDEO_PRESET |
+"EXTRAS_CAMERA_VIDEO_PRESET" |
+
+
+public static final java.lang.String |
+EXTRAS_HELP_INTENT |
+"EXTRAS_HELP_INTENT" |
+
+
+public static final java.lang.String |
+EXTRAS_IMAGE_LISTENER |
+"EXTRAS_IMAGE_LISTENER" |
+
+
+public static final java.lang.String |
+EXTRAS_IMAGE_METADATA_SETTINGS |
+"EXTRAS_IMAGE_METADATA_SETTINGS" |
+
+
+public static final java.lang.String |
+EXTRAS_INFINITE_LOOP_SCAN |
+"EXTRAS_INFINITE_LOOP_SCAN" |
+
+
+public static final java.lang.String |
+EXTRAS_LICENSE_KEY |
+"EXTRAS_LICENSE_KEY" |
+
+
+public static final java.lang.String |
+EXTRAS_LICENSEE |
+"EXTRAS_LICENSEE" |
+
+
+public static final java.lang.String |
+EXTRAS_RECOGNITION_RESULTS |
+"EXTRAS_RECOGNITION_RESULTS" |
+
+
+public static final java.lang.String |
+EXTRAS_SCAN_CONFIGURATION |
+"EXTRAS_SCAN_CONFIGURATION" |
+
+
+public static final java.lang.String |
+EXTRAS_SCAN_RESULTS |
+"EXTRAS_SCAN_RESULTS" |
+
+
+public static final java.lang.String |
+EXTRAS_SHOW_OCR_RESULT |
+"EXTRAS_SHOW_OCR_RESULT" |
+
+
+public static final java.lang.String |
+EXTRAS_SHOW_OCR_RESULT_MODE |
+"EXTRAS_SHOW_OCR_RESULT_MODE" |
+
+
+public static final java.lang.String |
+EXTRAS_USE_LEGACY_CAMERA_API |
+"EXTRAS_USE_LEGACY_CAMERA_API" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+ACCOUNT_NUMBER |
+"Account" |
+
+
+public static final java.lang.String |
+AMOUNT |
+"Amount" |
+
+
+public static final java.lang.String |
+AUTHORITY |
+"authority" |
+
+
+public static final java.lang.String |
+BANK_CODE |
+"BankCode" |
+
+
+public static final java.lang.String |
+BANK_NAME |
+"BankName" |
+
+
+public static final java.lang.String |
+BARCODE_DATA |
+"BarcodeData" |
+
+
+public static final java.lang.String |
+BARCODE_EXTENDED_DATA |
+"BarcodeExtendedData" |
+
+
+public static final java.lang.String |
+BARCODE_LOCATION |
+"BarcodeLocation" |
+
+
+public static final java.lang.String |
+BELEGNUMMER |
+"Belegart" |
+
+
+public static final java.lang.String |
+BIC |
+"BIC" |
+
+
+public static final java.lang.String |
+BILL_NUMBER |
+"BillNumber" |
+
+
+public static final java.lang.String |
+CODE128_RESULT |
+"code128" |
+
+
+public static final java.lang.String |
+CODE39_RESULT |
+"code39" |
+
+
+public static final java.lang.String |
+CONSTANT_SYMBOL |
+"constantSymbol" |
+
+
+public static final java.lang.String |
+CONTRACT_ACCOUNT |
+"Vertragskonto" |
+
+
+public static final java.lang.String |
+COUNTRY_ID |
+"countryId" |
+
+
+public static final java.lang.String |
+CREDITOR_ID |
+"creditorId" |
+
+
+public static final java.lang.String |
+CURRENCY |
+"Currency" |
+
+
+public static final java.lang.String |
+CUSTOMER_DATA |
+"CustomerData" |
+
+
+public static final java.lang.String |
+CUSTOMER_NUMBER |
+"CustomerNumber" |
+
+
+public static final java.lang.String |
+DATE_OF_SIGNATURE |
+"dateOfSignature" |
+
+
+public static final java.lang.String |
+DETECTIOR_RESULT |
+"detectionResult" |
+
+
+public static final java.lang.String |
+DISPLAY_DATA |
+"DisplayData" |
+
+
+public static final java.lang.String |
+DOCUMENT_CLASSIFICATION |
+"documentClassification" |
+
+
+public static final java.lang.String |
+DOCUMENT_EXPIRY_DATE |
+"documentExpiryDate" |
+
+
+public static final java.lang.String |
+DOCUMENT_ISSUE_DATE |
+"documentIssueDate" |
+
+
+public static final java.lang.String |
+DOCUMENT_ISSUING_AUTHORITY |
+"documentIssuingAuthority" |
+
+
+public static final java.lang.String |
+DRIVER_NUMBER |
+"driverNumber" |
+
+
+public static final java.lang.String |
+DUE_DATE |
+"DueDate" |
+
+
+public static final java.lang.String |
+EXECUTION_DATE |
+"executionDate" |
+
+
+public static final java.lang.String |
+FORM_FUNCTION |
+"FormFunction" |
+
+
+public static final java.lang.String |
+FORM_ID |
+"FormID" |
+
+
+public static final java.lang.String |
+FORM_TYPE |
+"FormType" |
+
+
+public static final java.lang.String |
+FORM_VERSION |
+"FormVersion" |
+
+
+public static final java.lang.String |
+IBAN |
+"IBAN" |
+
+
+public static final java.lang.String |
+INVOICE_ID |
+"invoiceId" |
+
+
+public static final java.lang.String |
+LIBINFO |
+"LibInfo" |
+
+
+public static final java.lang.String |
+MANDATE_ID |
+"mandateId" |
+
+
+public static final java.lang.String |
+MRTD_ALIEN_NUMBER |
+"AlienNumber" |
+
+
+public static final java.lang.String |
+MRTD_APPLICATION_RECIEPT_NUMBER |
+"ApplicationRecieptNumber" |
+
+
+public static final java.lang.String |
+MRTD_DATE_OF_BIRTH |
+"DateOfBirth" |
+
+
+public static final java.lang.String |
+MRTD_DATE_OF_EXPIRY |
+"DateOfExpiry" |
+
+
+public static final java.lang.String |
+MRTD_DOCUMENT_CODE |
+"DocumentCode" |
+
+
+public static final java.lang.String |
+MRTD_DOCUMENT_NUMBER |
+"DocumentNumber" |
+
+
+public static final java.lang.String |
+MRTD_DOCUMENT_TYPE |
+"MrtdDocumentType" |
+
+
+public static final java.lang.String |
+MRTD_IMMIGRANT_CASE_NUMBER |
+"ImmigrantCaseNumber" |
+
+
+public static final java.lang.String |
+MRTD_ISSUER |
+"Issuer" |
+
+
+public static final java.lang.String |
+MRTD_NATIONALITY |
+"Nationality" |
+
+
+public static final java.lang.String |
+MRTD_OPT1 |
+"Opt1" |
+
+
+public static final java.lang.String |
+MRTD_OPT2 |
+"Opt2" |
+
+
+public static final java.lang.String |
+MRTD_PARSED |
+"MrtdParsed" |
+
+
+public static final java.lang.String |
+MRTD_PRIMARY_ID |
+"PrimaryId" |
+
+
+public static final java.lang.String |
+MRTD_RAW |
+"MRTDRaw" |
+
+
+public static final java.lang.String |
+MRTD_SECONDARY_ID |
+"SecondaryId" |
+
+
+public static final java.lang.String |
+MRTD_SEX |
+"Sex" |
+
+
+public static final java.lang.String |
+NRIC_NUMBER |
+"nricNumber" |
+
+
+public static final java.lang.String |
+OCR_RESULT |
+"OCRResult" |
+
+
+public static final java.lang.String |
+OPTIONAL_DATA |
+"optionalData" |
+
+
+public static final java.lang.String |
+OWNER_ADDRESS |
+"ownerAddress" |
+
+
+public static final java.lang.String |
+OWNER_BIRTH_DATA |
+"ownerBirthData" |
+
+
+public static final java.lang.String |
+OWNER_BIRTH_DATE |
+"ownerBirthDate" |
+
+
+public static final java.lang.String |
+OWNER_FIRST_NAME |
+"ownerFirstName" |
+
+
+public static final java.lang.String |
+OWNER_FULL_NAME |
+"ownerFullName" |
+
+
+public static final java.lang.String |
+OWNER_LAST_NAME |
+"ownerLastName" |
+
+
+public static final java.lang.String |
+OWNER_RELIGION |
+"ownerReligion" |
+
+
+public static final java.lang.String |
+OWNER_SEX |
+"ownerSex" |
+
+
+public static final java.lang.String |
+PAYBULL_URL |
+"PayBullURL" |
+
+
+public static final java.lang.String |
+PAYER_ACCOUNT_NUMBER |
+"PayerAccount" |
+
+
+public static final java.lang.String |
+PAYER_ADDRESS |
+"PayerAddress" |
+
+
+public static final java.lang.String |
+PAYER_BANK_CODE |
+"PayerBankCode" |
+
+
+public static final java.lang.String |
+PAYER_DETAILED_ADDRESS |
+"PayerDetailedAddress" |
+
+
+public static final java.lang.String |
+PAYER_IBAN |
+"PayerIBAN" |
+
+
+public static final java.lang.String |
+PAYER_ID |
+"PayerID" |
+
+
+public static final java.lang.String |
+PAYER_NAME |
+"PayerName" |
+
+
+public static final java.lang.String |
+PAYER_REFERENCE |
+"PayerReference" |
+
+
+public static final java.lang.String |
+PAYER_REFERENCE_MODEL |
+"PayerReferenceModel" |
+
+
+public static final java.lang.String |
+PAYMENT_DESCRIPTION |
+"PaymentDescription" |
+
+
+public static final java.lang.String |
+PAYMENT_DESCRIPTION_CODE |
+"PaymentDescriptionCode" |
+
+
+public static final java.lang.String |
+PAYMENT_TYPE |
+"paymentType" |
+
+
+public static final java.lang.String |
+PDF417_RESULT |
+"pdf417" |
+
+
+public static final java.lang.String |
+PERIODIC_FIRST_EXECUTION_DATE |
+"periodicFirstExecutionDate" |
+
+
+public static final java.lang.String |
+PERIODIC_LAST_EXECUTION_DATE |
+"periodicLastExecutionDate" |
+
+
+public static final java.lang.String |
+PERIODIC_TIME_UNIT |
+"periodicTimeUnit" |
+
+
+public static final java.lang.String |
+PERIODIC_TIME_UNIT_ROTATION |
+"periodicTimeUnitRotation" |
+
+
+public static final java.lang.String |
+PHOTOMATH_DATA |
+"PhotoMathData" |
+
+
+public static final java.lang.String |
+POSTING_KEY |
+"Postingkey" |
+
+
+public static final java.lang.String |
+PRUFZIFFER |
+"Prufziffer" |
+
+
+public static final java.lang.String |
+PURPOSE_CODE |
+"PurposeCode" |
+
+
+public static final java.lang.String |
+RAW_BARCODE_DATA |
+"RawBarcodeData" |
+
+
+public static final java.lang.String |
+RAW_BARCODE_EXTENDED_DATA |
+"RawBarcodeExtendedData" |
+
+
+public static final java.lang.String |
+RAW_PDF417_RESULT |
+"Rawpdf417" |
+
+
+public static final java.lang.String |
+RAW_RESULT |
+"rawResult" |
+
+
+public static final java.lang.String |
+RECIPIENT_ADDRESS |
+"RecipientAddress" |
+
+
+public static final java.lang.String |
+RECIPIENT_DETAILED_ADDRESS |
+"RecipientDetailedAddress" |
+
+
+public static final java.lang.String |
+RECIPIENT_NAME |
+"RecipientName" |
+
+
+public static final java.lang.String |
+RECOGNITIONDATA_TYPE |
+"PaymentDataType" |
+
+
+public static final java.lang.String |
+REFERENCE |
+"Reference" |
+
+
+public static final java.lang.String |
+REFERENCE_MODEL |
+"ReferenceModel" |
+
+
+public static final java.lang.String |
+REFERENCE_STATUS |
+"ReferenceStatus" |
+
+
+public static final java.lang.String |
+SLIP_ID |
+"SlipID" |
+
+
+public static final java.lang.String |
+SORTING_CODE |
+"SortingCode" |
+
+
+public static final java.lang.String |
+SPECIFIC_SYMBOL |
+"specificSymbol" |
+
+
+public static final java.lang.String |
+SUBSCRIBER_NUMBER |
+"SubscriberNumber" |
+
+
+public static final java.lang.String |
+TAX_NUMBER |
+"TaxNumber" |
+
+
+public static final java.lang.String |
+TRANSACTION_CODE |
+"TransactionCode" |
+
+
+public static final java.lang.String |
+UNCERTAIN |
+"uncertain" |
+
+
+public static final java.lang.String |
+UTILITY_ID |
+"UtilityID" |
+
+
+public static final java.lang.String |
+VARIABLE_SYMBOL |
+"variableSymbol" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+DETECTION_TEST_MODE |
+2 |
+
+
+public static final int |
+RECOGNITION_MODE |
+0 |
+
+
+public static final int |
+RECOGNITION_TEST_MODE |
+1 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+kDefaultParserGroup |
+"defaultParserGroup" |
+
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+BlinkOCRRecognizerSettings
.BlinkOCRRecognitionResult
which contains data extracted from decoding infos
+ inherent to detector, classifies the document.DetectorResult
class.Parcel
.DocumentDetectorSettings
.Parcel
.DecodingInfo
array with single
+ element containing Rectangle
initialized with (0.f, 0.f, 1.f, 1.f) and given dewarp height).ImageListener
that will obtain images that are being processed.ImageListener
that will obtain images that are being processed.MetadataSettings.ImageMetadataSettings
that will define
+ which images will be sent to ImageListener
set via RandomScanActivity.EXTRAS_IMAGE_LISTENER
extra.MetadataSettings.ImageMetadataSettings
that will define
+ which images will be sent to ImageListener
set via SegmentScanActivity.EXTRAS_IMAGE_LISTENER
extra.RandomScanElement
s which
+ is used to set the parsers that will recognize text fields.Parcel
.DecodingInfo
+ which contains Rectangle
initialized with (0.f, 0.f, 1.f, 1.f) and given dewarp height).Date
representation of date result exists returns it,
+ otherwise returns null.DocumentClassifier
set
+ with BlinkOCRRecognizerSettings.setDocumentClassifier(DocumentClassifier)
.topupPrefix
.MRTDDetectorSettings
.Parcel
.Parcel
.Parcel
.RecognizerView.pauseScanning()
.DocumentClassifier
that can be used for classification of the documents based
+ on the extraction result of parser groups associated with decoding infos of detector set
+ with BlinkOCRRecognizerSettings.setDetectorSettings(DetectorSettings)
.DetectorSettings
given with BlinkOCRRecognizerSettings.setDetectorSettings(DetectorSettings)
.TemplatingRecognizerSettings
+ + diff --git a/docs/overview-summary.html b/docs/overview-summary.html new file mode 100644 index 0000000..d915461 --- /dev/null +++ b/docs/overview-summary.html @@ -0,0 +1,303 @@ + + + + + +