Git Product home page Git Product logo

licenseplatedemo's Introduction

LicensePlateDemo

号牌号码识别,支持新能源车牌,离线识别

号牌识别,支持新能源车,离线版

使用方式:

项目build.gradle添加

allprojects {
    repositories {
        .....
        maven { url 'https://jitpack.io' }   
    }
}

app build.gradle 添加

implementation 'com.github.ccc920123:LicensePlateDemo:v1.0'

或者

1:下载aar 包

licenseplatelib-v1.0.aar

2:由于library包含so 需要在 app 的build.gradle中添加
ndk的支持

 defaultConfig {
   .....
    ndk {
        //设置支持的SO库架构
        abiFilters 'armeabi'
    }
}

3:调用方法:

LPalte.openScanPlate(this, 666);//第一个参数就是activity的上下文,第二个参数是requestCode 我填写的666

4:重写onActivityResult 方法

//识别后的回调
    @Override
    protected void onActivityResult(int requestCode, int resultCode,  Intent data) {
        super.onActivityResult(requestCode, resultCode, data);


        if (resultCode == RESULT_OK && requestCode == 666 && data != null) {
            String hphm = data.getCharSequenceExtra("number").toString();
            String hpzl = data.getCharSequenceExtra("hpzl").toString();
            String color = data.getCharSequenceExtra("color").toString();

            result.setText(hphm+" 号牌种类:"+hpzl+" 号牌颜色:"+color);
        }
    }

好了号牌识别就这么简单。

注意:

如果你需要修改识别界面,请自行下载demo,然后导入licenseplatelib 这个library,修改里面的UI


号牌种类表:
code
01 大型汽车(黄牌车)
02 小型汽车(蓝牌)
52 新能源汽车(绿牌 小型新能源)
51 新能源汽车(黄绿 大型新能源)
03 使馆车牌
04 领事馆车牌
15 挂车
26 香港车牌
16 教练车牌
27 澳门车牌
32 军车车牌
23 警用车牌
31 武警号牌
25 原农机号牌
99 其他号牌
号牌颜色表:
code
0 黄牌
1 蓝牌
2 原农机号牌
3 使馆汽车号/香港澳门入出境
4 军队,警,武警号牌
5 新能源号牌
-1 其他号牌

licenseplatedemo's People

Contributors

ccc920123 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.