안 드 로 이 드 번호판 인식 시스템 EasyPR 사용 설명
5393 단어 android자동차 번호판 인식EasyPR
EasyPR 은 개 원 된 중국어 번호판 식별 시스템 이다.gitHub 주소
EasyPR 은 다음 과 같은 특징 이 있 습 니 다.
1.openCV 라 는 오픈 소스 라 이브 러 리 를 기반 으로 모든 코드 를 쉽게 얻 을 수 있 음 을 의미 합 니 다.
2.중국 어 를 식별 할 수 있다.예 를 들 어 자동차 번호판 은 소 EK 722 의 그림 으로 std:string 형식의'소 EK 722'의 결 과 를 정확하게 출력 할 수 있다.
3.그의 식별 율 이 비교적 높다.현재 상황 에서 문자 인식 은 이미 90%이상 의 정밀도 에 이 를 수 있다.
사용 방법
package com.android.guocheng.easypr;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.fosung.libeasypr.view.EasyPRPreSurfaceView;
import com.fosung.libeasypr.view.EasyPRPreView;
public class MainActivity extends AppCompatActivity {
private EasyPRPreView easyPRPreView;
private Button btnShutter;
private TextView text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
easyPRPreView = (EasyPRPreView) findViewById(R.id.preSurfaceView);
btnShutter = (Button) findViewById(R.id.btnShutter);
text = (TextView) findViewById(R.id.text);
initListener();
}
@Override
protected void onStart() {
super.onStart();
if (easyPRPreView != null) {
easyPRPreView.onStart();
}
}
@Override
protected void onStop() {
super.onStop();
if (easyPRPreView != null) {
easyPRPreView.onStop();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if (easyPRPreView != null) {
easyPRPreView.onDestroy();
}
}
private void initListener() {
easyPRPreView.setRecognizedListener(new EasyPRPreSurfaceView.OnRecognizedListener() {
@Override
public void onRecognized(String result) {
if (result == null || result.equals("0")) {
Toast.makeText(MainActivity.this, " !", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(MainActivity.this, " ", Toast.LENGTH_SHORT).show();
text.setText(result);
}
}
});
btnShutter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
easyPRPreView.recognize();//
}
});
}
}
레이아웃 파일
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00000000">
<com.fosung.libeasypr.view.EasyPRPreView
android:id="@+id/preSurfaceView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<Button
android:id="@+id/btnShutter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dp"
android:text=" "
android:textSize="16sp"
android:textColor="#FFFFFF"
android:background="@color/colorAccent"/>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="16dp"
android:text=" "/>
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="18dp"
android:layout_below="@+id/title"/>
</RelativeLayout>
manifest 에 카메라 권한 을 추가 하 는 것 을 잊 지 마 세 요app 이 실 행 될 때 자동차 번호판 한정 상자 가 있 고 상자 의 범위 내 에서 이미지 재단 을 하 며 인위적으로 식별 범 위 를 좁 히 고 식별 도 를 높 인 다.
본 라 이브 러 리 기반EasyPR_Android.
효과 그림:
마지막 으로 첨부demo 소스 코드
이상 이 바로 본 고의 모든 내용 입 니 다.여러분 의 학습 에 도움 이 되 고 저 희 를 많이 응원 해 주 셨 으 면 좋 겠 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Kotlin의 기초 - 2부지난 글에서는 Kotlin이 무엇인지, Kotlin의 특징, Kotlin에서 변수 및 데이터 유형을 선언하는 방법과 같은 Kotlin의 기본 개념에 대해 배웠습니다. 유형 변환은 데이터 변수의 한 유형을 다른 데이터...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.