Class LicensePlateScannerFrameHandler
-
- All Implemented Interfaces:
public final class LicensePlateScannerFrameHandler extends FrameHandler
Performs license plate scanning on camera preview frames. Outputs results via LicensePlateScannerFrameHandler.ResultHandler.
Preview frame considered intercepted if at least one LicensePlateScannerFrameHandler.ResultHandler returns
true
from LicensePlateScannerFrameHandler.ResultHandler.handle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
LicensePlateScannerFrameHandler.ResultHandler
Continuously notified about license plate recognition results.
public abstract class
LicensePlateScannerFrameHandler.LicensePlateScannerResultHandler
Successor-class needed for cross-platform implementation
-
Constructor Summary
Constructors Constructor Description LicensePlateScannerFrameHandler(LicensePlateScanner licensePlateScanner)
-
Method Summary
Modifier and Type Method Description Boolean
handleFrame(FrameHandler.Frame previewFrame)
Invoked for every new camera preview frame. final Unit
addResultHandler(LicensePlateScannerFrameHandler.ResultHandler resultHandler)
Registers result handler which will be notified about license plate recognition results. final Unit
removeResultHandler(LicensePlateScannerFrameHandler.ResultHandler resultHandler)
Unregisters handler. final Unit
clearResultHandlers()
Unregisters all handlers. final static LicensePlateScannerFrameHandler
attach(IScanbotCameraView cameraView, LicensePlateScanner licensePlateScanner)
Convenience method for creating new LicensePlateScannerFrameHandler and adding it as FrameHandler to given camera view. -
-
Constructor Detail
-
LicensePlateScannerFrameHandler
LicensePlateScannerFrameHandler(LicensePlateScanner licensePlateScanner)
-
-
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(LicensePlateScannerFrameHandler.ResultHandler resultHandler)
Registers result handler which will be notified about license plate 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(LicensePlateScannerFrameHandler.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 LicensePlateScannerFrameHandler attach(IScanbotCameraView cameraView, LicensePlateScanner licensePlateScanner)
Convenience method for creating new LicensePlateScannerFrameHandler and adding it as FrameHandler to given camera view.
- Parameters:
cameraView
- cameraView to attach handler tolicensePlateScanner
- scanner to perform license plate detection
-
-
-
-