Class VinScannerFrameHandler
-
- All Implemented Interfaces:
public final class VinScannerFrameHandler extends FrameHandler
Performs VIN recognition on camera preview frames. Outputs results via VinScannerFrameHandler.ResultHandler.
Preview frame considered intercepted if at least one VinScannerFrameHandler.ResultHandler returns
true
from VinScannerFrameHandler.ResultHandler.handle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
VinScannerFrameHandler.ResultHandler
Continuously notified about VIN recognition results.
public abstract class
VinScannerFrameHandler.TextRecognitionScannerResultHandler
Successor-class needed for cross-platform implementation.
-
Constructor Summary
Constructors Constructor Description VinScannerFrameHandler(VinScanner vinScanner)
-
Method Summary
Modifier and Type Method Description Boolean
handleFrame(FrameHandler.Frame previewFrame)
Invoked for every new camera preview frame. final Unit
addResultHandler(VinScannerFrameHandler.ResultHandler resultHandler)
Registers result handler which will be notified about VIN recognition results. final Unit
removeResultHandler(VinScannerFrameHandler.ResultHandler resultHandler)
Unregisters handler. final Unit
clearResultHandlers()
Unregisters all handlers. final static VinScannerFrameHandler
attach(IScanbotCameraView cameraView, VinScanner vinScanner)
Convenience method for creating new VinScannerFrameHandler and adding it as FrameHandler to given camera view. -
-
Constructor Detail
-
VinScannerFrameHandler
VinScannerFrameHandler(VinScanner vinScanner)
-
-
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(VinScannerFrameHandler.ResultHandler resultHandler)
Registers result handler which will be notified about VIN recognition results.
Results are coming on the worker thread. Don't forget to move execution to main thread before updating UI.
- Parameters:
resultHandler
- handler to register.
-
removeResultHandler
final Unit removeResultHandler(VinScannerFrameHandler.ResultHandler resultHandler)
Unregisters handler.
- Parameters:
resultHandler
- handler to unregister.
-
clearResultHandlers
final Unit clearResultHandlers()
Unregisters all handlers. If nothing was registered before, nothing happens.
-
attach
final static VinScannerFrameHandler attach(IScanbotCameraView cameraView, VinScanner vinScanner)
Convenience method for creating new VinScannerFrameHandler and adding it as FrameHandler to given camera view.
- Parameters:
cameraView
- cameraView to attach handler tovinScanner
- scanner to perform ID card detection
-
-
-
-