Giter VIP home page Giter VIP logo

openalpr-swift's Introduction

OpenALPRSwift

OpenALPRSwift is an iOS Framework for the open source OpenALPR Automatic License Plate Recognition library http://www.openalpr.com. It can be used in Swift and Objective-C

The library analyzes images and video streams to identify license plates. The output is the text representation of any license plate characters.

Current version is using precompiled Frameworks from cardash:

  • leptonica.framework
  • tesseract.framework

openalpr.framework compiled from v2.3.0 and dependency pod v3.1.0.1 for OpenCV

Requirements

  • iOS 9+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 1.3.0.beta.2+ is required to build OpenALPRSwift 1.0.0+.

To integrate OpenALPRSwift into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'OpenALPRSwift', '~> 2.0.0'
end

Then, run the following command:

$ pod install

If you get an error complaining about "transitive dependencies" then put this in your Podfile

pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end

Usage

import OpenALPRSwift in your class and then

    let imagePath = Bundle.main.path(forResource: "dk_vb33742", ofType: "jpg")
    let alprScanner = OAScanner(country: "eu", patternRegion: "dk")
    alprScanner?.scanImage(atPath: imagePath, onSuccess: { (plates) in
        plates?.forEach({ (plate) in
            print("result: \(plate.number)")
        })
    }, onFailure: { (error) in
        print("error: \(error?.localizedDescription)")
    })

or you can pass a UIImage as well

Options

country

Specifies which OpenALPR config file to load, corresponding to the country whose plates you wish to recognize. Currently supported values are: [au, auwide, br, eu, fr, gb, kr, kr2, mx, sg, us, vn2]

region

Specifies which plate pattern to look for e.g. dk for Denmark or al for Alabama. Complete list of patterns is available under runtime_data/postprocess/*.patterns

Documentation

Detailed documentation is available at doc.openalpr.com

License

GPLv3 http://www.gnu.org/licenses/gpl-3.0.html

Credits

openalpr-swift's People

Contributors

yasirmturk avatar

Watchers

 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.