public class DCScannerFrameHandler implements PreviewBuffer.FrameHandler
Performs Disability Certificates data detection on camera preview frames. Outputs results via DCScannerFrameHandler.ResultHandler (). DCScannerFrameHandler.addResultHandler
Preview frame considered intercepted if at least one DCScannerFrameHandler.ResultHandler returns true from DCScannerFrameHandler.ResultHandler.handleResult
| Constructor and Description |
|---|
DCScannerFrameHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResultHandler()
Registers result handler which will be notified about DC data detection results. Results are coming on the worker thread. Don't forget to move execution to main thread before updating UI.
|
static DCScannerFrameHandler |
attach()
Convenience method for creating new DCScannerFrameHandler and adding it as PreviewBuffer.FrameHandler to given camera view.
|
boolean |
handleFrame() |
boolean |
isEnabled() |
void |
removeResultHandler()
Unregisters handler.
|
void |
setEnabled() |
handleFramepublic static DCScannerFrameHandler attach()
Convenience method for creating new DCScannerFrameHandler and adding it as PreviewBuffer.FrameHandler to given camera view.
public boolean handleFrame()
public void addResultHandler()
Registers result handler which will be notified about DC data detection results.
Results are coming on the worker thread. Don't forget to move execution to main thread before updating UI.
public void removeResultHandler()
Unregisters handler.
public boolean isEnabled()
true if DC data detection is enabled. false if DC data detection is disabled, i.e. incoming frames are skipped.public void setEnabled()