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 interface
MedicalCertificateFrameHandler.ResultHandler
Continuously notified about MC data detection results.
public abstract class
MedicalCertificateFrameHandler.MedicalCertificateResultHandler
Successor-class needed for cross-platform implementation
-
Field Summary
Fields Modifier and Type Field Description private Boolean
recognizePatientInfo
private Boolean
extractDocumentImage
private Boolean
recognizeBarcode
-
Constructor Summary
Constructors Constructor Description MedicalCertificateFrameHandler(Context context, MedicalCertificateRecognizer medicalCertificateRecognizer)
MedicalCertificateFrameHandler(MedicalCertificateRecognizer medicalCertificateRecognizer)
-
Method Summary
Modifier and Type Method Description final Boolean
getRecognizePatientInfo()
Recognition of Patient Information block. final Unit
setRecognizePatientInfo(Boolean recognizePatientInfo)
Recognition of Patient Information block. final Boolean
getExtractDocumentImage()
Image extraction with the result. final Unit
setExtractDocumentImage(Boolean extractDocumentImage)
Image extraction with the result. final Boolean
getRecognizeBarcode()
Reading data from barcode, if it's present on document, could make data recognition more accurate. final Unit
setRecognizeBarcode(Boolean recognizeBarcode)
Reading data from barcode, if it's present on document, could make data recognition more accurate. Boolean
handleFrame(FrameHandler.Frame previewFrame)
Invoked for every new camera preview frame. final Unit
addResultHandler(MedicalCertificateFrameHandler.ResultHandler handler)
Registers result handler which will be notified about MC data detection results. final Unit
removeResultHandler(MedicalCertificateFrameHandler.ResultHandler handler)
Unregisters handler. final static MedicalCertificateFrameHandler
attach(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
-
-
-
-