示例#1
0
        /// <summary>
        /// Set the recognition parameters, call the recognizer capture interface for recognition,
        /// and the recognition result will be returned through the callback function.
        /// </summary>
        /// <param name="myObj"></param>
        /// <param name="callBack">The callback of cards analyse.</param>
        private void StartCaptureActivity(Java.Lang.Object myObj, MLGcrCaptureCallback callBack)
        {
            MLGcrCaptureConfig   cardConfig = new MLGcrCaptureConfig.Factory().Create();
            MLGcrCaptureUIConfig uiConfig   = new MLGcrCaptureUIConfig.Factory()
                                              .SetScanBoxCornerColor(Color.Green)
                                              .SetTipText("Recognizing, align edges")
                                              .SetOrientation(MLGcrCaptureUIConfig.OrientationAuto).Create();
            MLGcrCapture ocrManager = MLGcrCaptureFactory.Instance.GetGcrCapture(cardConfig, uiConfig);

            ocrManager.CapturePreview(this, myObj, callBack);
        }
示例#2
0
        /// <summary>
        /// Use the plug-in to take a picture of the card and recognize.
        /// </summary>
        /// <param name="myObj"></param>
        /// <param name="callback"></param>
        private void StartTakePhotoActivity(Java.Lang.Object myObj, MLGcrCaptureCallback callback)
        {
            MLGcrCaptureConfig   cardConfig = new MLGcrCaptureConfig.Factory().Create();
            MLGcrCaptureUIConfig uiConfig   = new MLGcrCaptureUIConfig.Factory()
                                              .SetScanBoxCornerColor(Color.Blue)
                                              .SetTipText("Taking EEP to HK/Macau picture")
                                              .SetOrientation(MLGcrCaptureUIConfig.OrientationAuto).Create();
            // Create a general card identification processor using the custom interface.
            MLGcrCapture ocrManager = MLGcrCaptureFactory.Instance.GetGcrCapture(cardConfig, uiConfig);

            // Create a general card identification processor using the default interface.
            // MLGcrCapture ocrManager = MLGcrCaptureFactory.Instance.GetGcrCapture(cardConfig);

            ocrManager.CapturePhoto(this, myObj, callback);
        }