0fd093a2
李进
初始提交:手持车牌核销应用
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package com.ectrip.checkincar.plate;
import android.content.Context;
import com.ectrip.checkincar.core.prefs.AppPrefs;
/** 按设置创建识别引擎:0 模拟 / 1 在线(百度云 REST)/ 2 离线(百度 SDK) */
public final class PlateRecognizerFactory {
private PlateRecognizerFactory() {
}
public static PlateRecognizer create(Context context) {
switch (AppPrefs.getEngine()) {
case AppPrefs.ENGINE_ONLINE:
return new OnlinePlateRecognizer();
case AppPrefs.ENGINE_OFFLINE:
return new BaiduPlateRecognizer(context.getApplicationContext());
case AppPrefs.ENGINE_MOCK:
default:
return new MockPlateRecognizer();
}
}
}
|