Class MedicalCertificateFrameHandler
-
- All Implemented Interfaces:
public final class MedicalCertificateFrameHandler extends FrameHandler
Performs Medical Certificates data detection on camera preview frames. Outputs results via MedicalCertificateFrameHandler.ResultHandler (.addResultHandler).
Preview frame considered intercepted if at least one MedicalCertificateFrameHandler.ResultHandler returns true from MedicalCertificateFrameHandler.ResultHandler.handle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceMedicalCertificateFrameHandler.ResultHandlerContinuously notified about MC data detection results.
public abstract classMedicalCertificateFrameHandler.MedicalCertificateResultHandlerSuccessor-class needed for cross-platform implementation
-
Field Summary
Fields Modifier and Type Field Description private BooleanrecognizePatientInfoprivate BooleanextractDocumentImageprivate BooleanrecognizeBarcode
-
Constructor Summary
Constructors Constructor Description MedicalCertificateFrameHandler(Context context, MedicalCertificateRecognizer medicalCertificateRecognizer)MedicalCertificateFrameHandler(MedicalCertificateRecognizer medicalCertificateRecognizer)
-
Method Summary
Modifier and Type Method Description final BooleangetRecognizePatientInfo()Recognition of Patient Information block. final UnitsetRecognizePatientInfo(Boolean recognizePatientInfo)Recognition of Patient Information block. final BooleangetExtractDocumentImage()Image extraction with the result. final UnitsetExtractDocumentImage(Boolean extractDocumentImage)Image extraction with the result. final BooleangetRecognizeBarcode()Reading data from barcode, if it's present on document, could make data recognition more accurate. final UnitsetRecognizeBarcode(Boolean recognizeBarcode)Reading data from barcode, if it's present on document, could make data recognition more accurate. BooleanhandleFrame(FrameHandler.Frame previewFrame)Invoked for every new camera preview frame. final UnitaddResultHandler(MedicalCertificateFrameHandler.ResultHandler handler)Registers result handler which will be notified about MC data detection results. final UnitremoveResultHandler(MedicalCertificateFrameHandler.ResultHandler handler)Unregisters handler. final static MedicalCertificateFrameHandlerattach(IScanbotCameraView cameraView, MedicalCertificateRecognizer medicalCertificateRecognizer)Convenience method for creating new MedicalCertificateFrameHandler and adding it as FrameHandler to given camera view. -
-
Constructor Detail
-
MedicalCertificateFrameHandler
MedicalCertificateFrameHandler(Context context, MedicalCertificateRecognizer medicalCertificateRecognizer)
-
MedicalCertificateFrameHandler
MedicalCertificateFrameHandler(MedicalCertificateRecognizer medicalCertificateRecognizer)
-
-
Method Detail
-
getRecognizePatientInfo
final Boolean getRecognizePatientInfo()
Recognition of Patient Information block. true if enabled. By default is disabled.
-
setRecognizePatientInfo
final Unit setRecognizePatientInfo(Boolean recognizePatientInfo)
Recognition of Patient Information block. true if enabled. By default is disabled.
-
getExtractDocumentImage
final Boolean getExtractDocumentImage()
Image extraction with the result. true if enabled. By default is disabled.
-
setExtractDocumentImage
final Unit setExtractDocumentImage(Boolean extractDocumentImage)
Image extraction with the result. true if enabled. By default is disabled.
-
getRecognizeBarcode
final Boolean getRecognizeBarcode()
Reading data from barcode, if it's present on document, could make data recognition more accurate. true if enabled. By default is disabled.
-
setRecognizeBarcode
final Unit setRecognizeBarcode(Boolean recognizeBarcode)
Reading data from barcode, if it's present on document, could make data recognition more accurate. true if enabled. By default is disabled.
-
handleFrame
@Synchronized() Boolean handleFrame(FrameHandler.Frame previewFrame)
Invoked for every new camera preview frame.
- Parameters:
previewFrame- captured preview frame data
-
addResultHandler
final Unit addResultHandler(MedicalCertificateFrameHandler.ResultHandler handler)
Registers result handler which will be notified about MC 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(MedicalCertificateFrameHandler.ResultHandler handler)
Unregisters handler.
- Parameters:
handler- handler to unregister.
-
attach
final static MedicalCertificateFrameHandler attach(IScanbotCameraView cameraView, MedicalCertificateRecognizer medicalCertificateRecognizer)
Convenience method for creating new MedicalCertificateFrameHandler and adding it as FrameHandler to given camera view.
- Parameters:
cameraView- camera view to which new MC data detector will be attached
-
-
-
-