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 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)