Git Product home page Git Product logo

smartidscan-ios-demo's Introduction

##SmartID Scan Library (v1.0.0)

SmartID Scan is a real-time video stream decoder, allowing to scan various type of content.

Depending on the version you ordered, you will be able to use it to decode any combination of the following codes :

  • 1D/2D barcodes (EAN8, EAN13, UPC, Code39, Code128, Datamatrix, databars, QRCodes, Aztec codes, ... )

  • Multiple OCR types :

    • OCR-B MRZ used on official papers (Swiss ID Cards, Swiss Passports, Swiss Driving license)
    • Swiss car plates
    • European Health Insurance Card
    • Swiss Inpayment Slips
  • Our decoder never stops growing, ask us about what's new in SmartID Scan !

Requirements

This project has been tested with iOS 6+ and build with xCode 5.0+. If your project supports lower versions of the iOS framework, SmartID Scan may not work as expected and could show unexpected behaviour in your application.

This project is compatible with ARC and non-ARC projects

The library has been build with iOS SDK 7.1. It is strongly advised to use it as well to compile your projet.

##Integration steps

This project is a demo iOS app to show how to integrate our decoding library in an iOS application. To make it work, just follow the few steps below :

  1. Add the library libSmartIDScan.a to your project (drag & drop to your project)

  2. Add the library headers : SmartScanner.h (library functions) and SmartIDScanTypes.h

  3. In your project properties, you will need to add the following framework :

    libc++.dylib

    libstdc++.dylib

    AVFundation

    CoreVideo

    CoreMedia

  4. If you own a version of SmartID Scan providing OCR features, you will also need to download an iOS version of the OpenCV Framework 2.4.9 . You can download it and drag and drop it on your project.

  5. In your project target properties, in the "Build Settings" you will also need to set the "C++ Standard Library" to value "libstdc++".

  6. If you don't have any other part of your code using C++ apis, you will also need to drop into your project the "DummyCPPEnable" (.h and .mm) class to let XCode know that part of the project will contain c++ content.

This is all you need to be able to launch this project on a real device for testing purposes.


##Minimal implementation (See the example project for more details)

Interaction with the SmartID Scan library is done with a SmartScanner object. Instantiate it inside a view controller, when you want to use it :

##Start to scan //Create the SmartScanner object reference SmartScanner* sc;

//Init SmartScanner when needed, and set the delegate
sc = [[SmartScanner alloc] init];
sc.scDelegate = self;

//Set which type of code you want to decode
[sc setDecodingType:CODE_INSURANCE_CARDS];

//Retrieve the preview screen and display it on your view
UIView* preview = [sc previewViewWithViewSize:self.view.bounds];
[self.view addSubview:preview];

##Select the type of code you want to decode

You can use a combination of any type (defined in the SmartDecodingTypes enum) that is enabled in the version you have. At any point you can set another decoding type (Verify the enabled types of your SmartID Scan version by calling the version function).

Here are some examples :

  • 1D/2D barcodes (EAN8, EAN13, UPC, Code39, Code128, QRCodes, ... )

      [sc setDecodingType:CODE_QR_CODES | CODE_1D2D_BARCODES_ALL ];
    
  • OCR-B MRZ used on official papers (Swiss ID Cards, Swiss Passports, Swiss Driving license)

      [sc setDecodingType:CODE_OCR_B_SWISS_IDS | CODE_OCR_B_SWISS_PASSPORTS | CODE_OCR_B_DRV_LICENSES ];
    
  • Swiss car plates

      [sc setDecodingType:CODE_PLATES ];
    
  • European Health Insurance Card

      [sc setDecodingType:CODE_INSURANCE_CARDS ];
    
  • Swiss Inpayment Slips

      [sc setDecodingType:CODE_OCR_B_BVR ];
    

##Retrieve the results by implementing the delegate protocol

-(void)SmartScannerFoundCode:(SmartScanner*)smartScan code:(NSString*) aCode ofType:(int)aType
{
    NSLog(@"SmartScanner result : %@  with type : %d", aCode, aType);
}

##Release the resources when you don't need to use the smartscanner anymore

[sc closeCameraStream];
sc = nil; //ARC
//[sc release] //not ARC

Links

(1) The demonstration decoding libraries replace some characters in the result string with the character 'X'

smartidscan-ios-demo's People

Contributors

abbetch avatar

Watchers

James Cloos avatar Sudhi S avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.