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