public bool ScannerControllerShouldAnalyseVideoFrame(SBSDKMultipleObjectScannerViewController controller) { bool shouldAnalyse = true; InvokeOnMainThread(() => { shouldAnalyse = IsPanelOpened() == false && _isProcessing == false; }); return(shouldAnalyse); }
public override void ViewDidLoad() { base.ViewDidLoad(); _imageProcessor = new SBSDKBusinessCardsImageProcessor(); _imageProcessor.PerformOCR = true; _imageProcessor.PerformAutoRotation = true; _scannerController = new SBSDKMultipleObjectScannerViewController(this, null); // Qualify only square-like objects: //_scannerController.AspectRatioRange = new SBSDKAspectRatioRange( // new SBSDKPageAspectRatio(0.9f, 1.0f), new SBSDKPageAspectRatio(1.1f, 1.0f) //); _scannerController.WeakDelegate = this; collectionView.Delegate = this; }
public void ScannerControllerWillCaptureImage(SBSDKMultipleObjectScannerViewController controller) { _storage.RemoveAllImages(); }
public void ScannerController(SBSDKMultipleObjectScannerViewController controller, ISBSDKImageStoring imageStorage) { ProcessDetectedDocumentsInStorage(imageStorage); }
[Export("scannerController:didCaptureObjectImagesInStorage:")] public void ScannerController(SBSDKMultipleObjectScannerViewController controller, ISBSDKImageStoring imageStorage) { ProcessDetectedDocumentsInStorage(imageStorage); }
} public partial class BusinessCardsDemoViewController : UIViewController, ISBSDKMultipleObjectScannerViewControllerDelegate, IUICollectionViewDelegate, IUICollectionViewDataSource { private SBSDKMultipleObjectScannerViewController _scannerController; private SBSDKBusinessCardsImageProcessor _imageProcessor; private BusinessCard _selectedCard; private NSArray <SBSDKOCRResult> _ocrResults; private ISBSDKImageStoring _storage = new SBSDKIndexedImageStorage(); private bool _isProcessing; public BusinessCardsDemoViewController(IntPtr handle) : base(handle) { } public override void ViewDidLoad() { base.ViewDidLoad(); _imageProcessor = new SBSDKBusinessCardsImageProcessor(); _imageProcessor.PerformOCR = true; _imageProcessor.PerformAutoRotation = true; _scannerController = new SBSDKMultipleObjectScannerViewController(this, null); _scannerController.WeakDelegate = this; collectionView.Delegate = this; } public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)