Class CheckRecognizerFrameHandler
-
- All Implemented Interfaces:
public final class CheckRecognizerFrameHandler extends FrameHandler
Performs check data detection on camera preview frames. Outputs results via CheckRecognizerFrameHandler.ResultHandler (.addResultHandler).
Preview frame considered intercepted if at least one CheckRecognizerFrameHandler.ResultHandler returns
true
from CheckRecognizerFrameHandler.ResultHandler.handle (FrameHandlerResult)}
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
CheckRecognizerFrameHandler.ResultHandler
Continuously notified about check data detection results.
public abstract class
CheckRecognizerFrameHandler.CheckRecognizerResultHandler
Successor-class needed for cross-platform implementation
-
Constructor Summary
Constructors Constructor Description CheckRecognizerFrameHandler(CheckRecognizer checkRecognizer)
-
Method Summary
Modifier and Type Method Description Boolean
handleFrame(FrameHandler.Frame previewFrame)
Invoked for every new camera preview frame. final Unit
addResultHandler(CheckRecognizerFrameHandler.ResultHandler handler)
Registers result handler which will be notified about check data detection results. final Unit
removeResultHandler(CheckRecognizerFrameHandler.ResultHandler handler)
Unregisters handler. final Unit
setReturnFrameOnSuccess(Boolean returnFrameOnSuccess)
Returns the frame in the recognition result on success. final static CheckRecognizerFrameHandler
attach(IScanbotCameraView cameraView, CheckRecognizer checkRecognizer)
Convenience method for creating new CheckRecognizerFrameHandler and adding it as FrameHandler to given camera view. -
-
Constructor Detail
-
CheckRecognizerFrameHandler
CheckRecognizerFrameHandler(CheckRecognizer checkRecognizer)
-
-
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(CheckRecognizerFrameHandler.ResultHandler handler)
Registers result handler which will be notified about check 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(CheckRecognizerFrameHandler.ResultHandler handler)
Unregisters handler.
- Parameters:
handler
- handler to unregister.
-
setReturnFrameOnSuccess
final Unit setReturnFrameOnSuccess(Boolean returnFrameOnSuccess)
Returns the frame in the recognition result on success.
- Parameters:
returnFrameOnSuccess
- if true camera frame will be returned in the recognition result, false - otherwise The default value is FALSE.
-
attach
final static CheckRecognizerFrameHandler attach(IScanbotCameraView cameraView, CheckRecognizer checkRecognizer)
Convenience method for creating new CheckRecognizerFrameHandler and adding it as FrameHandler to given camera view.
- Parameters:
cameraView
- camera view to which new check data detector will be attached
-
-
-
-