Class MRZScannerFrameHandler
-
- All Implemented Interfaces:
public final class MRZScannerFrameHandler extends FrameHandler
Performs MRZ data detection on camera preview frames. Outputs results via MRZScannerFrameHandler.ResultHandler (.addResultHandler).
Preview frame considered intercepted if at least one MRZScannerFrameHandler.ResultHandler returns
true
from MRZScannerFrameHandler.ResultHandler.handle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
MRZScannerFrameHandler.ResultHandler
Continuously notified about MRZ data detection results.
public abstract class
MRZScannerFrameHandler.MrzScannerResultHandler
Successor-class needed for cross-platform implementation
-
Constructor Summary
Constructors Constructor Description MRZScannerFrameHandler(Context context, MRZScanner mrzScanner)
MRZScannerFrameHandler(MRZScanner mrzScanner)
-
Method Summary
Modifier and Type Method Description Boolean
handleFrame(FrameHandler.Frame previewFrame)
Invoked for every new camera preview frame. final Unit
addResultHandler(MRZScannerFrameHandler.ResultHandler handler)
Registers result handler which will be notified about MRZ data detection results. final Unit
removeResultHandler(MRZScannerFrameHandler.ResultHandler handler)
Unregisters handler. final static MRZScannerFrameHandler
attach(IScanbotCameraView cameraView, MRZScanner mrzScanner)
Convenience method for creating new MRZScannerFrameHandler and adding it as FrameHandler to given camera view. -
-
Constructor Detail
-
MRZScannerFrameHandler
MRZScannerFrameHandler(Context context, MRZScanner mrzScanner)
-
MRZScannerFrameHandler
MRZScannerFrameHandler(MRZScanner mrzScanner)
-
-
Method Detail
-
handleFrame
@Synchronized() Boolean handleFrame(FrameHandler.Frame previewFrame)
Invoked for every new camera preview frame.
- Parameters:
previewFrame
- captured preview frame data
-
addResultHandler
final Unit addResultHandler(MRZScannerFrameHandler.ResultHandler handler)
Registers result handler which will be notified about MRZ data detection results.
Results are coming on the worker thread. Don't forget to move execution to main thread before updating UI.
- Parameters:
handler
- handler to register.
-
removeResultHandler
final Unit removeResultHandler(MRZScannerFrameHandler.ResultHandler handler)
Unregisters handler.
- Parameters:
handler
- handler to unregister.
-
attach
final static MRZScannerFrameHandler attach(IScanbotCameraView cameraView, MRZScanner mrzScanner)
Convenience method for creating new MRZScannerFrameHandler and adding it as FrameHandler to given camera view.
- Parameters:
cameraView
- camera view to which new MRZ data detector will be attached
-
-
-
-